|
| 1 | +# Disturbance Observer |
| 2 | + |
| 3 | +## Overview & Motivation |
| 4 | + |
| 5 | +Real plants never match their nominal models. External loads, friction, actuator nonlinearities, and parameter drift inject unmodeled energy into the loop. A Disturbance Observer (DOB) lumps all of these effects into a single **equivalent disturbance** signal, estimates it online, and subtracts it from the control input so the plant behaves as if it were the clean nominal model. |
| 6 | + |
| 7 | +The key insight is that the DOB wraps around any existing controller without redesigning it. An engineer who has already tuned a PID or LQR for the nominal plant can bolt on a DOB and gain strong disturbance rejection without revisiting the nominal design. This makes DOBs especially attractive for embedded motion controllers — motor drives, precision stages, robotic joints — where the plant is moderately well-known but subject to load variations the nominal model ignores. |
| 8 | + |
| 9 | +## Mathematical Theory |
| 10 | + |
| 11 | +### Setup |
| 12 | + |
| 13 | +Let the true discrete-time plant be $P(z)$ and the nominal model be $P_n(z)$. The control input seen by the true plant is $u_a = u + d$, where $u$ is the commanded input and $d$ is the lumped equivalent disturbance that captures model mismatch, external loads, and friction. The plant output is |
| 14 | + |
| 15 | +$$y = P(z)\, u_a = P(z)(u + d).$$ |
| 16 | + |
| 17 | +### Disturbance Estimate |
| 18 | + |
| 19 | +If $P_n^{-1}(z)$ is applied to $y$, it reconstructs the effective input that the nominal plant would have needed to produce that output: |
| 20 | + |
| 21 | +$$P_n^{-1}(z)\, y \approx u + d \quad \text{(if } P \approx P_n\text{)}.$$ |
| 22 | + |
| 23 | +Subtracting the actual commanded input $u$ isolates the disturbance: |
| 24 | + |
| 25 | +$$\hat{d} = P_n^{-1}(z)\, y - u.$$ |
| 26 | + |
| 27 | +### Q-Filter and Properness |
| 28 | + |
| 29 | +The plant inverse $P_n^{-1}(z)$ is generally improper (more zeros than poles) and amplifies high-frequency measurement noise. A low-pass **Q-filter** $Q(z)$ is cascaded to make the combination $Q(z)\,P_n^{-1}(z)$ proper and bandwidth-limited: |
| 30 | + |
| 31 | +$$\hat{d} = Q(z)\,P_n^{-1}(z)\, y - Q(z)\, u.$$ |
| 32 | + |
| 33 | +The filter $Q(z)$ must have relative degree at least equal to the relative degree of $P_n(z)$ so the realization does not differentiate. Unity DC gain, $Q(1) = 1$, is required for complete rejection of constant (step) disturbances. |
| 34 | + |
| 35 | +### Control Law |
| 36 | + |
| 37 | +The DOB corrects the nominal controller output $c$ by subtracting the estimate: |
| 38 | + |
| 39 | +$$u = c - \hat{d}.$$ |
| 40 | + |
| 41 | +The closed-loop system then sees an effective plant of $P_n(z)$ inside the Q-filter bandwidth — the actual mismatch and disturbances are cancelled — and approaches the uncorrected nominal plant behaviour outside the bandwidth. |
| 42 | + |
| 43 | +### Frequency-Domain Interpretation |
| 44 | + |
| 45 | +Let $L(z) = Q(z)\,P_n^{-1}(z)\,P(z)$. The closed-loop sensitivity from disturbance $d$ to output $y$ is |
| 46 | + |
| 47 | +$$S_d(z) = \frac{P(z)(1 - Q(z))}{1 + P(z)C(z)(1 - Q(z))}.$$ |
| 48 | + |
| 49 | +Inside the Q-filter passband ($Q \approx 1$): $S_d \approx 0$ — the disturbance is rejected. |
| 50 | +Outside the passband ($Q \approx 0$): $S_d$ equals the nominal sensitivity — the DOB is transparent. |
| 51 | + |
| 52 | +### Stability Robustness |
| 53 | + |
| 54 | +Robust stability requires the complementary sensitivity of the inner DOB loop to satisfy |
| 55 | + |
| 56 | +$$\left|Q(e^{j\omega})\,\Delta_m(e^{j\omega})\right| < 1 \quad \forall\, \omega,$$ |
| 57 | + |
| 58 | +where $\Delta_m = (P - P_n)/P_n$ is the relative model uncertainty. Widening $Q$ improves disturbance rejection but shrinks the robust-stability margin — this is the fundamental DOB trade-off. |
| 59 | + |
| 60 | +## Complexity Analysis |
| 61 | + |
| 62 | +| Operation | Time | Space | Notes | |
| 63 | +|-----------|------------------|--------------|------------------------------------------------| |
| 64 | +| Construct | $O(N \cdot S^2)$ | $O(S^2 + N)$ | DC gain simulation, $S$ = StateSize, $N$ = 512 | |
| 65 | +| Compute | $O(N_{\rm in})$ | $O(1)$ extra | Per-channel biquad filter pair | |
| 66 | +| Reset | $O(N_{\rm in})$ | $O(1)$ extra | Clears filter states | |
| 67 | + |
| 68 | +All storage is fixed-size; no heap allocation occurs at any point in the lifecycle. |
| 69 | + |
| 70 | +## Step-by-Step Walkthrough |
| 71 | + |
| 72 | +Consider a first-order discrete plant ($n=1$, $m=p=1$) with $a=0.9$, $b=0.1$, $c=1$, DC gain $= b/(1-a) = 1$, and a second-order Butterworth Q-filter at 20 Hz (sample rate 1 kHz). |
| 73 | + |
| 74 | +**Steady-state with constant disturbance $d = 0.5$, nominal command $c = 0$:** |
| 75 | + |
| 76 | +1. Plant output settles to $y_{ss} = P(1)\,d = 1 \cdot 0.5 = 0.5$. |
| 77 | +2. Q-filter path 1: $Q(1)\,P_n^{-1}(1)\,y_{ss} = 1 \cdot 1 \cdot 0.5 = 0.5$. |
| 78 | +3. Q-filter path 2: $Q(1)\,u_{ss} = 1 \cdot (c - \hat{d})_{ss}$. |
| 79 | +4. At equilibrium path 1 $-$ path 2 $= \hat{d}$ and $u_{ss} = c - \hat{d}$, giving $\hat{d} = 0.5 = d$. The estimate converges exactly. |
| 80 | +5. The corrected input is $u = 0 - 0.5 = -0.5$, so the effective input to the plant is $-0.5 + 0.5 = 0$ — the disturbance is cancelled. |
| 81 | + |
| 82 | +## Pitfalls & Edge Cases |
| 83 | + |
| 84 | +- **Non-minimum-phase plants**: $P_n^{-1}(z)$ has unstable poles when $P_n$ has zeros outside the unit circle. The DOB inner loop becomes unstable; non-minimum-phase zeros must be treated specially or the DOB must not be applied directly. |
| 85 | +- **DC gain of zero**: if the nominal plant has no steady-state response to the input, the inverse gain is ill-defined. The implementation guards against division by zero but the DOB will not function correctly. |
| 86 | +- **Wide Q bandwidth**: increasing the cutoff trades rejection bandwidth for noise amplification and reduced robustness to model mismatch. The trade-off is captured by the robust-stability bound above. |
| 87 | +- **Large model mismatch**: when $|\Delta_m|$ is not small, the DOB may amplify rather than cancel the disturbance. The bandwidth of $Q$ must be restricted so the robustness condition holds across the frequency range of significant mismatch. |
| 88 | +- **Unstable nominal plant**: the steady-state DC-gain simulation used during construction diverges; only stable nominal plants are supported. |
| 89 | + |
| 90 | +## Variants & Generalizations |
| 91 | + |
| 92 | +- **Two-degree-of-freedom DOB**: a separate reference pre-filter shapes the tracking response independently of the disturbance rejection channel. |
| 93 | +- **Nonlinear DOB**: replaces the linear inverse with a nonlinear observer (e.g., extended high-gain observer) for plants with known nonlinear structure. |
| 94 | +- **Time-varying Q**: adapts the Q-filter bandwidth online to balance rejection versus robustness as operating conditions change. |
| 95 | +- **Multi-input multi-output (MIMO) DOB**: generalises the scalar channel-pairing to full matrix $P_n^{-1}$, requiring the nominal plant to be square and invertible. |
| 96 | + |
| 97 | +## Applications |
| 98 | + |
| 99 | +- Precision motion control: rejects cutting forces in CNC machines and friction in ball-screw drives. |
| 100 | +- Robotic joint torque control: cancels gravity, Coriolis, and friction terms without explicit model inversion. |
| 101 | +- Hard-disk drive servo: one of the earliest industrial applications; Q-filter bandwidth sets the track-following bandwidth. |
| 102 | +- Power electronics: rejects grid-voltage disturbances in inverter current control. |
| 103 | + |
| 104 | +## Connections to Other Algorithms |
| 105 | + |
| 106 | +- **Sliding Mode Control**: an alternative approach to matched-disturbance rejection via a switching term; SMC is discontinuous and model-free while the DOB is smooth and model-based. |
| 107 | +- **Luenberger Observer / Kalman Filter**: estimate state from measurements; the DOB estimates disturbance from input-output pairs without augmenting the state. |
| 108 | +- **Active Disturbance Rejection Control (ADRC)**: treats total disturbance as an augmented state in a full observer; conceptually similar to DOB but parameterised through observer bandwidth rather than a Q-filter. |
| 109 | +- **BiquadCascade**: the Q-filter is realised directly as a second-order IIR section. |
| 110 | + |
| 111 | +## References & Further Reading |
| 112 | + |
| 113 | +- W.-H. Chen, J. Yang, L. Guo, S. Li, "Disturbance-Observer-Based Control and Related Methods — An Overview," *IEEE Transactions on Industrial Electronics*, 63(2), pp. 1083–1095, 2016. |
| 114 | +- K. Ohishi, M. Nakao, K. Ohnishi, K. Miyachi, "Microprocessor-Controlled DC Motor for Load-Insensitive Position Servo System," *IEEE Transactions on Industrial Electronics*, 34(1), pp. 44–49, 1987. |
| 115 | +- E. Schrijver, J. van Dijk, "Disturbance Observers for Rigid Mechanical Systems: Equivalence, Stability, and Design," *ASME Journal of Dynamic Systems, Measurement, and Control*, 124(4), pp. 539–548, 2002. |
| 116 | +- S. Komada, K. Ohnishi, "Force Feedback Control of Robot Manipulator by the Acceleration Tracing Orientation Method," *IEEE Transactions on Industrial Electronics*, 37(1), pp. 6–12, 1990. |
0 commit comments