This note continues Control System Design SpecificationsA control design starts from specifications on stability, steady-state and transient performance and robustness, which are stated on the closed-loop time or frequency response and then translated into a crossover frequency and a phase margin of the loop transfer function.Control System Design Specifications → : once the specifications are translated into a gain crossover frequency ω g c \omega_{gc} ω g c and a phase margin φ m \varphi_m φ m of the loop transfer function L ( s ) = P ( s ) C ( s ) L(s) = P(s)C(s) L ( s ) = P ( s ) C ( s ) , the controller parameters are computed from them.
PID controllers
Parallel (non-interacting) implementation
Three blocks in parallel on the error e e e (gains K P K_P K P , K I / s K_I/s K I / s , K D s K_D\,s K D s ), summed to give u u u :
C ( s ) = U ( s ) E ( s ) = K P + K I s + K D s = K P ( 1 + 1 T I s + T D s ) C(s) = \frac{U(s)}{E(s)} = K_P + \frac{K_I}{s} + K_D\,s = K_P\left(1 + \frac{1}{T_I\,s} + T_D\,s\right) C ( s ) = E ( s ) U ( s ) = K P + s K I + K D s = K P ( 1 + T I s 1 + T D s )
with
T I = K P K I = integral time (or reset time) , T D = K D K P = derivative time (or rate time) . T_I = \frac{K_P}{K_I} = \text{integral time (or reset time)},\qquad T_D = \frac{K_D}{K_P} = \text{derivative time (or rate time)}. T I = K I K P = integral time (or reset time) , T D = K P K D = derivative time (or rate time) .
Series (interacting) implementation
Three blocks in series: gain K C K_C K C , then 1 + τ I s τ I s \dfrac{1+\tau_I s}{\tau_I s} τ I s 1 + τ I s , then ( 1 + τ D s ) (1 + \tau_D s) ( 1 + τ D s ) :
C ( s ) = U ( s ) E ( s ) = K C ( 1 + τ I s τ I s ) ( 1 + τ D s ) , C(s) = \frac{U(s)}{E(s)} = K_C\left(\frac{1 + \tau_I s}{\tau_I s}\right)(1 + \tau_D s), C ( s ) = E ( s ) U ( s ) = K C ( τ I s 1 + τ I s ) ( 1 + τ D s ) ,
where τ I \tau_I τ I is the time constant of the integral action and τ D \tau_D τ D the time constant of the derivative action.
Interacting versus non-interacting parameters
Equating K P ( 1 + 1 T I s + T D s ) = K C 1 + τ I s τ I s ( 1 + τ D s ) K_P\left(1 + \frac{1}{T_Is} + T_Ds\right) = K_C\,\frac{1 + \tau_I s}{\tau_I s}\,(1 + \tau_D s) K P ( 1 + T I s 1 + T D s ) = K C τ I s 1 + τ I s ( 1 + τ D s ) gives
1 τ I , D = 1 ± 1 − 4 T D T I 2 T D , K C τ I = K P T I = K I . \frac{1}{\tau_{I,D}} = \frac{1 \pm \sqrt{1 - 4\dfrac{T_D}{T_I}}}{2\,T_D},\qquad \frac{K_C}{\tau_I} = \frac{K_P}{T_I} = K_I. τ I , D 1 = 2 T D 1 ± 1 − 4 T I T D , τ I K C = T I K P = K I .
Note: it is common practice to impose T I > 4 T D T_I > 4\,T_D T I > 4 T D to ensure that the time constants τ I \tau_I τ I and τ D \tau_D τ D are real (the square root has a non-negative argument).
Bode diagram of the series PID
For C ( s ) = K C 1 + τ I s τ I s ( 1 + τ D s ) C(s) = K_C\,\dfrac{1 + \tau_I s}{\tau_I s}\,(1 + \tau_D s) C ( s ) = K C τ I s 1 + τ I s ( 1 + τ D s ) the slides show the asymptotic Bode plot (with the exact curve in grey):
magnitude : slope − 20 -20 − 20 dB/decade at low frequency (integral action) with value ∣ K C / τ I ∣ dB \lvert K_C/\tau_I\rvert_{\text{dB}} ∣ K C / τ I ∣ dB at ω = 1 \omega = 1 ω = 1 rad/s; flat between 1 / τ I 1/\tau_I 1/ τ I and 1 / τ D 1/\tau_D 1/ τ D (here 1 / τ I < 1 / τ D 1/\tau_I < 1/\tau_D 1/ τ I < 1/ τ D ); slope + 20 +20 + 20 dB/decade after 1 / τ D 1/\tau_D 1/ τ D (derivative action);
phase : − 9 0 ∘ -90^\circ − 9 0 ∘ at low frequency, 0 ∘ 0^\circ 0 ∘ between 1 / τ I 1/\tau_I 1/ τ I and 1 / τ D 1/\tau_D 1/ τ D , + 9 0 ∘ +90^\circ + 9 0 ∘ after 1 / τ D 1/\tau_D 1/ τ D .
The pure derivative K D s K_D s K D s is not physically realisable and amplifies high-frequency noise. A pole is added to the derivative action.
Parallel real form:
C ( s ) = K P + K I s + K D s 1 + K D K P N s = K P ( 1 + 1 T I s + T D s 1 + T D N s ) , N = 5 ÷ 20 (typically). C(s) = K_P + \frac{K_I}{s} + \frac{K_D\,s}{1 + \frac{K_D}{K_P N}\,s} = K_P\left(1 + \frac{1}{T_I s} + \frac{T_D\,s}{1 + \frac{T_D}{N}\,s}\right),\qquad N = 5 \div 20 \text{ (typically).} C ( s ) = K P + s K I + 1 + K P N K D s K D s = K P ( 1 + T I s 1 + 1 + N T D s T D s ) , N = 5 ÷ 20 (typically).
Series real form (gain K C K_C K C , then 1 + τ I s τ I s \frac{1+\tau_I s}{\tau_I s} τ I s 1 + τ I s , then 1 + τ D s 1 + τ L s \frac{1+\tau_D s}{1+\tau_L s} 1 + τ L s 1 + τ D s ):
C ( s ) = K C ( 1 + τ I s τ I s ) ( 1 + τ D s 1 + τ L s ) , C(s) = K_C\left(\frac{1 + \tau_I s}{\tau_I s}\right)\left(\frac{1 + \tau_D s}{1 + \tau_L s}\right), C ( s ) = K C ( τ I s 1 + τ I s ) ( 1 + τ L s 1 + τ D s ) ,
with the same conversion formulas as above and in addition
τ L = T D N . \tau_L = \frac{T_D}{N}. τ L = N T D .
The Bode plot has the additional corner 1 / τ L 1/\tau_L 1/ τ L (with 1 / τ L > 1 / τ D 1/\tau_L > 1/\tau_D 1/ τ L > 1/ τ D ): the magnitude, after rising at + 20 +20 + 20 dB/decade from 1 / τ D 1/\tau_D 1/ τ D , flattens at 1 / τ L 1/\tau_L 1/ τ L , and the phase goes back from + 9 0 ∘ +90^\circ + 9 0 ∘ to 0 ∘ 0^\circ 0 ∘ after 1 / τ L 1/\tau_L 1/ τ L (the exact phase has a maximum of roughly 5 0 ∘ 50^\circ 5 0 ∘ in the slide plot).
Effect of the actions on the frequency response (slides): integral action provides gain attenuation and phase lag; derivative action provides gain amplification and phase lead.
Effects of the P-I-D actions
Action
Advantages
Drawbacks
P
improves responsiveness; reduces steady-state error
makes the system less damped (increases overshoot)
I
eliminates steady-state error for step references; perfectly rejects constant load disturbances
makes the system less damped (increases overshoot)
D
increases system damping (makes the system more stable)
tends to amplify measurement noise
PID design with the Bode method (frequency-domain method)
Setting
Write the controller and the plant as a gain, an integrator part of given type, and a normalised part:
C ( s ) = K c s h c C ^ ( s ) , P ( s ) = K p s h p P ^ ( s ) , C(s) = \frac{K_c}{s^{h_c}}\,\hat C(s),\qquad P(s) = \frac{K_p}{s^{h_p}}\,\hat P(s), C ( s ) = s h c K c C ^ ( s ) , P ( s ) = s h p K p P ^ ( s ) ,
where
Note: the controller type is either h c = 0 h_c = 0 h c = 0 or h c = 1 h_c = 1 h c = 1 , depending on whether the integral action is absent or present.
The design has two parts: the synthesis of C 0 ( s ) = K c / s h c C_0(s) = K_c/s^{h_c} C 0 ( s ) = K c / s h c (steady-state specifications) and of C ^ ( s ) \hat C(s) C ^ ( s ) (transient specifications).
Synthesis of C 0 ( s ) = K c / s h c C_0(s) = K_c/s^{h_c} C 0 ( s ) = K c / s h c (steady state)
The steady-state specifications (as in Control System Design SpecificationsA control design starts from specifications on stability, steady-state and transient performance and robustness, which are stated on the closed-loop time or frequency response and then translated into a crossover frequency and a phase margin of the loop transfer function.Control System Design Specifications → )
{ e s s = 0 with r ( t ) = δ − 1 ( t ) , … , δ − h ( t ) ∣ e s s ∣ ≤ ε with r ( t ) = δ − ( h + 1 ) ( t ) \begin{cases} e_{ss} = 0 & \text{with } r(t) = \delta_{-1}(t),\dots,\delta_{-h}(t) \\ \lvert e_{ss}\rvert \le \varepsilon & \text{with } r(t) = \delta_{-(h+1)}(t) \end{cases} { e ss = 0 ∣ e ss ∣ ≤ ε with r ( t ) = δ − 1 ( t ) , … , δ − h ( t ) with r ( t ) = δ − ( h + 1 ) ( t )
constrain the structure of the loop transfer function: L ( s ) = K l s h L ^ ( s ) L(s) = \dfrac{K_l}{s^h}\hat L(s) L ( s ) = s h K l L ^ ( s ) with L ^ ( 0 ) = 1 \hat L(0) = 1 L ^ ( 0 ) = 1 , K l ≥ 1 / ε K_l \ge 1/\varepsilon K l ≥ 1/ ε . Since
L ( s ) = P ( s ) C ( s ) = K p K c s h p + h c P ^ ( s ) C ^ ( s ) , L(s) = P(s)C(s) = \frac{K_pK_c}{s^{h_p + h_c}}\,\hat P(s)\hat C(s), L ( s ) = P ( s ) C ( s ) = s h p + h c K p K c P ^ ( s ) C ^ ( s ) ,
the parameters of C 0 ( s ) C_0(s) C 0 ( s ) must satisfy
{ h c + h p = h ∣ K c K p ∣ ≥ 1 / ε → { h c = h − h p K c ≥ 1 ε ∣ K p ∣ . \begin{cases} h_c + h_p = h \\ \lvert K_cK_p\rvert \ge 1/\varepsilon \end{cases}\quad\to\quad \begin{cases} h_c = h - h_p \\ K_c \ge \dfrac{1}{\varepsilon\,\lvert K_p\rvert}. \end{cases} { h c + h p = h ∣ K c K p ∣ ≥ 1/ ε → ⎩ ⎨ ⎧ h c = h − h p K c ≥ ε ∣ K p ∣ 1 .
Since a PID controller has type h c ≤ 1 h_c \le 1 h c ≤ 1 , the steady-state tracking error is as in the table (polynomial reference of order h h h , i.e. δ − h \delta_{-h} δ − h ):
without integral action (h c = 0 h_c = 0 h c = 0 )
with integral action (h c = 1 h_c = 1 h c = 1 )
e s s = 0 e_{ss} = 0 e ss = 0 for polynomial signals of order
h ≤ h p h \le h_p h ≤ h p
h ≤ h p + 1 h \le h_p + 1 h ≤ h p + 1
∣ e s s ∣ ≤ ε \lvert e_{ss}\rvert \le \varepsilon ∣ e ss ∣ ≤ ε for polynomial signals of order
h = h p + 1 h = h_p + 1 h = h p + 1
h = h p + 2 h = h_p + 2 h = h p + 2
Synthesis of C ^ ( s ) \hat C(s) C ^ ( s ) (transient)
C ^ ( s ) \hat C(s) C ^ ( s ) must be designed so that the loop transfer function
L ( s ) = P ( s ) C ( s ) = P ( s ) C 0 ( s ) ⏟ ≜ L 0 ( s ) C ^ ( s ) L(s) = P(s)C(s) = \underbrace{P(s)C_0(s)}_{\triangleq L_0(s)}\;\hat C(s) L ( s ) = P ( s ) C ( s ) = ≜ L 0 ( s ) P ( s ) C 0 ( s ) C ^ ( s )
achieves the desired phase margin φ m \varphi_m φ m and crossover frequency ω g c \omega_{gc} ω g c :
{ ∣ L ( j ω g c ) ∣ = ∣ L 0 ( j ω g c ) C ^ ( j ω g c ) ∣ = 1 ∠ L ( j ω g c ) = ∠ L 0 ( j ω g c ) C ^ ( j ω g c ) = − π + φ m \begin{cases} \lvert L(j\omega_{gc})\rvert = \lvert L_0(j\omega_{gc})\,\hat C(j\omega_{gc})\rvert = 1 \\ \angle L(j\omega_{gc}) = \angle L_0(j\omega_{gc})\hat C(j\omega_{gc}) = -\pi + \varphi_m \end{cases} { ∣ L ( j ω g c )∣ = ∣ L 0 ( j ω g c ) C ^ ( j ω g c )∣ = 1 ∠ L ( j ω g c ) = ∠ L 0 ( j ω g c ) C ^ ( j ω g c ) = − π + φ m
which gives the required gain and phase corrections at ω = ω g c \omega = \omega_{gc} ω = ω g c :
{ ∣ C ^ ( j ω g c ) ∣ = Δ K = 1 ∣ L 0 ( j ω g c ) ∣ ∠ C ^ ( j ω g c ) = Δ φ = φ m − φ m 0 , φ m 0 = π + ∠ L 0 ( j ω g c ) . \begin{cases} \lvert \hat C(j\omega_{gc})\rvert = \Delta K = \dfrac{1}{\lvert L_0(j\omega_{gc})\rvert} \\[6pt] \angle\hat C(j\omega_{gc}) = \Delta\varphi = \varphi_m - \varphi_m^0,\quad \varphi_m^0 = \pi + \angle L_0(j\omega_{gc}). \end{cases} ⎩ ⎨ ⎧ ∣ C ^ ( j ω g c )∣ = Δ K = ∣ L 0 ( j ω g c )∣ 1 ∠ C ^ ( j ω g c ) = Δ φ = φ m − φ m 0 , φ m 0 = π + ∠ L 0 ( j ω g c ) .
Here φ m 0 \varphi_m^0 φ m 0 is the phase margin that L 0 L_0 L 0 alone would have at ω g c \omega_{gc} ω g c .
PID structure for C ^ \hat C C ^
Requiring C ^ PID ( j ω g c ) = Δ K e j Δ φ \hat C_{\text{PID}}(j\omega_{gc}) = \Delta K\,e^{j\Delta\varphi} C ^ PID ( j ω g c ) = Δ K e j Δ φ and writing the PID polynomial (for the PID with integral action the left side is 1 + T I s + T I T D s 2 1 + T_I s + T_IT_D s^2 1 + T I s + T I T D s 2 on s = j ω g c s = j\omega_{gc} s = j ω g c ):
( 1 − T I T D ω g c 2 ) + j ω g c T I = Δ K cos Δ φ + j Δ K sin Δ φ \big(1 - T_IT_D\,\omega_{gc}^2\big) + j\,\omega_{gc}T_I = \Delta K\cos\Delta\varphi + j\,\Delta K\sin\Delta\varphi ( 1 − T I T D ω g c 2 ) + j ω g c T I = Δ K cos Δ φ + j Δ K sin Δ φ
⇓ { 1 − T I T D ω g c 2 = Δ K cos Δ φ ω g c T I = Δ K sin Δ φ \Downarrow \quad \begin{cases} 1 - T_IT_D\,\omega_{gc}^2 = \Delta K\cos\Delta\varphi \\ \omega_{gc}\,T_I = \Delta K\sin\Delta\varphi \end{cases} ⇓ { 1 − T I T D ω g c 2 = Δ K cos Δ φ ω g c T I = Δ K sin Δ φ
⇓ T I = Δ K ω g c sin Δ φ T D = 1 − Δ K cos Δ φ ω g c Δ K sin Δ φ \Downarrow \quad \boxed{T_I = \frac{\Delta K}{\omega_{gc}}\sin\Delta\varphi}\qquad \boxed{T_D = \frac{1 - \Delta K\cos\Delta\varphi}{\omega_{gc}\,\Delta K\sin\Delta\varphi}} ⇓ T I = ω g c Δ K sin Δ φ T D = ω g c Δ K sin Δ φ 1 − Δ K cos Δ φ
The results for PD and PI controllers can be derived in a similar way (slide footnote).
Notes (slides):
To ensure that T I T_I T I and T D T_D T D are positive it is necessary that
T I > 0 ⇒ 0 < Δ φ < π , T D > 0 ⇒ cos Δ φ < 1 Δ K . T_I > 0 \Rightarrow 0 < \Delta\varphi < \pi,\qquad T_D > 0 \Rightarrow \cos\Delta\varphi < \frac{1}{\Delta K}. T I > 0 ⇒ 0 < Δ φ < π , T D > 0 ⇒ cos Δ φ < Δ K 1 .
This is equivalent to requiring that the zeros of C ^ PID ( s ) \hat C_{\text{PID}}(s) C ^ PID ( s ) lie in the left half-plane (minimum phase ), so that the controller introduces a phase lead (less than π \pi π ).
A pole can be introduced in the derivative action to ensure physical realisability and to limit the high-frequency gain: C PID ( s ) = K P + K I s + K D s 1 + K D K P N s = K P ( 1 + 1 T I s + T D s 1 + T D N s ) C_{\text{PID}}(s) = K_P + \dfrac{K_I}{s} + \dfrac{K_Ds}{1 + \frac{K_D}{K_PN}s} = K_P\left(1 + \dfrac{1}{T_Is} + \dfrac{T_Ds}{1 + \frac{T_D}{N}s}\right) C PID ( s ) = K P + s K I + 1 + K P N K D s K D s = K P ( 1 + T I s 1 + 1 + N T D s T D s ) , with N = 5 ÷ 20 N = 5 \div 20 N = 5 ÷ 20 typically, so that the pole lies at a sufficiently high frequency, making its effect negligible within the control bandwidth.
Partially specified steady-state requirements
Sometimes the steady-state specifications are only partially given (for example perfect tracking of polynomial references up to a given order, with no bound ε \varepsilon ε on the next order): the second line ∣ e s s ∣ ≤ ε \lvert e_{ss}\rvert \le \varepsilon ∣ e ss ∣ ≤ ε is removed and the bound K l ≥ 1 / ε K_l \ge 1/\varepsilon K l ≥ 1/ ε on the loop gain is no longer available (the slide marks ε \varepsilon ε with a question mark).
In this case the controller is designed solely to meet the transient performance specifications :
{ ∣ L ( j ω g c ) ∣ = ∣ P ( j ω g c ) C ( j ω g c ) ∣ = 1 ∠ L ( j ω g c ) = ∠ P ( j ω g c ) C ( j ω g c ) = − π + φ m \begin{cases} \lvert L(j\omega_{gc})\rvert = \lvert P(j\omega_{gc})\,C(j\omega_{gc})\rvert = 1 \\ \angle L(j\omega_{gc}) = \angle P(j\omega_{gc})C(j\omega_{gc}) = -\pi + \varphi_m \end{cases} { ∣ L ( j ω g c )∣ = ∣ P ( j ω g c ) C ( j ω g c )∣ = 1 ∠ L ( j ω g c ) = ∠ P ( j ω g c ) C ( j ω g c ) = − π + φ m
Notes: individual actions (P, I or D) may be omitted if not needed for the required compensation; the inclusion of the integral action still depends on the steady-state specifications and on the plant type.
The required gain and phase corrections for the whole controller are
{ ∣ C ( j ω g c ) ∣ = Δ K ≜ 1 ∣ P ( j ω g c ) ∣ ∠ C ( j ω g c ) = Δ φ ≜ − π + φ m − ∠ P ( j ω g c ) . \begin{cases} \lvert C(j\omega_{gc})\rvert = \Delta K \triangleq \dfrac{1}{\lvert P(j\omega_{gc})\rvert} \\[6pt] \angle C(j\omega_{gc}) = \Delta\varphi \triangleq -\pi + \varphi_m - \angle P(j\omega_{gc}). \end{cases} ⎩ ⎨ ⎧ ∣ C ( j ω g c )∣ = Δ K ≜ ∣ P ( j ω g c )∣ 1 ∠ C ( j ω g c ) = Δ φ ≜ − π + φ m − ∠ P ( j ω g c ) .
Note: for a PID the phase correction is always − π / 2 < Δ φ < + π / 2 -\pi/2 < \Delta\varphi < +\pi/2 − π /2 < Δ φ < + π /2 .
All start from C ( j ω g c ) = Δ K e j Δ φ C(j\omega_{gc}) = \Delta K\,e^{j\Delta\varphi} C ( j ω g c ) = Δ K e j Δ φ .
1) PID - selected when both integral action and phase lead compensation are required.
K P + j K P ( ω g c T D − 1 ω g c T I ) = Δ K cos Δ φ + j Δ K sin Δ φ K_P + jK_P\left(\omega_{gc}T_D - \frac{1}{\omega_{gc}T_I}\right) = \Delta K\cos\Delta\varphi + j\,\Delta K\sin\Delta\varphi K P + j K P ( ω g c T D − ω g c T I 1 ) = Δ K cos Δ φ + j Δ K sin Δ φ
{ K P = Δ K cos Δ φ K P ( ω g c T D − 1 ω g c T I ) = Δ K sin Δ φ \begin{cases} K_P = \Delta K\cos\Delta\varphi \\ K_P\left(\omega_{gc}T_D - \dfrac{1}{\omega_{gc}T_I}\right) = \Delta K\sin\Delta\varphi \end{cases} ⎩ ⎨ ⎧ K P = Δ K cos Δ φ K P ( ω g c T D − ω g c T I 1 ) = Δ K sin Δ φ
Two equations, three unknowns: one imposes T I = α T D T_I = \alpha\,T_D T I = α T D with α ≥ 4 \alpha \ge 4 α ≥ 4 , from which
{ K P = Δ K cos Δ φ T D = tan Δ φ + tan 2 Δ φ + 4 / α 2 ω g c T I = α T D \boxed{\begin{cases} K_P = \Delta K\cos\Delta\varphi \\[2pt] T_D = \dfrac{\tan\Delta\varphi + \sqrt{\tan^2\Delta\varphi + 4/\alpha}}{2\,\omega_{gc}} \\[8pt] T_I = \alpha\,T_D \end{cases}} ⎩ ⎨ ⎧ K P = Δ K cos Δ φ T D = 2 ω g c tan Δ φ + tan 2 Δ φ + 4/ α T I = α T D
Note: when α ≥ 4 \alpha \ge 4 α ≥ 4 the PID controller has two distinct real zeros, i.e. τ I ≠ τ D \tau_I \ne \tau_D τ I = τ D .
2) PI - selected when integral action is required, but no phase lead compensation is needed.
K P − j K I ω g c = Δ K cos Δ φ + j Δ K sin Δ φ K_P - j\,\frac{K_I}{\omega_{gc}} = \Delta K\cos\Delta\varphi + j\,\Delta K\sin\Delta\varphi K P − j ω g c K I = Δ K cos Δ φ + j Δ K sin Δ φ
{ K P = Δ K cos Δ φ K I = − ω g c Δ K sin Δ φ \boxed{\begin{cases} K_P = \Delta K\cos\Delta\varphi \\ K_I = -\omega_{gc}\,\Delta K\sin\Delta\varphi \end{cases}} { K P = Δ K cos Δ φ K I = − ω g c Δ K sin Δ φ
(since K I > 0 K_I > 0 K I > 0 , a PI needs sin Δ φ < 0 \sin\Delta\varphi < 0 sin Δ φ < 0 , i.e. a phase lag, consistent with the phase lag of the integral action.)
3) PD - selected when integral action is not required, but phase lead is needed.
K P + j K D ω g c = Δ K cos Δ φ + j Δ K sin Δ φ K_P + jK_D\,\omega_{gc} = \Delta K\cos\Delta\varphi + j\,\Delta K\sin\Delta\varphi K P + j K D ω g c = Δ K cos Δ φ + j Δ K sin Δ φ
{ K P = Δ K cos Δ φ K D = 1 ω g c Δ K sin Δ φ \boxed{\begin{cases} K_P = \Delta K\cos\Delta\varphi \\ K_D = \dfrac{1}{\omega_{gc}}\,\Delta K\sin\Delta\varphi \end{cases}} ⎩ ⎨ ⎧ K P = Δ K cos Δ φ K D = ω g c 1 Δ K sin Δ φ
Procedure summary
From the specifications, get ω g c \omega_{gc} ω g c and φ m \varphi_m φ m (Control System Design SpecificationsA control design starts from specifications on stability, steady-state and transient performance and robustness, which are stated on the closed-loop time or frequency response and then translated into a crossover frequency and a phase margin of the loop transfer function.Control System Design Specifications → ).
Evaluate P ( j ω g c ) P(j\omega_{gc}) P ( j ω g c ) : modulus and phase.
Compute Δ K \Delta K Δ K and Δ φ \Delta\varphi Δ φ .
Choose the controller type (P, PI, PD, PID) according to the sign and size of Δ φ \Delta\varphi Δ φ and to the steady-state requirements.
Compute the parameters with the formulas above; if the derivative is used, add the pole T D / N T_D/N T D / N (N = 5 ÷ 20 N = 5 \div 20 N = 5 ÷ 20 ).
Validate by simulation and experiment (design flow in Control System Design SpecificationsA control design starts from specifications on stability, steady-state and transient performance and robustness, which are stated on the closed-loop time or frequency response and then translated into a crossover frequency and a phase margin of the loop transfer function.Control System Design Specifications → ); the controller is later discretised for implementation (Discretization Methods for ControllersDesign by emulation discretizes a continuous-time controller with impulse or step invariance or with numerical integration rules (forward Euler, backward Euler, Tustin), choosing the sampling frequency 10 to 20 times or more above the bandwidth, and accounting for the half-sample delay of the zero-order hold.Discretization Methods for Controllers → ).
Versione ripasso
Parallel PID: C = K P + K I / s + K D s = K P ( 1 + 1 / ( T I s ) + T D s ) C = K_P + K_I/s + K_Ds = K_P\big(1 + 1/(T_Is) + T_Ds\big) C = K P + K I / s + K D s = K P ( 1 + 1/ ( T I s ) + T D s ) , T I = K P / K I T_I = K_P/K_I T I = K P / K I , T D = K D / K P T_D = K_D/K_P T D = K D / K P .
Series PID: C = K C 1 + τ I s τ I s ( 1 + τ D s ) C = K_C\dfrac{1 + \tau_Is}{\tau_Is}(1 + \tau_Ds) C = K C τ I s 1 + τ I s ( 1 + τ D s ) ; conversion 1 τ I , D = 1 ± 1 − 4 T D / T I 2 T D \dfrac{1}{\tau_{I,D}} = \dfrac{1 \pm \sqrt{1 - 4T_D/T_I}}{2T_D} τ I , D 1 = 2 T D 1 ± 1 − 4 T D / T I , K C τ I = K P T I = K I \dfrac{K_C}{\tau_I} = \dfrac{K_P}{T_I} = K_I τ I K C = T I K P = K I ; impose T I > 4 T D T_I > 4T_D T I > 4 T D for real τ \tau τ .
Real form: derivative term T D s 1 + T D N s \dfrac{T_Ds}{1 + \frac{T_D}{N}s} 1 + N T D s T D s with N = 5 ÷ 20 N = 5 \div 20 N = 5 ÷ 20 ; series version has 1 + τ D s 1 + τ L s \dfrac{1 + \tau_Ds}{1 + \tau_Ls} 1 + τ L s 1 + τ D s , τ L = T D / N \tau_L = T_D/N τ L = T D / N . Integral = gain attenuation and phase lag; derivative = gain amplification and phase lead.
Effects: P faster and smaller error, less damped; I zero step error and rejects constant loads, less damped; D more damping, amplifies noise.
Bode method: C = K c s h c C ^ C = \dfrac{K_c}{s^{h_c}}\hat C C = s h c K c C ^ , P = K p s h p P ^ P = \dfrac{K_p}{s^{h_p}}\hat P P = s h p K p P ^ , C ^ ( 0 ) = P ^ ( 0 ) = 1 \hat C(0) = \hat P(0) = 1 C ^ ( 0 ) = P ^ ( 0 ) = 1 , h c ∈ { 0 , 1 } h_c \in \{0, 1\} h c ∈ { 0 , 1 } .
Steady state: h c = h − h p h_c = h - h_p h c = h − h p , K c ≥ 1 ε ∣ K p ∣ K_c \ge \dfrac{1}{\varepsilon\lvert K_p\rvert} K c ≥ ε ∣ K p ∣ 1 . With h c = 0 h_c = 0 h c = 0 : e s s = 0 e_{ss} = 0 e ss = 0 up to order h p h_p h p , bounded at h p + 1 h_p + 1 h p + 1 ; with h c = 1 h_c = 1 h c = 1 : zero up to h p + 1 h_p + 1 h p + 1 , bounded at h p + 2 h_p + 2 h p + 2 .
Transient: Δ K = 1 / ∣ L 0 ( j ω g c ) ∣ \Delta K = 1/\lvert L_0(j\omega_{gc})\rvert Δ K = 1/ ∣ L 0 ( j ω g c )∣ , Δ φ = φ m − φ m 0 \Delta\varphi = \varphi_m - \varphi_m^0 Δ φ = φ m − φ m 0 , φ m 0 = π + ∠ L 0 ( j ω g c ) \varphi_m^0 = \pi + \angle L_0(j\omega_{gc}) φ m 0 = π + ∠ L 0 ( j ω g c ) .
Without steady-state bound: Δ K = 1 / ∣ P ( j ω g c ) ∣ \Delta K = 1/\lvert P(j\omega_{gc})\rvert Δ K = 1/ ∣ P ( j ω g c )∣ , Δ φ = − π + φ m − ∠ P ( j ω g c ) \Delta\varphi = -\pi + \varphi_m - \angle P(j\omega_{gc}) Δ φ = − π + φ m − ∠ P ( j ω g c ) , − π / 2 < Δ φ < π / 2 -\pi/2 < \Delta\varphi < \pi/2 − π /2 < Δ φ < π /2 .
PID: K P = Δ K cos Δ φ K_P = \Delta K\cos\Delta\varphi K P = Δ K cos Δ φ , T I = α T D T_I = \alpha T_D T I = α T D (α ≥ 4 \alpha \ge 4 α ≥ 4 ), T D = tan Δ φ + tan 2 Δ φ + 4 / α 2 ω g c T_D = \dfrac{\tan\Delta\varphi + \sqrt{\tan^2\Delta\varphi + 4/\alpha}}{2\omega_{gc}} T D = 2 ω g c tan Δ φ + tan 2 Δ φ + 4/ α .
PI: K P = Δ K cos Δ φ K_P = \Delta K\cos\Delta\varphi K P = Δ K cos Δ φ , K I = − ω g c Δ K sin Δ φ K_I = -\omega_{gc}\Delta K\sin\Delta\varphi K I = − ω g c Δ K sin Δ φ .
PD: K P = Δ K cos Δ φ K_P = \Delta K\cos\Delta\varphi K P = Δ K cos Δ φ , K D = Δ K sin Δ φ / ω g c K_D = \Delta K\sin\Delta\varphi/\omega_{gc} K D = Δ K sin Δ φ / ω g c .
Typical error: forgetting that T I T_I T I and T D T_D T D positive need 0 < Δ φ < π 0 < \Delta\varphi < \pi 0 < Δ φ < π and cos Δ φ < 1 / Δ K \cos\Delta\varphi < 1/\Delta K cos Δ φ < 1/Δ K in the version with C ^ \hat C C ^ and integral action.
Passi del metodo di Bode:
Dalle specifiche: ω g c \omega_{gc} ω g c e φ m \varphi_m φ m ; scegliere h c h_c h c dal tipo richiesto dal regime, h c = h − h p h_c = h - h_p h c = h − h p .
Sintesi di C 0 = K c / s h c C_0 = K_c/s^{h_c} C 0 = K c / s h c con K c ≥ 1 / ( ε ∣ K p ∣ ) K_c \ge 1/(\varepsilon\lvert K_p\rvert) K c ≥ 1/ ( ε ∣ K p ∣) .
Calcolo di Δ K = 1 / ∣ L 0 ( j ω g c ) ∣ \Delta K = 1/\lvert L_0(j\omega_{gc})\rvert Δ K = 1/ ∣ L 0 ( j ω g c )∣ e Δ φ = φ m − φ m 0 \Delta\varphi = \varphi_m - \varphi_m^0 Δ φ = φ m − φ m 0 , con φ m 0 = π + ∠ L 0 ( j ω g c ) \varphi_m^0 = \pi + \angle L_0(j\omega_{gc}) φ m 0 = π + ∠ L 0 ( j ω g c ) .
Scelta del tipo (P, PI, PD, PID) dal segno e dall'entità di Δ φ \Delta\varphi Δ φ ; formule della tabella delle tre.
Tipo di controllore e regime: con h c = 0 h_c = 0 h c = 0 l'errore è nullo fino all'ordine h p h_p h p ed è limitato all'ordine h p + 1 h_p+1 h p + 1 ; con h c = 1 h_c = 1 h c = 1 è nullo fino a h p + 1 h_p+1 h p + 1 e limitato a h p + 2 h_p+2 h p + 2 .
Senza vincolo di regime: Δ K = 1 / ∣ P ( j ω g c ) ∣ \Delta K = 1/\lvert P(j\omega_{gc})\rvert Δ K = 1/ ∣ P ( j ω g c )∣ e Δ φ = − π + φ m − ∠ P ( j ω g c ) \Delta\varphi = -\pi + \varphi_m - \angle P(j\omega_{gc}) Δ φ = − π + φ m − ∠ P ( j ω g c ) . Per un PID − π / 2 < Δ φ < π / 2 -\pi/2 < \Delta\varphi < \pi/2 − π /2 < Δ φ < π /2 .
PID ideale con Δ K \Delta K Δ K e Δ φ \Delta\varphi Δ φ : dalla parte immaginaria si ricava T I = Δ K ω g c sin Δ φ T_I = \dfrac{\Delta K}{\omega_{gc}}\sin\Delta\varphi T I = ω g c Δ K sin Δ φ ; dalla parte reale T D = 1 − Δ K cos Δ φ ω g c Δ K sin Δ φ T_D = \dfrac{1 - \Delta K\cos\Delta\varphi}{\omega_{gc}\,\Delta K\sin\Delta\varphi} T D = ω g c Δ K sin Δ φ 1 − Δ K cos Δ φ .
Condizioni di positività: T I > 0 T_I > 0 T I > 0 richiede 0 < Δ φ < π 0 < \Delta\varphi < \pi 0 < Δ φ < π ; T D > 0 T_D > 0 T D > 0 richiede cos Δ φ < 1 / Δ K \cos\Delta\varphi < 1/\Delta K cos Δ φ < 1/Δ K . Gli zeri del PID stanno nel semipiano sinistro (fase positiva).
Derivata reale: un polo a T D / N T_D/N T D / N (con N N N tipicamente tra 5 5 5 e 20 20 20 ) rende il controllore realizzabile e limita il guadagno ad alta frequenza, lasciando il polo fuori dalla banda.
Errori tipici:
Scegliere il PI quando Δ φ > 0 \Delta\varphi > 0 Δ φ > 0 : con K I = − ω g c Δ K sin Δ φ K_I = -\omega_{gc}\Delta K\sin\Delta\varphi K I = − ω g c Δ K sin Δ φ serve sin Δ φ < 0 \sin\Delta\varphi < 0 sin Δ φ < 0 .
Usare α < 4 \alpha < 4 α < 4 : gli zeri non sono reali distinti.
Dimenticare il polo T D / N T_D/N T D / N nella forma reale della derivata.