Different Results of allmargin() and margin()
7 次查看(过去 30 天)
显示 更早的评论
Hello,
I am currently analyzing the stabiity margins of my MIMO open-loop with 2 inputs (find ol_sys attached) . Therefore I tried both, the margin() and the allmargin() commands.
- allmargin(-ol_sys, Focus=[0.001 Inf]) delivers a low Gain Margin at 0.0414 rad/s, however, the bodeplots of the system do not have a phase transition of -180° at this freqeuncy

- margin(-ol_sys(1,1)) and margin(-ol_sys(2,2)) deliver similar Phase margins, but different GM, which are in line with the corresponding Bode Plots

I am wondering if there is a error in the allmargin() calculation or why there is a different resut. Would be awesome if someone can help me.
Cheers,
Florian
0 个评论
采纳的回答
Paul
2025-4-22
Hi Florian,
For a MIMO system, allmargin computes the margins of each loop with all other loops are closed. However, the command margin(-ol_sys(1,1)) doesn't know about any other loops.
Consider
load ol_sys
s = allmargin(-ol_sys,Focus=[0.001,inf]);
These are the margins at the first input with the loop closed on the second input (don't know why they are slightly different than your result)
s(1)
Manually close the second loop
L = feedback(-ol_sys,diag([0 1]));
and compute the margins on the first loop
allmargin(L(1,1),Focus=[0.001,inf])
which yields the same result as above.
margin(L(1,1))
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!