sdo.requirements.GainPhaseMargin class

Package: sdo.requirements

Gain and phase margin bounds

Description

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.

Construction

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 Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'Description'

Requirement description. Must be a string.

Default: ''

'FeedbackSign'

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

'GainMargin'

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

Default: 10

'MagnitudeUnits'

Magnitude units of the requirement. Must be:

  • 'db' (decibels)

  • 'abs' (absolute units)

Default: 'db'

'Name'

Requirement name. Must be a string.

Default: ''

'PhaseMargin'

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

'PhaseUnits'

Phase units of the requirement. Must be one of the following strings:

  • 'deg' (degrees)

  • 'rad' (radians)

Default: 'deg'

'Type'

Gain and phase margin requirement type. Must be one of the following strings:

  • '>=' — Lower bound

  • '==' — Equality bound

  • 'max' — Maximization objective

Default: '>='

Properties

Description

Requirement description. Must be a string.

Default: ''

FeedbackSign

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

GainMargin

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

Default: 10

MagnitudeUnits

Magnitude units of the requirement. Must be:

  • 'db' (decibels)

  • 'abs' (absolute units)

Default: 'db'

Name

Requirement name. Must be a string.

Default: ''

PhaseMargin

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

PhaseUnits

Phase units of the requirement. Must be one of the following strings:

  • 'deg' (degrees)

  • 'rad' (radians)

Default: 'deg'

Type

Gain and phase margin requirement type. Must be one of the following strings:

  • '>=' — Lower bound

  • '==' — Equality bound

  • 'max' — Maximization objective

Default: '>='

Methods

evalRequirementEvaluate gain and phase margin bounds for linear system

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects in the MATLAB® documentation.

Examples

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);

Alternatives

Use getbounds to get the bounds specified in a Check Gain and Phase Margins and Check Nichols Characteristics block.

Was this topic helpful?