Thermostat: on/off vs PID
A thermostat implements temperature regulation with hysteresis or proportional control: heating or cooling runs until the measured temperature crosses a setpoint band, preventing rapid on-off chattering from sensor noise. Simple bang-bang control flips at high and low thresholds; more advanced digital thermostats approximate PID behavior or model predictive schedules. The simulator connects the *control law* to the *thermal inertia* of a room or vessel—capacity, losses to ambient, and actuator power limit how quickly temperature can change. Idealizations often use a first- or second-order thermal model without spatial gradients, assuming a single well-mixed temperature and instantaneous actuator response. Students see why overshoot appears when gain is too aggressive, why deadband saves wear on compressors, and why feed-forward (weather, occupancy) improves comfort in real products.
Who it's for: Introductory control or HVAC students linking household thermostats to feedback concepts taught with the PID and governor simulators.
Key terms
- Setpoint
- Hysteresis
- Bang-bang control
- Deadband
- Thermal inertia
- Heat loss
- Feedback
- Overshoot
How it works
First-order room model: dT/dt = −k(T−T_amb) + P·u with u ∈ [0,1] heater power. On/off control uses hysteresis around the setpoint to avoid chattering. PID smoothly modulates power and usually settles with less overshoot when gains are tuned.
Frequently asked questions
- Why not heat exactly to the setpoint and stop?
- Real sensors lag, and heat keeps flowing after the actuator turns off. Without hysteresis or a modulating valve, the system would chatter—rapidly cycling on and off—which is inefficient and hard on equipment.
- Is this the same mathematics as the PID cart demo?
- Same family of ideas—error-driven feedback—but thermal plants are slow, often dominated by long time constants, so proportional-only or PI loops are common and derivative action must be filtered against sensor noise.
- What does thermal mass change in the plots?
- Larger capacitance slows temperature swings, smoothing disturbances but delaying response. It is analogous to a larger time constant in an RC circuit.
- Do smart thermostats violate these basics?
- They add scheduling, occupancy sensing, and sometimes weather prediction, but the core still closes a loop between measured temperature and actuator commands.
More from Engineering
Other simulators in this category — or see all 18.
Stress–Strain & Hooke’s Law
Qualitative σ–ε curve: elastic Hooke region, yield, strain hardening, necking, and fracture. Drag strain and tune E, σ_y, σ_u.
Quadcopter 2D (Pitch)
Side view: two rotors, PD on thrust split vs pitch — whiteboard quad slice.
Watt Governor (schematic)
Flyballs and sleeve vs RPM; steam throttle gap — speed feedback cartoon.
Logic Gate Simulator
AND, OR, NOT, NAND, XOR. Drag, drop, connect, see output.
Truth Table Generator
Build a circuit, auto-generate the truth table.
Bridge Builder
Place beams and joints. Apply load. See stress distribution.