What is the Nyquist and Bode plot?

Both Nyquist plots and Bode plots are used to analyze the frequency response of a system, particularly in control theory and signal processing. They provide insights into system stability, performance, and behavior across different frequencies. However, they differ in how they present this information. We will study them one by one.

Bode Plot

A Bode plot is a graphical representation used in control systems and signal processing to visualize the frequency response of a system. It consists of two plots:

  1. Magnitude Plot: Shows how the magnitude of the system’s response changes with frequency (often in decibels, dB).The magnitude plot shows the gain (output/input) of the system, often in decibels.
bode plot (magnitude)

2. Phase Plot: Displays how the phase of the system’s output signal changes with respect to the input signal as a function of frequency (usually in degrees).Thus the phase plot shows the phase shift introduced by the system as a function of frequency.

bode plot (phase)

Key features of Bode plots:

In both the plots, the x-axis represents the frequency, typically on a logarithmic scale. Whereas, y-axis represents the magnitude (linear scale) of open loop transfer function in the magnitude plot and the phase angle (linear scale) of the open loop transfer function in the phase plot.

Key features of Bode plots:

  • The x-axis represents the frequency, typically on a logarithmic scale.
  • The magnitude plot shows the gain (output/input) of the system, often in decibels.
  • The phase plot shows the phase shift introduced by the system as a function of frequency.

Why it’s useful:

Bode plots help engineers and system designers understand the stability, bandwidth, and resonant frequency of a system. They’re used in control theory, particularly when analyzing transfer functions and feedback systems.

Step-by-Step Process of Plotting a Bode Plot

To plot a Bode plot, we can follow these step-by-step instructions. Let’s assume we’re working with a transfer function G(s), which could represent a control system or a signal processing filter. Here’s the general process:


1. Express the Transfer Function

  • Start by expressing the system’s transfer function in the form of G(s)=N(s)/D(s) where N(s) is the numerator and D(s) is the denominator.
  • The variable s is the Laplace variable, where s=jω for Bode plots (i.e., the imaginary axis, j times angular frequency, ω).

Example:
For a transfer function like G(s)=K/(s+a)(s+b)​, we will work with the frequency ω=2πf, where f is frequency in Hz.


2. Convert to Frequency Domain

  • Replace s with jω to express the transfer function in terms of frequency. So the transfer function becomes G(jω).

Example:
For the transfer function G(s)=1/(s+1) ​, replace s with jω, resulting in G(jω)=1/(jω+1)


3. Magnitude Plot Calculation (in dB)

  • To find the magnitude, compute modulus of G(jω) i.e ∣ G(jω) ∣ at various frequencies.
  • Express the magnitude in decibels (dB):
    Magnitude (dB)=20log⁡10(∣ G(jω ) ∣)
  • For each frequency, calculate the magnitude. Frequencies typically span from very low values (close to 0 Hz) to high frequencies.

Example:
For G(jω)=1/(jω+1)​, the magnitude is:∣ G(jω) ∣=1/ Squrt.(1+ω^2)

Now convert this into decibels using the above formula.


4. Phase Plot Calculation (in Degrees)

  • The phase shift is the angle of the complex number G(jω)
  • For each frequency, compute the phase angle θ of G(jω) (in degrees).

