Nyquist plot¶

The Nyquist plot is arguably easier than the Bode plot, although often claimed to be more difficult to understand. You won't be such a person to make this claim!

There is this so-called Nyquist contour, $\Gamma_s$, in the complex plane and it is defined as the half circle shape that goes along the entire imaginary axis and makes a half-circle with infinite radius around the right half plane. Then the Nyquist plot is just the loop transfer function evaluated on the Nyquist contour plotted in the complex plane.

You lose the frequency information compared to Bode plots, but when you've learned about margins and the Nyquist criterion, you'll understand how Nyquist is more useful for stability analysis.

I'll make a Nyquist plot for you :)

In [7]:
%matplotlib notebook
import numpy as np
import matplotlib.pyplot as plt

from matplotlib.ticker import MultipleLocator
from matplotlib.gridspec import GridSpec
from IPython.display import display

import warnings
warnings.filterwarnings("ignore")

from helperFunctions import *
setPlotStyle()

OM = np.logspace(-2, 4, 900)
S = OM*1j

L1 = lambda s :  150* s*(s - 1e1) / ((s + .1) * (s + 50)**2)
L1_eval1 = L1(S)
L1_eval2 = L1(np.flip(-S))

fig, ax = plt.subplots()


drawContour(ax, L1_eval1, c='k', ls='-')
drawContour(ax, L1_eval2, c='k', ls='--')
ax.set(title="Nyquist plot", 
          xlabel="$\mathfrak{Re}\{L(\Gamma_s)\}$", ylabel="$\mathfrak{Im}\{L(\Gamma_s)\}$")
ax.plot([-1], [0], 'xr')
display(fig)
No description has been provided for this image

The solid line corresponds to the mapping of the positive imaginary axis, and the dashed line to the mapping of negative imaginary axis included in $\Gamma_s$. The arrows point in the positive direction of $\Gamma_s$.