Nyquist command takes as input the open loop transfer function (not the closed loop!) and generates a plot, which was can look at to determine if the closed loop is stable or not. The closed loop is assumed to be unity feedback. For example, if the open loop is \(G(s)\), then we know that the closed loop transfer function is \(\frac {G(s)}{1+G(s)}\). But we call Nyquist with \(G(s)\).
Here are two examples.
Given \(G(s)=\frac {s}{1-0.2s}\) generate Nyquist plot.
Mathematica
Matlab
Given \(G(s)=\frac {5(1-0.5s)}{s(1+0.1s)(1-0.25s)}\) generate Nyquist plot.
Mathematica
Matlab
clear all; close all; s=tf('s'); sys=5*(1-0.5*s)/... (s*(1+0.1*s)*(1-0.25*s))
|
2.5 s - 5 ------------------------ 0.025 s^3 + 0.15 s^2 - s Continuous-time transfer function.
|
nyquist(sys)
|
|
However, there is a better function to do this called nyquist1.m which I downloaded and tried. Here is its results