CD All Margins VI
- Updated2023-03-14
- 14 minute(s) read
CD All Margins VI
Owning Palette: Frequency Response VIs
Requires: Control Design and Simulation Module
Calculates all the gain and phase margins, which result from the frequency response crossing at 0 decibels (magnitude) and –180 degrees (phase). You can use the CD All Margins VI only with single-input single-output (SISO) systems. Wire data to the State-Space Model and Frequency Range inputs determine the polymorphic instance to use or manually select the instance.
This VI converts the state-space and zero-pole-gain models into transfer function models before calculating their margins.
CD All Margins (State-Space)

![]() |
State-Space Model contains a mathematical representation of and information about the system for which this VI determines gain and phase margins. | ||||||||||||
![]() |
Frequency Range contains the frequency information of the model.
| ||||||||||||
![]() |
Magnitude Scale specifies how to scale the magnitude of the frequency response.
|
||||||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||
![]() |
Gain Margins returns information about the gain margins.
| ||||||||||||
![]() |
Phase Margins returns information about the phase margins.
| ||||||||||||
![]() |
Frequency Response Data returns the data before this VI parameterizes it. To access the frequency response data, use the CD Get Frequency Response Data VI.
| ||||||||||||
![]() |
error out contains error information. This output provides standard error out functionality. | ||||||||||||
![]() |
Delay Margins returns information about the delay margins.
|
CD All Margins (Transfer Function)

![]() |
Transfer Function Model contains a mathematical representation of and information about the system for which this VI determines gain and phase margins. | ||||||||||||
![]() |
Frequency Range contains the frequency information of the model.
| ||||||||||||
![]() |
Magnitude Scale specifies how to scale the magnitude of the frequency response.
|
||||||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||
![]() |
Gain Margins returns information about the gain margins.
| ||||||||||||
![]() |
Phase Margins returns information about the phase margins.
| ||||||||||||
![]() |
Frequency Response Data returns the data before this VI parameterizes it. To access the frequency response data, use the CD Get Frequency Response Data VI.
| ||||||||||||
![]() |
error out contains error information. This output provides standard error out functionality. | ||||||||||||
![]() |
Delay Margins returns information about the delay margins.
|
CD All Margins (Zero-Pole-Gain)

![]() |
Zero-Pole-Gain Model contains a mathematical representation of and information about the system for which this VI determines gain and phase margins. | ||||||||||||
![]() |
Frequency Range contains the frequency information of the model.
| ||||||||||||
![]() |
Magnitude Scale specifies how to scale the magnitude of the frequency response.
|
||||||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||
![]() |
Gain Margins returns information about the gain margins.
| ||||||||||||
![]() |
Phase Margins returns information about the phase margins.
| ||||||||||||
![]() |
Frequency Response Data returns the data before this VI parameterizes it. To access the frequency response data, use the CD Get Frequency Response Data VI.
| ||||||||||||
![]() |
error out contains error information. This output provides standard error out functionality. | ||||||||||||
![]() |
Delay Margins returns information about the delay margins.
|
CD All Margins (Frequency Response Data)

![]() |
Frequency Response specifies the frequency response for which this VI calculates the margins.
| ||||||||
![]() |
Frequency Vector specifies information about the frequencies this VI uses to excite the model.
| ||||||||
![]() |
Magnitude Scale specifies how to scale the magnitude of the frequency response.
|
||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||
![]() |
Gain Margins returns information about the gain margins.
| ||||||||
![]() |
Phase Margins returns information about the phase margins.
| ||||||||
![]() |
Frequency Response Data returns the data before this VI parameterizes it. To access the frequency response data, use the CD Get Frequency Response Data VI.
| ||||||||
![]() |
error out contains error information. This output provides standard error out functionality. | ||||||||
![]() |
Delay Margins returns information about the delay margins.
|
CD All Margins Details
This VI supports delays. Refer to the LabVIEW Control Design User Manual for more information about delays.
Example
Refer to the CDEx Bode Analysis VI in the labview\examples\Control and Simulation\Control Design\Frequency Analysis directory for an example of using the CD All Margins VI.













