Skip to Main Content Skip to Search
Product Documentation

nyquistplot - Nyquist plot with additional plot customization options

Syntax

h = nyquistplot(sys)
nyquistplot(sys,{wmin,wmax})
nyquistplot(sys,w)
nyquistplot(sys1,sys2,...,w)
nyquistplot(AX,...)
nyquistplot(..., plotoptions)

Description

h = nyquistplot(sys) draws the Nyquist plot of the dynamic system model sys. It also returns the plot handle h. You can use this handle to customize the plot with the getoptions and setoptions commands. Type

help nyquistoptions 

for a list of available plot options.

The frequency range and number of points are chosen automatically. See bode for details on the notion of frequency in discrete time.

nyquistplot(sys,{wmin,wmax}) draws the Nyquist plot for frequencies between wmin and wmax (in rad/TimeUnit, where TimeUnit is the time units of the input dynamic system, specified in the TimeUnit property of sys).

nyquistplot(sys,w) uses the user-supplied vector w of frequencies (in rad/TimeUnit, where TimeUnit is the time units of the input dynamic system, specified in the TimeUnit property of sys) at which the Nyquist response is to be evaluated. See logspace to generate logarithmically spaced frequency vectors.

nyquistplot(sys1,sys2,...,w) draws the Nyquist plots of multiple models sys1,sys2,... on a single plot. The frequency vector w is optional. You can also specify a color, line style, and marker for each system, as in

nyquistplot(sys1,'r',sys2,'y--',sys3,'gx')

nyquistplot(AX,...) plots into the axes with handle AX.

nyquistplot(..., plotoptions) plots the Nyquist response with the options specified in plotoptions. Type

help nyquistoptions 

for more details.

Tips

You can change the properties of your plot, for example the units. For information on the ways to change properties of your plots, see Ways to Customize Plots.

Examples

Example 1

Customize Nyquist Plot Frequency Units

Plot the Nyquist frequency response and change the units to rad/s.

sys = rss(5);
h = nyquistplot(sys);
% Change units to radians per second.
setoptions(h,'FreqUnits','rad/s');

Example 2

Compare the frequency responses of identified state-space models of order 2 and 6 along with their 1-std confidence regions rendered at every 50th frequency sample.

load iddata1
sys1 = n4sid(z1, 2) % discrete-time IDSS model of order 2
sys2 = n4sid(z1, 6) % discrete-time IDSS model of order 6

Both models produce about 76% fit to data. However, sys2 shows higher uncertainty in its frequency response, especially close to Nyquist frequency as shown by the plot:

w = linspace(10,10*pi,256);
h = nyquistplot(sys1,sys2,w);
setoptions(h, 'ConfidenceRegionDisplaySpacing', 50, 'ShowFullContour', 'off');

Right-click to turn on the confidence region characteristic by using the Characteristics-> Confidence Region.

See Also

getoptions | nyquist | setoptions

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS