Bode and Nyquist plots

Updated

September 13, 2024

1 Frequency response

The frequency response refers to the Fourier transform of the impulse response; or equivalently, the trasfer function evaluated at \(jω\), which we will denote by \(G(jω)\). We can think of it as a function that maps the frequency \(ω\) to a complex number \(G(jω)\).

Frequency response can be determined experimentally. Recall that complex exponentials are eigenfunctions of LTI systems. Thus, when the input to a LTI system is \(e^{jω}\), the output is \(G(jω)e^{jω}\). Therefore, when the input is \(A\cos ωt = A(e^{jω} + e^{-jω})/2\), the output is \[\begin{align*} \frac A2 G(jω)e^{jω} + \frac A2 G(-jω)e^{-jω} &= \frac A2 |G(jω)|e^{jω + \angle G(jω)} + \frac A2 |G(jω)|e^{-jω - \angle G(jω)} \\ &= A|G(jω)| \cos (ωt + \angle G(jω)) \end{align*}\] where the first equality uses the fact that for a real signal \(g(t)\), the Fourier transform has the property that \(G(-jω) = G^*(jω)\).

If we input a cosine at frequency \(ω\), the output is also a cosine of the same frequency with magnitude scaled by \(|G(jω)|\) and shifted by \(\angle G(jω)\).

There are two ways to plot the frequency response:

  1. Bode plot where we plot two separate plots: a magitude plot which is the plot of \(|G(jω)|\) vs \(ω\) and a phase plot which is a plot of \(\angle G(jω)\) vs \(ω\).

    Figure 1: Bode plot of \(G(s) = \dfrac{1}{s^2 + s + 1}\).
  2. Nyquist plot which is a parametric polar plot of \(G(jω)\).

    Figure 2: Nyquist plot of \(G(s) = \dfrac{1}{s^2 + s + 1}\).

We will first understand how to draw these plots and then use them as a tool to design controllers.

2 Bode Plots

As mentioned earlier, Bode plot refers to a combination of two plots: magnitude vs frequency and phase vs frequency. It is named after :Hendrik Bode

