Chapter 13

# 13.3 Lead Controller Design – Solved Examples

### 13.3.1 Lead Controller Design – Solved Example 1

Consider a typical unit feedback closed loop control system, as shown, which is to operate under Lead Control.

The Lead Controller transfer function is as follows:

$g_c(s) = K_c \cdot \frac{\tau s + 1}{\alpha\tau s +1} = \frac{a_1 s + a_0}{b_1 s + 1}$

Where $\tau$ is the so-called Lead Time Constant and $a<1$ The process transfer function G(s) is:

$G(s)=\frac{0.5}{(s+5){(s+0.1)}^2}$

Open loop frequency response plots of G(s) are shown in Figure 13‑3. The closed loop performance requirements are: the Steady State Error for the unit step input for the compensated closed loop system is to be no more than 2%; Percent Overshoot of the compensated closed loop system is to be no more than 15%; the Settling Time, $T_{settle(\pm 2 \%)}$, is to be no more than 5 seconds – preferably less.

Check what the current (uncompensated system) values of the Phase Margin, $\Phi_m$, and the Crossover Frequency, $\omega_{cp}$, are. Estimate the uncompensated closed loop step response specs: Percent Overshoot, PO, Steady State Error, $e_{ss(step\%)}$, and Settling Time, $T_{settle(\pm 2 \%)}$. Next, based on the specifications, calculate the required values of the Phase Margin for the compensated system, $\Phi_{mc}$, and the DC gain of the controller, $K_{dc}$.

Design the Lead Controller such that it meets the closed loop response requirements, and write the Lead Controller transfer function and its parameters. For your Controller, estimate the compensated closed loop step response specs: Percent Overshoot, PO, Steady State Error, $e_{ss(step\%)}$, Rise Time, $T_{rise(100\%)}$, and Settling Time, $T_{settle(\pm 2\%)}$.

SOLUTION:

Let’s start by finding the open loop DC gain – note that reading the gains off the Bode plots is difficult due to decibel units – here the gain could be read off from Figure 13‑3 as somewhere close to 20 dB. It is therefore, preferable to use the transfer function, if available, to compute the accurate gain values. Here we can compute the Uncompensated Open Loop DC gain – there is no controller, i.e. $G_c(s)=1$ – from the process transfer function:

$K_{dcopen}=\lim_{s\rightarrow 0}G(s)=\lim_{s\rightarrow 0}\frac{0.5}{(s+5){(s+0.1)^2}}=\frac{0.5}{5\cdot0.01}=10$

The uncompensated closed loop DC gain is then:

$K_{dc} = \frac{K_{dc0}}{1 + K_{dc0}} = \frac{10}{11}=0.9091$

The Phase Margin and the crossover frequency can be read off from the Bode plot in Figure 13‑3 as: $\Phi_m = 33^{\circ}$ and $\omega_{cp} = 0.3$ rad/sec. The damping ratio $\zeta$ and the frequency of natural oscillations $\omega_n$ for the uncompensated closed loop system can now be estimated by either reading it off the Phase Margin graph in Figure 12‑9, or by using the formula:

$\zeta = \frac{\tan\Phi_m}{2\sqrt{\sqrt{({\tan\Phi_m)}^2 + 1}}} \rightarrow \zeta=0.3$

$\omega_n=\frac{\tan\Phi_m\cdot\omega_{cp}}{2\zeta}=0.328$

$G_m(s)=K_{dc}\frac{\omega_n^2}{s^2 + 2\zeta s + \omega_n^2}$

The uncompensated closed loop model based on the Open Loop Frequency Response is then:

$G_{mu}(s) = \frac{0.0979}{s^2 + 0.1982s + 0.1077}$

Model specs can be calculated as:

$PO = 100\cdot \left ( e^{\frac{-\zeta\pi}{\sqrt{1-\zeta^2}}} \right ) = 37\%$

$T_{settle(\pm2\%)}=\frac{4}{\zeta\omega_n}=40.4$

$T_{rise(100\%)}=\frac{\pi - \cos\zeta^{-1}}{\omega_n\sqrt{1-\zeta^2}}=6$

$T_{rise(100\%)}=\frac{\pi - \cos\zeta^{-1}}{\omega_n\sqrt{1-\zeta^2}}=6$

