Question 10.19: Stability Analysis Using a Bode Plot Consider the feedback c...
Stability Analysis Using a Bode Plot
Consider the feedback control system in Figure 10.65, where
KG(s) = K\frac{100}{s(s+5)(s+20)}
and K is assumed to be 1. Plot the Bode magnitude and phase curves using MATLAB. Give comments on the stability of the closed-loop system.

Learn more on how do we answer questions.
Note that the Bode plot is drawn based on the loop gain
L(s) = K\frac{100}{s(s+5)(s+20)}
The MATLAB command used to sketch the Bode plot is bode. Assuming K = 1, the following is the MATLAB session:


>> num = [100];
>> den = conv(conv([1 0],[1 5]),[1 20]);
>> sysL = tf(num,den);
>> bode(sysL);
As observed in Figure 10.75, the phase curve crosses −180° at frequency 10 \text{rad/s}, and the corresponding magnitude is approximately −28 \text{dB}. This implies that a gain of 28 \text{dB} can be added before the magnitude plot reaches 0 \text{dB} at that frequency. Thus, the \text{GM} is 28 \text{dB}. The magnitude curve crosses 0 \text{dB} at frequency 1 \text{rad/s}, and the corresponding phase is −104°. This implies that a phase of 76° can be subtracted before the phase plot reaches −180°. Thus, the \text{PM} is 76°. According to Equations 10.61 and 10.62, the closedloop system with the proportional controller K = 1 is stable.
\begin{cases}\text{GM}>0 \text{db} \text{stable}\\\text{GM}=0 \text{db} \text{marginally stable} \\ \text{GM}<0 \text{db} \text{unstable} \end{cases} (10.61)
\begin{cases}\text{PM}>0° \text{stable}\\\text{PM}=0° \text{marginally stable} \\ \text{PM}<0° \text{unstable} \end{cases} (10.62)
More information on stability can be extracted from the \text{GM}. Specifically, the \text{GM} when K = 1 gives the stability range of K for which the proportional feedback control system is stable. In our case, \text{GM} = 28 \text{dB} or 25, and this indicates that the closed-loop system is stable for 0 < K < 25. We can also use the MATLAB command margin as follows:
>> [gm,pm,wcg,wcp] = margin(sysL)
which returns \text{GM}, \text{PM}, and the associated frequencies as defined in Figure 10.74. In our case, the \text{GM} returned by the command margin is 25. Note that the stability range of K can be determined in this way only for systems that change from being stable to unstable as K increases.