Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

CD Gain and Phase Margin VI

LabVIEW 2012 Control Design and Simulation Module Help

Edition Date: June 2012

Part Number: 371894G-01

»View Product Info

Owning Palette: Frequency Response VIs

Requires: Control Design and Simulation Module

Calculates the gain and phase margins. If a system has multiple crossover frequencies, the CD Gain and Phase Margin VI returns the smallest gain and phase margins. You can use the CD Gain and Phase Margin VI only with single-input single-output (SISO) systems. Wire data to the State-Space Model and Frequency Range inputs to determine the polymorphic instance to use or manually select the instance.

This VI converts state-space and zero-pole-gain models into transfer function models before calculating the margins.

Details  Example

Use the pull-down menu to select an instance of this VI.

CD Gain and Phase Margin (State-Space)

Phase Plot Reference is a reference to the Phase Plot. Phase Plot Reference configures the x-scale, y-scale, and legend properties. If you want to use the default settings or customize the settings for these properties, do not wire a value to this input.
Magnitude Plot Reference is a reference to the Magnitude Plot. Magnitude Plot Reference configures the x-scale, y-scale, and legend properties. If you want to use the default settings or customize the settings for these properties, do not wire a value to this input.
State-Space Model contains a mathematical representation of and information about the SISO system for which this VI determines gain and phase margins.
Frequency Range contains the frequency information of the model.
Initial frequency is the minimum frequency this VI uses in calculating the frequency response and producing the plots. The default is –1.
Final frequency is the maximum frequency this VI uses in calculating the frequency response and producing the plots. The default is –1.
Minimum number of points is the minimum number of points this VI uses in calculating the frequency response and producing the plots. The default is 100 points.
Frequency Unit specifies the units of frequency, either in Hertz or radians/seconds, to use in calculating the frequency response and producing the plots.

0Hz
1rad/s (default)
Magnitude Scale specifies how to scale the magnitude of the frequency response.

0linear—Does not convert the magnitude of the frequency response to decibels.
1db (default)—Converts the magnitude of the frequency response to decibels.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Magnitude Plot shows the magnitude of the frequency response of the system this VI plots against the frequency.
Phase Plot shows the phase of the frequency response of the system in degrees this VI plots against the frequency.
Gain and Phase Margins returns information about the gain and phase margins. To access the Gain and Phase Margins, use the CD Get Frequency Response Data VI.
P.M. Frequency is the 0 decibels crossover frequency that corresponds to the smallest phase margin.
Gain Margin is the smallest gain margin of the system.
G.M. Frequency is the –180 degrees crossover frequency that corresponds to the smallest gain margin.
Phase Margin is the smallest phase margin of the system.
error out contains error information. This output provides standard error out functionality.
Delay Margin returns information about the smallest delay margin in the system.
D.M. Frequency specifies at which frequency the system phase crosses –180 degrees or a multiple of –180.
Delay Margin lists the amount of delay, in seconds, that makes the system unstable in a closed loop.

CD Gain and Phase Margin (Transfer Function)

Phase Plot Reference is a reference to the Phase Plot. Phase Plot Reference configures the x-scale, y-scale, and legend properties. If you want to use the default settings or customize the settings for these properties, do not wire a value to this input.
Magnitude Plot Reference is a reference to the Magnitude Plot. Magnitude Plot Reference configures the x-scale, y-scale, and legend properties. If you want to use the default settings or customize the settings for these properties, do not wire a value to this input.
Transfer Function Model contains a mathematical representation of and information about the SISO system for which this VI determines gain and phase margins.
Frequency Range contains the frequency information of the model.
Initial frequency is the minimum frequency this VI uses in calculating the frequency response and producing the plots. The default is –1.
Final frequency is the maximum frequency this VI uses in calculating the frequency response and producing the plots. The default is –1.
Minimum number of points is the minimum number of points this VI uses in calculating the frequency response and producing the plots. The default is 100 points.
Frequency Unit specifies the units of frequency, either in Hertz or radians/seconds, to use in calculating the frequency response and producing the plots.

0Hz
1rad/s (default)
Magnitude Scale specifies how to scale the magnitude of the frequency response.

0linear—Does not convert the magnitude of the frequency response to decibels.
1db (default)—Converts the magnitude of the frequency response to decibels.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Magnitude Plot shows the magnitude of the frequency response of the system this VI plots against the frequency.
Phase Plot shows the phase of the frequency response of the system in degrees this VI plots against the frequency.
Gain and Phase Margins returns information about the gain and phase margins. To access the Gain and Phase Margins, use the CD Get Frequency Response Data VI.
P.M. Frequency is the 0 decibels crossover frequency that corresponds to the smallest phase margin.
Gain Margin is the smallest gain margin of the system.
G.M. Frequency is the –180 degrees crossover frequency that corresponds to the smallest gain margin.
Phase Margin is the smallest phase margin of the system.
error out contains error information. This output provides standard error out functionality.
Delay Margin returns information about the smallest delay margin in the system.
D.M. Frequency specifies at which frequency the system phase crosses –180 degrees or a multiple of –180.
Delay Margin lists the amount of delay, in seconds, that makes the system unstable in a closed loop.

