Stability Analysis of a First-Order System with Proportional Control – Bode Plot

Let’s analyze the stability of a first-order system with a proportional controller using Bode Plot method. The process has a time constant of 10 seconds, and the proportional controller gain is K_p.

Closed Loop System with First Order Process and Proportional Controller

The transfer function of the process under control is:

    \[ P(s) = \frac{1}{10s + 1} \]

The transfer function of the open-loop system is:

    \[ G(s) = C(s) \cdot P(s) = \frac{K_p}{10s + 1} \]

The closed-loop transfer function is:

    \[T(s) = \frac{G(s)}{1 + G(s)} = \frac{\frac{K_p}{10s + 1}}{1 + \frac{K_p}{10s + 1}} = \frac{K_p}{10s + 1 + K_p}\]

Bode Plot and Stability Analysis for C(s) and P(s)

The Bode plot is a powerful tool used to analyze the frequency response of a control system. Even though it is drawn based on the open-loop transfer function, G(s) = C(s)P(s) (where C(s) is the controller and P(s) is the process), it provides valuable insights into the stability of the closed-loop system.


The Role of the Open-Loop Transfer Function in Closed-Loop Stability

For a system with unit feedback, the closed-loop transfer function is:

    \[ T(s) = \frac{G(s)}{1 + G(s)} = \frac{C(s)P(s)}{1 + C(s)P(s)} \]

The closed-loop system’s stability is determined by the characteristic equation:

    \[ 1 + G(s) = 1 + C(s)P(s) = 0 \]

The roots of this equation (poles of the closed-loop system) dictate stability. By analyzing G(s) = C(s)P(s), we can predict whether the closed-loop poles lie in the left-half s-plane (stable) or the right-half s-plane (unstable).


Key Concepts for Stability Analysis Using the Bode Plot

  1. Open-Loop Gain (G(j\omega) = C(j\omega)P(j\omega)):
    • The magnitude of G(j\omega) tells how much the system amplifies signals at different frequencies.
  2. Phase Shift:
    • The phase of G(j\omega) shows how much delay is introduced at each frequency.
  3. Stability Margins:
    • Gain Margin (GM): Indicates how much the gain of G(j\omega) can increase before the closed-loop system becomes unstable.
    • Phase Margin (PM): Indicates how much additional phase lag can be tolerated before instability occurs.

Steps for Stability Analysis Using the Bode Plot

  1. Construct the Bode Plot:
    • Plot the magnitude (|G(j\omega)|) and phase (\angle G(j\omega)) of G(s) = C(s)P(s) across a range of frequencies (\omega).
  2. Identify Critical Frequencies:
    • Gain Crossover Frequency (\omega_g): The frequency where |G(j\omega)| = 1 (or 0 \, \text{dB}).
    • Phase Crossover Frequency (\omega_p): The frequency where \angle G(j\omega) = -180^\circ for K_p > 0, or -360^\circ for K_p < 0.
  3. Determine Stability Margins:
    • Phase Margin (PM): At \omega_g, measure the difference between the phase and the critical phase (-180^\circ for K_p > 0, -360^\circ for K_p < 0). A positive PM indicates stability.
    • Gain Margin (GM): At \omega_p, calculate the gain increase (in dB) required to make |G(j\omega)| = 1. A positive GM indicates stability.

Why Are There Different Critical Phases for Positive and Negative Gains?

Stability analysis using the Bode plot is based on the Nyquist Stability Theorem, which states that the stability of a closed-loop system depends on the encirclement of the critical point -1 + j0 in the Nyquist plot.

  • For K_p > 0: The critical phase is -180^\circ. The Nyquist plot must avoid encircling -1 + j0 to ensure stability.
  • For K_p < 0: The critical phase becomes -360^\circ. This accounts for the additional -180^\circ phase shift introduced by the negative gain.

Explanation of Critical Phase Thresholds

When K_p > 0:

  • The phase plot starts at 0^\circ and decreases with increasing frequency.
  • Instability occurs if the total phase shift reaches -180^\circ, at which point the Nyquist plot risks encircling -1 + j0.

When K_p < 0:

  • The negative gain introduces an additional -180^\circ phase shift.
  • As a result, the phase plot starts at -180^\circ at low frequencies and decreases further.
  • Instability now occurs if the total phase shift reaches -360^\circ, which includes the initial -180^\circ from the negative gain.

Thus, for K_p < 0, the critical phase threshold shifts from -180^\circ to -360^\circ to account for the added phase shift. This ensures consistency with the Nyquist criterion, which examines encirclement of the -1 point in the complex plane.


Visualizing with Nyquist Plots

Consider the Nyquist plots for K_p = 1, K_p = -0.5, and K_p = -2:

Nyquist Plot for Different Values of K_p
  • For K_p = 1: The plot starts at 0^\circ and avoids encircling -1 + j0, ensuring stability.
  • For K_p = -0.5: The plot starts at -180^\circ. Stability is maintained as it does not encircle -1 + j0 by reaching -360^\circ.
  • For K_p = -2: The plot starts at -180^\circ and crosses -360^\circ, leading to instability due to encirclement of -1 + j0.

This shift in the critical phase aligns with the Nyquist stability criterion and reflects the impact of the sign of K_p on the system’s stability.


Stability Conditions for the Closed-Loop System

  • The closed-loop system is stable if:
    • Gain Margin > 0 \, \text{dB}
    • Phase Margin > 0^\circ
  • The system is marginally stable or integrator-driven unstable if:
    • Gain Margin = 0 \, \text{dB}
    • Phase Margin = 0^\circ
  • The system is unstable if:
    • Gain Margin < 0 \, \text{dB} or Phase Margin < 0^\circ

Why the Bode Plot of G(s) Predicts Stability of the Closed-Loop System

Although the Bode plot is based on the open-loop transfer function G(s) = C(s)P(s), it predicts closed-loop stability because the characteristic equation 1 + G(s) = 0 involves G(s). When G(s) has a magnitude of |G(j\omega)| = 1 and a phase of -180^\circ, the system is on the verge of instability because it satisfies 1 + G(j\omega) = 0.

By ensuring sufficient gain and phase margins in the Bode plot of G(s), you can guarantee the closed-loop poles remain in the left-half s-plane.


Bode Plot for the System

For the transfer function P(s) = \frac{1}{10s + 1}, the Bode plot can be derived as follows:

  1. Magnitude Plot:
    • The magnitude of P(j\omega) is:

          \[ |P(j\omega)| = \frac{1}{\sqrt{(10\omega)^2 + 1}} \]

    • In decibels (dB):

          \[ 20 \log_{10} |P(j\omega)| = -20 \log_{10} \sqrt{(10\omega)^2 + 1} \]

  2. Phase Plot:
    • The phase of P(j\omega) is:

          \[ \angle P(j\omega) = -\tan^{-1}(10\omega) \]

  3. Key Frequencies:
    • At low frequencies (\omega \to 0):
      • Magnitude: |P(j\omega)| \approx 0 \, \text{dB}
      • Phase: \angle P(j\omega) \approx 0^\circ
    • At high frequencies (\omega \to \infty):
      • Magnitude: |P(j\omega)| \to -\infty \, \text{dB}
      • Phase: \angle P(j\omega) \to -90^\circ

Python Code to Generate the Bode Plot

The following Python code uses the control library to generate the Bode plot for the system:

import numpy as np
import matplotlib.pyplot as plt
from control import tf, bode

# Define the transfer function
num = [1]  # Numerator of G(s)
den = [10, 1]  # Denominator of G(s)
G = tf(num, den)

# Generate Bode plot
plt.figure()
mag, phase, omega = bode(G, dB=True, omega=np.logspace(-2, 2, 500), plot=True)

# Customize the plot
plt.suptitle("Bode Plot of the System", fontsize=14)
plt.show()

Bode plot for P(s) = \frac{1}{10s + 1} is depicted below:

Wait! What Happened to C(s)?

You’re absolutely right—what happened to C(s)? We can’t forget it! In the open-loop transfer function G(s), we must include C(s). Luckily, in this example, C(s) is a pure gain: C(s) = K_p. Let’s explore how this gain impacts the Bode plot.


Magnitude Plot

The magnitude of G(j\omega) = C(j\omega)P(j\omega) is given by:

    \[ |G(j\omega)| = |C(j\omega)||P(j\omega)| = \frac{K_p}{\sqrt{(10\omega)^2 + 1}} \]

In decibels (dB), this becomes:

    \[ 20 \log_{10} |G(j\omega)| = 20 \log_{10} K_p - 20 \log_{10} \sqrt{(10\omega)^2 + 1} \]

This means the magnitude plot shifts vertically when K_p changes. Increasing K_p raises the plot, while decreasing K_p lowers it.


Phase Plot

For K_p > 0:

The phase of G(j\omega) is:

    \[ \angle G(j\omega) = \angle C(j\omega) - \angle P(j\omega) = 0^\circ - \tan^{-1}(10\omega) = -\tan^{-1}(10\omega) \]

The phase plot for K_p > 0 remains unchanged, as K_p contributes no phase shift.

For K_p < 0:

When K_p < 0, the gain introduces a -180^\circ phase shift:

    \[ \angle G(j\omega) = \angle C(j\omega) - \angle P(j\omega) = -180^\circ - \tan^{-1}(10\omega) \]

In this case, the phase plot shifts downward by -180^\circ.


Bode Plot Analysis for K_p > 0

Let’s consider G(s) = \frac{K_p}{10s + 1}. For K_p > 0, the magnitude plot shifts vertically with K_p, but the phase plot remains the same.

Gain Margin:

The gain margin is \infty, meaning no amount of gain can make the system unstable. For instability to occur in a closed-loop system, the phase plot must cross -180^\circ, but this doesn’t happen here.

Phase Margin:

The phase margin measures how much additional phase lag can occur before instability. It is determined at the frequency where the magnitude crosses 0 dB.

For K_p = 1

At low frequencies (\omega \approx 0), the phase is already 0^\circ, and the magnitude is 0 dB. This means the phase margin is:

    \[ \text{Phase Margin} = 180^\circ -0^\circ = 180^\circ \]

For K_p = 10

For K_p = 10, the magnitude crosses 0 dB at a frequency \omega_c. Solving for \omega_c when |G(j\omega)| = 1:

    \[ \frac{|10|}{\sqrt{(10\omega_c)^2 + 1}} = 1 \]

    \[ \sqrt{(10\omega_c)^2 + 1} = 10 \]

    \[ (10\omega_c)^2 = 100 - 1 = 99 \]

    \[ \omega_c = \frac{\sqrt{99}}{10}\approx0.99 \, \text{rad/s}\]

The magnitude crosses 0 dB at \omega \approx 0.99 \, \text{rad/s}. At this frequency, the phase is:

    \[ \angle G(j0.99) = -\tan^{-1}(10 \cdot 0.99) \approx -84.2^\circ \]

The phase margin is:

    \[ \text{Phase Margin} = 180^\circ - 84.2^\circ = 95.8^\circ \]

Bode Plot Kp=10 - Gain Margin

Stability Range

The closed-loop system is stable for all K_p > 0 because the phase plot never reaches -180^\circ.


What Does the Phase Margin Tell Us?

The phase margin gives us an idea of the system’s robustness. For K_p = 10, a phase margin of 95.8^\circ means the system can tolerate some delay before becoming unstable.

Time Delay Interpretation

Let’s add a time delay T_d to the loop:

A delay introduces a phase shift proportional to frequency:

    \[ \phi = -\omega T_d \quad \text{(in radians)} \quad \text{or} \quad \phi = -\frac{180}{\pi} \cdot \omega T_d \quad \text{(in degrees)}. \]

To reduce the phase margin by 95.8^\circ at \omega = 0.99 , \text{rad/s}, the time delay is:

    \[ T_d = \frac{\phi}{-\frac{180}{\pi} \cdot \omega} \]

    \[ T_d = \frac{-95.8}{-\frac{180}{\pi} \cdot 0.99} \approx 1.69 , \text{seconds}. \]

This shows that the system can tolerate a delay of approximately 1.69 seconds before losing stability when K_p = 10. Below, step response of the closed loop system is depicted for K_p = 10 with various time delays.

Calculate how much delay can be added if K_p=2. You will see that the Phase margin is approximately 120.2^\circ that means the closed loop can tolerate 12.13 seconds of delay before becoming unstable.

Bode Plot Kp=2 Gain Margin

Analysis for K_p < 0

When K_p < 0, the negative gain introduces a -180^\circ phase shift, which affects the Bode plot as follows:


Magnitude Plot

The magnitude of G(j\omega) remains the same because |K_p| is positive:

    \[ |G(j\omega)| = \frac{|K_p|}{\sqrt{(10\omega)^2 + 1}}. \]

In decibels (dB), this is:

    \[ 20 \log_{10} |G(j\omega)| = 20 \log_{10} |K_p| - 20 \log_{10} \sqrt{(10\omega)^2 + 1}. \]

The magnitude plot shifts vertically, just as in the K_p > 0 case, depending on |K_p|.


Phase Plot

For K_p < 0, the phase is:

    \[ \angle G(j\omega) = \angle C(j\omega) - \angle P(j\omega) = -180^\circ - \tan^{-1}(10\omega). \]

This means the phase plot shifts downward by -180^\circ, compared to the K_p > 0 case.

Bode Plot for K_p = -0.5 is depicted below.


Stability Analysis

Case 1: 0 > K_p > -1

  • Magnitude Plot: At low frequencies (\omega \to 0), |G(j\omega)| \to |K_p|. The magnitude remains less than 1 (0 dB) because |K_p| < 1.
  • Phase Plot: The phase starts at -180^\circ and decreases further, but the closed-loop system does not cross the critical -360^\circ phase threshold for instability. Please refer to “Why Are There Different Critical Phases for Positive and Negative Gains?” above for more explanations.

The system is stable in this range because the Nyquist criterion is not violated.

Case 2: K_p = -1

  • Magnitude Plot: At low frequencies (\omega \to 0), |G(j\omega)| \to 1 (0 dB).
  • Phase Plot: The phase starts at -180^\circ and decreases to -270^\circ. The system could be marginally stable or unstable because the Nyquist plot passes through the critical point. The closed loop transfer function is

        \[T(s)=-\frac{1}{10s}\]

    . For marginal stability, poles must lie purely on the imaginary axis (e.g., s = \pm j\omega) and not at s = 0 or repeated. Here, the pole at s = 0 leads to integrator-driven instability, not marginal stability.

Case 3: K_p < -1

  • Magnitude Plot: At low frequencies (\omega \to 0), |G(j\omega)| > 1 (greater than 0 dB).
  • Phase Plot: The phase continues to decrease, and the Nyquist plot encircles the critical point multiple times.

The system becomes unstable for K_p < -1.


Phase Margin and Gain Margin for K_p = -0.5

Phase Margin:

For K_p = -0.5, the magnitude crosses 0 dB at a frequency \omega_c. Solving for \omega_c when |G(j\omega)| = 1:

    \[ \frac{|-0.5|}{\sqrt{(10\omega_c)^2 + 1}} = 1 \]

    \[ \sqrt{(10\omega_c)^2 + 1} = 0.5 \]

    \[ (10\omega_c)^2 = 0.25 - 1 = -0.75 \]

Since this is not physically possible, the magnitude never crosses 0 dB, and the system remains stable.

Gain Margin:

To find the gain margin, we note that the magnitude does not cross 0 dB, so the gain margin is effectively infinite.