$G_{cl}(s) = \frac{0.5}{s^3+5.2s^2+1.01s+0.55}$

$G_{cl}(s) = \frac{0.5}{(s+5.02)(s^2+0.1793s+0.1095)}$

The closed loop transfer function has a dominant pair of complex poles, with the damping ratio $\zeta=0.27$ and the natural frequency of oscillations $\omega_n=0.33$ rad/sec, which are close to the model estimates: $\zeta=0.3$, $\omega_n=0.33$ rad/sec. The actual transfer function also has a real pole at – 5.02, which is negligible, compared to the dominant pair of closed loop poles at $-0.09\pm j0.32$. Thus, the assumed model is quite accurate – see the actual step response comparison, shown in Figure 13‑4, Figure 13‑30, and the calculated specs.

Actual specs, compared to the model specs (based on uncompensated Open Loop Bode plots), are:

 Actual Uncompensated System $G_{mu}(s)$ – Model for the Uncompensated System PO 41% 37% $e_{ss(step\%)}$ 9.1% 9.1% $T_{rise(0-100\%}$ 6.0 sec 6.0 sec $T_{settle(\pm 2\%)}$ 42.0 sec 40.4 sec

The specs estimates from the model are very accurate, with all specs meeting the required values.

Now, the Lead Controller design – we can choose a simplified design or an analytical design. First, always calculate the required DC gain of the controller – this part is the same in both approaches.

Based on the required error specification:

$e_{ss(step)c}=2\% \rightarrow \frac{1}{1+K_{posc}} = 0.02$

$K_{posc}=\frac{1}{0.02}-1\rightarrow K_{posc}=49$

The compensated closed loop DC gain should be:

$K_{dc(comp)} = \frac{K_{posc}}{1+K_{posc}} = \frac{49}{50}=0.98$

The controller DC gain is then:

$K_c = a_0 = \frac{K_{posc}}{K_{posu}}=\frac{49}{10}=4.9$

Next, “translate” the required PO spec into the equivalent closed loop damping ratio. For PO = 15%, the required damping ratio, based on Figure 7‑4, is $\zeta = 0.517$. The compensated Phase Margin should be, based on Figure 12‑9: $\Phi_{m(comp)}=52^\circ$. Let’s round off the Phase Margin to: $\Phi_{m(comp)}=55^\circ$. Next, “translate” the required Settling Time spec into the equivalent closed loop frequency of natural oscillations:

$T_{settle(\pm2\%)} \frac{4}{\zeta\omega_n}=5 \rightarrow \omega_n=1.55$

That frequency can then be “translated” into the minimum required Phase Margin crossover frequency:

$\omega_{cp} = \frac{2\zeta\omega_n}{\tan(\Phi_m)} = \frac{2\cdot0.517\cdot1.55}{\tan(55^\circ)}=1.12$

What do we do next? The two approaches differentiate on how we proceed.

### 13.3.1.1 Lead Controller Design Solved Example 1: The “Simplified” Lead Design

Based on the required PO spec, let’s decide on the “good” Phase Margin for the compensated system – it will be $\Phi_{m(comp)}=55^{\circ}$. Next, based on the required Settling Time spec, let’s decide on a “good” crossover frequency – let us pick $\omega_{cp}=1.5$. Remember that it is an arbitrary choice that does not guarantee that the solution is the “best”, or “optimal”. It will result in one possible improvement of the system response. Note that in the Lead Design, the compensated crossover frequency will always be to the right of the uncompensated frequency of the crossover. If it were to the left of the uncompensated frequency of the crossover, we would end up with a Lag Design.

At the chosen frequency of 1.5 rad/sec, we need to find the magnitude and phase of the original system G(s). Recall that reading values off the dB plot is notoriously inaccurate, and thus it is better to substitute $s=j1.5$ into the transfer function G(s) to obtain more accurate values of magnitude and phase:

$\left |G(j1.5)\right | = 0.042 \frac{V}{V} = -27.5dB$

$\angle G(j\omega) = -189^{\circ}$

Recall that we are gaining the most phase “lead” at the mid-point frequency of the Lead Controller (see the graph below). That mid-point will become our intended compensated crossover frequency, at which the Phase Margin will be measured. If we want to $\Phi_{m(comp)}= 55^{\circ}$, then the required “phase lift” at $\omega_{cp}= 1.5$ would be:

$\theta=-180^{\circ}+\Phi_m - \angle G(j1.5) = -180^{\circ} + 55^{\circ} + 189^{\circ}=64^{\circ}$

We will get that phase lift from the largest phase gain of the Lead Controller:

$\varphi_{max} = \sin^{-1}\left (\frac{1-\alpha}{1+\alpha} \right ) = 64^{\circ} \rightarrow \alpha = 0.053$

The mid-point frequency of the Lead Controller is equal to 1.5 rad/sec:

$\omega_0 = \frac{1}{\sqrt\alpha \cdot\tau} = 1.5 \rightarrow \tau = 2.896$

As seen on the plot, there is a gain increase at the mid-point frequency of the Lead Controller, equal to:

$\frac{1}{\sqrt{\alpha}} = 4.34$

Further, remember that since we are going to use the DC gain of 4.9, the new total gain at the chosen crossover frequency of 1.5 is going to be the original gain of $G(j1.5)$ multiplied by 4.9 and by 4.34:

$G_{new}(j1.5) = G_{old}(j1.5) \cdot 4.9 \cdot4.34=0.042\cdot4.9\cdot4.34=0.9$

To make that point the compensated crossover frequency, the total “new” gain has to be equal to 0 dB (1 V/V) – thus we can calculate the additional required adjustment of the DC gain of the controller equal to 1/0.9. The total DC gain of the controller is equal to 4.9/0.9 = 5.43. Note that, should the adjustment require a reduction of the controller DC gain, we would not be meeting the error specs, which would require reconsidering our choice of the crossover frequency.

The controller transfer function is:

$G_c(s)=K_c\cdot\frac{\tau s + 1}{\alpha\tau s +1} = 5.43\cdot\frac{2.89s+1}{0.053\cdot2.89s + 1} = 5.43\cdot\frac{2.89s+1}{0.154s + 1}$

$G_c(s)=\frac{a_1 s + a_0}{b_1 s + 1} = \frac{15.73s + 5.43}{0.265s +1}$

The open loop Bode plots before and after compensation and the system Phase Margin are shown in Figure 13‑22 and the compensated Phase Margin is shown in – it is $\Phi_m = 55^{\circ}$ at the frequency of $\omega_{cp(comp)}=1.5$ rad/sec, as was chosen for this design.

The expected compensated closed loop response specs can be estimated using the dominant poles model again. Use the formula or read off the Phase Margin graph:

$\zeta = \frac{\tan\Phi_m}{2\sqrt{{(\tan\Phi_m)^2 +1}}} \rightarrow \zeta=0.54$

$\omega_n = \frac{\tan\Phi_m\cdot\omega_{cp}}{2\zeta} = 1.98$

The compensated open loop gain:

$K_{pos}=\lim_{s\rightarrow 0} G_{open}(s) = \lim_{s\rightarrow 0} G_{c}(s) \cdot G_(s) = 5.3\frac{0.5}{5\cdot0.01} =54.32$

The compensated closed loop gain:

$K_{dc} = \frac{K_{dco}}{1 + K_{dco}} = \frac{54.32}{55.32} = 0.982$

The compensated closed loop model:

$G_{mc}(s)=\frac{3.852}{s^2+2.142s +3.923}$

Model specs can be calculated as:

$PO = 100 \cdot \left(e^{\frac{-\zeta\pi}{\sqrt{1-\zeta^2}}} \right ) = 13.27\%$

$T_{settle(\pm2\%)}=\frac{4}{\zeta\omega_n}=3.73$

$T_{rise(100\%)} = \frac{\pi-cos\zeta^{-1}}{\omega_n\sqrt{1-\zeta^2}}=1.286$

$e_{ss(step\%)}=\frac{1}{1 + k_{pos}}\cdot100\%=\frac{1}{1 + 31}\cdot 100\% = 1.8\%$

The actual closed loop transfer function is:

$G_{cl}(s) = \frac{51.246(s+0.345)}{(s+8.33)(s+0.3924)(s^2+2.993s+5.514)}$

As we can see, the actual closed loop transfer function has a dominant pair of complex poles at $-1.5\pm j1.81$, with the damping ratio $\zeta=0.637$ and the natural frequency of oscillations $\omega_n = 2.35$rad/sec, as well as a zero at -0.3453 and two real poles at –8.33 and at -0.3924. The dominant poles model is not as accurate as before, because now an additional pole-zero combo shows up, closer to the Imaginary axis than the real coordinate of the dominant pair, and they do not totally cancel out. Their net residual effect on the closed loop response is that there is a slight additional overshoot caused by the zero, and the Settling Time is actually a bit slower than expected – see the actual step response comparison in Figure 13‑7 and the comparison of the specs below.

Actual specs, compared to the model specs (based on compensated Open Loop Bode plots), are:

 $G_{mc}(s)$ – Model for Compensated System Actual Compensated System PO 13.3% 16.8% $e_{ss(step\%)}$ 1.8% 1.8% $T_{rise(0-100\%)}$ 1.29 sec 1.25 sec $T_{settle(\pm2\%)}$ 3.7 sec 5.5 sec

We could try to improve on this design by trying a different choice of the crossover frequency. The biggest problem is that a different choice of the crossover frequency may require us to make a final adjustment to the DC gain of the open loop (the one we need to make the total open loop gain equal to 0 dB at the crossover frequency) to be less than 1, and that will cause us to miss the steady state specs, requiring yet another iteration. However, it is much easier to meet all conditions using the analytical design formulae, which we will try next.

Plus of the simplified design – it will never lead to negative values of the controller parameters, which may happen with the Analytical Lead Design.

Minus of the Simplified Lead Design – some choices of the crossover frequency may result in the final adjustment of the open loop DC gain that will not meet the error specs. As well, Lead Design always results in adding a zero to the closed loop transfer function that is not totally cancelling out and thus is affecting the shape of the closed loop response by increasing its PO. The solution to both these problems is a trial & error approach to finding an acceptable set of controller parameters, but it is tedious.

### 13.3.1.2 Lead Controller Design Solved Example 1: The “Analytical” Lead Design

The analytical design gives us more flexibility to shape the open loop response by choosing different locations for the crossover frequency and quickly checking the resulting open loop parameters and the closed loop response.

Remember that the first step is always to choose the required DC gain based on the error specs – the calculations are identical to the simplified method, so the Controller DC gain ($a_0$) will be the same.

Based on the required error specification:

$e_{ss(step)c} = 2\% \rightarrow \frac{1}{1+K_{posc}}=0.02$

$K_{posc}=\frac{1}{0.02}-1 \rightarrow K_{posc}=49$

The compensated closed loop DC gain should be:

$K_{dc(comp)} = \frac{K_{posc}}{1+K_{posc}}=\frac{49}{50}=0.98$

The controller DC gain is then:

$K_c = a_0 = \frac{K_{posc}}{K_{posu}} = \frac{49}{10} = 4.9$

Next, we pick the Phase Margin – in this example, we decided to have the Phase Margin of $55^{\circ}$, so let’s stick with this value. Next, we need to choose the crossover frequency – as long as it is more than 0.3 (the uncompensated value). First, let’s choose the same value as in the simplified design:

$\omega_{cp(comp)} = 1.5 rad/sec$

To use the derived formulae for the controller constants $a_1$ and $b_1$, we need to find the uncompensated open loop Bode plot the phase and the gain at that frequency. Recall that reading values off the dB plot is notoriously inaccurate, and thus it is better to substitute $s=j1.5$ into the transfer function G(s) to obtain more accurate values of magnitude and phase – we already did that for the simplified design:

$\left | G(j1.5) \right | = 0.042 \frac{V}{V}=-27.5dB$

$\angle G(jw) = -189^{\circ}$

Next, substitute these values into the formulae:

$\theta = -180^{\circ} + \Phi_m -\angle G(j1.5) = -180^{\circ}+55^{\circ}+189^{\circ} = 64^{\circ}$

Note that the “lift” angle is similar to the “maximum phase lift” in the simplified design, except that we don’t need to choose just this one maximum value, as you will see later. Next, we substitute the values into the Analytical Design formulae:

$a_1 = \frac{1-a_0 \cdot \left |G(j\omega_{cp}) \right |\cdot\cos\theta}{\omega_{cp} \cdot \left |G(j\omega_{cp}) \right |\cdot\sin\theta}=15.9$

$b_1 = \frac{\cos\theta-a_0 \cdot \left |G(j\omega_{cp}) \right |}{\omega_{cp} \cdot\sin\theta}=0.17$

These values are very close to the ones obtained using the simplified approach, as expected. The closed loop response will also be similar. Recall that that design had more Percent Overshoot than expected, and a longer Settling Time, so let us look for an improvement.

With the analytical design, we can easily choose a different frequency of the crossover (as long as it is more than the uncompensated crossover frequency of 0.3 rad/sec) and see if the resulting closed loop step response simulations will improve. Knowing that the Lead design causes more PO than expected, we can also overcompensate slightly for it by making the Phase Margin larger than the dominant poles model suggests. Let’s say, make $\omega_{cp(comp)} = 1.8$ rad/sec and $\Phi_{m} = 60^{\circ}$ . Again, we need to find the gain of the uncompensated system at that frequency (1.8 rad/sec) – recall that reading it off the graph is inaccurate so it is best to substitute $s=j1.8$ into G(s):

$\angle G(j1.8) = -193^{\circ}$

$\left | G(j0.2) \right | = 0.029 \frac{V}{V} = -30.8dB$

Next, substitute these values into the formulae:

$\theta = -180^{\circ} + \Phi_m - \angle G(j0.2) = -180^{\circ} +60^{\circ}+193^{\circ} = 73^{\circ}$

$a_1 = \frac{1-a_0 \cdot \left |G(j\omega_{cp}) \right |\cdot\cos\theta}{\omega_{cp} \cdot \left |G(j\omega_{cp}) \right |\cdot\sin\theta}=19.21$

$b_1 = \frac{\cos\theta-a_0 \cdot \left |G(j\omega_{cp}) \right |}{\omega_{cp} \cdot\sin\theta}=0.083$

Here we see that the controller coefficients are acceptable, both being positive. Recall that the controller pole in RHP would be unacceptable, because it means an unstable open loop transfer function – even if the resulting closed loop is stable, for safety reasons we do not want to implement that – in case if the closed loop incidentally opens (a malfunction), we would have an unstable system on our hands. The RHP location of the controller zero would also be unacceptable – even if the controller pole is in a stable location, the RHP zero will introduce an effective delay into the system, extending both the Rise Time and the Settling Time. Recall that we will never get that kind of surprise in the “simplified” lag design. Let’s check the compensated system response. The open loop Bode plots before and after compensation are shown in Figure 13‑8 and the system Phase Margin is shown in Figure 13‑9. The controller transfer function is:

$G_c(s) = \frac{a_1 s + a_0}{b_1 s + 1} = \frac{19.21s + 4.9}{0.083 s + 1}$

The expected compensated closed loop response can be estimated using the dominant poles model again. Use the formula or read off the Phase Margin graph in Figure 12‑9:

$\zeta = \frac{\tan\Phi_m}{2\sqrt{\sqrt{(\tan\Phi_m)^2 + 1}}} \rightarrow \zeta = 0.612$

$\omega_0 = \frac{\tan\Phi_m\cdot\omega_{cp}}{2\zeta} = 2.546$

The compensated closed loop model:

$G_{mc}(s) = \frac{6.35}{s^2 + 3.18s + 6.48}$

Model specs can be calculated as:

$PO = 100\cdot \left ( e^{\frac{-\zeta \pi}{\sqrt{1-\zeta^2}}} \right ) = 8.8\%$

$T_{settle(\pm2\%)}=\frac{4}{\zeta\omega_n} = 2.57$

$T_{rise(100\%)}=\frac{\pi - \cos\zeta^{-1}}{\omega_n\sqrt{1-\zeta^2}} = 1.11$

$e_{ss(step\%)} = \frac{1}{1+K_{pos}}\cdot100\% = \frac{1}{1+49}\cdot100\% =2\%$

The actual closed loop transfer function:

$G_{cl}(s) = \frac{115.75 (s + 0.2551)}{(s+13.13)(s+0.2688)(s^2 + 3.852s + 8.536)}$

Note that the closed loop model based on the dominant poles is now more accurate than in the case of the “simplified” design – while the additional pole-zero combo still shows up, both closer to the Imaginary axis than the complex pair of poles at $-1.93\pm j2.2$, their net effect on the closed loop response is almost negligible because of a much better “near-cancellation”: we have a zero at -0.2551, and a pole at -0.2688. Before they were at -0.3453 and at -0.3924, respectively.

See the actual step response comparison in Figure 13‑10 and the comparison of the specs below. The actual specs, compared to the model specs (based on compensated Open Loop Bode plots), are:

 Actual Compensated System $G_{mc} (s)$ – Model for the Compensated System PO 10.5% 8.8% $e_{ss(step\%)}$ 2% 2% $T_{rise(0-100\%)}$ 1.1 sec 1.1 sec $T_{settle(\pm 2\%)}$ 12.1 sec 5.5 sec

Finally, let’s see how much of an improvement we achieved by introducing the Lead Controller – see the comparison of the responses in Figure 13‑11. The only spec that differs from the model is the Settling Time. This is due to an additional pole in the transfer function close to the significant region, and the not-perfect pole-zero cancellation. These two additional poles and the zero affect the system response. The not-exactly cancelled zero increases the Percent Overshoot, and the two poles slow down the Settling Time.

Plus of the Analytical Lead Design – it can be quickly iterated to find a much better system performance, without compromising any of the specifications, including the DC gain, which may happen with the Simplified Lead Design.

Minus of the Analytical Lead Design – sometimes the design formulae will yield negative, i.e. unacceptable, values of controller parameters. This can be addressed by a slightly different choice of the crossover frequency and the phase margin.

### 13.3.2 Lead Controller Design – Solved Example 2

Consider another unit feedback closed loop control system (see previous example), which is to operate under Lead Control. The process transfer function G(s) is:

$G(s)=\frac{262}{(s+0.3)(s+5)(s+50)}$

Open loop frequency response plots of G(s) are shown in Figure 13‑12. The closed loop performance requirements are: the Steady State Error for the unit step input for the compensated closed loop system is to be equal to 1%; Percent Overshoot of the compensated closed loop system is to be no more than 15%; the Settling Time, $T_{settle{(\pm 2 \%)}}$, is to be no more than 0.3 seconds, and the Rise Time, $T_{rise{(0-100\%)}}$, is to be no more than 0.1 seconds.

Let’s start with an estimate of the uncompensated closed loop step response specs: $PO$, $e_{ss(step\%)}$, $T_{rise(0-100\%)}$ and $T_{settle(\pm 2 \%)}$.

$K_{pos(u)}=\frac{262}{(0.3)(5)(50)} = 3.493$

Estimates of the uncompensated system step error can be calculated directly from the Position Constant:

$e_{ss(step\%)}=\frac{1}{1+K_{pos(u)}}\cdot100\%=\frac{1}{1+3.493}\cdot100\%=22.3\%$

Or, we can use the closed loop DC gain:

$K_{dcG_{clu}(0)}=\frac{262}{337}=0.777$

$e_{ss(step\%)}=(1-K_{dc})\cdot100\%=22.3\%$

Let’s check the model for the uncompensated system – from open loop Bode plots, the Phase Margin is so large ($\Phi_{m(uncomp)}=94^{\circ}$), the formulas clearly do not apply – it will give you a damping ratio close to 1 – the system is overdamped! We have to default to the transfer function calculations of the dominant poles model – fortunately, we can use Matlab to do the heavy lifting:

$G_{clu}(s)=\frac{\frac{262}{(s+0.3)(s+5)(s+50)}}{1 + \frac{262}{(s+0.3)(s+5)(s+50)}} = \frac{262}{s^3 + 55.3s^2 + 266.3s + 337}$

$G_{clu}(s) = \frac{262}{(s+50.12)(s^2+5.2s+6.72)}$

The uncompensated closed loop system has one real pole and two complex poles with the damping ratio almost equal to 1: -50.1, $-2.59\pm j 0.086$ ($\zeta = 0.999$). This is NOT an underdamped dominant poles model! We can have the model based on the one DOUBLE dominant real pole – critical damping ($\zeta = 1$)  – see the step response of the actual uncompensated closed loop system and of the 2nd order model, shown in Figure 13‑13.

$K_{dc} = G_{clu}(0)=\frac{262}{337}=0.777$

$G_{mu}(s) = 0.777\frac{6.72}{s^2 + 5.2s + 6.72}$

Estimates from the model: $\omega_n = 2.59, \zeta=1.0, PO=0\%$

$T_{settle(\pm2\%)}=\frac{4}{\zeta\omega_n}=1.54$

$T_{rise(10-90\%)}\approx 0.8\cdot T_{settle(\pm2\%)}=1.23$

$e_{ss(step])}=1-K_{dc}=1-0.777=0.223$

$e_{ss(step])}=22.3\%$

Note it is difficult to estimate the Rise Time for a critically damped system. One way would be to assume $T_{rise}\approx T_{settle}$. Check with “stepeval” what the actual specs are:  $PO = 0\%$, $T_{settle(\pm2\%)}=22$ sec, $T_{rise(10-90\%)}=1.3$ sec, $e_{ss(step\%)}=22.3\%$.

Next, decide on the DC gain of the Controller ($a_0$) that would meet the design requirements. Calculate the DC gain of the controller, $K_c = a_0$ – for the error to be 1%:

$e_{ss}=\frac{1}{1+K_{pos}}$

$0.01=\frac{1}{1+K_{pos}} \rightarrow K_{pos(c)}=\frac{1}{0.01}-1 =99$

From that we can calculate the DC gain of the controller transfer function, $a_0$:

$a_0=\frac{K_{pos(c)}}{K_{pos)u}}=\frac{99}{3.493}=28.34$

Decide what value of the Phase Margin for the compensated system ($\Phi_{m, c}$), and what value of the crossover frequency for the compensated system ($\omega_{cp, c}$), would meet the design requirements. To figure out the compensated system Phase Margin and frequency of the crossover, we should look at the “desired” values of the closed loop dominant poles model – check the plot of PO vs. damping ratio in Figure 7‑4.

