Table of Contents

1 Further Examples on Controller Design

1.1 Example 1

Consider a position control system:

Sorry, your browser does not support SVG.

Design a lag or lead compensator \(C(s)\) such that the following specifications are met:

  • The steady-state error due to a unit-step disturbance input \(D(s)\) is less that or equal to \(5\%\).
  • The gain crossover frequency is at least \(12\) rad/s.
  • The phase margin is no less than \(50^\circ\).

1.1.1 Designing \(K\)

  • The transfer function of the compensator is \[C(s) = K\frac{Ts+1}{\gamma Ts+1},\,\gamma > 0\]
  • The transfer function for the disturbance is (assuming \(R(s)=0\)) \[\frac{Y(s)}{D(s)}=\frac{G(s)}{1+C(s)G(s)} = \frac{\gamma T s+1}{s(1+0.1s)(1+0.02s)(\gamma Ts+1)+K(Ts+1)}.\]
  • If the disturbance is a unit step input, then \[Y(s) =\frac{G(s)}{s(1+C(s)G(s))}.\]
  • The steady-state error is given by \[e_{ss}=-y(\infty) = -\lim_{s\rightarrow 0}sY(s) = -\frac{1}{K}\]
  • To ensure that the error caused by disturbance is less than \(5\%\), we choose \(K = 1/0.05 = 20\).

1.1.2 Draw the Bode Plot of \(KG(s)\)

Sorry, your browser does not support SVG.

1.1.3 Select Compensator

  • The gain crossover frequency of \(KG(s)\) is \(12.3\) rad/s and the phase margin is \(-154.6+180 = 25.4^\circ\).
  • Since a lag compensator will result in a smaller gain crossover frequency, to meet the gain crossover frequency requirement, we shall adopt a lead compensator.

1.1.4 Design \(\alpha\)

  • The maximum phase lead we need is \[\phi = 50^\circ - 25.4^\circ + 10^\circ = 34.6^\circ.\]
  • \(\alpha\) can be derived from \[\alpha = \frac{1-\sin 34.6^\circ}{1+\sin 34.6^\circ} = 0.2756.\]

1.1.5 Design \(T\)

  • Using the straight line approximation, we know that between \(\omega = 10\) and \(\omega = 50\), the magnitude plot can be approximated by \[20\log 2+40-40 \log \omega.\]
  • The new gain crossover frequency is \[20\log 2+40 - 40 \log \omega_g =10\log \alpha \Rightarrow \omega_g = 19.52.\]
  • \(T\) can be computed as \[T = \frac{1}{\sqrt{\alpha}\omega_g} = 0.0976.\]
  • The (lead) compensator is \[C(s) = 20 \frac{0.0976 s + 1}{0.0267s+1}.\]

1.1.6 Verification

Sorry, your browser does not support SVG.

  • The phase margin is only \(-133.7+180 = 46.7^\circ\), which is less than desired margin.
  • This is because the phase goes down significantly when the gain crossover frequency is increased. Need to increase the phase lead.

1.1.7 Step Response

Sorry, your browser does not support SVG.

  • The original system response is very slow.
  • After changing \(K\) to \(20\), the system response faster (also the steady state error is reduced). However, the overshoot is \(50\%\).
  • By adding the lead-compensator, we can reduce the overshoot to \(20\%\).

1.2 Example 2

Consider a control system

Sorry, your browser does not support SVG.

Design a lead of lag compensator so that the following specifications are satisfied:

  • The steady-state error due to a unit step disturbance is no more than \(1\%\).
  • The phase margin is no less than \(50^\circ\).
  • The gain crossover frequency is between \(4\) and \(10\) rad/s.

1.2.1 Designing \(K\)

  • The transfer function of the compensator is \[C(s) = K\frac{Ts+1}{\gamma Ts+1},\,\gamma > 0\]
  • The transfer function for the disturbance is (assuming \(R(s)=0\)) \[\frac{Y(s)}{D(s)}=\frac{G(s)}{1+C(s)G(s)}.\]
  • If the disturbance is a unit step input, then \[Y(s) =\frac{G(s)}{s(1+C(s)G(s))}.\]
  • The steady-state error is given by \[e_{ss}=-y(\infty) = -\lim_{s\rightarrow 0}sY(s) = -\frac{1}{K}.\]
  • To ensure that the error caused by disturbance is less than \(1\%\), we choose \(K = 1/0.01 = 100\).

1.2.2 Draw the Bode Plot of \(KG(s)\)

Sorry, your browser does not support SVG.

1.2.3 Select Compensator

  • The gain crossover frequency of \(KG(s)\) is \(\approx 40\) rad/s.
  • Since a lead compensator will result in a larger gain crossover frequency, to meet the gain crossover frequency requirement, we shall adopt a lag compensator.

1.2.4 Design \(\beta\)

  • We need to find a frequency \(\omega_g\) where the phase is \(50-180+5= -125^\circ\).
  • From the phase plot, we choose \(\omega_g = 5\) rad/s.
  • Using the straight line approximation, we know that when \(\omega < 10\) and \(\omega = 50\), the magnitude plot can be approximated by \[20\log 200-20 \log \omega.\]
  • \(\beta\) can be calculated as \[20\log\beta =20\log 200-20\log \omega \Rightarrow \beta = 40. \]

1.2.5 Design \(T\)

  • We choose \(T = 10/\omega_g = 2\).

1.2.6 Verification

Sorry, your browser does not support SVG.

  • The phase margin is only \(-125.8+180 = 54.2^\circ\), which satisfies the specification.

1.2.7 Step Response

Sorry, your browser does not support SVG.

1.3 Example 3

Consider the plant as shown in the figure. Determine the values of PID parameters using the Ziegler-Nichols rules. Make fine tuning to achieve the maximum overshoot of \(25\%\).

Sorry, your browser does not support SVG.

1.3.1 Self-Oscillation Method

  • Since there is an integrator in the plant, the first method is not applicable (the open-loop step response will not plateau)
  • The transfer function of the plant is given, we need to find the gain margin and phase crossover frequency: \[\angle\frac{1}{j\omega_\phi(j\omega_\phi+1)(j\omega_\phi+5)} = -180^\circ \]
  • Using the property of complex numbers: \[\angle \left(5-\omega_\phi^2 + 6\omega_\phi j\right) = 90^\circ \Rightarrow \omega_\phi = \sqrt{5}.\]
  • The critical period is \[P_{cr} = 2\pi/\sqrt{5} = 2.8099.\]
  • The gain margin (critical gain) is \[K_{cr} =\sqrt{5}\times \sqrt{6}\times \sqrt{30} = 30.\]

1.3.2 Bode Plot

Sorry, your browser does not support SVG.

1.3.3 PID Tuning

  • From the table of Ziegler-Nichols methods, we have \[K_p = 0.6K_{cr} = 18,\,T_i = 0.5P_{cr} = 1.405,\,T_d = 0.125 P_{cr} = 0.351.\]
  • The step response of the closed-loop system with the designed PID is shown as the blue line. The maximum overshoot is \(60\%\).
  • To reduce the maximum overshoot, we increase \(T_i\) and \(T_d\), for example:
    • Red Line: \(K_p = 18,\,T_i =2.81 ,\,T_d = 0.702.\)
    • Black Line: \(K_p = 18,\,T_i =4.215 ,\,T_d = 1.053.\)

1.3.4 Step Response

Sorry, your browser does not support SVG.