Documentation Center

  • Trial Software
  • Product Updates

allmargin

Gain margin, phase margin, delay margin and crossover frequencies

Syntax

S = allmargin(sys)
S = allmargin(mag,phase,w,ts)

Description

S = allmargin(sys)

allmargin computes the gain margin, phase margin, delay margin and the corresponding crossover frequencies of the SISO open-loop model sys. The allmargin command is applicable to any SISO model, including models with delays.

The output S is a structure with the following fields:

  • GMFrequency — All –180° (modulo 360°) crossover frequencies in rad/TimeUnit, where TimeUnit is the time units of the input dynamic system, specified in the TimeUnit property of sys.

  • GainMargin — Corresponding gain margins, defined as 1/G, where G is the gain at the –180° crossover frequency. Gain margins are in absolute units.

  • PMFrequency — All 0 dB crossover frequencies in rad/TimeUnit, where TimeUnit is the time units of the input dynamic system, specified in the TimeUnit property of sys).

  • PhaseMargin — Corresponding phase margins in degrees.

  • DMFrequency and DelayMargin — Critical frequencies and the corresponding delay margins. Delay margins are specified in the time units of the system for continuous-time systems and multiples of the sample time for discrete-time systems.

  • Stable — 1 if the nominal closed-loop system is stable, 0 otherwise.

    Where stability cannot be assessed, Stable is set to NaN. In general, stability cannot be assessed for an frd system.

S = allmargin(mag,phase,w,ts) computes the stability margins from the frequency response data mag, phase, w, and the sampling time, ts. Provide magnitude values mag in absolute units, and phase values phase in degrees. You can provide the frequency vector w in any units; allmargin returns frequencies in the same units. allmargin interpolates between frequency points to approximate the true stability margins.

See Also

|

Was this topic helpful?