Main Content

sdo.requirements.GainPhaseMargin class

Package: sdo.requirements

Gain and phase margin bounds


Specify lower or equality bounds on the gain and phase margin of a linear system. You can then optimize the model response to meet the bounds using sdo.optimize.

You must have Simulink® Control Design™ software to specify gain and phase margin requirements.


gainphase_req = sdo.requirements.GainPhaseMargin creates a sdo.requirements.GainPhaseMargin object and assigns default values to its properties.

gainphase_req = sdo.requirements.GainPhaseMargin(Name,Value) uses additional options specified by one or more Name,Value pair arguments. Name is a property name and Value is the corresponding value. Name must appear inside single quotes (''). You can specify several name-value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Input Arguments

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Use Name,Value arguments to specify properties of the requirement object during object creation. For example, requirement = sdo.requirements.GainPhaseMargin('Type','>=') creates an sdo.requirements.GainPhaseMargin object and specifies the Type property as a lower bound.



Requirement description, specified as a character vector. For example, 'Requirement on signal 1'.

Default: ''


Feedback loop sign to determine the gain and phase margins of the linear system.

Must be –1 or 1. Use –1 if the loop has negative feedback and 1 if the loop has positive feedback.

Default: –1


Gain margin bound. Use MagnitudeUnits to specify the gain units. Set to [] to specify a bound on the phase margin only.

Default: 10


Magnitude units of the requirement. Must be:

  • 'db' (decibels)

  • 'abs' (absolute units)

Default: 'db'


Requirement name, specified as a character vector.

Default: ''


Phase margin bound. Must be in degrees and a positive finite scalar. Set to [] to specify a bound on the gain margin only.

Default: 60


Phase units of the requirement specified as one of the following values:

  • 'deg' (degrees)

  • 'rad' (radians)

Default: 'deg'


Gain and phase margin requirement type, specified as one of the following values:

  • '>=' — Lower bound

  • '==' — Equality bound

  • 'max' — Maximization objective

Default: '>='


copyCopy design requirement
getGet design requirement property values
setSet design requirement property values
evalRequirementEvaluate design requirement

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.


collapse all

Construct a gain and phase margin object and specify gain and phase margin requirement.

r = sdo.requirements.GainPhaseMargin;
r.GainMargin = 5;
r.PhaseMargin = 55;

Alternatively, you can specify the gain and phase margins during construction.

 r = sdo.requirements.GainPhaseMargin(...
              'GainMargin',5, ...
              'PhaseMargin', 55);


Use getbounds to get the bounds specified in a Check Gain and Phase Margins (Simulink Control Design) and Check Nichols Characteristics (Simulink Control Design) block.