CD Gain and Phase Margin (Zero-Pole-Gain)

Phase Plot Reference is a reference to the Phase Plot. Phase Plot Reference configures the x-scale, y-scale, and legend properties. If you want to use the default settings or customize the settings for these properties, do not wire a value to this input.
Magnitude Plot Reference is a reference to the Magnitude Plot. Magnitude Plot Reference configures the x-scale, y-scale, and legend properties. If you want to use the default settings or customize the settings for these properties, do not wire a value to this input.
Zero-Pole-Gain Model contains a mathematical representation of and information about the SISO system for which this VI determines gain and phase margins.
Frequency Range contains the frequency information of the model.
Initial frequency is the minimum frequency this VI uses in calculating the frequency response and producing the plots. The default is –1.
Final frequency is the maximum frequency this VI uses in calculating the frequency response and producing the plots. The default is –1.
Minimum number of points is the minimum number of points this VI uses in calculating the frequency response and producing the plots. The default is 100 points.
Frequency Unit specifies the units of frequency, either in Hertz or radians/seconds, to use in calculating the frequency response and producing the plots.

0Hz
1rad/s (default)
Magnitude Scale specifies how to scale the magnitude of the frequency response.

0linear—Does not convert the magnitude of the frequency response to decibels.
1db (default)—Converts the magnitude of the frequency response to decibels.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Magnitude Plot shows the magnitude of the frequency response of the system this VI plots against the frequency.
Phase Plot shows the phase of the frequency response of the system in degrees this VI plots against the frequency.
Gain and Phase Margins returns information about the gain and phase margins. To access the Gain and Phase Margins, use the CD Get Frequency Response Data VI.
P.M. Frequency is the 0 decibels crossover frequency that corresponds to the smallest phase margin.
Gain Margin is the smallest gain margin of the system.
G.M. Frequency is the –180 degrees crossover frequency that corresponds to the smallest gain margin.
Phase Margin is the smallest phase margin of the system.
error out contains error information. This output provides standard error out functionality.
Delay Margin returns information about the smallest delay margin in the system.
D.M. Frequency specifies at which frequency the system phase crosses –180 degrees or a multiple of –180.
Delay Margin lists the amount of delay, in seconds, that makes the system unstable in a closed loop.

CD Gain and Phase Margin (Frequency Response Data)

Phase Plot Reference is a reference to the Phase Plot. Phase Plot Reference configures the x-scale, y-scale, and legend properties. If you want to use the default settings or customize the settings for these properties, do not wire a value to this input.
Magnitude Plot Reference is a reference to the Magnitude Plot. Magnitude Plot Reference configures the x-scale, y-scale, and legend properties. If you want to use the default settings or customize the settings for these properties, do not wire a value to this input.
Frequency Response specifies the frequency response for which this VI calculates the margins.
Magnitude specifies the magnitude component of the frequency response. The Magnitude Scale parameter defines the units of the Magnitude array.
Phase specifies the phase component, in degrees, of the frequency response.
Frequency Vector specifies information about the frequencies this VI uses to excite the model.
Frequency specifies the frequencies this VI uses to excite the model.
Frequency Unit specifies the unit of measurement of the Frequency array.

0Hz—Specifies that the frequency is measured in hertz.
1rad/s (default)—Specifies that the frequency is measured in radians per second.
Magnitude Scale specifies how to scale the magnitude of the frequency response.

0linear—Does not convert the magnitude of the frequency response to decibels.
1db (default)—Converts the magnitude of the frequency response to decibels.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Magnitude Plot shows the magnitude of the frequency response of the system this VI plots against the frequency.
Phase Plot shows the phase of the frequency response of the system in degrees this VI plots against the frequency.
Gain and Phase Margins returns information about the gain and phase margins. To access the Gain and Phase Margins, use the CD Get Frequency Response Data VI.
P.M. Frequency is the 0 decibels crossover frequency that corresponds to the smallest phase margin.
Gain Margin is the smallest gain margin of the system.
G.M. Frequency is the –180 degrees crossover frequency that corresponds to the smallest gain margin.
Phase Margin is the smallest phase margin of the system.
error out contains error information. This output provides standard error out functionality.
Delay Margin returns information about the smallest delay margin in the system.
D.M. Frequency specifies at which frequency the system phase crosses –180 degrees or a multiple of –180.
Delay Margin lists the amount of delay, in seconds, that makes the system unstable in a closed loop.

CD Gain and Phase Margin Details

This VI supports delays. Refer to the LabVIEW Control Design User Manual for more information about delays.

Example

Refer to the CDEx Nichols Analysis VI in the labview\examples\Control and Simulation\Control Design\Frequency Analysis directory for an example of using the CD Gain and Phase Margin VI.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit