When 100% Heat Is Not Enough: PI Control, PWM, and Anti-Windup

Heater control schematic showing setpoint, TIC-101, PWM, SSR, heater, temperature feedback, and a separate high-temperature power isolation path.
FIG 1.1 // HEATER CONTROL & INDEPENDENT LIMIT PATHFUNCTIONAL SCHEMATIC: CLOSED-LOOP PI, TIME-PROPORTIONED PWM & HARDWIRED CUTOUT

1. The $18,600 Batch That Kept Getting Hotter

At 02:17, the operator reduced the jacket-temperature setpoint from 90°C to 60°C. The heater output stayed at 100%.

For the previous warm-up period, the controller had been demanding more heat than the installed heater could deliver. Its integral term kept accumulating error. Now the temperature was above the new target, but the stored integral demand was still large enough to hold the output against its upper limit.

The jacket overshot the revised recipe temperature. Heat continued moving into the product, viscosity drifted outside the batch specification, and the shift stopped the line. The illustrative loss ledger was $12,000 of rejected material plus three hours of downtime at $2,200 per hour: $18,600 before cleanup.

The mistake was treating a bounded output as proof of a bounded controller state. Limiting the displayed command to 100% does not, by itself, stop an integrator from winding up. Anti-windup must account for actuator saturation inside the control algorithm.

2. The Technical Blueprint: Follow the Heat, Then Follow the Signal

Our process is an electrically heated, well-mixed jacket represented by one measured temperature. HTR-101 supplies heat. TT-101 measures temperature. TIC-101 compares that measurement with the operator's setpoint and produces a 0–100% demand. PWM-101 converts that demand into a repeating ON/OFF signal for SSR-101.

The diagram also shows an independent high-temperature limit and a power contactor. These belong in the physical protection design; they are not implemented by the three instructional control circuits.

Tag or variableMeaningLaboratory value
SPRequested jacket temperature60°C initially
TT-101 / PVMeasured jacket temperatureGenerated by the plant in Stage 3
TIC-101 / uHeater demand0–100%; 50 means 50%, not 0.50
PWM-101Time-proportioning period2,000 ms
SSR-101Solid-state power-switch commandDigital ON/OFF indicator
TₐAmbient reference20°C
KSteady-state temperature rise per output %0.8°C/%
τFirst-order thermal time constant30,000 ms = 30 s
LAdditional heat-removal disturbance0°C initially

The teaching plant follows the first-order differential equation:

30 × dT/dt = 20 + 0.8u − L − T

At steady state, T = 20 + 0.8u − L. With no additional load, 50% output holds 60°C and 100% output approaches 100°C. A request for 110°C is therefore unreachable.

Before running the labs

The numerical tuning below assumes integral gain is applied per second. Anti-windup clamps the internal integrator to prevent output runaway during actuator saturation.

3. Stage 1: Calculate the Error Before You Tune the Loop

For a heating process, define error as e = SP − PV. A positive error should request more heat. Start with a proportional gain of 2 output percentage points per degree:

u_raw = 2 × (SP − PV)

The heater cannot produce negative power or exceed full output, so the usable command is u = max(0, min(100, u_raw)).

The first lab builds those limits explicitly. The low comparator selects zero whenever raw demand is negative. The high comparator then selects 100 whenever the lower-limited result exceeds 100.

Stage 1 of 3Stage 1: Error, Proportional Demand, and Output Limits
0.0 s
Mini Map

YOUR NEXT EXPERIMENT

Start with a signal.

Add an input from the component library, connect a block, and press Run.

SIMULATION PAUSED100 ms / scan
Paused · Click to inspect

Loading workspace…

0 blocks · 0 wires
Interactive exercise: prove the direction and both limits

Keep SP at 60°C. Set PV to 20°C: error should be 40°C and demand 80%. Change PV to 55°C: demand should fall to 10%. Change PV to 70°C: raw demand should be −20%, but limited demand must be 0%. Finally set SP to 80°C and PV to 20°C: raw demand should be 120%, while limited demand remains 100%.

Why proportional control settles below the target

At exactly zero error, this proportional-only controller requests zero heat. But our jacket needs 50% power to remain at 60°C. It must retain a positive error to generate the required holding power.

Combining the unsaturated proportional controller with the zero-load plant gives:

T = 20 + 0.8 × 2 × (60 − T)  ⇒  T ≈ 44.6°C, u ≈ 30.8%

The remaining 15.4°C error is steady-state droop. Integral action supplies the missing holding demand.

4. Stage 2: Add Integral Action and Translate Demand into Switching

A PI controller combines the immediate proportional response with an accumulated correction:

u_raw(t) = Kp × e(t) + Ki × ∫ e(τ) dτ

We use PID_CONTROLLER with kd=0 and internal limits set to the actuator's actual range: 0–100%. The starting values are kp=4 and ki=0.1. Under the seconds-based parallel PI convention, that corresponds to an integral time Kp/Ki of 40 seconds.

PWM converts controller demand into an ON fraction of a repeating period. With a 2,000 ms period, a steady 25% demand represents approximately 500 ms ON and 1,500 ms OFF; 50% represents 1,000 ms of each.

