Active disturbance rejection control (ADRC)
Active disturbance rejection: an extended state observer estimates everything acting on the PV besides the controller (unmodelled dynamics, loads, nonlinearity) as one "total disturbance", and the control law cancels it. It needs little model: the plant's order and a rough gain b₀.
Theory
The idea (Han, then Gao's linear form): write the plant as integrators,
and put everything you don't know or don't want to model into , the total disturbance: the rest of the dynamics, loads, the reaction heat in a reactor, the error in .
The extended state observer (ESO) adds as an extra state and estimates it with the output and its derivatives:
with all observer poles at : .
The law cancels the estimate and closes a simple loop on what is left:
so the plant behaves like integrators under a PD, with poles at .
Three knobs, all with meaning: (how fast), (how quickly disturbances are estimated, 3–10 × ), and (how hard the output pushes, within a factor of two or so). Linear ADRC is a linear controller, a particular two-degree-of-freedom PID with a filter, so the usual margins apply. Its appeal is the tuning: by bandwidth, without a full model.
When it works, and when it breaks
Plants whose dynamics change or aren't well known, but whose order and rough gain are: motion, drives, thermal systems.
Disturbances that act like an extra force or heat: the ESO sees them through their effect and cancels them.
Where you want to tune by bandwidth instead of by Kc, Ti, Td.
A big lag that isn't in its order: an order-1 ADRC on a plant with a slow jacket in the way loses its margins.
Dead time: the ESO sees the effect late, so the cancellation comes late.
b₀ far off, or the wrong sign: too small and it is violent, too large and sluggish.
Noise: a fast observer differentiates it into the output.
Ramps: plain ADRC lags them (add the reference's derivatives as feedforward).
How to tune it
- Order: 1 if the plant looks like an integrator or a first-order lag near the bandwidth you want, 2 if there are two lags (a reactor behind a jacket, a mass on a motor).
- b₀: from a step test, the initial slope per % (order 1) or curvature per % (order 2). Auto-tune here reads it off the frequency response at 4× the bandwidth.
- ω_c: as fast as the dead time and the lags allow; check Ms.
- ω_o: 3–10 × ω_c, limited by noise and the controller cycle.
The tuning rules in the lab
Model-based, one tuning knob: the closed-loop time constant τc. τc = θ gives a fast, still robust loop (Ms ≈ 1.6); larger τc is smoother. The min() on Ti keeps lag-dominant and integrating processes from responding too slowly to load upsets. PID uses the second-order model: Td = τ2 in series form.
The process-industry favourite: choose λ, the closed-loop time constant, and the setpoint response is first-order with no overshoot. Ti = τ cancels the process pole, which makes load rejection slow on lag-dominant processes. λ = 1–3 × τ is typical for robustness.
Internal model control worked back into a PID (Rivera, Morari and Skogestad, 1986): the controller that makes the loop a first-order λ response, with the dead time replaced by its first-order Padé approximation. That approximation is what gives the derivative, and why Ti = τ + θ/2 rather than τ. Keep λ above about 0.8θ for the PID and 1.7θ for the PI, where the approximation stops holding. Like Lambda, it cancels the process lag, so load upsets on lag-dominant processes recover slowly. The IMC structure itself (the model running beside the plant) is the Smith predictor on the bench.
For integrating processes such as levels, from the ramp rate k′ (% of span per second, per % of output). λ is the arrest time: how long the level keeps moving after an inflow upset. For a step upset Δ (in % of output) the level swings about k′·Δ·λ/e before it turns round, so choose λ from the room the tank has. A long λ lets the tank absorb the upset and keeps the outflow smooth: averaging level control. P-only: Kc = 1/(k′λ), which leaves an offset that is harmless in a buffer.
The 1942 rules, aiming for a quarter-amplitude decay. Aggressive: Ms is often above 2, so the loop rings and is sensitive to model error. Worth knowing because so many loops in the field were tuned this way.
Like Ziegler–Nichols but corrected for dead time, so it copes better when θ/τ is large. Also aimed at quarter-amplitude decay, so also aggressive.
Derived by optimizing load rejection with a robustness limit (Ms ≈ 1.4) over a large test batch of processes. A safe modern default when you have no reason to choose a speed.
How to implement it
- Discretize the ESO for the cycle (exactly, as here, or by Euler at a fast cycle).
- Feed the observer the output actually applied (after the limits): that is the anti-windup.
- Bumpless: in manual, set , derivatives to 0 and .
- Trend : it is a free estimate of everything acting on the process (on the reactor it moves with the reaction heat).
Siemens and elsewhere
- No standard ADRC block in TIA Portal: the exported LL_Adrc is a small SCL FB (an observer of n + 1 states and a gain row).
- Motion libraries and some drives have disturbance observers of the same family (load torque estimation); there they are a parameter, not code.
- ADRC is used in motion control, power electronics and some process applications; it is common in recent academic and Asian industrial work.
- It belongs with disturbance observers (DOB) and internal model control: estimate what is acting, and cancel it.
Interactive Controller Sandbox
Test and tune Active disturbance rejection control (ADRC) live on a process, benchmark against baseline PI, and inspect the resulting code.
Closed-Loop Response: ADRC vs Baseline PI
Simulating…// Loop Lab export: Exothermic batch reactor, TIC-1001
// TIA Portal SCL (S7-1200 / S7-1500). Generated code: review before use on a real plant.
FUNCTION_BLOCK "LL_Adrc"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
// Order 2: z[0] the output, z[1] its rate, z[2] the total disturbance f.
VAR_INPUT
Setpoint : Real; // °C
Input : Real; // TT-1001, °C
ManualEnable : Bool;
ManualValue : Real; // %
END_VAR
VAR_OUTPUT
Output : Real; // %
Disturbance : Real; // the estimated total disturbance, as the output it takes to cancel it (%)
END_VAR
VAR
// Observer: z <- Phi*z + Gam*[last output, measurement] (ω_o 0.016 rad/s, discretized for 2.0 s).
Phi : Array[0..2, 0..2] of LReal := [0.9070180362, 1.906020954, 1.937013164,
-0.001471758098, 0.998507042, 1.998997585,
-7.807061826E-6, -7.93400592E-6, 0.9999946681];
Gam : Array[0..2, 0..1] of LReal := [6.120961599E-5, 0.0929819638,
6.31683237E-5, 0.001471758098,
-1.684888061E-10, 7.807061826E-6];
// Law: Output = Cz*z + Dr*r, i.e. (kp*(r - z0) - kd*z1 - f) / b0 with ω_c 0.0054 rad/s, b0 3.16E-5.
Cz : Array[0..2] of LReal := [-0.9227848101, -341.7721519, -31645.56962];
Dr : LReal := 0.9227848101;
B0 : LReal := 3.16E-5;
Z : Array[0..2] of LReal;
ZNew : Array[0..2] of LReal;
ULast : LReal;
Started : Bool;
END_VAR
VAR_TEMP
i : Int;
j : Int;
y : LReal;
r : LReal;
u : LReal;
END_VAR
BEGIN
#y := (#Input - 0.0) / 150.0 * 100.0;
#r := (#Setpoint - 0.0) / 150.0 * 100.0;
IF #ManualEnable OR NOT #Started THEN
// At rest: the output where it is, nothing changing, f = -b0 * the output that holds it.
FOR #i := 0 TO 2 DO
#Z[#i] := 0.0;
END_FOR;
#Z[0] := #y;
#Z[2] := -#B0 * #ManualValue;
#u := #ManualValue;
#Started := TRUE;
ELSE
FOR #i := 0 TO 2 DO
#ZNew[#i] := #Gam[#i, 0] * #ULast + #Gam[#i, 1] * #y;
FOR #j := 0 TO 2 DO
#ZNew[#i] := #ZNew[#i] + #Phi[#i, #j] * #Z[#j];
END_FOR;
END_FOR;
#u := #Dr * #r;
FOR #i := 0 TO 2 DO
#Z[#i] := #ZNew[#i];
#u := #u + #Cz[#i] * #Z[#i];
END_FOR;
END_IF;
#Output := LREAL_TO_REAL(LIMIT(MN := 0.0, IN := #u, MX := 100.0));
#ULast := #Output; // the observer needs what was really applied: no windup
#Disturbance := LREAL_TO_REAL(-#Z[2] / #B0);
END_FUNCTION_BLOCK
// OB30 "Cyclic interrupt", cycle time 2.0 s (2000 ms).
// "TT-1001" is the scaled input (NORM_X/SCALE_X from the analog card), "TY-1001" the output to scale back to 0-27648.
// ADRC: the observer and the law in one block, called every cycle (in manual too: it tracks).
"TIC_1001_DB"(Setpoint := "SP", Input := "TT-1001", ManualEnable := "Manual", ManualValue := "ManualOut");
"TY-1001" := "TIC_1001_DB".Output;
// "TIC_1001_DB".Disturbance is what it is cancelling: trend it. On a batch reactor it follows the reaction heat.