Owning Class: frqrsp
Requires: Control Design and Simulation Module and MathScript RT Module
margins(SysInSISO)
s = margins(SysInSISO)
[gmf, gm] = margins(SysInSISO)
[gmf, gm, pmf] = margins(SysInSISO)
[gmf, gm, pmf, pm] = margins(SysInSISO)
Legacy Name: allmargin
Calculates all gain and phase margins of a singleinput singleoutput (SISO) system model. The gain margins indicate where the frequency response crosses at 0 decibels. The phase margins indicate where the frequency response crosses 180 degrees. Use the margin function to return only the smallest gain and phase margins of a SISO model. If you do not request an output, this function returns the structure described in the S output description that follows.
Name  Description 

SysInSISO  Specifies a linear timeinvariant (LTI) SISO model in transfer function, zeropolegain, or statespace form. 
Name  Description 

s  Returns a structure with the following elements:

gmf  Returns the gain margin frequencies, in radians/second, of the SysInSISO model. A gain margin frequency indicates where the model phase crosses 180 degrees. The ith element of this vector corresponds to the ith element of the gm vector. gmf is a real vector. 
gm  Returns the gain margins of the SysInSISO model. gm is a real vector. 
pmf  Returns the phase margin frequencies, in radians/second, of the SysInSISO model. A phase margin frequency indicates where the model magnitude crosses 0 decibels. The ith element of this vector corresponds to the ith element of the pm vector. pmf is a real vector. 
pm  Returns the phase margins of SysInSISO. pm is a real vector. 
The following table lists the support characteristics of this function.
Supported in the LabVIEW RunTime Engine  Yes 
Supported on RT targets  Yes 
Suitable for bounded execution times on RT  Not characterized 
SysInSISO = tf([1, 1], [1, 1, 3])
[gmf, gm, pmf, pm] = margins(SysInSISO)