Why don’t gain and phase margins appear on my Bode plot?
12 views (last 30 days)
Show older comments
MathWorks Support Team
on 28 Mar 2025
Answered: MathWorks Support Team
on 3 Apr 2025
I have discrete-time frequency response data in the form of a "frd" object. When I try to show the gain and phase margins associated with this data using the "bodeplot" function, these gain and phase margins do not appear on the plot. What am I missing?
Accepted Answer
MathWorks Support Team
on 3 Apr 2025
For gain and phase margins to appear on a Bode diagram, they must exist in the first place. More specifically, if "G" is the "frd" object that contains the frequency response data, then the expression
[Gm, Pm, Wcg, Wcp] = margin(G)
must return finite values for "Gm" and "Pm".
In case "Gm" and "Pm" are infinite, then further investigation is needed. Moreover, because "G" contains frequency response data for a discrete-time system, then it is possible that the gain and phase margins exist outside the range that the "margin" function considers when computing the gain and phase margins.
That is, the margin function only considers the range "[0, pi / Ts]" rad/s for margin calculations, where "Ts" is the sampling period associated with the system "G". To check if the margins exist outside of this range, set "G"’s sampling period to 0 using the expression "G.Ts = 0" and then execute the expression
[Gm, Pm, Wcg, Wcp] = margin(G)
once again to see if the gain and phase margins are now finite.
After executing the expression "G.Ts = 0", if the gain and phase margins turn out to be finite, then executing the "bodeplot" function should now show the Bode diagram with the gain and phase margins marked, as desired.
0 Comments
More Answers (0)
See Also
Categories
Find more on Classical Control Design 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!