margin() returns incorrect gain margin for open-loop unstable system
조회 수: 33 (최근 30일)
이전 댓글 표시
I am wondering if anyone knows why MATLAB returns an incorrect value for gain margin when using margin() with a system that is open-loop unstable, or whether this is a bug that should be reported.
See the following example:
>> Gol1
Gol1 =
0.00074321 (z+0.9875)
---------------------
(z-1.001) (z-0.9619)
Sample time: 0.04 seconds
Discrete-time zero/pole/gain model.
>> [Gm,Pm,Wgm,Wpm]=margin(Gol1)
Gm =
0.0316
Pm =
48.7296
Wgm =
0
Wpm =
0.7615
Manually applying the Jury stability criterion to the above discrete-time system results in a range of stability of 0 < K < ~50.6. margin(), on the other hand, returns a gain margin of -30dB/0.0316 at 0 rad/s for some reason.
The bode plots generated using margin() or bode() clearly shows the -180deg phase crossover near ~6.8 rad/s with ~34dB of gain margin, which is the correct result. Why does margin() return the wrong Gm and Wgm values?
댓글 수: 0
채택된 답변
Arkadiy Turevskiy
2014년 11월 26일
편집: Arkadiy Turevskiy
2014년 11월 26일
I don't agree that "MATLAB returns incorrect value". If you read the documentation for margin , you will see the section I posted below as an image (at the very end of the answer). Notice the text I highlighted in yellow. The important thing here is that margin returns minimum gain margin, i.e., if the phase is -180 at several frequencies, the answer is for the frequency where the gain margin is the lowest.
Now take your system and evaluate gain and phase at w = 0 rad/sec:
This shows that at 0 rad/sec the phase is -180, and gain is 31.7 dB (ignore small numerical differences with your 30db) - so the answer that margin returns.
You see that this system has 3 gain margins, and margin returned the lowest one, as intended.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!