User`s guide

Table Of Contents
margin
11-137
11margin
Purpose Compute gain and phase margins and associated crossover frequencies
Syntax [Gm,Pm,Wcg,Wcp] = margin(sys)
[Gm,Pm,Wcg,Wcp] = margin(mag,phase,w)
margin(sys)
Description margin calculates the gain margin, phase margin, and associated crossover
frequencies of S ISO o pen-loop models. The gain and phase margins indicate
the relative stability of the control system when the loop is closed. When
invoked without left-hand arguments,
margin produces a Bode plot and
displays the margins on this plot.
The gain margin is the amount of gain increase required to make the loop gain
unity at the frequency where the phase angle is 180°. In other words, the gain
margin is if is the gain at the –180° phase frequency. Similarly, the
phase margin is the difference between the phase of the response and –180°
when the loop gain is 1.0. The frequency at which the magnitude is 1.0 is called
the unity-gain frequencyor crossover frequency.It is generally found that gain
margins of three or more combi ned with phase margins between 30 and 60
degrees result in reasonable trade-offs between bandwidth and stability.
[Gm,Pm,Wcg,Wcp] = margin(sys) computes the gain margin Gm,thephase
margin
Pm, and the corresponding crossoverfrequenciesWcg andWcp,giventhe
SISO open-loop model
sys. This function handles both continuous- and
discrete-time cases. W hen faced with several crossover frequencies,
margin
returns the smallest gain and phase margins.
[Gm,Pm,Wcg,Wcp] = margin(mag,phase,w) derives the gain and phase
margins from the Bode frequency response data (magnitude, phase, and
frequency vector). Interpolation is performed between the frequency points to
estimate the margin values. This approach is generally less accurate.
When i nvoked without left-hand argument,
margin(sys)
plots the open-loop Bode response with the gain and phase margins marked by
vertical lines.
1 g
g