Steady state error and PID controller See also problem
Problemè 1
In Lab 4, We used a PD compensator to control our ball and beam apparatus. The transfer function of our PD compensator was as follows:
G C ( s ) = K D s + K P G_C(s) = K_Ds + K_P G C ( s ) = K D s + K P
However, we did not use the compensator in this form. The transfer function we used in lab was as follows:
G C ( s ) = K C ( s + z ) G_C(s) = K_C(s+z) G C ( s ) = K C ( s + z )
Solve for K C K_C K C and z z z in terms of K P K_P K P and K D K_D K D .
Given
G C ( s ) = K C ( s + z ) G C ( s ) = K D s + K P \begin{align*}
G_C(s) &= K_C(s+z) \\\
G_C(s) &= K_Ds + K_P
\end{align*} G C ( s ) G C ( s ) = K C ( s + z ) = K D s + K P
Or it can be written as:
( K C − K D ) s + K C z − K P = 0 (K_C - K_D)s + K_Cz - K_P = 0 ( K C − K D ) s + K C z − K P = 0
To solve for the characteristic equation, we can set the coefficients of s s s and the constant term to zero:
K C − K D = 0 K C z − K P = 0 \begin{align*}
K_C - K_D &= 0 \\\
K_Cz - K_P &= 0
\end{align*} K C − K D K C z − K P = 0 = 0
Thus, we can solve for K C K_C K C and z z z as follows:
K C = K D z = K P K C = K P K D \begin{align*}
K_C &= K_D \\\
z &= \frac{K_P}{K_C} = \frac{K_P}{K_D}
\end{align*} K C z = K D = K C K P = K D K P
Problemè 2
Given that the transfer function of our Ball and Beam plant used in the previous lab is as follows:
G ( s ) = 0.419 s 2 G(s) = \frac{0.419}{s^2} G ( s ) = s 2 0.419
And given that the controller is applied to the plant in cascade configuration, find:
Static error constant for position (position constant)
This is a Type-2 system, thus position constant K p = ∞ K_p = \infty K p = ∞
Static error constant for velocity (velocity constant)
Velocity constant K v = lim s → 0 s G ( s ) = lim s → 0 0.419 s s 2 = ∞ K_v = \lim_{s\to 0} sG(s) = \lim_{s\to 0} \frac{0.419s}{s^2} = \infty K v = lim s → 0 s G ( s ) = lim s → 0 s 2 0.419 s = ∞
Static error constant for acceleration (acceleration constant)
Acceleration constant K a = lim s → 0 s 2 G ( s ) = lim s → 0 0.419 s 2 s 2 = 0.419 K_a = \lim_{s\to 0} s^2G(s) = \lim_{s\to 0} \frac{0.419s^2}{s^2} = 0.419 K a = lim s → 0 s 2 G ( s ) = lim s → 0 s 2 0.419 s 2 = 0.419
Steady-state error for a step input u ( t ) u(t) u ( t )
For a step input R ( s ) = 1 s R(s) = \frac{1}{s} R ( s ) = s 1 , the steady-state error is given by:
e s s = lim s → 0 R ( s ) 1 + K p G ( s ) = lim s → 0 1 / s 1 + ∞ = 0 e_{ss} = \lim_{s\to 0} \frac{R(s)}{1+K_pG(s)} = \lim_{s\to 0} \frac{1/s}{1+\infty} = 0 e ss = s → 0 lim 1 + K p G ( s ) R ( s ) = s → 0 lim 1 + ∞ 1/ s = 0
Steady-state error for a ramp input t u ( t ) tu(t) t u ( t )
For a ramp input R ( s ) = 1 s 2 R(s) = \frac{1}{s^2} R ( s ) = s 2 1 , the steady-state error is given by:
e s s = lim s → 0 s R ( s ) 1 + K v G ( s ) = lim s → 0 s / s 2 1 + 0.419 = 1 0.419 ≈ 2.39 e_{ss} = \lim_{s\to 0} \frac{sR(s)}{1+K_vG(s)} = \lim_{s\to 0} \frac{s/s^2}{1+0.419} = \frac{1}{0.419} \approx 2.39 e ss = s → 0 lim 1 + K v G ( s ) s R ( s ) = s → 0 lim 1 + 0.419 s / s 2 = 0.419 1 ≈ 2.39
Steady-state error for a parabolic input t 2 u ( t ) t^2u(t) t 2 u ( t )
For a parabolic input R ( s ) = 1 s 3 R(s) = \frac{1}{s^3} R ( s ) = s 3 1 , the steady-state error is given by:
e s s = lim s → 0 s 2 R ( s ) 1 + K a G ( s ) = lim s → 0 s 2 / s 3 1 + 0.419 = 1 0.419 ≈ 2.39 e_{ss} = \lim_{s\to 0} \frac{s^2R(s)}{1+K_aG(s)} = \lim_{s\to 0} \frac{s^2/s^3}{1+0.419} = \frac{1}{0.419} \approx 2.39 e ss = s → 0 lim 1 + K a G ( s ) s 2 R ( s ) = s → 0 lim 1 + 0.419 s 2 / s 3 = 0.419 1 ≈ 2.39
Problemè 3
We will be augmenting our controller to include an integrator. The transfer function of our new PID compensator will be as follows;
G C ( s ) = K D s + K P + K I s G_C(s) = K_Ds + K_P + \frac{K_I}{s} G C ( s ) = K D s + K P + s K I
Given that the transfer function for our plant has not changed, and given that this controller is also applied to the plant in cascade configuration.
The closed-loop transfer function is
Y ( s ) R ( s ) = G ( s ) G C ( s ) 1 + G ( s ) G C ( s ) = 0.419 s 2 ∗ ( K D s + K P + K I s ) 1 + 0.419 s 2 ∗ ( K D s + K P + K I s ) = 0.419 ∗ ( K D s + K P + K I s ) s 2 + 0.419 ∗ ( K D s + K P + K I s ) \frac{Y(s)}{R(s)} = \frac{G(s)G_C(s)}{1+G(s)G_C(s)} = \frac{\frac{0.419}{s^2} * (K_Ds + K_P + \frac{K_I}{s})}{1+\frac{0.419}{s^2} * (K_Ds + K_P + \frac{K_I}{s})} = \frac{0.419*(K_Ds + K_P + \frac{K_I}{s})}{s^2 + 0.419*(K_Ds + K_P + \frac{K_I}{s})} R ( s ) Y ( s ) = 1 + G ( s ) G C ( s ) G ( s ) G C ( s ) = 1 + s 2 0.419 ∗ ( K D s + K P + s K I ) s 2 0.419 ∗ ( K D s + K P + s K I ) = s 2 + 0.419 ∗ ( K D s + K P + s K I ) 0.419 ∗ ( K D s + K P + s K I )
Static error constant for position (position constant)
K P = lim s → 0 G C ( s ) G ( s ) = lim s → 0 0.419 s 2 ( K D s + K P + K I s ) = ∞ K_P = \lim_{s\to 0} G_C(s)G(s) = \lim_{s\to 0} \frac{0.419}{s^2}(K_Ds+K_P+\frac{K_I}{s}) = \infty K P = s → 0 lim G C ( s ) G ( s ) = s → 0 lim s 2 0.419 ( K D s + K P + s K I ) = ∞
Static error constant for velocity (velocity constant)
K V = lim s → 0 s G C ( s ) G ( s ) = lim s → 0 s 0.419 s 2 ( K D s + K P + K I s ) = 0.419 K D + 0.419 K P s + 0.419 K I s 2 = 0.419 K I K_V = \lim_{s\to 0} sG_C(s)G(s) = \lim_{s\to 0} s\frac{0.419}{s^2}(K_Ds+K_P+\frac{K_I}{s}) = 0.419K_D + \frac{0.419K_P}{s} + \frac{0.419K_I}{s^2} = 0.419K_I K V = s → 0 lim s G C ( s ) G ( s ) = s → 0 lim s s 2 0.419 ( K D s + K P + s K I ) = 0.419 K D + s 0.419 K P + s 2 0.419 K I = 0.419 K I
Static error constant for acceleration (acceleration constant)
K A = lim s → 0 s 2 G C ( s ) G ( s ) = lim s → 0 s 2 0.419 s 2 ( K D s + K P + K I s ) = 0.419 K P K_A = \lim_{s\to 0} s^2G_C(s)G(s) = \lim_{s\to 0} s^2\frac{0.419}{s^2}(K_Ds+K_P+\frac{K_I}{s}) = 0.419K_P K A = s → 0 lim s 2 G C ( s ) G ( s ) = s → 0 lim s 2 s 2 0.419 ( K D s + K P + s K I ) = 0.419 K P
Steady-state error for a step input u ( t ) u(t) u ( t )
For a step input R ( s ) = 1 s R(s) = \frac{1}{s} R ( s ) = s 1 , the steady-state error is given by:
e s s = lim s → 0 s R ( s ) 1 − C ( s ) R ( s ) = lim s → 0 s 1 / s 1 − C ( s ) R ( s ) = 1 1 + K P = 0 e_{ss} = \lim_{s\to 0} \frac{sR(s)}{1-\frac{C(s)}{R(s)}} = \lim_{s\to 0} s\frac{1/s}{1-\frac{C(s)}{R(s)}} = \frac{1}{1+K_P} = 0 e ss = s → 0 lim 1 − R ( s ) C ( s ) s R ( s ) = s → 0 lim s 1 − R ( s ) C ( s ) 1/ s = 1 + K P 1 = 0
Steady-state error for a ramp input t u ( t ) tu(t) t u ( t )
For a ramp input R ( s ) = 1 s 2 R(s) = \frac{1}{s^2} R ( s ) = s 2 1 , the steady-state error is given by:
e s s = lim s → 0 s 2 R ( s ) 1 − C ( s ) R ( s ) = lim s → 0 s 2 / s 2 1 − C ( s ) R ( s ) = 1 K V = 1 0.419 K I e_{ss} = \lim_{s\to 0} \frac{s^2R(s)}{1-\frac{C(s)}{R(s)}} = \lim_{s\to 0} \frac{s^2/s^2}{1-\frac{C(s)}{R(s)}} = \frac{1}{K_V} = \frac{1}{0.419K_I} e ss = s → 0 lim 1 − R ( s ) C ( s ) s 2 R ( s ) = s → 0 lim 1 − R ( s ) C ( s ) s 2 / s 2 = K V 1 = 0.419 K I 1
Steady-state error for a parabolic input t 2 u ( t ) t^2u(t) t 2 u ( t )
For a parabolic input R ( s ) = 1 s 3 R(s) = \frac{1}{s^3} R ( s ) = s 3 1 , the steady-state error is given by:
e s s = lim s → 0 s 3 R ( s ) 1 − C ( s ) R ( s ) = lim s → 0 s 3 / s 3 1 − C ( s ) R ( s ) = 1 K A = 1 0.419 K P e_{ss} = \lim_{s\to 0} \frac{s^3R(s)}{1-\frac{C(s)}{R(s)}} = \lim_{s\to 0} \frac{s^3/s^3}{1-\frac{C(s)}{R(s)}} = \frac{1}{K_A} = \frac{1}{0.419K_P} e ss = s → 0 lim 1 − R ( s ) C ( s ) s 3 R ( s ) = s → 0 lim 1 − R ( s ) C ( s ) s 3 / s 3 = K A 1 = 0.419 K P 1
Problemè 4
Ideally you want your controller design to reject a step disturbance input at D ( s ) D(s) D ( s ) . This means that in the steady state for D ( s ) = 1 s D(s) = \frac{1}{s} D ( s ) = s 1 , the output Y ( s ) Y(s) Y ( s ) is unchanged.
Ignoring the input R ( s ) R(s) R ( s ) , what is the transfer function E ( s ) D ( s ) \frac{E(s)}{D(s)} D ( s ) E ( s ) in terms of G 1 ( s ) G_1(s) G 1 ( s ) and G 2 ( s ) G_2(s) G 2 ( s ) ?
To find the transfer function E ( s ) D ( s ) \frac{E(s)}{D(s)} D ( s ) E ( s ) , then the transfer function E ( s ) D ( s ) \frac{E(s)}{D(s)} D ( s ) E ( s ) is given by:
E ( s ) D ( s ) = G 1 ( s ) G 2 ( s ) 1 + G 1 ( s ) G 2 ( s ) \frac{E(s)}{D(s)}=\frac{G_1(s)G_2(s)}{1+G_1(s)G_2(s)} D ( s ) E ( s ) = 1 + G 1 ( s ) G 2 ( s ) G 1 ( s ) G 2 ( s )
For G 1 ( s ) = K C ( s + z ) G_1(s) = K_C(s+z) G 1 ( s ) = K C ( s + z ) and G 2 ( s ) = 0.419 s 2 G_2(s) = \frac{0.419}{s^2} G 2 ( s ) = s 2 0.419 what is the steady state error resulting from step inputs R ( s ) = A s R(s) = \frac{A}{s} R ( s ) = s A and D ( s ) = B s D(s) = \frac{B}{s} D ( s ) = s B
The steady-state error to step input R ( s ) = A s R(s) = \frac{A}{s} R ( s ) = s A is given by:
e s s ( R ) = lim s → 0 A s ( 1 1 + L ( s ) ) e_{ss}(R) = \lim_{s\to 0} \frac{A}{s}(\frac{1}{1+L(s)}) e ss ( R ) = s → 0 lim s A ( 1 + L ( s ) 1 )
with L ( s ) = G 1 ( s ) G 2 ( s ) = 0.419 K C ( s + z ) s 2 L(s) = G_1(s)G_2(s) = \frac{0.419K_C(s+z)}{s^2} L ( s ) = G 1 ( s ) G 2 ( s ) = s 2 0.419 K C ( s + z )
e s s ( R ) = lim s → 0 A s ( 1 1 + 0.419 K C ( s + z ) s 2 ) = A 0.419 K C e_{ss}(R) = \lim_{s\to 0} \frac{A}{s}(\frac{1}{1+\frac{0.419K_C(s+z)}{s^2}}) = \frac{A}{0.419K_C} e ss ( R ) = s → 0 lim s A ( 1 + s 2 0.419 K C ( s + z ) 1 ) = 0.419 K C A
The steady-state error to step input D ( s ) = B s D(s) = \frac{B}{s} D ( s ) = s B is given by: e s s ( D ) = B 0.419 K C e_{ss}(D) = \frac{B}{0.419K_C} e ss ( D ) = 0.419 K C B
Thus, the total steady-state error is e s s = e s s ( R ) + e s s ( D ) = A + B 0.419 K C e_{ss} = e_{ss}(R) + e_{ss}(D) = \frac{A+B}{0.419K_C} e ss = e ss ( R ) + e ss ( D ) = 0.419 K C A + B
For G 1 ( s ) = K D s + K P + K I s G_1(s) = K_Ds + K_P + \frac{K_I}{s} G 1 ( s ) = K D s + K P + s K I and G 2 ( s ) = 0.419 s 2 G_2(s) = \frac{0.419}{s^2} G 2 ( s ) = s 2 0.419 what is the steady state error resulting from step inputs R ( s ) = A s R(s) = \frac{A}{s} R ( s ) = s A and D ( s ) = B s D(s) = \frac{B}{s} D ( s ) = s B
L ( s ) = G 1 ( s ) G 2 ( s ) = 0.419 ( K D s + K P + K I s ) s 2 = 0.419 K D s 2 + 0.419 K P s + 0.419 K I s 3 L(s) = G_1(s)G_2(s) = \frac{0.419(K_Ds + K_P + \frac{K_I}{s})}{s^2} = \frac{0.419K_Ds^2 + 0.419K_Ps + 0.419K_I}{s^3} L ( s ) = G 1 ( s ) G 2 ( s ) = s 2 0.419 ( K D s + K P + s K I ) = s 3 0.419 K D s 2 + 0.419 K P s + 0.419 K I
The steady-state error to step input R ( s ) = A s R(s) = \frac{A}{s} R ( s ) = s A is zero:
e s s ( R ) = lim s → 0 A s ( 1 1 + L ( s ) ) = lim s → 0 A s ( 1 1 + 0.419 K D s 2 + 0.419 K P s + 0.419 K I s 3 ) = 0 e_{ss}(R) = \lim_{s\to 0} \frac{A}{s}(\frac{1}{1+L(s)}) = \lim_{s\to 0} \frac{A}{s}(\frac{1}{1+\frac{0.419K_Ds^2 + 0.419K_Ps + 0.419K_I}{s^3}}) = 0 e ss ( R ) = s → 0 lim s A ( 1 + L ( s ) 1 ) = s → 0 lim s A ( 1 + s 3 0.419 K D s 2 + 0.419 K P s + 0.419 K I 1 ) = 0