$PO = 100\cdot\left ( e^{\frac{-\zeta\pi}{\sqrt{1-\zeta^2}}} \right )$

$PO=15\% \rightarrow \zeta = 0.5169$

$T_{settle(\pm2\%)}=\frac{4}{\zeta\omega_n}=0.3\rightarrow \omega_n =25.8$

We can now put together the model for the compensated closed loop system:

$K_{dc}=\frac{K_{pos(c)}}{1+K_{pos(c)}}=\frac{99}{1+99}=0.99$

$G_{mc}(s)=K_{dc}\frac{\omega_n^2}{s^2+2\zeta\omega_n s + \omega^2}=0.99\cdot\frac{665.3}{s^2+26.67s+665.3}$

$G_{mc}(s)=0.99\cdot\frac{658.6}{s^2+26.67s+665.3}$

Let’s check if this choice of $\zeta$ and $\omega_n$ will also result in an acceptable Rise Time:

$T_{rise(0-100\%)}=\frac{\pi-\cos^{-1} \zeta}{\omega_n\sqrt{1-\zeta^2}}=0.096$

This is fine, so the next step is to “translate” the closed loop model parameters into the Phase Margin and crossover frequency: based on Figure 12‑9 we have: $\zeta = 0.5169 \rightarrow \Phi_m \approx 55^{\circ}$  Next, solve for the required crossover frequency:

