# Nyquist Plot generator

This app will generate the Nyquist Plot for a transfer function of
the form (a + bs) e^{-ts} / (g + hs). In process control,
Nyquist plots are used for analyzing the stability of controllers.

## Download

.xlsx file

## How to use

The use of this app is quite straightforward, simply key in the values of a, b, g, h and t into the sheet, along with the desired frequency range. Note that the units of frequency is rad/time. The Nyquist plot is generated.

For example, the screenshot above shows the Nyquist plot for e^{-3s}/(1 +
s), from 0.01 rad/s to 100 rad/s. We have

a = 1,

b = 0,

g =1,

h = 1 and

t = 3.

## Stability analysis using Nyquist plots

Nyquist plots are useful for analysing the stability of control systems. The (-1,0) point on the plot corresponds to a closed loop gain of 1 with a phase shift of 180°. The controller becomes unstable beyond this point.

In our example above, we can see that the plot first crosses the negative x axis at (-0.775,0), the gain margin for this system is therefore 1 / 0.775 = 1.3. This means that if the gain of this system (corresponding to the value of a) is raised to 1.3, the system will be on the verge of instability. The system will be unstable if the gain increases beyond 1.3.

The PID Loop Simulator can be used to verify this. This system corresponds to a proportional only controller used on a process with Gain =1 and Lag equal to 1 second. The delsy is 3 seconds, but as the simulator has an inherent delay of 1 second (due to the sampling rate), we set the process delay to 2 seconds to get a total delay of 3 seconds. Hence the PID controller set up is as follows:

As seen from the simulation results below, the system is stable at a gain of 1, but is on the verge of instability at gain = 1.3. Furtther increase in gain will make the system unstable.

## How it works

This tool is similar to the Bode Plot Generator. The amplitude and phase are calculated at 1000 points over the frequency range using defined names and formulae. All formulae are evaluated in the memory, there are no calculations done directly on the spreadsheet. See the How Bode Plot works page for details of the formulae used.

There are 2 additional formulae used in this app, these calculate the X and Y axis values for the plot. These formulae are:

Xaxis = Amplitude * cos(Phase); and

Yaxis = Amplitude * sin(Phase).

These values are plotted on the X-Y chart to produce the Nyquist plot.

Note that in this app, the phase is calculated in radians and not degrees as in the Bode plot app.

## Also See:

Ziegler Nichols Tuning Calculator