There are two features of these plots:

  • In the magnitude plot, we plot \(\log |G(jω)|\) vs \(ω\) (rather than \(|G(jω)|\) vs \(ω\). This is useful for the following reason. Consider a series interconnection: \(G(s) = G_1(s)G_2(s)\). Then, we have \[ \log |G(jω)| = \log |G_1(jω)| + \log |G_2(jω)| \] and \[ \angle |G(jω)| = \angle |G_1(jω)| + \angle |G_2(jω)|. \] Thus, the Bode plot of \(G(s)\) is simply the sum of the Bode plots of \(G_1(s)\) and \(G_2(s)\).

    For historical reasosn, we plot the magnitude square (which corresponds to power at a particular frequency) on the :decibel scale, i.e., we plot \(20 \log |G(jω)|\) vs \(ω\).

  • The key insight of Bode was that if we plot the frequency plot on the logarithmic scale on the \(ω\)-axis, then both the magnitude and phase plot can be easily approximated. This allows us to easily plot the Bode plot of any transfer function and understand the impact of adding a controller on the Bode plot.

From properties of Fourier transforms, we know that if the impulse response \(g(t)\) is real, then \(|G(jω)|\) is even and \(\angle G(jω)\) is an odd function of \(ω\).

For this reason, Bode plots are drawn only for \(ω > 0\). We now illustrate how to draw Bode plots of simple terms.

In this course, we only consider Bode plot of minimum phase systems (i.e., all poles and zeros are in the LHP). Non-minimum phase systems have the same magnitude plot, but the phase plots are inverted.

2.1 Bode plot of a constant term

Consider the constant term \[ G(s) = K \] Clearly, the magnitude is a constant \[ 20 \log |G(jω)| = 20 \log K \] and the phase is a constant \[ \angle G(jω) = \begin{cases} 0^∘ & K > 0 \\ \pm 180 ^∘ & K < 0 \end{cases}\]

Bode plot of \(G(s) = 10\).

  • For a constant term, the magnitude plot is a straight line.
  • The phase plot is also a striaght line, either at \(0 ^∘\) (when the gain is positive) or at \(\pm 180 ^∘\) (when the gain is negative).

2.2 Bode plot of first order term

Consider a normalized first order system \[ G(s) = \frac{a}{s + a} = \frac{1}{1 + \dfrac{s}{a}}. \] The frequency \(a\) is called the corner frequency (the reason for the name will become clear when we plot the magnitude plot).

The magnitude and phase are: \[|G(jω)|^2 = \frac{1}{1 + \dfrac{ω^2}{a^2}} \quad\text{and}\quad \angle G(jω) = -\tan^{-1}\frac{ω}{a}.\]

Observe the following:

  • For \(ω/a \ll 1\), (i.e., \(ω \ll a\)) \[20 \log |G(jω)| \approx 10 \log \frac{1}{1} = 0 \quad\text{and}\quad \angle \log G(jω) \approx -\tan^{-1} 0 = 0^∘\]

    Thus, the magnitude is \(0\) dB and the phase is \(0^∘\).

  • For \(ω/a \gg 1\), (i.e., \(ω \gg a\)) \[20 \log |G(jω)| \approx 10 \log \frac{1}{\dfrac{ω}{a}} = -20 \log ω + 20 \log ω \quad\text{and}\quad \angle \log G(jω) \approx -\tan^{-1} ∞ = 90^∘\]

    Thus, the magnitude is a straight line with a slope of \(-20\) dB/decade and the phase is \(-90^∘\).

Thus, the Bode plot is a straight line for low and high frequencies. We will approximate it by a straight line in the intermediate range as well as shown below.

Bode plot of \(G(s) = \dfrac{1}{1 + \dfrac{s}{a}}\).

Bode plot of \(G(s) = \dfrac{1}{1 + \dfrac{s}{a}}\).

  • For a pole at \(a\), the straight line approximation of the magnitude Bode plot starts at 0 dB until the corner frequency \(a\) and then decreases at a slope of -20 dB/decade.
  • The phase plot starts at 0° until one decade before the corner frequency (i.e., until \(a/10\), then goes down at a slope of -45°/decade for two decades (i.e., until \(10a\)) and then remains constant at -90°.
  • If the pole has multiplicity \(n\), then the slopes are \(-20n\) dB/decade and \(-45n^∘\)/decade.

2.3 Bode plot of a second order term

Consider a normalized second order term is of the form:

\[ G(s) = \frac{ω_n^2}{s^2 + 2 ζ ω_n s + ω_n^2}. \]

In this course, we will ignore the impact of damping coefficient on the Bode plot approximate any second order system as \[ G(s) = \frac{ω_n^2}{s^2 + 2 ζ ω_n s + ω_n^2} \approx \frac{ω_n^2}{(s+ω_n)^2}. \]

The reason for ignoring the damping coefficient is as follows. In this course, we are using the straight line approximation of Bode plot to understand how to use them for control design. It is possible to develop rules that capture the impact of damping coefficient on the Bode plot (and the textbook presents such rules!), but in my opinion, there is very little value in remembering such rules. In practice, if you need an accurate Bode plot, it is much simpler to just plot it via MATLAB.

Bode plot of \(G(s) = \dfrac{1}{s^2+s+1}\).

Bode plot of \(G(s) = \dfrac{1}{s^2+s+1}\).

  • For the purpose of this course, we will treat a second order term \(ω_n^2/(s^2 + 2 ζ ω_n s + ω_n^2)\) as a repeated root at \(ω_n\).

2.4 Poles at origin

Consider the TF with a pole at origin: \[ G(s) = \frac 1s \]

Thus, \[ |G(jω)|^2 = \frac{1}{ω^2} \quad\hbox{hence}\quad 20 \log |G(jω)| = -20 \log ω \] and \[ \angle G(jω) = - 90^∘ \]

Bode plot of \(G(s) = \dfrac{1}{s}\).

  • For a pole at origin, the magnitude Bode plot is a straight line with -20 dB/decade slope. The line passes through 0 dB at \(ω=1\) rad/sec.
  • The phase is constant at -90°.
  • If the pole has multiplicity \(n\), then the slope of the magnitude plot is \(-20n\) dB/decade and the constant phase is \(-90n^∘\).

2.5 The impact of zeros

Consider the transfer function \[ G(s) = 1 + \frac{s}{a}. \]

The Bode plot of this is simply the “flipped” version of \(1/(1 + s/a)\).

Bode plot of \(G(s) = {1 + \dfrac{s}{a}}\).

Bode plot of \(G(s) = {1 + \dfrac{s}{a}}\).

  • A zero is similar to a pole but the plots are mirrored around 0dB or 0°.

2.6 Bode plot of general transfer functions

We now explain how to plot the Bode plots of a general transfer function via an example. Consider \[ G(s) = \frac{100 (s+10)}{ (s+1)(s+100) } \]

Step 1: Normalize the transfer function and break it into first or second order terms.

\[ G(s) = \frac{1}{10} \left( \frac{1}{1 + s} \right) \left( 1 + \frac{s}{10} \right) \left( \frac 1{1 + \dfrac{s}{100}} \right) \]

Step 2 Separately plot the straight-line Bode plot approximation for each of the terms

Step 3: Add all the individual terms to plot the combined Bode plot.

2.7 System type and steady state errors

It is possible to identify the system type and the corresponding error constant from Bode plots. Recall that a general TF of type \(k\) can be written as \[ \def\1#1{\Bigl(1 + \dfrac{s}{#1}\Bigr)} G(s) = \dfrac{K}{s^k} \frac{\1{z_1}\1{z_2}\cdots\1{z_m}} {\1{p_1}\1{p_2}\cdots\1{p_n}} \]

2.7.1 Position constant of type 0 system

The TF of a type 0 system is: \[ \def\1#1{\Bigl(1 + \dfrac{s}{#1}\Bigr)} G(s) = K_p \frac{\1{z_1}\1{z_2}\cdots\1{z_m}} {\1{p_1}\1{p_2}\cdots\1{p_n}} \]

Thus, \(\lim_{s \to 0} G(s) = K_p\). This means that at low frequency (i.e., \(s \to 0\)), the magnitude Bode plot is straight line with 0 dB/decade slope and has a y-offset of \(20 \log K_p\). So, we can find the position constant by inspection.

An illustration of the Bode plot of a type 0 system is shown in Figure 3.

Figure 3: Bode plot of type 0 system. The magnitude at low frequencies is equal to \(20 \log K_p\).

2.7.2 Velocity constant of type 1 system

The TF of a type 1 system is: \[ \def\1#1{\Bigl(1 + \dfrac{s}{#1}\Bigr)} G(s) = \dfrac{K_v}{s} \frac{\1{z_1}\1{z_2}\cdots\1{z_m}} {\1{p_1}\1{p_2}\cdots\1{p_n}} \]

Thus, \(\lim_{s \to 0} s G(s) = K_v\). This means that at low frequency (i.e., \(s \to 0\)), the magnitude Bode plot is straight line with -20 dB/decade slope. One can identify the velocity constant \(K_v\) by extending the initial -20 dB line until it hits 0 dB. The frequency at which it happens is \(ω = K_v\) (because at that frequency |K_v/j ω| = 1). So, we can find the velocity constant by inspection.

An illustration of the Bode plot of a type 1 system is shown in Figure 4.

Figure 4: Bode plot of type 1 system. The initial slope of -20 dB/dec intercepts the 0 dB line at \(K_v\).

2.7.3 Acceleration constant of type 2 system

The TF of a type 1 system is: \[ \def\1#1{\Bigl(1 + \dfrac{s}{#1}\Bigr)} G(s) = \dfrac{K_a}{s^2} \frac{\1{z_1}\1{z_2}\cdots\1{z_m}} {\1{p_1}\1{p_2}\cdots\1{p_n}} \]

Thus, \(\lim_{s \to 0} s^2 G(s) = K_a\). This means that at low frequency (i.e., \(s \to 0\)), the magnitude Bode plot is straight line with -40 dB/decade slope. One can identify the acceleration constant \(K_v\) by extending the initial -40 dB line until it hits 0 dB. The frequency at which it happens is \(ω = \sqrt{K_a}\) (because at that frequency |K_a/(j ω)^2| = 1). So, we can find the acceleration constant by inspection.

An illustration of the Bode plot of a type 2 system is shown in Figure 5.

Figure 5: Bode plot of type 2 system. The initial slope of -40 dB/dec intercepts the 0 dB line at \(\sqrt{K_a}\).

Exercise 1 For each of the following systems, identify the system type and the corresponding error constant.

2.8 System identification via Bode plots

Since there is a one-to-one correspondence between transfer functions and Bode plots, we can identify a system transfer function from its Bode plot. We illustrate this via an example.

Exercise 2 Find the minimum phase transfer function which has a magnitude Bode plot as shown below.

This is the Bode plot of a type 0 systems, since the magnitude Bode plot is a constant at low frequencies. The position constant is \(K_p = -10\)dB or equivalently \(\sqrt{10}\). There is then a zero at \(10\) rad/s, a pole at \(100\) rad/sec, and a second pole at \(1000\) rad/sec. Thus, the TF is \[ G(s) = \sqrt{10} \frac{ \biggl(1+\dfrac{s}{10}\biggr) } { \biggl(1 + \dfrac{s}{100} \biggr) \biggl(1 + \dfrac{s}{1000} \biggr) } = \frac{1}{1000\sqrt{10}} \frac{ (s+10) }{ (s + 100) (s + 1000) }. \]

3 Nyquist plots

Nquist plot is a polar plot of the frequency response, that is, we plot \(G(jω)\) as a complex number for different values of \(ω\). Unlike the Bode plot, we plot the Nyquist plot for all \(ω \in (-∞, ∞)\) and usually also draw an arrow indicating the direction. An example is shown in Figure 2. In the next lecture, we will show how to use Nyquist plot to determine stability of a unity feedback system.