$\omega_{cp} \approx \omega_n \sqrt{1-2\zeta^2}=17.6$

Alternatively, we can use this formula:

$\omega_{cp} = \frac{2\zeta\cdot\omega_n}{(\tan\Phi_m)}=19.96$

Let’s pick the values of $\Phi_{m(comp)} = 55^{\circ}$ and $\omega_{cp(comp)}$ rad/sec, and $a_0=24.25$ Next, the appropriate Controller parameters and clearly write the Lead Controller transfer function, $G_c(s)$. We will use the analytical design formulae, but first we need to compute open loop gain and phase values at the chosen frequency of the crossover – we will use Matlab to obtain accurate values, as reading them off the graph may be too rough; see if you can read off the value close to -40 dB directly off the open loop Bode plot in Figure 13‑12. Matlab values are shown in Figure 13‑14.

$\omega_{cp(comp)}=20rad/sec\rightarrow \left | G(j20) \right | = -38.6dB$

$\left | G(j20) \right | = 0.0118$

$\angle G(j\omega) = -186.9^{\circ}$

We can now compute the “lift” angle:

$\theta=-180^{\circ}+\Phi_m-\angle G(j20)$

$\theta=-180^{\circ}+55^{\circ}+187^{\circ}=62^{\circ}$

Apply the formulae:

$a_1 = \frac{1-a_0\cdot \left | G(j\omega_{cp}) \right | \cdot \cos\theta}{\omega_{cp}\cdot \left | G(j\omega_{cp}) \right | \cdot \sin\theta} = \frac{1-28.34\cdot0.0118\cdot\cos62^{\circ}}{20\cdot0.0118\sin62^{\circ}} = 4.05$

$b_1 = \frac{\cos\theta-a_0\cdot \left | G(j\omega_{cp}) \right |}{\omega_{cp}\cdot \sin\theta} = \frac{\cos62^{\circ}-28.34\cdot0.0118}{20\cdot\sin62^{\circ}} = 0.0077$

$G_c(s)=\frac{a_1s+a_0}{b_1+1}=\frac{4.05s + 28.34}{0.0077s + 1}$

The Lead Controller transfer function coefficients are both positive, so the transfer function is acceptable! Let’s have a look at the compensated vs. uncompensated open loop Bode plots in Figure 13‑15. You can clearly see the characteristic shape of the open loop compensation – the increased open loop DC gain, the increased Phase Margin and crossover frequency. We can check the obtained values by using the “margin” function in Matlab, as shown in Figure 13‑21.

$\Phi_{m_c} = 55^{\circ}$ and $\omega_{cp_c} = 20rad/sec$

