1.39 How to make Nyquist plot?

1.39.1 Example 1
1.39.2 Example 2

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.

1.39.1 Example 1

Given \(G(s)=\frac {s}{1-0.2s}\) generate Nyquist plot.

Mathematica

NyquistPlot[s/(1 - 0.2 s), 
   NyquistGridLines -> Automatic]
 

pict

 

Matlab

clear all; close all; 
nyquist([1 0],[-0.2 1]) 
grid
 

pict

 

1.39.2 Example 2

Given \(G(s)=\frac {5(1-0.5s)}{s(1+0.1s)(1-0.25s)}\) generate Nyquist plot.

Mathematica

NyquistPlot[5(1-0.5 s)/ 
    (s(1 + 0.1 s)(1 - 0.25 s))]
 

pict

 

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)
 

pict

 

However, there is a better function to do this called nyquist1.m which I downloaded and tried. Here is its results

clear all; close all; 
nyquist1()
 

pict