Different Results of allmargin() and margin()

10 Ansichten (letzte 30 Tage)
Florian
Florian am 22 Apr. 2025
Beantwortet: Paul am 22 Apr. 2025
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

Akzeptierte Antwort

Paul
Paul am 22 Apr. 2025
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)
ans = struct with fields:
GainMargin: 0.0636 GMFrequency: 0.0374 PhaseMargin: 84.4117 PMFrequency: 11.0574 DelayMargin: 0.1332 DMFrequency: 11.0574 Stable: 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])
ans = struct with fields:
GainMargin: 0.0636 GMFrequency: 0.0374 PhaseMargin: 84.4117 PMFrequency: 11.0574 DelayMargin: 0.1332 DMFrequency: 11.0574 Stable: 1
which yields the same result as above.
Now use margin on the first loop with the second loop closed to visualize the result.
margin(L(1,1))

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by