PID: the integral that winds up
Đã giới thiệu| English | Ý nghĩa |
|---|---|
| PID controller | A controller whose output is the sum of proportional, integral and derivative actions on the error. |
| error/ˈerə/ | The difference between the setpoint and the measured output, which a controller acts on. |
| control/kənˈtrəʊl/ | Making a system's output follow a desired value, usually by measuring it and correcting the input. |
| phase margin | How much extra phase lag at the gain crossover frequency would make a feedback loop unstable. |
| rate limit | The largest rate of change an actuator or signal is allowed to have. |
| integrator windup | The build-up of the integral term while an actuator is saturated, which causes large overshoot. |
| overshoot/ˌəʊvəˈʃuːt/ | How far a step response goes past its final value, usually given as a percentage of the step. |
| Anti-windup | A method that stops the integral term growing while the actuator is saturated. |
Exact, even when the water pushes
- The valve must stop exactly where it is told, even when the water pushes on it. Feedback makes a cheap motor accurate, if it is designed with the actuator's limits in mind.
- A PID controller acts on the error: $u = K_pe + K_i\int e\,dt + K_d\dot e$. Proportional for speed, integral to remove steady error, derivative to add damping.

Why the integral is needed
- The 5 N·m load acts like 3.0 V subtracted at the motor. With P control, that voltage must come from $K_pe$, so an error $e = 3.0/134 = \mathbf{1.29°}$ remains, failing the 0.5° spec.
- An integral keeps growing until the error is zero, so it can supply the 3.0 V on its own.
Which term fixes it?
Match each behaviour to the PID term or protection that handles it.
Steady error with P only, d = 3.0 V, K_p = 134 V/rad (two decimals, degrees)?
Độ khó 2/5 · 140 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
3.0/134 rad in degrees.
Proportional control alone removes the steady error under a constant load.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
It needs an error to make the holding voltage.
Tuning against the spec
- Put the integral zero a decade below $\omega_n$: $K_i = K_p\omega_n/10 = \mathbf{993}$ V/(rad·s).
- The steady error is now zero, and the phase margin falls by about 9°, to 56°.
- No derivative: the damping already comes from $K_p$ and the motor lag, and a derivative would amplify encoder noise.
K_i = K_p omega_n / 10 with K_p = 133.4 and omega_n = 74.4 (whole number)?
Độ khó 2/5 · 140 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Place the zero a decade down.
Saturation and windup
- A 90° step asks $134 \times 1.571 = \mathbf{210}$ V of a 12 V driver. The valve moves at its rate limit, 3.58 rad/s under load.
- Meanwhile the integrator keeps adding error it cannot act on, integrator windup, and the valve overshoots to $\mathbf{159°}$. Anti-windup by clamping removes the overshoot completely.
Voltage asked by a 90 degree step at K_p = 134 (V, whole number)?
Độ khó 2/5 · 140 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
134 times 1.571.
Rate limit under load: 0.398 x (12 - 3.0) (two decimals, rad/s)?
Độ khó 2/5 · 140 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Only 9 V is left for speed.
Integrator windup happens because:
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Error accumulates that the actuator cannot act on.
What the integral costs
- A PI controller is $K_p(1 + \omega_i/s)$ with its zero at $\omega_i = K_i/K_p = 993/134 = 7.41$ rad/s. At crossover it adds lag of $\tan^{-1}(\omega_i/\omega_c)$.
- $\tan^{-1}(7.41/48.2) = \mathbf{8.7°}$: the margin falls from 65.2° to 56.5°. A zero closer to crossover removes load errors faster but eats more margin, so a decade below is the usual compromise.
PI zero at $K_i/K_p = 993/134$, crossover 48.2 rad/s: phase lag it adds (one decimal, degrees)?
Độ khó 2/5 · 140 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
$\omega_i = 7.41$ rad/s; $\tan^{-1}(7.41/48.2) = 8.7°$.
Moving the PI zero up to crossover removes load errors faster at no cost in phase margin.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
At $\omega_i = \omega_c$ the zero costs 45° of margin; a decade below costs about 6° to 9°.
Worked example: how big a step stays linear?
- The driver saturates when $K_pe$ reaches 12 V, so the largest step the linear model describes is $12/134 = 0.0896$ rad, $\mathbf{5.1°}$.
- The 90° move is 17.5 times larger. For almost its whole travel the valve runs at its rate limit, and the overshoot and settling formulas apply only to the last 5°: that is why the spec must be checked by a nonlinear simulation.
$K_p = 134$ V/rad and a 12 V driver: largest step that stays linear (one decimal, degrees)?
Độ khó 2/5 · 140 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
$12/134 = 0.0896$ rad $= 5.13°$.
Three PID slips
- P-only tuning judged on small steps. Large steps saturate.
- Derivative on a noisy measurement. It amplifies the noise.
- Integral without windup protection. Clamp it.
Recap
- P leaves $e = d/K_p = 1.29°$ under load; I removes it.
- $K_i = 993$; phase margin 56°.
- Windup carries a 90° move to 159°; clamping fixes it.