Further Examples on Controller Design

Example 1

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\).

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)}.\]

Designing \(K\)

  • 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\).

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

Sorry, your browser does not support SVG.

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.

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.\]

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}.\]

Verification

Sorry, your browser does not support SVG.

Verification

  • 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.

Step Response

Sorry, your browser does not support SVG.

Step Response

  • 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\%\).

Example 2

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.

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)}.\]

Designing \(K\)

  • 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\).

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

Sorry, your browser does not support SVG.

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.

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. \]

Design \(T\)

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

Verification

Sorry, your browser does not support SVG.

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

Step Response

Sorry, your browser does not support SVG.

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.

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}.\]

Critical Gain and Period

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.\]

Bode Plot

Sorry, your browser does not support SVG.

PID Tuning

  • From the table of Ziegler-Nichols methods, we have \[K_p = 18,\,T_i = 1.405,\,T_d = 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.\)

Step Response

Sorry, your browser does not support SVG.