Next, estimate the compensated closed loop step response specs: PO, $e_{ss(step\%)}$, $T_{rise(0-100\%)}$, and $T_{settle(\pm2\%)}$.

The estimated specs are going to be as expected since we created the compensated closed loop system model based on these:

$\zeta = 0.5169$, $\omega_n = 25.8$, $K_{dc} = 0.99$

$G_{mc}(s)=\frac{658.6}{s^2 + 26.67s + 665.3}$

Thus, we expect these estimates, as per model:

$PO = 100\cdot\left ( e^{\frac{-\zeta\pi}{\sqrt{1-\zeta^2}}} \right )=15\%$

$T_{settle(\pm2\%)}=\frac{4}{\zeta\omega_n}=0.3$

$T_{rise(0-100\%)} = \frac{\pi-cos^{-1}\zeta}{\omega\sqrt{1-\zeta^2}}=0.1$

$e_{ss(step)}= 1 - K_{dc}=1-0.99=0.01$, $e_{ss(step\%)}= 1\%$

Let’s now check if the closed loop response conforms to these expectations. The compensated open loop system transfer function is:

$G_{open(c)}(s)=\frac{4.05s + 28.34}{0.0077s + 1}\cdot \frac{262}{(s+0.3)(s + 5)(s+50)}$

