Fiveable

🦫Intro to Chemical Engineering Unit 9 Review

QR code for Intro to Chemical Engineering practice questions

9.4 PID controllers and tuning

9.4 PID controllers and tuning

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🦫Intro to Chemical Engineering
Unit & Topic Study Guides

PID Control Actions

A PID controller keeps a process variable (like temperature or pressure) at a desired setpoint by continuously calculating an error signal and adjusting a control output. It does this by combining three distinct control actions: proportional, integral, and derivative. Each one addresses a different aspect of the error, and together they form one of the most widely used control strategies in chemical engineering.

The standard PID equation is:

u(t)=Kp[e(t)+1Ti0te(τ)dτ+Tdde(t)dt]u(t) = K_p \left[ e(t) + \frac{1}{T_i} \int_0^t e(\tau) \, d\tau + T_d \frac{de(t)}{dt} \right]

where u(t)u(t) is the controller output, e(t)e(t) is the error (setpoint minus process variable), KpK_p is the proportional gain, TiT_i is the integral time, and TdT_d is the derivative time.

Proportional (P) Control

Proportional action produces an output directly proportional to the current error. It's the main driving force of the controller.

  • Proportional gain (KpK_p) sets how aggressively the controller responds. Doubling KpK_p doubles the output change for the same error.
  • Higher KpK_p gives a faster response but can cause oscillations if pushed too far.
  • P-only control always leaves a residual offset (steady-state error) between the setpoint and the actual value. The controller needs a nonzero error to produce a nonzero output, so it can never fully close the gap on its own.

Integral (I) Control

Integral action sums the error over time and drives the output based on that accumulated total. Its purpose is to eliminate the steady-state offset that P-only control can't fix.

  • The integral time constant (TiT_i) controls how quickly the integral action ramps up. A smaller TiT_i means faster integral action (halving TiT_i doubles the rate at which the integral contribution grows).
  • Because integral action keeps accumulating past error, it will eventually push the output enough to bring the error to zero.
  • The tradeoff: if TiT_i is too small (integral action too aggressive), the process will overshoot the setpoint and oscillate.

Derivative (D) Control

Derivative action responds to how fast the error is changing, not the error itself. Think of it as a predictive brake: if the error is shrinking quickly (meaning the process variable is approaching the setpoint fast), derivative action reduces the output to prevent overshoot.

  • The derivative time constant (TdT_d) sets the strength of this dampening effect. Larger TdT_d values provide more dampening.
  • Derivative action improves transient response and stability, especially for processes prone to oscillation.
  • The downside: derivative action amplifies high-frequency noise in the measurement signal. In practice, a low-pass filter is almost always applied to the derivative term to avoid noise-induced instability.

Combined PID Control

When all three actions work together, the controller can respond quickly (P), eliminate steady-state error (I), and dampen oscillations (D). Tuning involves selecting values for KpK_p, TiT_i, and TdT_d that balance these goals for your specific process. The desired closed-loop behavior typically includes fast response, minimal overshoot, and zero steady-state error.

Proportional (P) Control, Proportional–integral–derivative controller - Wikipedia

PID Controller Tuning

Tuning means finding KpK_p, TiT_i, and TdT_d values that give acceptable performance. Empirical methods provide a starting point based on measured process behavior, and fine-tuning adjusts from there.

Ziegler-Nichols (ZN) Method

The Ziegler-Nichols method is the most widely taught empirical tuning approach. It comes in two versions.

Open-loop (process reaction curve) method:

  1. Put the controller in manual mode so it doesn't adjust the output automatically.
  2. Apply a step change to the manipulated variable (e.g., open a valve by a fixed amount).
  3. Record the process variable response over time.
  4. From the response curve, identify the dead time (LL, the delay before the output starts changing) and the reaction rate (RR, the maximum slope of the response divided by the step size).
  5. Calculate initial tuning parameters using the ZN open-loop formulas. For a full PID controller: Kp=1.2RLK_p = \frac{1.2}{RL}, Ti=2LT_i = 2L, Td=0.5LT_d = 0.5L.

Closed-loop (ultimate gain) method:

  1. Set the controller to P-only mode (disable integral and derivative actions).
  2. Gradually increase KpK_p until the process output oscillates with constant amplitude. This is sustained oscillation, not growing or decaying.
  3. Record the ultimate gain (KuK_u), which is the KpK_p value that produces sustained oscillation, and the ultimate period (PuP_u), the time for one full oscillation cycle.
  4. Calculate tuning parameters using the ZN closed-loop formulas. For a full PID controller: Kp=0.6KuK_p = 0.6 K_u, Ti=0.5PuT_i = 0.5 P_u, Td=0.125PuT_d = 0.125 P_u.

The ZN method tends to produce aggressive tuning with about a quarter-decay ratio (each oscillation peak is roughly one-quarter the height of the previous one). This may be too aggressive for some applications, so further adjustment is often needed.

Other Empirical Tuning Methods

  • The Cohen-Coon method uses the same open-loop process reaction curve but applies different formulas that account for higher ratios of dead time to time constant. It tends to work better for processes with significant dead time.
  • The Tyreus-Luyben method uses the ultimate gain and period (like ZN closed-loop) but produces less aggressive tuning, which is often preferred in chemical process applications where stability matters more than speed.
  • After any empirical method, fine-tuning is almost always necessary. You adjust parameters to optimize the trade-off between response speed, stability, and robustness for your specific operating conditions.

PID Control Implementation

Proportional (P) Control, PID controller - Wikipedia

Control Strategies

Feedback control is the standard PID setup:

  • The controller measures the controlled variable (CV), which is the process parameter you want to regulate (e.g., reactor temperature, column pressure, flow rate).
  • It compares the CV to the setpoint, calculates the error, and adjusts the manipulated variable (MV), which is the process input the controller can change (e.g., valve position, heater power, pump speed).
  • Feedback control only acts after a disturbance has already affected the process, so there's always some lag.

Feedforward control is used alongside feedback control to handle measurable disturbances:

  • If you can measure a disturbance before it hits the process (e.g., a change in feed temperature), feedforward control adjusts the MV preemptively.
  • This reduces the error the feedback controller has to correct and improves disturbance rejection.

Cascade control links two controllers together:

  • The output of an outer (primary) controller becomes the setpoint for an inner (secondary) controller.
  • This is useful when a fast-responding intermediate variable affects a slower primary variable. For example, in a heat exchanger, the outer controller regulates outlet temperature (slow) by setting the setpoint for an inner controller that regulates steam flow rate (fast). The inner loop catches disturbances in steam supply before they affect the temperature.

Simulation and Real-time Implementation

  • Process simulation using mathematical models lets you test and optimize PID strategies before applying them to a real process. You can evaluate performance under various operating conditions and disturbance scenarios without risk.
  • Real-time monitoring and data acquisition systems continuously measure process variables and feed them back to the PID controller. This closed-loop operation allows continuous adjustment of the manipulated variable to maintain stable, efficient operation.

PID Controller Troubleshooting

Poor Performance Symptoms

When a PID controller isn't performing well, the symptoms usually fall into two categories:

Oscillations or instability typically point to:

  • Excessive KpK_p (too much proportional gain)
  • Too small TiT_i (integral action too aggressive)
  • Too large TdT_d (derivative action overreacting)

To fix this: reduce KpK_p, increase TiT_i, or decrease TdT_d. If oscillations seem noise-driven, apply or strengthen the derivative filter.

Slow response or persistent steady-state error typically points to:

  • Insufficient KpK_p (proportional gain too low)
  • Too large TiT_i (integral action too slow to accumulate)

To fix this: increase KpK_p or decrease TiT_i to speed up the response and eliminate offset.

Process Nonlinearities and Windup

Real processes aren't perfectly linear, and this can degrade PID performance.

  • Nonlinearities like valve saturation (valve fully open or closed, can't move further) or sensor calibration drift cause the process to behave differently than the controller expects. One approach is gain scheduling, where you adjust PID parameters at different operating points to maintain consistent performance across the operating range.
  • Integral windup happens when the controller output saturates (hits its limit) but the integral term keeps accumulating error. When the process finally returns to a controllable range, the inflated integral term causes large overshoot and long settling times. Anti-windup techniques prevent this:
    • Integral clamping stops the integral from accumulating when the output is saturated.
    • Back-calculation reduces the integral term based on the difference between the desired and actual controller output.

Maintenance and Re-tuning

Process conditions change over time due to equipment aging, fouling, feed composition changes, and other factors. PID controllers that were well-tuned at startup may drift out of optimal performance.

  • Regular monitoring of control loop performance helps catch degradation early.
  • Periodic re-tuning using current process data keeps the controller matched to actual conditions.
  • Historical trends and process knowledge should guide re-tuning decisions rather than blindly reapplying empirical formulas.