Time Delay for Instability:

For K_p = -0.5, the phase at low frequencies is -180^\circ. Adding a time delay introduces a frequency-dependent phase shift:

    \[ \phi = -\omega T_d. \]

For instability, the phase shift must cause the total phase to reach -360^\circ. This means the time delay must satisfy:

    \[ -180^\circ - \omega T_d = -360^\circ. \]

At low frequencies (\omega \to 0):

    \[ T_d = \frac{180^\circ}{\omega}. \]

Since the system remains stable at K_p = -0.5, no realistic finite time delay can destabilize it under normal conditions.

Step Response of Closed-Loop System (Kp = -0.5) with Time Delay

Summary

  • For 0 > K_p > -1: The system is stable.
  • For K_p = -1: The system is Integrator-driven instability.
  • For K_p < -1: The system is unstable.
  • For K_p = -0.5, the magnitude plot never crosses 0 dB, the phase plot shifts down by -180^\circ, and the system is stable with infinite gain margin and significant tolerance to time delays.

Integrator-driven instability

Integrator-driven instability occurs when a feedback control system contains an integrator in its dynamics, and the system is improperly designed, leading to unbounded growth in its response. This instability arises because the integrator accumulates input over time, and without proper control or stabilization, this accumulation can grow indefinitely.


Conclusion

The Bode plot provides a clear visualization of how the system’s frequency response changes with K_p. The magnitude plot shifts upward as K_p becomes more negative, while the phase plot remains unchanged. The system is stable for K_p > -1, as the gain margin and phase margin are positive in this range. Beyond this range (K_p \leq -1), the system becomes unstable.

The stability of the system depends on the proportional gain (K_p):

  • Stable for K_p > -1: the gain margin and phase margin are positive in this range.
  •  Integrator-driven instability for K_p = -1: the system is unstable.
  • Unstable for K_p < -1

Real-World Implications of Stability

In practical applications, stability is not just a binary concept (stable or unstable). Engineers need to evaluate how stable a system is to ensure robust and reliable operation. This is where gain margin and phase margin play a crucial role.

Phase Margin and Its Importance

The phase margin (PM) provides a measure of how much additional phase delay the system can tolerate before becoming unstable. This is especially important in real-world scenarios where time delays are common.Time delay can occur due to various factors:

  • Faulty sensors or actuators that respond slower than expected.
  • Jammed control networks in automated systems that delay communication between components.
  • Physical transport delays in processes such as chemical mixing or thermal conduction.
  • External disturbances in the environment, such as varying load conditions.

When a stable system is subjected to time delays, the phase lag increases. If the phase lag reaches the critical threshold (e.g., -180^\circ), the system can become unstable. The larger the phase margin, the more delay the system can tolerate before instability arises.

Gain Margin and Amplification Risks

A higher proportional gain (K_p) amplifies the system’s response but also magnifies the effects of time delay.

  • With a high gain, even a small time delay can result in significant overshoot or oscillation.
  • If the gain exceeds a certain limit, the system becomes unstable, as the delay causes excessive phase lag.

Example to Clarify

Imagine a factory conveyor belt controlled by an automated system.

  • When the conveyor belt’s motor has a low gain, it responds sluggishly but is stable, even if the network experiences delays.
  • If the motor gain is too high, the conveyor belt reacts aggressively, and even a brief network delay could cause oscillations or loss of control, resulting in spilled items or damage.

Key Takeaways

  1. Stable Systems Can Become Unstable with Delays: Even if a system is initially stable, time delay introduces additional phase lag, reducing phase margin. A low phase margin means even small delays can destabilize the system.
  2. Stability is Not Binary: Knowing how stable a system is (gain and phase margins) is critical for designing robust controllers.
  3. High Gain Increases Risk with Delays: While high gain improves system responsiveness, it also makes the system more sensitive to delays and disturbances, increasing the likelihood of instability.

Engineers must carefully balance stability margins and gain to ensure systems perform reliably in real-world industrial environments.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *