Skip to main content
Engineering LibreTexts

Chapter 11: PID Control

  • Page ID
    123787
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Overview of PID Control

    Proportional-Integral-Derivative (PID) control is one of the most widely used control strategies in both academic and industrial settings. Its versatility, simplicity, and effectiveness make it a go-to solution for systems ranging from robotics and aerospace to HVAC and process control.

    The general PID controller has the following transfer function:

    \[ C(s) = K_p + \frac{K_i}{s} + K_d s \]

    In practical implementations, this controller structure means that the error signal \( e(t) = r(t) - y(t) \) is passed through three parallel control blocks:

    - A proportional gain \( K_p \)
    - An integrator with gain \( K_i \)
    - A differentiator with gain \( K_d \)

    PID.jpg
    Figure \(\PageIndex{1}\): PID Control

    The outputs of these blocks are then summed to produce the control command \( u(t) \). This structure gives us control over the transient and steady-state behavior of the system, and the ability to shift closed-loop poles. However, due to the presence of three tunable gains, the PID parameter space is large and often unintuitive without a structured tuning method or physical insight.

    Motivation for PID: Unknown Plant Case

    One of the key strengths of PID control is that it does not require an exact mathematical model of the plant \( P(s) \). In practice, many industrial systems (e.g., HVAC units, process control loops) operate with minimal knowledge of the underlying dynamics. In such situations, PID controllers are often tuned heuristically or using standard procedures, and can still provide robust and acceptable performance.

    This model-free feature is one of the reasons PID control has remained dominant in the field despite the rise of more modern model-based control strategies.

    Physical Interpretation Using Mass-Spring-Damper

    To build intuition, consider a mass-spring-damper system modeled by:

    \[ m \ddot{y}(t) + c \dot{y}(t) + k y(t) = u(t) \]

    This system has:

    - A damping term \( c \dot{y}(t) \)
    - A stiffness term \( k y(t) \)
    - A mass term \( m \ddot{y}(t) \)

    We wish to regulate the output \( y(t) \) so that it closely follows a reference input \( r(t) \), despite the presence of external disturbances. This is a regulation control objective. Now let’s examine the effect of each PID term individually.

    Proportional Control: \( K_p \)

    If we apply a pure proportional controller, \( C(s) = K_p \), the closed-loop system becomes:

    \[
    G_{\text{cl}}(s) = \frac{K_p P(s)}{1 + K_p P(s)}
    \]

    given

    \[
    P(s) = \frac{1}{m s^2 + c s + k}
    \]

    We want to determine the poles of the closed-loop system, i.e., the roots of the equation:

    \[
    \boxed{
    s = \frac{-c \pm \sqrt{c^2 - 4m(k + K_p)}}{2m}
    }
    \]

    Closed-Loop Poles

    Let us define the poles explicitly:

    \[
    s_{1,2} = \frac{-c \pm \sqrt{c^2 - 4m(k + K_p)}}{2m}
    \]

    Interpretation:

    - If \( c^2 > 4m(k + K_p) \): real and distinct (overdamped)
    - If \( c^2 = 4m(k + K_p) \): repeated real root (critically damped)
    - If \( c^2 < 4m(k + K_p) \): complex conjugate (underdamped)

    As we increase \( K_p \), the term \( k + K_p \) increases, which:

    - Increases the natural frequency \( \omega_n = \sqrt{(k + K_p)/m} \)
    - Decreases the damping ratio \( \zeta = \frac{c}{2\sqrt{m(k + K_p)}} \)

    Thus, increasing \( K_p \) causes:

    - Faster oscillation (higher frequency)
    - Lower damping (more oscillatory response)
    - Settling time remains largely unchanged, because \( \zeta \omega_n \approx \) constant if \( c \) and \( m \) are fixed

    This adds a static gain into the loop, which primarily influences the system’s stiffness. Specifically:

    - Increasing \( K_p \) moves the poles in the complex plane further up the imaginary axis
    - \( \omega_n \) increases (higher natural frequency)
    - Damping ratio \( \zeta \) decreases which leads more oscillatory response
    - The real part \( \sigma \) remains unchanged which leads to no improvement in settling time
    - Control effort increases and will lead to large control signals

    Let's actually visualize this by considering the scenario of our old mass, spring constant, and damping coefficient values we worked with previously for our time domain specs.

    Thus, proportional control can speed up the response and improve tracking, but often at the cost of increased oscillations and limited impact on convergence rate.

    Numerical Example: \( m = 2 \), \( c = 8 \), \( k = 200 \)

    We substitute into the closed-loop pole formula:

    \[
    s = \frac{-8 \pm \sqrt{8^2 - 4(2)(200 + K_p)}}{2(2)}
    = \frac{-8 \pm \sqrt{64 - 16(200 + K_p)}}{4}
    \]

    The system transitions from overdamped to underdamped when the discriminant becomes negative:

    \[
    64 - 16(200 + K_p) < 0 \Rightarrow K_p > -196
    \]

    Since all practical \( K_p \) values are nonnegative, the system is always underdamped for all \( K_p > 0 \). We can see the system response and poles here:

    pcontrol1.jpg
    Figure \(\PageIndex{2}\): P Control Kp = 1
    pcontrol1000.jpg
    Figure \(\PageIndex{3}\): P Control Kp = 1000

    Takeaway: Increasing \( K_p \) speeds up the system (higher \( \omega_n \)) but reduces damping (\( \zeta \)). This leads to faster but more oscillatory responses.

    Derivative Control: \( K_d \)

    Adding derivative control gives:

    \[
    C(s) = K_p + K_d s
    \]

    This introduces a velocity-dependent term and increases the effective damping in the system.

    - \( K_d \) increases the coefficient on \( s \) in the denominator which leads to improved damping
    - The complex poles move leftward (more negative real part) and down in imaginary axis
    - \( \zeta \) increases which leads to less oscillation
    - \( \sigma \) increases which leads to faster settling time
    - More phase margin which leads to improved robustness

    In effect, derivative control acts like adding a physical damper. It smooths out the oscillations and increases the rate of convergence. When combined with \( K_p \), this forms a PD controller, which gives independent tuning over stiffness and damping.

    Closed-Loop Transfer Function

    Under unity feedback, the closed-loop transfer function becomes:

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

    Let us collect terms in the denominator:

    \[
    G(s) = \frac{K_p + K_d s}{m s^2 + (c + K_d) s + (k + K_p)}
    \]

    Characteristic Equation

    The denominator is the characteristic polynomial:

    \[
    m s^2 + (c + K_d)s + (k + K_p)
    \]

    This is again a second-order system, but now both the damping and stiffness terms are affected:

    - \( c_{\text{eff}} = c + K_d \) — damping increases with \( K_d \)
    - \( k_{\text{eff}} = k + K_p \) — stiffness increases with \( K_p \)

    Closed-Loop Poles

    The roots of the characteristic equation are:

    \[
    s_{1,2} = \frac{-(c + K_d) \pm \sqrt{(c + K_d)^2 - 4m(k + K_p)}}{2m}
    \]

    Interpretation:

    - Increasing \( K_d \) leads to more damping and poles move leftward in the s-plane
    - Increasing \( K_p \) leads to more stiffness and poles move away from the imaginary axis (increased natural frequency)
    - You now have independent control over:
    - The rate of convergence (via \( K_d \))
    - The frequency of oscillation (via \( K_p \))

    System Parameters in Terms of \( K_p \), \( K_d \)

    \[
    \omega_n = \sqrt{\frac{k + K_p}{m}}, \quad
    \zeta = \frac{c + K_d}{2 \sqrt{m(k + K_p)}}
    \]

    These expressions show how both gains directly shape the closed-loop response. By adjusting \( K_p \) and \( K_d \), we can place the poles in the complex plane with a specific damping ratio \( \zeta \) and natural frequency \( \omega_n \), enabling faster convergence and reduced overshoot.

    Benefits of PD Control

    - Improves response speed via increased natural frequency
    - Increases damping to reduce overshoot and oscillations
    - Settling time decreases because poles move further left
    - Better transient behavior and robustness

    Limitations

    - No integrator → cannot eliminate steady-state error
    - Still a Type 0 system → steady-state error persists for step inputs
    - Sensitive to high-frequency noise (derivative amplification)

    Therefore:

    - PD control introduces a zero into the loop
    - \( K_p \) and \( K_d \) provide two degrees of freedom to shape the transient response
    - Poles can be placed to achieve desired performance — fast, well-damped convergence
    - Still limited in steady-state performance without an integrator

    Numerical Example: \( m = 2 \), \( c = 8 \), \( k = 200 \)

    The characteristic equation is:

    \[
    2s^2 + (8 + K_d)s + (200 + K_p)
    \]

    The closed-loop poles are:

    \[
    s_{1,2} = \frac{-(8 + K_d) \pm \sqrt{(8 + K_d)^2 - 8(200 + K_p)}}{4}
    \]

    We can also see some of the poles and system response:

    pdcontrol1.jpg
    Figure \(\PageIndex{4}\): PD Control Kp = 1 and Kd = 1
    pdcontrol2.jpg
    Figure \(\PageIndex{5}\): PD Control Kp = 1000 and Kd = 1
    pdcontrol3.jpg
    Figure \(\PageIndex{6}\): PD Control Kp = 1 and Kd = 10

    Conclusion:

    As \( K_d \) increases:

    - \( \zeta \) increases — better damping
    - Poles move further left — faster settling
    - Response becomes smoother with less overshoot

    Integral Control: \( K_i \)

    Integral control introduces a pole at the origin:

    \[
    C(s) = \frac{K_i}{s}
    \]

    - Improves steady-state error and drives it to zero for step inputs
    - Increases system type which leads to better tracking of low-order reference signals
    - But introduces a new pole which therefore increases system order to third order

    When included with \( K_p \) and \( K_d \), the denominator becomes a cubic (third-order) polynomial. Now stability analysis requires methods such as Routh-Hurwitz or root locus.

    Effect of Integral Gain on Stability

    While \( K_i \) improves steady-state performance, it can also introduce instability. Consider root locus as \( K_i \) increases:

    - One root starts at the origin (integrator pole)
    - As \( K_i \) increases, this pole moves left (stabilizing), but other poles may migrate toward the right-half plane
    - If \( K_i \) exceeds a critical value, the system becomes unstable

    Thus, we must carefully tune \( K_i \) to avoid crossing the stability boundary.

    Integral Control Applied to a Mass-Spring-Damper System

    We now extend our controller by adding integral action. The controller becomes:

    \[
    C(s) = K_p + \frac{K_i}{s}
    \]

    This structure is known as a Proportional-Integral (PI) controller. The addition of \( \frac{K_i}{s} \) introduces an integrator, which has profound effects on the system:

    - It introduces a pole at the origin
    - It increases the system type from 0 to 1
    - It improves steady-state error — eliminates error for step reference input
    - It increases the system order (denominator becomes cubic)

    Plant Model

    As before, the plant is modeled by a second-order mass-spring-damper system:

    \[
    P(s) = \frac{1}{m s^2 + c s + k}
    \]

    Closed-Loop Transfer Function

    The closed-loop transfer function with unity feedback becomes:

    \[
    G(s) = \frac{C(s) P(s)}{1 + C(s) P(s)} = \frac{\left(K_p + \frac{K_i}{s}\right) \cdot \frac{1}{m s^2 + c s + k}}{1 + \left(K_p + \frac{K_i}{s}\right) \cdot \frac{1}{m s^2 + c s + k}}
    \]

    Simplifying:

    \[
    G(s) = \frac{K_p s + K_i}{s (m s^2 + c s + k) + K_p s + K_i}
    \]

    Characteristic Equation

    Multiply out the denominator:

    \[
    s (m s^2 + c s + k) + K_p s + K_i = m s^3 + c s^2 + k s + K_p s + K_i
    \]

    Group terms:

    \[
    \boxed{
    m s^3 + c s^2 + (k + K_p) s + K_i
    }
    \]

    This is a third-order system. To assess stability, we must examine the roots of this cubic equation, typically using the Routh-Hurwitz criterion or root locus.

    Effect of \( K_i \) on Performance and Stability

    - The pole at the origin increases system type → better tracking for step inputs
    - As \( K_i \) increases:
    - One pole remains near the origin
    - The other two poles may become lightly damped and eventually unstable
    - There exists a critical value of \( K_i \) beyond which the system becomes unstable
    - Must use Routh-Hurwitz or root locus to determine safe range of \( K_i \)

    Numerical Example: PI Control on Mass-Spring-Damper

    Let \( m = 2 \), \( c = 8 \), \( k = 200 \)

    The characteristic equation becomes:

    \[
    2s^3 + 8s^2 + (200 + K_p)s + K_i
    \]

    We assess stability using the Routh-Hurwitz criterion. The first column of the Routh table must be strictly positive for stability.

    Example 1:
    Let \( K_p = 100 \), \( K_i = 50 \)

    Characteristic polynomial:

    \[
    2s^3 + 8s^2 + 300s + 50
    \]

    All first-column entries are positive → system is stable.

    picontrol1.jpg
    Figure \(\PageIndex{7}\): PI Control Stable

    Example 2:
    Let \( K_p = 0.1 \), \( K_i = 1000 \)

    We are no longer stable, and we can see the response here:

    picontrol2.jpg
    Figure \(\PageIndex{8}\): PI Control Unstable

    Conclusion:

    - For this system, modest \( K_i \in [0, 300] \) gives stability with fast convergence
    - Large \( K_i \) risks instability and should be validated via Routh or root locus
    - The addition of integral control improves tracking but raises the system order and complexity

    Full PID Controller

    Now we consider the complete Proportional-Integral-Derivative (PID) controller:

    \[
    C(s) = K_p + \frac{K_i}{s} + K_d s = \frac{K_d s^2 + K_p s + K_i}{s}
    \]

    Closed-loop transfer function:

    \[
    G(s) = \frac{C(s) P(s)}{1 + C(s) P(s)} = \frac{\left(K_d s^2 + K_p s + K_i\right) \cdot \frac{1}{m s^2 + c s + k}}{1 + \left(K_d s^2 + K_p s + K_i\right) \cdot \frac{1}{s (m s^2 + c s + k)}}
    \]

    Simplify the denominator:

    \[
    s (m s^2 + c s + k) + K_d s^2 + K_p s + K_i = m s^3 + (c + K_d) s^2 + (k + K_p) s + K_i
    \]

    Final Characteristic Equation for PID Control

    The closed-loop poles are the roots of:

    \[
    s^3 + \frac{c + K_d}{m} s^2 + \frac{k + K_p}{m} s + \frac{K_i}{m} = 0
    \]

    This third-order equation determines the system stability and performance. The PID controller allows complete shape control over this cubic polynomial.

    Interpretation of Each Gain

    - \( K_p \): increases stiffness → improves rise time but may increase overshoot
    - \( K_d \): increases damping → reduces overshoot, improves settling time
    - \( K_i \): adds integrator → eliminates steady-state error but may destabilize

    Tuning Caution

    Although a PID controller gives three tunable gains and full control over a second-order system, the third-order dynamics introduced by the integrator can introduce unwanted oscillations or instability.

    - Increasing \( K_i \) too much can push one or more poles into the right-half plane
    - Trade-off exists between steady-state performance and transient robustness
    - Tuning must be done carefully (e.g., Routh table, root locus, simulation)

    Routh-Hurwitz Stability Analysis for PID Control

    We now analyze the stability of the PID-controlled mass-spring-damper system using the Routh-Hurwitz criterion. From the previous derivation, the closed-loop characteristic polynomial is:

    \[
    P(s) = m s^3 + (c + K_d) s^2 + (k + K_p) s + K_i
    \]

    To assess stability, we construct the Routh table. First, define the normalized polynomial by dividing through by \( m \):

    \[
    P(s) = s^3 + \frac{c + K_d}{m} s^2 + \frac{k + K_p}{m} s + \frac{K_i}{m}
    \]

    Let:

    \[
    a_3 = 1, \quad a_2 = \frac{c + K_d}{m}, \quad a_1 = \frac{k + K_p}{m}, \quad a_0 = \frac{K_i}{m}
    \]

    Construct the Routh Table

    \[
    \begin{array}{c|cc}
    s^3 & 1 & \frac{k + K_p}{m} \\
    s^2 & \frac{c + K_d}{m} & \frac{K_i}{m} \\
    s^1 & b_1 & 0 \\
    s^0 & \frac{K_i}{m} & -
    \end{array}
    \]

    Where:

    \[
    b_1 = \frac{\left(\frac{c + K_d}{m} \cdot \frac{k + K_p}{m} - 1 \cdot \frac{K_i}{m}\right)}{\frac{c + K_d}{m}} = \frac{(k + K_p) - \frac{K_i m}{c + K_d}}{m}
    \]

    Stability Conditions

    All the elements in the first column must be strictly positive for stability:

    1. \( \frac{c + K_d}{m} > 0 \Rightarrow c + K_d > 0 \)
    2. \( \frac{K_i}{m} > 0 \Rightarrow K_i > 0 \)
    3. \( b_1 > 0 \Rightarrow (k + K_p) > \frac{K_i m}{c + K_d} \)

    Interpretation

    This provides clear guidance on gain selection:

    - Derivative gain \( K_d \) must be large enough to ensure sufficient damping
    - Integral gain \( K_i \) must be positive but cannot be too large
    - There exists a critical value of \( K_i \) beyond which the system becomes unstable

    Numerical Example: PID Controller

    Let \( m = 2 \), \( c = 8 \), \( k = 200 \).
    The closed-loop characteristic polynomial becomes:

    \[
    2s^3 + (8 + K_d)s^2 + (200 + K_p)s + K_i
    \]

    Normalize:

    \[
    s^3 + \frac{8 + K_d}{2}s^2 + \frac{200 + K_p}{2}s + \frac{K_i}{2}
    \]

    We define:

    \[
    a_3 = 1, \quad
    a_2 = \frac{8 + K_d}{2}, \quad
    a_1 = \frac{200 + K_p}{2}, \quad
    a_0 = \frac{K_i}{2}
    \]

    Routh Table:

    \[
    \begin{array}{c|cc}
    s^3 & 1 & \frac{200 + K_p}{2} \\
    s^2 & \frac{8 + K_d}{2} & \frac{K_i}{2} \\
    s^1 & b_1 & 0 \\
    s^0 & \frac{K_i}{2} & -
    \end{array}
    \]

    Where:

    \[
    b_1 = \frac{
    \left( \frac{8 + K_d}{2} \cdot \frac{200 + K_p}{2} - 1 \cdot \frac{K_i}{2} \right)
    }{
    \frac{8 + K_d}{2}
    }
    = \frac{200 + K_p - \frac{K_i}{8 + K_d}}{2}
    \]

    Stability Conditions:

    All entries in the first column must be positive:

    1. \( \frac{8 + K_d}{2} > 0 \Rightarrow K_d > -8 \)
    2. \( \frac{K_i}{2} > 0 \Rightarrow K_i > 0 \)
    3. \( b_1 > 0 \Rightarrow 200 + K_p > \frac{K_i}{8 + K_d} \)

    Worked Example:

    Let \( K_p = 100 \), \( K_d = 4 \), \( K_i = 50 \)

    Then:

    \[
    b_1 = \frac{200 + 100 - \frac{50}{8 + 4}}{2}
    = \frac{300 - \frac{50}{12}}{2}
    = \frac{300 - 4.1667}{2} = 147.92
    \]

    All entries in the Routh table are positive therefore system is stable as seen below:

    pidcontrol1.jpg
    Figure \(\PageIndex{9}\): PID Control
    pidcontrol2.jpg
    Figure \(\PageIndex{10}\): PID Control

    But if \( K_i \) is too large...

    Let \( K_i = 1200 \), then:

    \[
    b_1 = \frac{300 - \frac{1200}{12}}{2} = \frac{300 - 100}{2} = 100
    \]

    Still stable. Try \( K_i = 2500 \):

    \[
    b_1 = \frac{300 - \frac{2500}{12}}{2} = \frac{300 - 208.33}{2} = 45.83
    \]

    Still positive. If \( K_i > 3600 \), \( b_1 < 0 \) thus <strong>instability begins</strong> as seen here:

    pidcontrol3.jpg
    Figure \(\PageIndex{11}\): PID Control

    Conclusion:

    - \( K_p \) shifts the poles for speed
    - \( K_d \) adds damping and helps suppress overshoot
    - \( K_i \) improves steady-state accuracy but must be bounded to preserve stability

    Use the inequality below to ensure stability in this system:
    \[
    K_i < (8 + K_d)(200 + K_p)
    \]

    PID Control with Known and Unknown Plant Models

    One of the key advantages of PID control is that it can be applied effectively whether or not the mathematical model of the plant is known. The design approach differs significantly depending on whether the plant model is available.

    Case 1: Known Plant Model

    If the plant transfer function \( P(s) \) is known, either from first-principles modeling (e.g., free-body diagrams, energy methods, circuit laws) or system identification, then we have full access to analysis tools. These include:

    - Derivation of the differential equation or transfer function
    - Simulation of system dynamics
    - Controller design via pole placement, root locus, frequency response, and state-space methods
    - Formal analysis of stability (Routh-Hurwitz, Nyquist), transient response, and control effort

    In this case, PID parameters can be tuned analytically to meet specified time-domain or frequency-domain performance criteria.

    Case 2: Unknown Plant Model

    In many real-world systems, particularly in industrial settings, the exact plant dynamics are unknown or difficult to model. For example:

    - Thermal systems like HVAC
    - Fluid flow control
    - Legacy or black-box systems

    In these situations, PID control is often applied using heuristic or empirical tuning. Engineers do not assume a precise transfer function but rather tune the controller based on measured input-output behavior.

    Empirical PID Tuning Methods

    Two widely used model-free PID tuning methods are:

    1. Ziegler-Nichols Ultimate Sensitivity Method

    This classical tuning method predates computer simulation tools and remains effective for many systems. The process is:

    1. Set \( K_i = 0 \) and \( K_d = 0 \) (use only proportional control).
    2. Gradually increase \( K_p \) until the output begins to oscillate with constant amplitude.
    3. The gain at which sustained oscillations occur is called the <b>ultimate gain</b> \( K_u \).
    4. The period of oscillation is called the <b>ultimate period</b> \( T_u \).
    5. Use the following formulas to determine initial PID gains:
    \[
    K_p = 0.1 K_u, \quad K_i = \frac{2 K_p}{T_u}, \quad K_d = \frac{K_p T_u}{8}
    \]
    6. These gains can then be fine-tuned based on system performance.

    This method pushes the system to the edge of instability (marginal stability) to extract key dynamic properties and use them as design anchors.

    We can see this process here for the following system:

    \[
    P(s) = \frac{1}{s^3 + 9s^2 + 23s + 15}
    \]

    The control for this system will be our full PID controller:

    \[
    C(s) = K_p + K_d s + \frac{K_i}{s}
    \]

    We will also assume a response function of:

    \[
    R(s) = \frac{1}{s}
    \]

    Now as mentioned we set \( K_d = 0 \) and \( K_i = 0 \). We then have to change and increase \( K_p \) and we can see the response where we do not have sustained oscillations, i.e., we are looking for poles that lie on the imaginary plane as seen below.

    zn1.jpg
    Figure \(\PageIndex{12}\): Ziegler-Nichols No Sustained Oscillations
    zn2.jpg
    Figure \(\PageIndex{13}\): Ziegler-Nichols Sustained Oscillation

    Once we obtain the sustained oscillations we can calculate the ultimate period and we have found our ultimate gain which is 192. We can then calculate our values for our PID control and then we can see the resulting response to our system and the response looks very good.

    zn3.jpg
    Figure \(\PageIndex{14}\): Ziegler-Nichols Response

    2. Quarter Decay Method (Modified Ziegler-Nichols)

    Sometimes it is not possible or desirable to produce sustained oscillations in the system. In such cases, the Quarter Decay method is used:

    1. Again, start with \( K_i = 0 \) and \( K_d = 0 \).
    2. Slowly increase \( K_p \) until the output exhibits underdamped oscillations that decay over time.
    3. Continue increasing \( K_p \) until the ratio of the second peak to the first peak is approximately 1/4. Make sure to look at peak amplitude and subtract the peak height from the steady-state value.
    4. At this point, define:
    \[
    K_u = 2 K_p, \quad T_u = \text{measured period of oscillation}
    \]
    5. Use the same Ziegler-Nichols tuning formulas to determine initial values for \( K_p, K_i, K_d \).

    This method avoids the need for full marginal stability and instead uses the <b>transient shape</b> to infer system dynamics.

    So we can do a similar analysis here and first we have to find the quarter decay value.

    qd1.jpg
    Figure \(\PageIndex{15}\): Quarter Decay Condition not met
    qd2.jpg
    Figure \(\PageIndex{16}\): Quarter Decay Condition Met

    We can also calculate our ultimate gain and our ultimate period. We can then calculate our other values for the PID control and we can see the resulting system response here:

    qd3.jpg
    Figure \(\PageIndex{17}\): System Response Quarter Decay Method

    Summary of Empirical PID Tuning

    These tuning methods work without knowing the plant model.
    They rely on observing how the system responds to increasing \( K_p \) under proportional-only control.
    Both methods generate estimates of the ultimate gain \( K_u \) and period \( T_u \), which define the system’s most unstable behavior.
    Once baseline gains are chosen, further tuning is often done experimentally or with tools like Simulink.

    These techniques are still widely used in HVAC, process control, and embedded control applications where analytical modeling is impractical or unnecessary. PID control remains effective in both model-based and model-free contexts — its power lies in its simplicity, interpretability, and flexibility.


    This page titled Chapter 11: PID Control is shared under a CC BY-NC-ND license and was authored, remixed, and/or curated by Joshua P. Steimel.

    • Was this article helpful?