PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Engineering

Other simulators in this category — or see all 45.

View category →
NewUniversity / research

Euler Column Buckling

Elastic column stability with P_cr = π²EI/(KL)²: choose end conditions, effective length factor K, first mode shape, and load ratio P/P_cr.

Launch Simulator
NewSchool

Mohr Circle & Stress Transformation

Plane stress σx, σy, τxy: Mohr circle, transformed stresses on a rotated element, principal stresses, τmax, and θp.

Launch Simulator
NewUniversity / research

Fracture Mechanics: Griffith / K_IC

Mode-I crack: K_I = Yσ√(πa), compare with K_IC, critical crack size, critical stress, and safe/unstable crack growth.

Launch Simulator
NewSchool

Thin-Walled Pressure Vessel Stress

Cylinder vs sphere membrane stresses: hoop σθ, longitudinal σz, von Mises stress, r/t thin-wall check, and yield safety factor.

Launch Simulator
NewUniversity / research

Jeffcott Rotor Critical Speed

Single disk on a flexible shaft: ω_n = √(k/m), unbalance response, whirl orbit, phase lag, and critical-speed crossing.

Launch Simulator
NewSchool

Beam Deflection: Unit Load Method

Simply supported Euler-Bernoulli beam with point load P and UDL w: closed-form deflection vs virtual-work unit-load integral.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Engineering/Thermostat: on/off vs PID

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

Plant & control

22 °C
18 °C
0.12 1/s
2.8 °C/s at u=1
0.35 °C

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.