Anda di halaman 1dari 3

5/4/13

Gain margin, phase margin, and crossover frequencies - MATLAB margin

margin
Gain margin, phase margin, and crossover frequencies

Syntax
[ G m , P m , W g m , W p m ]=m a r g i n ( s y s ) [ G m , P m , W g m , W p m ]=m a r g i n ( m a g , p h a s e , w ) m a r g i n ( s y s )

Description
m a r g i n calculates the minimum gain margin, G m , phase margin, P m , and associated frequencies W g mand W p mof SISO open-loop models. The gain and phase margin of a system s y sindicates the relative stability of the closed-loop system formed by applying unit negative feedback to s y s , as in the follow ing illustration.

The gain margin is the amount of gain increase or decrease required to make the loop gain unity at the frequency W g mw here the phase angle is 180 (modulo 360). In other w ords, the gain margin is 1/g if g is the gain at the 180 phase frequency. Similarly, the phase margin is the difference betw een the phase of the response and 180 w hen the loop gain is 1.0. The frequency W p mat w hich the magnitude is 1.0 is called the unity-gain frequency or gain crossover frequency. It is generally found that gain margins of three or more combined w ith phase margins betw een 30 and 60 degrees result in reasonable trade-offs betw een bandw idth and stability. [ G m , P m , W g m , W p m ]=m a r g i n ( s y s ) computes the gain margin G m , the phase margin P m , and the corresponding frequencies W g mand W p m , given the SISO open-loop dynamic system model s y s .W g mis the frequency w here the gain margin is measured, w hich is a 180 degree phase crossing frequency. W p mis the frequency w here the phase margin is measured, w hich is a 0dB gain crossing frequency. These frequencies are expressed in radians/T i m e U n i t , w here T i m e U n i tis the unit specified in the T i m e U n i tproperty of s y s . When s y shas several crossovers, m a r g i nreturns the smallest gain and phase margins and corresponding frequencies. The phase margin P mis in degrees. The gain margin G mis an absolute magnitude. You can compute the gain margin in dB by G m _ d B=2 0 * l o g 1 0 ( G m ) [ G m , P m , W g m , W p m ]=m a r g i n ( m a g , p h a s e , w ) derives the gain and phase margins from Bode frequency response data (magnitude, phase, and frequency vector). m a r g i ninterpolates betw een the frequency points to estimate the margin values. Provide the gain data m a gin absolute units, and phase data p h a s ein degrees. You can provide the frequency vector win any units; m a r g i nreturns W g mand W p min the same units. m a r g i n ( s y s ) , w ithout output arguments, plots the Bode response of s y son the screen and indicates the gain and phase margins on the plot. By default, gain margins are expressed in dB on the plot.

Examples
Gain and Phase Margins of Open-Loop Transfer Function Create an open-loop discrete-time transfer function.

www.mathworks.com/help/control/ref/margin.html

1/3

5/4/13

Gain margin, phase margin, and crossover frequencies - MATLAB margin

h d=t f ( [ 0 . 0 4 7 9 80 . 0 4 6 4 ] , [ 11 . 8 10 . 9 0 4 8 ] , 0 . 1 )

h d= 0 . 0 4 7 9 8z+0 . 0 4 6 4 z ^ 2-1 . 8 1z+0 . 9 0 4 8 S a m p l et i m e :0 . 1s e c o n d s D i s c r e t e t i m et r a n s f e rf u n c t i o n .

Compute the gain and phase margins.

[ G m , P m , W g m , W p m ]=m a r g i n ( h d )

G m= 2 . 0 5 1 7

P m= 1 3 . 5 7 1 1

W g m= 5 . 4 3 7 4

W p m= 4 . 3 5 4 4

Display the gain and phase margins graphically. m a r g i n ( h d )

www.mathworks.com/help/control/ref/margin.html

2/3

5/4/13

Gain margin, phase margin, and crossover frequencies - MATLAB margin

Solid vertical lines mark the gain margin and phase margin. The dashed vertical lines indicate the locations of W p m , the frequency w here the phase margin is measured, and W g m , the frequency w here the gain margin is measured.

More About
Algorithms

expand all

See Also
b o d e| l t i v i e w

www.mathworks.com/help/control/ref/margin.html

3/3

Anda mungkin juga menyukai