Main Content

sdo.requirements.GainPhaseMargin

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.

Creation

Description

example

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

gainphase_req = sdo.requirements.GainPhaseMargin(Name=Value) specifies one or more properties using name-value arguments. For example, gainphase_req = sdo.requirements.GainPhaseMargin(PhaseUnits="rad") creates an sdo.requirements.GainPhaseMargin object and specifies the PhaseUnits property as radians.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes. For example, gainphase_req = sdo.requirements.GainPhaseMargin("PhaseUnits","rad") creates an sdo.requirements.GainPhaseMargin object and specifies the PhaseUnits property as radians.

Properties

expand all

Requirement description, specified as a character vector.

Example: 'Requirement on signal 1'

Feedback loop sign to determine the gain and phase margins of the linear system, specified as –1 when the loop has negative feedback and 1 when the loop has positive feedback

Gain margin bound, specified as a numeric scalar or an empty array ([]). Set the value as [] to specify a bound on the phase margin only. Specify the gain units using the MagnitudeUnits property.

Magnitude units of the requirement, specified as either "db" (decibels) or "abs" (absolute units). The sdo.requirements.GainPhaseMargin object stores the value as a character vector.

Requirement name, specified as a character vector.

Phase margin bound, in degrees, specified as a positive finite scalar or an empty array ([]). Set the value as [] to specify a bound on the gain margin only.

Phase units of the requirement, specified as either "deg" (degrees) or "rad" (radians). The sdo.requirements.GainPhaseMargin object stores the value as a character vector.

Gain and phase margin requirement type, specified as one of the following values and stored as a character vector:

  • ">=" — Lower bound

  • "==" — Equality bound

  • "max" — Maximization objective

Object Functions

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

Examples

collapse all

Create a gain and phase margin object and specify the gain and phase margin requirement.

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

Alternatively, you can specify the gain and phase margins when you create the object.

r = sdo.requirements.GainPhaseMargin( ...
    GainMargin=5,PhaseMargin=55)
r = 
  GainPhaseMargin with properties:

        GainMargin: 5
       PhaseMargin: 55
              Type: '>='
      FeedbackSign: -1
              Name: ''
       Description: ''
    MagnitudeUnits: 'dB'
        PhaseUnits: 'deg'

Alternatives

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

Version History

Introduced in R2010b