θ(ω)=Phase of G(jω)

  • The phase is calculated as θ=arg(G(jω) and then converted to degrees:
    Phase (degrees)=tan⁡−1(Imaginary Part/Real Part)

Example:
For G(jω)=1/(jω+1), the phase is:
θ(ω)=−tan⁡−1(ω)

which gives the phase angle in degrees.


5. Choose Frequencies

  • Select a range of frequencies, typically spanning several decades, for example, from 10−110^{-1}10−1 to 10310^{3}103 Hz. Plot points on a logarithmic frequency scale.
  • Frequencies often range from very low to very high (depending on the system), and this range helps visualize both low-frequency and high-frequency behavior.

6. Plot the Magnitude and Phase

  • Magnitude Plot: Use the calculated dB values to plot 20log⁡10∣G(jω)∣20 \log_{10} |G(j\omega)|20log10​∣G(jω)∣ on the y-axis (vertical axis) and frequency on the x-axis (logarithmic).
  • Phase Plot: Use the calculated phase angles in degrees and plot them against frequency (same x-axis).

You can use software tools like MATLAB, Python (Matplotlib or SciPy), or do it manually.


7. Add Asymptotes (Optional)

  • For manual plotting, you can add asymptotes to approximate the plot behavior at low and high frequencies.
  • These straight lines make it easier to sketch the plot by hand, especially if you’re using a transfer function with simple poles and zeros.

8. Interpret the Bode Plot

  • The magnitude plot shows the gain or attenuation of the system across different frequencies. At low frequencies, you can observe whether the system amplifies or attenuates signals.
  • The phase plot helps you understand the system’s phase shift and its tendency toward lag or lead over different frequencies, which is critical in stability analysis.

Nyquist plot

A Nyquist plot is a graphical tool used in control theory and signal processing to analyze the stability of a feedback system. It visualizes the frequency response of a system by plotting the complex values of the transfer function G(jω) over a range of frequencies ω, displaying both the real and imaginary components of the system response on the same plot.

Key Aspects of the Nyquist Plot

  • Complex Plane Representation: The x-axis represents the real part of G(jω), and the y-axis represents the imaginary part.
  • Frequency Sweep: Frequencies are typically swept from ω=0 to ω=+∞, covering all positive frequencies.
  • Symmetry: The plot usually reflects over the x-axis to account for the entire range of frequencies from −∞- to +∞.

Why Nyquist Plots are Important

The primary use of the Nyquist plot is to analyze the stability of closed-loop feedback systems using the Nyquist Stability Criterion. This criterion helps determine whether the system will remain stable or become unstable when feedback is applied.

Nyquist Stability Criterion

According to the Nyquist Stability Criterion:

  1. Count the encirclements of the critical point (−1,0)(-1, 0)(−1,0) on the complex plane.
  2. Calculate the number of poles of G(s)H(s)G(s)H(s)G(s)H(s) (the open-loop transfer function) in the right half of the sss-plane.
  3. Stability is determined by: Z=N+P where:
    • Z is the number of poles of the closed-loop transfer function in the right-half s-plane (which indicates instability if Z>0 .
    • N is the number of encirclements of (−1,0) with clockwise counts as positive and counterclockwise as negative.
    • P is the number of poles of the open-loop transfer function in the right half of the s-plane.

For a system to be stable, it must meet certain conditions based on how it encircles (−1,0) allowing engineers to assess stability and adjust the design if necessary.

Steps to Create a Nyquist Plot

  1. Define the Transfer Function:
    • Express the system’s open-loop transfer function G(s)H(s).
  2. Substitute s=jω
    • Replace s with jω to get the frequency response G(jω)
  3. Calculate Real and Imaginary Parts:
    • For each value of ω, calculate the real part Re(G(jω)) and the imaginary part Im(G(jω)) of the transfer function.
  4. Plot on the Complex Plane:
    • Plot the calculated points on the complex plane, with the x-axis for the real part and y-axis for the imaginary part. Frequency points are often joined to form a continuous curve.
  5. Analyze for Encirclements:
    • Observe the plot to see if it encircles the critical point (−1,0) and count the encirclements, which will help assess the system’s stability.
  6. Interpret Stability Using the Nyquist Criterion:
    • Apply the Nyquist Criterion to determine stability based on the number and direction of encirclements relative to the right-half plane poles.

Practical Application and Example

Consider an open-loop transfer function: G(s)=K/s(s+a)

where K and a are constants. To create a Nyquist plot:

  • Substitute s=jω, calculate the real and imaginary parts over a range of ω, and plot the resulting points.
  • Then, analyze the Nyquist plot to see if it encircles (−1,0) to determine stability.

Nyquist Plot in Control Design

In practical control system design, Nyquist plots are valuable for:

  • Determining the robustness of a control system by understanding how close the plot comes to (−1,0).
  • Evaluating gain and phase margins indirectly.
  • Providing insight for tuning controllers in feedback systems.

Nyquist plots are frequently generated in software tools like MATLAB, Python, or control system design software due to the complexity of calculating and plotting complex values manually.

Leave a comment