Thermocouple
Heater OFF
Parameters
Temperature Over Time
Heater State (on/off cycling)
How It Works
A thermocouple measures temperature by the voltage between two different metals joined at a sensing tip. Here, it reads the room temperature continuously while a bang-bang controller decides when to heat.
The Petri net has just 3 places and 4 transitions:
- temperature place — token count = current degrees
- heater_on / heater_off — mutual exclusion via a single token
- heat transition (rate-based) — adds tokens to temperature when heater is on
- cool transition (rate-based) — removes tokens proportional to current temperature
- turn_on / turn_off — toggle heater based on temperature vs target
The ODE solver predicts the exact time the room reaches the target, the overshoot from delayed shutoff, and the equilibrium duty cycle. Adjust the heating and cooling rates to see how insulation (low cooling rate) and heater power (high heating rate) change the predictions.
dT/dt = heat_rate · heater_on − cool_rate · T
Equilibrium = heat_rate / cool_rate (heater always on)