I used the matlab function **margin() **to plot the phase and gain margins for the open-loop transfer function for maglev. It seems to give an incorrect answer. Here is what I got:
As the gain margin is negative, this indicates that the system (plant + controller) is unstable. However, this is not the case.
I used the matlab function **nyquist()** to make a Nyquist plot, and this is what I got:
**The contour circles -1 counter-clock wise once, and this satisfies the **Nyquist stability criterion, as the plant (in my case the plate can be modeled as a mechanical object attached to a negative spring) has one pole on the right-half complex plane. Basically, my plant together with the controller in indeed stable, which is also the reality.
Therefore, this seems to indicate that** nyquist(), instead of margin() is the right way to examine the stability in the case with an unstable plant** in matlab. |