Postive PM and GM but unstable closed loop response
8 views (last 30 days)
Show older comments
Hi,
I have the following plant (Gp) and controller (Gc) transfer functions
Gp =
0.9524 s^2 - 5.079 s + 5.079
---------------------------------------------
s^4 + 6.127 s^3 + 13.49 s^2 + 25.14 s + 20.91
Gc =
3858 s + 5107
-------------------
1.324 s^2 + 62.57 s
If we look at the open-loop transfer function, we see that both GM and PM are positive.
margin(Gp*Gc)

But the closep loop system response is unstable.
Gcl = feedback(Gol*Gc, 1);
figure; step(Gcl)

Do you have any idea what is wrong with this?
*****************************************************************************
Explanation (Solution)
This system had originally two very large delays on the loop transfer function (one was the actuator delay and the other was the sensor delay). These two delays introduced significant phase shifts making the phase response start somewhere around 260 degrees and decreasing all the way down to -265 (as seen in first figure above). So, the phase response crosses the critical phase of 180 degrees twice, one at +180 and the other at -180. Matlab computes the PM and GM based on the -180 crossing. That's why we see a postive PM and GM but unstable response. The magnitude at +180 degrees is very high (around 30dB) causing a negative GM and unstable response. Therefore, we need to pay attention to both crossings to make sure that the system has sufficint margin not to become unstable.
3 Comments
Paul
on 5 May 2021
Edited: Paul
on 1 Aug 2025
Here is an example of system that has a negative gain margin but is closed loop stable.
G=tf(5,[1 0])*tf(1,[1/1000 2*.7/sqrt(1000) 1]);
G1=G*tf(100*conv([1/2 1],[1/2 1]),conv([1/.1 1],[1/.1 1]));
margin(G1) % negative gain margin
%H1=minreal(G1/(1+G1));
H1 = feedback(G1,1);
pole(H1) % all closed loop poles in left half plane
Answers (1)
Paul
on 20 Apr 2021
Edited: Paul
on 20 Apr 2021
Closed loop stability needs to be determined before caculating GM and PM. In other words, GM and PM cannot be used to determine or verify closed loop stability. Instead, closed loop stability needs to be determined by other means. For systems that are closed loop stable the GM and PM tell how much the gain or phase can vary before changing the number of encircelments of the -1 point, thereby inducing closed loop instability.
For systems that are closed loop unstable, it's possible to use the open loop Bode plot to determine how much to change the open loop gain or phase to make the system stable, but care must be taken to understand whether or not the change in gain or phase needs to increase or decrease the number of encirclements and by how many.
0 Comments
See Also
Categories
Find more on Get Started with Control System Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!