Industrial Furnace Temperature Control with PID
This article is available in English only.
The Engineering Challenge
A heat treatment furnace for steel parts must hold temperature at exactly 850°C during a 45-minute soak phase. Too cold: incomplete austenization. Too hot: grain growth and reduced toughness. The acceptable band is ±5°C.
The furnace heating element is rated at 15 kW. A PT100 sensor provides temperature feedback. A thyristor power controller accepts a 0-100% setpoint. Simple on-off control oscillates too much. A properly tuned PID controller achieves this tight specification.
This is the canonical PID problem, and it's exactly the kind of system Twinsys was built to simulate.
Building the Plant Model
Before tuning a controller, we need a model of the plant (the furnace). From basic heat transfer, a furnace can be approximated as a first-order system with dead time (FOPDT):
K · e^(-θs)
G(s) = ─────────────────
τs + 1
K = Process gain (e.g. 10 °C/%)
τ = Time constant (e.g. 200 s)
θ = Dead time (e.g. 30 s)
In Twinsys, the FOPDT model is built using a Transfer Function block followed by a Transport Delay block:
┌───────────┐ ┌────────────────┐ ┌──────────────┐ ┌───────────┐
│ Step │ u(t) │ Transfer Func. │ │ Transport │ y(t) │ Scope │
│ heater ├───────►│ 10 ├───────►│ Delay 30 s ├───────►│ (open │
│ 0 → 50 % │ │ ────────── │ │ │ │ loop) │
└───────────┘ │ 200s + 1 │ └──────────────┘ └───────────┘
└────────────────┘
Closing the Loop: Full PID System
The complete closed-loop system in Twinsys looks like this:
setpoint measured
r(t) temp y(t)
│ │
▼ │
┌──────────┐ e(t) ┌────────┐ u(t) ┌────────────┐
│ Sum (-) │ ─────► │ PID │ ─────► │ Furnace │
│ │ │ │ │ Plant │
└────┬────┘ └────────┘ └──────┬─────┘
└──────────────────────────────┘
feedback (y)
Blocks used: Step (setpoint), Sum (error), PID Controller, Transfer Function (plant), Transport Delay (dead time), Scope (monitoring).
Ziegler-Nichols Tuning
For our FOPDT furnace (K=10, τ=200s, θ=30s), the Ziegler-Nichols step-response method gives:
R = K / τ = 10/200 = 0.05 (reaction rate)
L = θ = 30s (apparent dead time)
Kp = 1.2 / (R · L) = 1.2 / (0.05 × 30) = 0.8
Ti = 2L = 60s → Ki = Kp/Ti = 0.0133
Td = 0.5L = 15s → Kd = Kp×Td = 12
Enter these values into the Twinsys PID block: Kp=0.8, Ki=0.0133, Kd=12.
Simulation Results
Running the simulation from cold start (20°C) to setpoint (850°C), with the PID output limited to 0–100% and a Constant block adding the 20°C room temperature to the plant output:
Temperature (°C)
900 |
| ───────────────────── ← small overshoot ~856°C
850 |──────────────────────────────── ← setpoint
| /
700 | /
| /
500 | /
| /
300 | /
| /
20 |/
─────────────────────────────── Time (s)
0 200 400 600
Rise time: ~260s (10% → 90%)
Overshoot: ~0.7% (856 vs 850°C)
Settling: ~460s (±5°C band)
The system settles comfortably within ±5°C after approximately 460 seconds.
The Integrator Windup Problem
With a physical furnace, the power controller is clamped between 0% and 100%. During the initial ramp-up, the error is large and the PID integrator accumulates a very large value. When the temperature approaches setpoint, this accumulated integral causes overshoot — sometimes dramatically.
This is called integrator windup. The fix is anti-windup: clamp the integrator output to match the actuator limits.
Twinsys's PID block has anti-windup built in: when the output reaches OutputMin or OutputMax, the integrator stops accumulating. Set the limits to [0, 100]. To see what windup costs, open the PID limits wide and clamp its output with a separate Saturation block instead:
| Setting | Overshoot | Settling Time |
|---|---|---|
| No anti-windup | ~20% (1018°C) | ~1460s |
| With anti-windup | ~0.7% (856°C) | ~460s |
Disturbance Rejection
A real furnace faces disturbances: opening the door drops temperature by 30°C in seconds. We can simulate this in Twinsys by adding a Step block as a disturbance (a negative step of -30 at t=800s) summed into the measured temperature at the plant output.
With Kp=0.8, Ki=0.0133, Kd=12, the temperature is back within ±5°C about 60 seconds after a -30°C door-open disturbance. Increasing Ki to 0.02 does not bring it back sooner: it overshoots to about 859°C — outside the ±5°C band — and takes about 140 seconds to settle.
Derivative Filtering
The derivative term amplifies high-frequency noise. If your temperature sensor has electrical noise, the raw derivative term will cause the heating element to rapidly switch on and off — shortening its lifespan.
Twinsys's PID block differentiates the raw error; it has no built-in derivative filter. The simplest remedy is a first-order Transfer Function on the measured temperature, which smooths the input to all three terms. To filter only the derivative, set Kd = 0 in the PID block and build that path yourself — Derivative block → Gain Kd → first-order Transfer Function 1/((Td/N)·s + 1), where Td = Kd/Kp — and add it to the PID output. Together they form the classic filtered derivative:
Ds(s) = Kd · s / ((Td/N)·s + 1), Td = Kd/Kp
Lower N → more filtering → slower derivative response
Higher N → less filtering → noisier but faster
For industrial furnaces with PT100 sensors and good signal conditioning, N=10 to N=20 is a good starting point. With Td = 15 s that is a filter time constant of 1.5 s down to 0.75 s: a Transfer Function denominator of 1.5 1 to 0.75 1.
Real-World Considerations
The simulation captures the dominant dynamics, but real commissioning adds complexity:
Thermal mass changes: Loading cold steel parts into the furnace adds significant thermal mass, changing the effective time constant. Adapt the model by measuring step responses under loaded conditions.
Sensor lag: A PT100 sensor inside a thermowell has its own thermal lag (~15-30s). Include this as a first-order lag on the feedback path in Twinsys.
Gain scheduling: At low temperatures, the furnace gains differently than at high temperatures. Twinsys's Switch block can implement a two-regime PID that switches at a defined threshold.
Conclusion
This furnace example illustrates the full PID design cycle: plant modeling, Z-N tuning, closed-loop simulation, anti-windup, and disturbance analysis — all before touching real hardware.
Twinsys's combination of Transfer Function blocks, PID controllers, and real-time Scope monitoring makes this kind of analysis fast and visual. Change a parameter, run again and compare the responses on the Scope: a fast way to develop engineering intuition.
Next: try varying the dead time from 30s to 90s and observe how it affects the Z-N tuned response. This sensitivity analysis reveals why dead time is the "enemy" of PID control.