SOLUTION:
The first step is to find number of poles and number of zeros. Looking at the phase plot, we see that at high frequency the phase is \(-270^{0}\). Therefore, there are 3 more poles than zeros. (A pole adds \(-90^{0}\) at high frequency and zero adds \(+90^{0}\)). Now we look at the magnitude plot and look for any slope change in the positive direction. There is none. The slope starts at \(-20\) dB/decade and remains negative going to \(-40\) dB/decade, then \(-60\) dB/decade.
This implies there are no zeros since a zero makes the slope positive. We now know that there are \(3\) poles and no zeros.
Next we look at where the phase starts. We see it starting at \(-90^{0}\). This means this is type 1 system (i.e. one pole at the origin.). So now we can say that our system has this general form
\[ G\left ( s\right ) =\frac{K}{s\left ( 1+\frac{s}{\tau _{1}}\right ) \left ( 1+\frac{s}{\tau _{2}}\right ) }\]
A pole at zero always starts at \(40\) dB at low frequency since \(20\log \frac{1}{\omega }=-20\log \omega \), and using \(\omega =0.01\) as the small frequency value (by convention), we obtain \(-20\log 0.01=40\) dB. It drops by \(-20\) dB/decade. Now we need to find the locations of the break points \(\tau _{1}\) and \(\tau _{2}\) (also called corner frequencies).
To find \(\tau _{1}\) we draw an asymptotic lines between the first segment which has slop of \(-20\) dB/decade and the next segment which has slope of \(-40\) dB per decade and look for the intersection point. We find it is \(\tau _{1}\approx 1\) rad/sec as illustrated below. Similarly between the second segment which has slope of \(-40\) dB/decade and the third segment which has slope of \(-60\) dB/decade we find the intersection to be around \(\tau _{1}\approx 10\) rad/sec
Now that we found the corner frequencies, our system has this form\[ G\left ( s\right ) =\frac{K}{s\left ( 1+s\right ) \left ( 1+\frac{s}{10}\right ) }\] The only thing left is to determine gain \(K\). This is done by looking at low frequency. By convention this is \(\omega =0.01\) rad/sec. At \(\omega =0.1\) we see the gain is about \(45\) dB, and since the slope is \(-20\) dB/decade we go back one decade, and conclude that magnitude at \(\omega =0.01\) rad/sec must be \(65\) dB.
Since pole at zero at \(40\) dB, then the difference, which is \(25\) dB, must be due to the gain \(K\). Hence we solve for \(K\) from\begin{align*} 20\log K & =25\\ K & =10^{\frac{25}{20}}=17.78 \end{align*}
Therefore our system is now complete. The open loop transfer function is\[ \fbox{$G\left ( s\right ) =\frac{17.78}{s\left ( 1+s\right ) \left ( 1+\frac{s}{10}\right ) }$}\] Now we Draw the magnitude straight line approximation (this below was drawn by hand using drawing program. This is not computer generated)
Now we draw the phase straight line approximation. Phase goes down by \(-45^{0}\) for each pole, starting one decade before the corner frequency, and ending one decade after the corner frequency. This is only for the approximation factors in the form \(\frac{1}{1+\frac{s}{\tau }}\). For the exact pole \(\frac{1}{s}\), it starts at \(-90^{0}\) and remains over the whole frequency range. For \(\tau _{1}=1\) rad/sec, we start from \(0.1\) up to \(10\) rad/sec. For \(\tau _{1}=10\) rad/sec, we start from \(1\) rad/sec up to \(100\) rad/sec. Using this information, below is sketch of the phase straight line approximation.
Below is the straight line approximation on top of the true bode plot as required to show.
Since the open loop is stable as it has poles at \(\left \{ 0,-1,-0.1\right \} \), then the closed loop will be stable if there is zero net clock wise encirclement around \(-1\). This translates to having positive phase margin when magnitude of \(\left \vert G\left ( j\omega _{gc}\right ) \right \vert \) is unity and positive gain margin with phase is \(-180^{0}\).
To find the gain margin and the phase margins, we first plot our approximation of the system found above: \(G\left ( s\right ) =\frac{17.78}{s\left ( 1+s\right ) \left ( 1+\frac{s}{10}\right ) }\) using the bode command. Here it is, showing on it the \(\omega _{pc}\) frequency (where phase is \(-180^{0}\)) and the corresponding \(\left \vert G\left ( j\omega _{pc}\right ) \right \vert \) in dB found, which we will use to find the gain margin from
We see that at \(-180^{0}\), the frequency is \(3.2\) rad/sec. This is called \(\omega _{pc}\). Going back to the magnitude plot, we see that at \(\omega _{pc}\) then \(\left \vert G\left ( j\omega _{pc}\right ) \right \vert _{dB}=4\) dB. This means the gain margin \(GM_{dB}\) is
\[ GM_{dB}=-4\text{ dB}\]
Notice that \(GM_{dB}\) is negative of \(\left \vert G\left ( j\omega _{pc}\right ) \right \vert _{dB}\). The reason is due to the definition of \(GM_{dB}\), which is
\[ GM_{dB}=20\log _{10}\frac{1}{\left \vert G\left ( j\omega _{pc}\right ) \right \vert }\]
But \(\left \vert G\left ( j\omega _{pc}\right ) \right \vert =10^{\frac{\left \vert G\left ( j\omega _{pc}\right ) \right \vert _{dB}}{20}}\). Substituting this in the above gives
\begin{align*} GM_{dB} & =20\log _{10}\frac{1}{10^{\frac{\left \vert G\left ( j\omega _{pc}\right ) \right \vert _{dB}}{20}}}\\ & =-20\log _{10}10^{\frac{\left \vert G\left ( j\omega _{pc}\right ) \right \vert _{dB}}{20}}\\ & =-\left \vert G\left ( j\omega _{pc}\right ) \right \vert _{dB}\log _{10}10\\ & =-\left \vert G\left ( j\omega _{pc}\right ) \right \vert _{dB} \end{align*}
Therefore, \(GM_{db}\) is the negative of \(\left \vert G\left ( j\omega _{pc}\right ) \right \vert _{db}\) as read from bode plot. Since \(GM_{dB}<0\) then closed loop is not stable. To find the phase margin. we find the frequency \(\omega _{gm}\) which is where magnitude plot is at \(0\) dB. We see that the frequency is \(\omega _{gm}=4\) rad/sec as shown in the plot below.
At \(\omega _{gm}\), the phase is \(-188^{0}\). Subtracting \(180^{0}\) from this phase gives \(-7^{0}\). Hence
\[ \text{phase margin}=-7^{0}\]
Phase margin must be positive for stable closed loop stable. The closed loop is not stable. Note that both the phase margin and the gain margin must be positive for stable closed loop system.
SOLUTION:
The open loop\[ G\left ( s\right ) =\frac{\left ( s+5\right ) \left ( s+3\right ) }{s\left ( s+1\right ) \left ( s^{2}+s+4\right ) }\] has poles at \(s=0,s=-1\) and \(s=-\frac{1}{2}\pm \frac{\sqrt{3}}{2}j\), therefore it is stable. So we expect the closed loop to be stable only if the Nyquist plot has a net of zero clockwise encirclement around \(-1\). When looking at the bode plot, the rules are these. The closed loop is stable, if both these conditions are met:
Here is Nyquist plot
It shows there is one encirclement around \(-1\). We can zoom in to make sure:
The above shows that the closed loop is not stable. We will now look at Bode plot. Here is the result, where I showed the gain and phase margins on the generated Matlab plot. This shows that the gain margin is negative, hence not stable, and it also shows that the phase margin is negative, also indicating it is not stable.
We can also ask Matlab to give us the margins and the corresponding break frequencies. Matlab was correct and found that the closed system is also not stable:
Notice that Matlab gives the gain margin \(GM\) in linear value. We see it says \(GM=0.4254\) above, which is \(-7.42\) dB. Since it is negative, then closed loop is not stable.
We can display the cross over frequencies using Matlab either by using the margin command or using the GUI by using the mouse as shown below. First we find the frequency where the phase is \(-180^{0}\), this is called \(\omega _{pc}\). We see it is \(1.93\) rad/sec. Then using the mouse, we locate this frequency on the magnitude plot and read \(|G(j\omega )|\) in dB. We see that \(|G(j\omega )|\) in dB is positive, hence \(GM\) is negative, and closed loop is not stable.
To determine the stability using phase margin, we do the reverse. We locate the frequency where the magnitude is zero dB using the mouse. This is called \(\omega _{gm}\). We see it is at \(2.48\) rad/sec. Then on the phase plot, we locate the phase at this frequency using the mouse. We see it is \(-228^{0}\,.\) Adding \(-180^{0}\) gives \(-48^{0}\). Since this is negative, then the close loop is not stable.
Using Nyquist to determine stability, we plot Nyquist. Then make a unit circle around the origin to locate the gain and phase margin, as illustrated below
Plotting the Nyquist plot using Matlab, and zooming in, and making a unit circle (Circle was added by hand on top of the Matlab Nyquist plot), one can measure the gain and phase margin as below
SOLUTION:
The open loop transfer function is\[ G\left ( s\right ) =\frac{25\left ( 1+5s\right ) }{s^{3}+42.277s^{2}+25.772s+2.526}\left ( \frac{1-Ts}{1+0.5Ts}\right ) \left ( \frac{1}{Ms+D}\right ) \left ( \frac{1}{K}\right ) \] We start with \(T=1,M=10,D=1,K=1\).\[ G\left ( s\right ) =\frac{25\left ( 1+5s\right ) }{s^{3}+42.277s^{2}+25.772s+2.526}\left ( \frac{1-s}{1+0.5s}\right ) \left ( \frac{1}{10s+1}\right ) \] And make a bode plot, then find the \(\left \vert G\left ( j\omega _{pc}\right ) \right \vert \) at corresponding \(-180^{0}.\)
But the phase do not cross \(-180^{0}\). This indicates an infinite gain margin. Similarly we find that the phase margin is infinite. Hence we conclude that we can make \(K\) as close to zero (since it is in denominator) as we want, while keeping the system stable and can make it as large as we want. Note that we are assuming that gain itself can only be positive here.
Both the gain and the phase margin are infinite. There is no corresponding crossover frequencies.
SOLUTION:
\[ G\left ( s\right ) =\frac{\left ( 1+\frac{s}{10}\right ) }{s\left ( 1+\frac{s}{5}\right ) \left ( 1+\frac{s}{2.5}\right ) }\] For the magnitude, the corner frequencies are at \(s=0,s=5,s=2.5\) for the poles and \(s=10\) for the zeros. The pole at zero starts at \(40\) dB (we use \(\omega =0.01\) as starting point by convention) with slope of \(-20\) dB/decade. Each pole in the denominator adds a \(-20\) dB/decade slope, while each zero adds \(+20\) dB/decade. Here is the magnitude plot approximation
For the phase, since this is type 1 system, it starts at \(-90^{0}\) at the \(\omega =0.01\). This stays for all the range of frequencies. At \(\omega =5\) and \(\omega =2.5\), A \(-45^{0}\) slope is added. This slope extends one decade before the corner frequency up to one decade above it. At \(\omega =10\) rad/sec, we add \(+45^{0}\) for the zero. Here is the result
Now to answer the part about the gain and phase margins. For this, we show both \(\left \vert G\left ( j\omega \right ) \right \vert \) and phase plot that we sketched above in one diagram and mark on them the gain and phase related quantities. This is the result.
In next part, we use Matlab to get accurate margin values, which shows that gain margin is \(30\) dB and phase margin is \(64^{0}\). The gain cross over frequency is \(7\) rad/sec and the phase cross over frequency is \(0.92\) rad/sec. The closed loop is stable.
Using Matlab
Part(1) For phase margin of \(55^{0}\) we want the phase at \(-125^{0}\) to correspond to \(0\) dB in the magnitude plot. At phase \(-125^{0}\) the frequency is \(1.3\) rad/sec from the plot. At this frequency the magnitude is \(-3.55\) dB and not zero dB. Hence positive gain margin of \(3.55\) dB. We want to shift this up to \(0\) dB. So we need to solve for additional gain from
\begin{align*} 20\log _{10}K & =3.55\\ K & =10^{\left ( \frac{3.55}{20}\right ) }\\ & =1.5 \end{align*}
Hence
\[ K=1.5 \]
To verify, here is the Matlab margin command, which shows the phase margin is indeed now \(55^{0}\) when using \(K=1.5\)
Part(2) At \(-180^{0}\) in the phase plot, we want the corresponding gain margin to be \(26\) dB which means we want \(\left \vert G\left ( j\omega _{gc}\right ) \right \vert =-26\) dB. Currently, we see that at \(-180^{0}\), the frequency is \(7.1\). The magnitude is \(-30\) dB at this frequency. We want magnitude to be \(-26\) dB instead. Hence we want to shift up by \(4\) dB the magnitude plot, or \(K=10^{\left ( \frac{4}{20}\right ) }=1.585\)
\[ K=1.585 \]
To verify, here is the Matlab margin command, which shows the gain margin is close to \(26\) dB now using \(K=1.585.\) (Matlab gives \(gm=18.92\) which is \(25.54\) dB)
;
;
;
;
;
;
;
;
;
;
;