Thermostats, PI and heating limits
A heater makes three ideas tangible: a system stores energy, holding a target requires continued input, and an actuator cannot do everything a controller asks.
THE SHORT ANSWER
Temperature control here rests on a one-temperature energy balance, C·dT/dt = u − H(T − Ta), with a heater that can only supply 0 ≤ u ≤ Pmax. Holding a target r needs the steady power H(r − Ta), so only temperatures from Ta up to Ta + Pmax/H can be maintained, whatever the gains. A thermostat switches between 0 and Pmax with hysteresis, while PI control builds the holding power through its integral.
Use an energy balance to test whether a target temperature is reachable before tuning PI gains.
PID limits matter when an actuator cannot deliver the requested input. A one-way heater is a clear example.
Review the previous lesson: Tuning PID controllers: Ziegler–Nichols and what to do afterwardsFirst, picture it
A cup warms slowly because its temperature changes only after energy enters. At 60 °C in a 20 °C room, heat still leaves the cup. Reaching the target does not mean the heater can stay off forever.
Build the idea step by step
Heat capacity tells us how much energy is needed to raise temperature by one degree. Heat loss grows with the difference between the body and room temperatures. Subtract heat loss from heater power: the remainder changes stored energy and therefore temperature. This one-temperature model treats the whole body as equally warm. PI control can supply the steady power needed to balance heat loss, but cannot supply more power than the heater has.
Read the equations
Heater power raises temperature; heat loss to ambient lowers it. The heater cannot supply negative power.
What the symbols mean
- thermal capacity, in joules per kelvin
- body temperature, in degrees Celsius for temperature differences
- ambient temperature, in degrees Celsius
- heat-loss coefficient, in watts per kelvin
- applied heater power, in watts
- maximum heater power, watts
- temperature change per second
Power is in watts, heat capacity in joules per kelvin, and heat-loss coefficient in watts per kelvin. A temperature difference has the same numerical value in kelvin and Celsius. This heater can add heat but cannot actively cool below room temperature.
Can this heater hold 60 degrees?
Let ambient temperature be 20 degrees Celsius and heat-loss coefficient be 5 watts per kelvin. The target is 60 degrees Celsius.
At a steady temperature, heater power must equal heat loss: 200 watts.
A 150 watt heater cannot hold that target in this model, whatever PI gains we choose. A 400 watt heater can, though its response speed depends on thermal capacity and control settings.
More detail and model assumptions
Start with energy, not a tuning knob
Over a short interval, input energy minus heat lost to the room equals C times the temperature change. Dividing by the interval gives the differential equation. If the heater supplies 400 W while loss is 100 W, net heating is 300 W. With C = 1000 J/K the instantaneous warming rate is 0.3 K/s. As the temperature rises, loss rises and the warming rate slows even with unchanged input.
For constant ambient and constant applied power, T(t) = Ta + u/H + (T0−Ta−u/H) exp(−t/τ). After one τ, 63.2% of the distance from the initial temperature to equilibrium has been covered. Larger C slows both heating and cooling. Larger H speeds the passive time scale but lowers the maximum warm equilibrium at the same heater power. Faster is not automatically better.
A thermostat remembers whether it was on
With an ON-OFF actuator, the available commands are 0 and Pmax. A hysteresis band of total width b turns heating on when T ≤ r−b/2 and off when T ≥ r+b/2. Between the thresholds it retains its previous state. That memory distinguishes hysteresis from merely comparing temperature to a single threshold. This lab starts OFF if the initial temperature is inside the band.
Under the thermostat preset, zero power cools near the target while full power heats, so switching repeats. Widening the band trades temperature variation for fewer transitions. It cannot guarantee that every temperature stays inside the band: sampled decisions occur every 1 s, and the body moves between them. Delay, noise and heater residual heat would change the result in real hardware, but are deliberately absent here. Transition counts refer to this fixed sampling period and finite run.
PI supplies a steady power even when P disappears
The lab uses urequest = Kp(r−T) + I and accumulates I from Ki(r−T) at 1 s intervals. There is no feedforward bias. At a settled reachable target, P can approach zero while I approaches H(r−Ta). Integral action is therefore not just a way to make startup faster; it builds the output needed to cancel a sustained loss. With Ki = 0 and no clipping at equilibrium, Kp(r−T) = H(T−Ta), so T = (Kp·r + H·Ta)/(Kp + H). For r = 60, Ta = 20, Kp = 20, H = 5 this gives 52 °C.
Compare P-only and PI with identical C, H, initial temperature and events. Then compare PI with the thermostat. The ideal PI actuator can apply an intermediate 200 W directly; a physical relay cannot. Its implementation may need time-proportioning, a power electronic driver and switching constraints. A smooth simulated PI trace does not prove that a real relay can reproduce it.
Check reachability before increasing gains
Steady temperature requires u = H(r−Ta). With 0 ≤ u ≤ Pmax, maintainable equilibria span Ta to Ta + Pmax/H. The endpoints are approached asymptotically from a different initial temperature; they are not necessarily reached in finite time. A target above the upper limit needs more heater power or less heat loss. A target below ambient needs a cooling mechanism. No PI setting removes these physical restrictions.
In the windup preset, 100 °C is impossible with a 200 W heater and H = 5 at Ta = 20. At 300 s the target becomes 40 °C. Without anti-windup, I has accumulated the impossible demand and may keep applied power high after the step down. Compare the I trace and requested versus applied power, not temperature alone. Conditional integration blocks increments that worsen clipping while allowing I to unwind; it is not an instant reset or a new actuator.
Cooling, ambient steps and fair comparisons
With u = 0 and constant ambient, temperature approaches Ta with τ = C/H. Raising Kp cannot improve the initial passive cooling while the output is already at its lower limit. The Passive cooling preset demonstrates this. An ambient step is a persistent environmental change: the new Ta is used from the event time until the end. Unlike an impulse, it changes both heat flow and the set of maintainable temperatures.
Pin one baseline, change one parameter and use the same replay time. Keep duration matched when comparing whole-run energy, time within ±1 °C and switching counts. A warmer final state contains more stored energy, so lower electricity use alone does not establish better control or efficiency. The energy plot separates supplied energy, net ambient loss and stored change; C(T−T0) = supplied − net loss.
Connect the example to the lab
C = 1000 J/K and H = 5 W/K give τ = 200 s. Holding 60 °C at Ta = 20 °C needs 200 W. A 400 W heater can do this; a 150 W heater cannot, regardless of PI gains.
Compare thermostat and PI controlMake a prediction before moving a control.
- PREDICTAfter an impossible 100 °C demand, will the heater turn off immediately when the target becomes 40 °C?
- CHANGE ONE THINGOpen A target beyond heater power. Pin anti-windup ON, then change only that switch to OFF and pin again.
- OBSERVESeek to 300 s and compare integral contribution, requested/applied power and subsequent temperature. Keep initial state and event matched.
- EXPLAINCalculate the maintainable range first, then explain stored integral demand and why cooling is limited even when heating stops.
Turning a heater off removes positive input; it does not create negative input. Thermal inertia is not the same as transport delay, and this ideal body has neither sensor lag nor residual heat stored in a separate heater.
Check your understanding+
At zero temperature error, why may a PI heater still need nonzero power?
The body still loses H(T−Ta) watts. P is zero at zero error, but I can retain the power needed to balance that loss, if the target is maintainable and the loop has converged.Solve these before opening the solutions
Work each problem on paper first. Open the answer to check yours, then the full solution if you need the steps, and mark how it went.
A body has thermal capacity C = 2400 J/K and heat-loss coefficient H = 8 W/K in an 18 °C room. Its heater delivers 0 to 600 W. Find the passive time constant, the highest temperature the heater can maintain, and the power needed to hold 50 °C.
Show answer
Answerτ = 300 s. The heater can maintain at most 93 °C, approached only asymptotically. Holding 50 °C needs 256 W.
Show full solution
Solution
Passive time constant.
At a steady temperature heater power equals heat loss. Full power gives the upper end of the reachable range.
Power to hold 50 °C.
The maintainable range is 18 to 93 °C. A target outside it cannot be held by any choice of PI gains.
The same body (C = 2400 J/K, H = 8 W/K, Ta = 18 °C) starts at room temperature, and the heater is switched to a constant 400 W. Find the initial warming rate, the temperature it approaches and the time it takes to reach 50 °C.
Show answer
AnswerIt starts warming at about 0.167 K/s and approaches 68 °C. It reaches 50 °C after about 306 s, roughly one time constant.
Show full solution
Solution
At the start there is no heat loss, so all 400 W raises the temperature.
The equilibrium is where the loss equals the input.
Use the constant-input solution with T₀ = Ta.
At the initial rate, 32 K would take 192 s. The real time is longer because the loss grows as the body warms.
Hold the same body at r = 50 °C. (a) With P-only control u = Kp(r − T), Kp = 24 W/K, find the steady temperature and power. (b) With PI control, what steady power does the integral supply? (c) The target is changed to 100 °C. What temperature does the PI loop approach, and how fast does an unprotected integral grow with Ki = 0.2 W/(K·s)?
Show answer
Answer(a) 42 °C with 192 W, an error of 8 K. (b) 256 W, all from the integral, with zero error. (c) 100 °C is above the 93 °C limit: the heater saturates at 600 W and the body approaches 93 °C. The error approaches 7 K, so without anti-windup the integral keeps rising at about 1.4 W/s.
Show full solution
Solution
Steady P-only balance from the lecture.
Check the energy balance: the loss at 42 °C is also 192 W.
With PI the steady error is zero, so the P term is zero and the integral holds the power that the loss requires.
For 100 °C the required 656 W exceeds 600 W. At full power the body approaches 93 °C, leaving 7 K of error that the integral keeps accumulating.
Exam level. The same body is controlled by an ON–OFF thermostat at r = 50 °C with a total hysteresis band of 4 K: full 600 W when T ≤ 48 °C, off when T ≥ 52 °C, and unchanged in between. Ignoring sampling and delay, find the heating time, the cooling time, the period of the steady cycle and the average power. Compare the average with the PI holding power.
Show answer
AnswerHeating from 48 to 52 °C takes about 27.9 s and cooling back takes about 37.5 s, so the period is about 65.5 s. The heater is on about 42.7% of the time, an average of about 256 W, practically the 256 W that PI supplies continuously.
Show full solution
Solution
While heating, T moves toward 93 °C with τ = 300 s.
While off, T moves toward 18 °C.
Period, duty and average power.
Over a cycle the average power balances the mean heat loss, which is close to H(50 − 18) because the temperature swings almost symmetrically around 50 °C. The thermostat gets the same average by switching, at the cost of a ±2 K ripple; with 1 s sampling the real swing can overshoot the band slightly.
Mark each exercise after you check your answer. Marks stay in this browser.
Terms this lecture teaches
- PI controlPI 제어
- hysteresis히스테리시스
- anti-windup안티와인드업
- on-off controlON-OFF 제어
- first-order system1차 시스템
- integrator windup적분 와인드업
- PID tuningPID 동조
- time constant시정수
Frequently asked questions
How do I know whether a heater can reach a target temperature?
At a steady temperature r the heater must replace the heat lost, u = H(r − Ta). If that exceeds Pmax, no controller can hold r. With H = 5 W/K and a 20 °C room, holding 60 °C needs 200 W, so a 150 W heater cannot do it.
Why does a P-only temperature controller settle below the target?
At equilibrium the heater power Kp(r − T) must equal the loss H(T − Ta), which needs a nonzero error. Solving gives T = (Kp·r + H·Ta)/(Kp + H); with r = 60 °C, Ta = 20 °C, Kp = 20 W/K and H = 5 W/K it settles at 52 °C. Integral action removes this offset by holding the power itself.
What is the thermal time constant and what does it tell me?
For this one-temperature model τ = C/H. With constant power and ambient temperature, the body covers about 63.2% of the distance to its new equilibrium in one τ. Larger C slows both heating and cooling; larger H speeds the passive response but lowers the highest temperature a given heater can hold.
Why does a thermostat keep the temperature cycling around the target?
An on–off heater can apply only 0 or Pmax, and neither balances the heat loss at the target, so the temperature keeps moving. Hysteresis turns heating on at or below r − b/2, off at or above r + b/2, and keeps the previous state in between. A wider band gives fewer switching events but a larger temperature swing.
Can a stronger PI controller cool the body faster?
No, because this heater cannot supply negative power. Once the output is at 0 W, passive cooling toward Ta with time constant C/H is the fastest possible, and raising Kp changes nothing until the heater turns on again.
Why the next lesson follows
Classical input-output models have limits when several states and sensors matter. We return to state-space models to design feedback and estimation.
Finished the reading and the exercises? Mark the lecture as done to tick it on the syllabus. Progress stays in this browser.
EIGENROOM · https://eigenroom.com/theory/thermal-control · Updated 2026-11-15