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 nn integrators,

y(n)=b0 u+f,y^{(n)} = b_0\,u + f,

and put everything you don't know or don't want to model into ff, the total disturbance: the rest of the dynamics, loads, the reaction heat in a reactor, the error in b0b_0.

The extended state observer (ESO) adds ff as an extra state and estimates it with the output and its derivatives:

z˙=[01⋱10]z+[0b00]u+L (y−z1),\dot z = \begin{bmatrix}0 & 1 & \\ & \ddots & 1\\ & & 0\end{bmatrix} z + \begin{bmatrix}0\\ b_0\\ 0\end{bmatrix} u + L\,(y - z_1),

with all observer poles at −ωo-\omega_o: L=[(n+11)ωo, (n+12)ωo2, …]L = \left[\binom{n+1}{1}\omega_o,\ \binom{n+1}{2}\omega_o^2,\ \ldots\right].

The law cancels the estimate and closes a simple loop on what is left:

u=kp(r−z1)−kdz2−zn+1b0,kp=ωc2, kd=2ωc  (n=2; kp=ωc for n=1)u = \frac{k_p(r - z_1) - k_d z_2 - z_{n+1}}{b_0},\qquad k_p = \omega_c^2,\ k_d = 2\omega_c\ \ (n = 2;\ k_p = \omega_c\ \text{for}\ n = 1)

so the plant behaves like nn integrators under a PD, with poles at −ωc-\omega_c.

Three knobs, all with meaning: ωc\omega_c (how fast), ωo\omega_o (how quickly disturbances are estimated, 3–10 × ωc\omega_c), and b0b_0 (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

Works
  • 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.

Breaks
  • 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

  1. 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).
  2. 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.
  3. ω_c: as fast as the dead time and the lags allow; check Ms.
  4. ω_o: 3–10 × ω_c, limited by noise and the controller cycle.
The tuning rules in the lab
SIMC (Skogestad) (PI, PID)
Kc=τK(τc+θ),Ti=min⁡(τ, 4(τc+θ))K_c = \frac{\tau}{K(\tau_c + \theta)},\quad T_i = \min\big(\tau,\ 4(\tau_c + \theta)\big)

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.

Lambda (IMC) (PI)
Kc=τK(λ+θ),Ti=τK_c = \frac{\tau}{K(\lambda + \theta)},\quad T_i = \tau

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.

IMC-PID (Rivera–Morari–Skogestad) (PI, PID)
Kc=2τ+θ2Kλ,Ti=τ+θ2PID: Kc=2τ+θK(2λ+θ), Td=τθ2τ+θK_c = \frac{2\tau + \theta}{2K\lambda},\quad T_i = \tau + \frac{\theta}{2}\qquad\text{PID: } K_c = \frac{2\tau + \theta}{K(2\lambda + \theta)},\ T_d = \frac{\tau\theta}{2\tau + \theta}

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.

Lambda for integrating (averaging level) (P, PI)
Kc=2λ+θk′(λ+θ)2,Ti=2λ+θK_c = \frac{2\lambda + \theta}{k'(\lambda + \theta)^2},\quad T_i = 2\lambda + \theta

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.

Ziegler–Nichols (reaction curve) (P, PI, PID)
Kc=0.9 τKθ,Ti=3.33 θK_c = \frac{0.9\,\tau}{K\theta},\quad T_i = 3.33\,\theta

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.

Cohen–Coon (P, PI, PID)
Kc=τKθ(0.9+θ12τ),Ti=θ 30+3θ/τ9+20θ/τK_c = \frac{\tau}{K\theta}\Big(0.9 + \frac{\theta}{12\tau}\Big),\quad T_i = \theta\,\frac{30 + 3\theta/\tau}{9 + 20\theta/\tau}

Like Ziegler–Nichols but corrected for dead time, so it copes better when θ/τ is large. Also aimed at quarter-amplitude decay, so also aggressive.

AMIGO (Åström–Hägglund) (PI, PID)
Kc=0.15K+(0.35−θτ(θ+τ)2)τKθ,Ti=0.35θ+13θτ2τ2+12θτ+7θ2K_c = \frac{0.15}{K} + \Big(0.35 - \frac{\theta\tau}{(\theta+\tau)^2}\Big)\frac{\tau}{K\theta},\quad T_i = 0.35\theta + \frac{13\theta\tau^2}{\tau^2 + 12\theta\tau + 7\theta^2}

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 z1=yz_1 = y, derivatives to 0 and f=−b0uf = -b_0 u.
  • Trend ff: it is a free estimate of everything acting on the process (on the reactor it moves with the reaction heat).

Siemens and elsewhere

Siemens
  • 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.
Elsewhere
  • 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…
Running test scenarios…
Block Diagram
SP rΣ+−ADRCobserver + cancel fPIDCV uValve1/(τᵥs + 1), char.stemΣ++d: reactant chargedProcessA → B + heatPV yTransmittere^(−θs)/(τₘs + 1)Σ++noise nPV measured
Generated code
// 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.