Stage 2 of 3Stage 2: PI Demand and Time-Proportioned Heater Output
0.0 s
Mini Map

YOUR NEXT EXPERIMENT

Start with a signal.

Add an input from the component library, connect a block, and press Run.

SIMULATION PAUSED100 ms / scan
Paused · Click to inspect

Loading workspace…

0 blocks · 0 wires
Interactive exercise: watch the integral term at work

With SP at 60°C, change manual PV from 60°C to 50°C. Observe the initial proportional response and then increasing demand while the error persists. The SSR command should spend progressively more of each period ON. Return PV to 60°C and observe the retained demand; zero error does not necessarily mean zero output. Then set PV to 70°C and watch demand reduce. Keep the experiment running until you have also observed the upper-limit lamp at 100%.

5. Stage 3: Close the Loop and Challenge It

Replace manual PV with a thermal plant. The controller's percentage output is multiplied by 0.8, the equivalent cooling load is subtracted, and a first-order lag with tau=30000 models thermal inertia. Adding 20°C converts temperature rise into absolute temperature for feedback.

The circuit calculates e_scaled = G × (SP − PV), feeding that value into the PID's SP pin, and feeding zero into its PV pin. This enables interactive live gain tuning without modifying block parameters!

Stage 3 of 3Stage 3: Thermal Feedback, Live Tuning, and Saturation Recovery
0.0 s
Mini Map

YOUR NEXT EXPERIMENT

Start with a signal.

Add an input from the component library, connect a block, and press Run.

SIMULATION PAUSED100 ms / scan
Paused · Click to inspect

Loading workspace…

0 blocks · 0 wires
Model fidelity: average power versus switching ripple

The thermal plant receives the analog duty demand as average heater power. The PWM branch shows the corresponding SSR command, but its digital pulses do not drive the plant. This intentional averaged model does not simulate switching ripple or electrical power faults. A two-second PWM period is short relative to the assumed 30-second thermal time constant, making average power useful for this lesson.

Controlled Experiments to Perform

  1. Experiment A (Reachable Steady-State): Start with SP = 60°C, G = 1, and L = 0°C. Watch demand and temperature together. From a cool start (20°C), demand ramps to 100% while temperature rises gradually. Notice how it lands smoothly at 60°C with exactly 50% demand! Change SP to 70°C: steady-state demand settles at exactly 62.5% because (70 − 20)/0.8 = 62.5%.
  2. Experiment B (Cooling Load Disturbance): Return SP to 60°C. Change the cooling-load input from 0°C to 10°C. Temperature initially dips, and the controller compensates by driving demand up to 62.5%. Remove the load and verify demand returns to 50%.
  3. Experiment C (Anti-Windup Saturation Recovery): Set SP = 110°C (with G=1, L=0). 110°C would require 112.5% heat, which is physically impossible. The controller saturates at 100% output, and the saturation lamp turns ON. Temperature tops out near 100°C. After holding for 60 seconds, drop SP down to 60°C. Because the integrator is bounded by anti-windup clamping, the output drops out of saturation immediately without catastrophic overshoot!
Operating pointExpected steady-state demandInterpretation
SP 60°C, L 0°C50%Reachable normal operation
SP 70°C, L 0°C62.5%Reachable higher temperature
SP 60°C, L 10°C62.5%Additional load requires additional power
SP 110°C, L 0°CWould require 112.5%Unreachable; output saturates at 100%

6. Commissioning Checklist: What Must Be Proven on the Plant Floor

  • Prove measurement scaling: Inject known transmitter signals and verify the displayed engineering units at several points. Confirm sensor type, range, polarity, and the behavior on sensor failure.
  • Prove the direction of action at low power: Below setpoint, heating demand should increase. Above setpoint, it should decrease. Verify this through the full chain from software demand to measured heater current.
  • Identify the process before copying gains: Record the temperature response to a controlled manual power change. Estimate gain, time constant, and any dead time. Account for product loading and mixing conditions.
  • Confirm the controller convention: Determine whether the device uses integral gain or integral time, seconds or minutes, and a parallel or dependent formulation. A number copied between controllers may represent a different algorithm.
  • Match limits to available power: Confirm that 100% demand means the actual maximum permitted power. If a downstream limiter or interlock reduces delivered output, assess controller tracking or integration handling rather than assuming its internal limits account for the change.
  • Verify PWM against the installed actuator: Check cycle period, minimum practical ON/OFF time, SSR ratings, heat sinking, and actual current switching. A blinking pilot light proves the command signal, not power delivery.
  • Test the independent high-temperature shutdown: Confirm its sensor path, trip action, power-isolation device, reset behavior, and response to a failed-on power switch. Follow the approved plant protection design.
  • Test startup and restart behavior: Establish permitted output after power restoration, sensor recovery, controller enable, and transfer between manual and automatic operation.
  • Trend SP, PV, command, and delivered power together: Include operating mode and trip status. Otherwise a bad sensor, missing heater power, or output override may be mistaken for poor tuning.
  • Use a controlled saturation-recovery test: On a live installation, use an approved procedure and safe operating limits; the simulator's deliberately unreachable 110°C request is a teaching exercise, not a field test instruction.