GainPhaseMargins
✖
GainPhaseMargins
Details and Options

- The system lsys can be a TransferFunctionModel or a StateSpaceModel.
- GainPhaseMargins returns {{{ωp1,g1},{ωp2,g2},…},{{ωg1,p1},{ωg2,p2},…}}, where the ωpi are the phase crossover frequencies, the gi are the gain margins, the ωgi are the gain crossover frequencies, and the pi are the phase margins.
- The gain margins gi are absolute values and the phase margins pi are in radians.
- The gain margins are the reciprocals of the magnitude of lsys at the phase crossover frequencies.
- At the phase crossover frequencies, lsys has phase
.
- The phase margins are phase lags needed to make the phase
at the gain crossover frequencies.
- At the gain crossover frequencies, the gain of lsys is unity.
- The following options can be given:
-
FeedbackType "Negative" the feedback type Method Automatic method to use SamplingPeriod None the sampling period - Explicit settings for the Method option include "Solve" and "NSolve". In each case the methods of Solve or NSolve can be specified as suboptions. The default setting of Automatic switches between these methods, depending on whether lsys is exact or inexact.
- GainPhaseMargins has the attribute Listable.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (3)Survey of the scope of standard use cases
A system with multiple crossover frequencies:

https://wolfram.com/xid/08u4mw1rwt9mo32-j355e4

https://wolfram.com/xid/08u4mw1rwt9mo32-lvltzl

The number of gain crossover frequencies:

https://wolfram.com/xid/08u4mw1rwt9mo32-6kqjq3


https://wolfram.com/xid/08u4mw1rwt9mo32-vwmxxm

Margins of a time-delay system:

https://wolfram.com/xid/08u4mw1rwt9mo32-j0v9ji

Generalizations & Extensions (1)Generalized and extended use cases
GainPhaseMargins[TransferFunctionModel[g,var]] equals GainPhaseMargins[g]:

https://wolfram.com/xid/08u4mw1rwt9mo32-etd1u7

https://wolfram.com/xid/08u4mw1rwt9mo32-70c9js

Options (2)Common values & functionality for each option
FeedbackType (2)
The system is assumed to be the loop transfer function of a negative-feedback system:

https://wolfram.com/xid/08u4mw1rwt9mo32-4vlsy6

https://wolfram.com/xid/08u4mw1rwt9mo32-sar8oa

Specify the system as part of a positive-feedback system:

https://wolfram.com/xid/08u4mw1rwt9mo32-uh5jej

Specify the system as a closed-loop system:

https://wolfram.com/xid/08u4mw1rwt9mo32-xy8ucx


https://wolfram.com/xid/08u4mw1rwt9mo32-0idpgi

Properties & Relations (2)Properties of the function, and connections to other functions
The gain and phase margins can be visualized on all the frequency response plots:

https://wolfram.com/xid/08u4mw1rwt9mo32-0xtr5m

https://wolfram.com/xid/08u4mw1rwt9mo32-yiamlb


https://wolfram.com/xid/08u4mw1rwt9mo32-equ7un


https://wolfram.com/xid/08u4mw1rwt9mo32-45zcbj


https://wolfram.com/xid/08u4mw1rwt9mo32-ulqmjm


https://wolfram.com/xid/08u4mw1rwt9mo32-hojcpe


https://wolfram.com/xid/08u4mw1rwt9mo32-rhlt4b

If the crossover frequencies are in radians/second, they can be converted to hertz as follows:

https://wolfram.com/xid/08u4mw1rwt9mo32-cy7716

The setting StabilityMargins->True computes and draws the gain and phase margins:

https://wolfram.com/xid/08u4mw1rwt9mo32-67m1gp

Wolfram Research (2010), GainPhaseMargins, Wolfram Language function, https://reference.wolfram.com/language/ref/GainPhaseMargins.html.
Text
Wolfram Research (2010), GainPhaseMargins, Wolfram Language function, https://reference.wolfram.com/language/ref/GainPhaseMargins.html.
Wolfram Research (2010), GainPhaseMargins, Wolfram Language function, https://reference.wolfram.com/language/ref/GainPhaseMargins.html.
CMS
Wolfram Language. 2010. "GainPhaseMargins." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GainPhaseMargins.html.
Wolfram Language. 2010. "GainPhaseMargins." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GainPhaseMargins.html.
APA
Wolfram Language. (2010). GainPhaseMargins. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GainPhaseMargins.html
Wolfram Language. (2010). GainPhaseMargins. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GainPhaseMargins.html
BibTeX
@misc{reference.wolfram_2025_gainphasemargins, author="Wolfram Research", title="{GainPhaseMargins}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/GainPhaseMargins.html}", note=[Accessed: 16-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_gainphasemargins, organization={Wolfram Research}, title={GainPhaseMargins}, year={2010}, url={https://reference.wolfram.com/language/ref/GainPhaseMargins.html}, note=[Accessed: 16-April-2025
]}