The closed loop system transfer function is:

$G_{cl(c)}(s)=\frac{\frac{4.05s + 28.34}{0.0077s + 1}\cdot\frac{262}{(s+0.3)(s+5)(s+50)}}{1 + \frac{4.05s + 28.34}{0.0077s + 1}\cdot \frac{262}{(s+0.3)(s+5)(s+50)}}$

$G_{cl(c)}(s)=\frac{68254(s+7)}{(s+139.9)(s+7.78)(s^2+36.77s+890)}$

The dominant pair of complex poles is at: $-18.4 \pm j 23.5$. Based on the closed loop transfer function, we can expect a near-pole-zero cancellation weakening the effect on the significant pole-zero pair at -7 and -7.78 respectively; the pole at -139.9 is not insignificant either but it should counteract the effect of the not-entirely cancelled zero. Conclusion – the actual compensated system response should be very similar to the predicted model. This is confirmed by the plots in Figure 13‑17. The actual system response, despite the presence of an extra pole and an extra zero, is not that different from the expected response, confirming the validity of this approach.

Below, we compare the expected specs, based on the model, with the actual system response specs, obtained by running the “stepeval” function. The actual specs, compared to the model specs, are:

 Actual Compensated System $G_{mc}(s)$ – Model for the Compensated System PO 14.9% 15% $e_{ss(step\%)}$ 1% 1% $T_{rise(0-100\%)}$ 0.093 sec 0.1 sec $T_{settle(\pm2\%)}$ 0.24 sec 0.3 sec

The specs estimates from the model are very accurate, with all specs meeting the required values.