Documentation |
Nyquist plot with additional plot customization options
h = nyquistplot(sys)
nyquistplot(sys,{wmin,wmax})
nyquistplot(sys,w)
nyquistplot(sys1,sys2,...,w)
nyquistplot(AX,...)
nyquistplot(..., plotoptions)
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.
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');
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.