1. PID Control Overview
A PID (Proportional-Integral-Derivative) controller is the most widely used feedback controller in the process industries. It continuously calculates an error signal as the difference between a desired setpoint (SP) and the measured process variable (PV), then adjusts a control output (CO) to minimize that error. In midstream gas processing, PID controllers regulate temperature, pressure, flow, level, and composition across hundreds of control loops per facility.
Proportional (P)
Immediate response
Output is proportional to current error. Provides fast initial correction but cannot eliminate steady-state offset alone.
Integral (I)
Eliminates offset
Accumulates past error over time. Drives steady-state error to zero but can cause overshoot and wind-up.
Derivative (D)
Anticipates change
Responds to rate of change of error. Dampens oscillation and reduces overshoot but amplifies noise.
The PID Equation
The standard (ISA) form of the PID controller equation used in most DCS and PLC systems:
Alternative Parameter Forms
Different DCS manufacturers use different parameter representations. Understanding the conversions is essential for tuning:
| Parameter | Symbol | Conversion |
|---|---|---|
| Controller Gain | Kc | Kc = 100 / PB |
| Proportional Band | PB (%) | PB = 100 / Kc |
| Integral Time (reset) | Ti (min) | Ti = Kc / Ki |
| Integral Gain | Ki (repeats/min) | Ki = Kc / Ti |
| Derivative Time (rate) | Td (min) | Td = Kd / Kc |
| Derivative Gain | Kd | Kd = Kc × Td |
Control Action: Direct vs. Reverse
The control action determines how the controller output responds to an increase in the process variable:
| Action | When PV Increases... | Typical Applications |
|---|---|---|
| Reverse-acting | CO decreases | Heating control, compressor speed, most valves in gas service |
| Direct-acting | CO increases | Cooling control, vent valves, pressure relief applications |
Most control valves in midstream service are fail-closed (air-to-open), making the controller reverse-acting. Always verify the valve action and controller action work together to provide negative feedback.
2. Process Dynamics
Effective PID tuning requires understanding the dynamic behavior of the process being controlled. The three fundamental parameters that characterize a self-regulating process are process gain, dead time, and time constant.
First-Order Plus Dead Time (FOPDT) Model
Most process control loops can be adequately modeled as a first-order system with dead time. This is the standard model used by all classical tuning methods:
Process Gain (Kp)
The process gain is the ratio of the total change in the process variable to the change in controller output that caused it. It describes how sensitive the process is to changes in the manipulated variable:
Process gain can be positive (direct-acting process) or negative (reverse-acting process). The sign of the process gain determines the required controller action.
Dead Time (θ)
Dead time (also called transport delay or time delay) is the time between when a change is made to the controller output and when the process variable first begins to respond. It represents pure delay with no dynamics.
Common sources of dead time in midstream facilities:
- Transport delay: Time for fluid to travel from control valve to sensor (dominant in long pipelines)
- Analyzer sample time: Gas chromatograph cycle times of 3–15 minutes
- Heat transfer lag: Time for heat to penetrate through vessel walls or insulation
- Mixing delays: Time for a slug of chemical to fully mix in a vessel
- Digital sampling: DCS scan rate and filter time constants
Time Constant (τ)
The time constant represents how quickly the process responds after the dead time has elapsed. It is the time required for the process variable to reach 63.2% of its final value. Larger time constants mean slower processes:
| Time to Reach | Multiples of τ | % of Final Value |
|---|---|---|
| 1τ | 1.0 | 63.2% |
| 2τ | 2.0 | 86.5% |
| 3τ | 3.0 | 95.0% |
| 4τ | 4.0 | 98.2% |
| 5τ | 5.0 | 99.3% |
Controllability Ratio (θ/τ)
The ratio of dead time to time constant is the single most important indicator of how well a process can be controlled. This ratio determines the achievable control performance and the appropriate tuning method:
| θ/τ Ratio | Controllability | Recommended Approach |
|---|---|---|
| < 0.1 | Very easy | Any tuning method works. Use moderate gain. |
| 0.1 – 0.3 | Easy | Z-N, Cohen-Coon, or IMC all perform well. |
| 0.3 – 0.5 | Moderate | IMC/Lambda preferred. Z-N may oscillate. |
| 0.5 – 0.7 | Difficult | Use conservative IMC. Consider cascade control. |
| 0.7 – 1.0 | Very difficult | Conservative tuning only. Feedforward or MPC may be needed. |
| > 1.0 | Nearly impossible | PID alone inadequate. Use Smith predictor, MPC, or process redesign. |
Process Reaction Curve (Open-Loop Test)
The process reaction curve is obtained by performing a step test with the controller in manual mode. This is the primary method for identifying Kp, θ, and τ:
3. Tuning Methods
Several classical tuning methods have been developed to calculate PID parameters from process dynamic data. Each method makes different tradeoffs between speed of response, overshoot, and robustness.
Ziegler-Nichols Open-Loop (Process Reaction Curve)
The original and most widely known tuning method. Published by Ziegler and Nichols in 1942, it uses the process reaction curve (Kp, θ, τ) and targets a quarter-decay ratio, meaning each successive oscillation peak is one-quarter the amplitude of the previous one. This corresponds to approximately 25% overshoot on the first peak.
| Controller | Kc | Ti | Td |
|---|---|---|---|
| P | τ / (Kp × θ) | — | — |
| PI | 0.9 × τ / (Kp × θ) | 3.33 × θ | — |
| PID | 1.2 × τ / (Kp × θ) | 2.0 × θ | 0.5 × θ |
Characteristics: Aggressive tuning with fast response. Produces approximately 25% overshoot on setpoint changes. Can be too aggressive for processes with large dead time or noisy signals.
Ziegler-Nichols Closed-Loop (Ultimate Gain Method)
The closed-loop method keeps the controller in automatic with proportional-only control. The gain is gradually increased until the process exhibits sustained oscillation (neither growing nor decaying). The gain at this point is the ultimate gain (Ku), and the period of oscillation is the ultimate period (Pu).
| Controller | Kc | Ti | Td |
|---|---|---|---|
| P | 0.50 × Ku | — | — |
| PI | 0.45 × Ku | Pu / 1.2 | — |
| PID | 0.60 × Ku | Pu / 2.0 | Pu / 8.0 |
Cohen-Coon
Developed in 1953, the Cohen-Coon method improves on Ziegler-Nichols for processes with larger dead-time ratios (θ/τ > 0.3). It uses the same open-loop step test data but applies more sophisticated correlations that account for the dead-time ratio:
| Controller | Kc | Ti | Td |
|---|---|---|---|
| P | (τ/Kpθ)(1 + θ/3τ) | — | — |
| PI | (τ/Kpθ)(0.9 + θ/12τ) | θ(30+3r)/(9+20r) | — |
| PID | (τ/Kpθ)(4/3 + θ/4τ) | θ(32+6r)/(13+8r) | 4θ/(11+2r) |
Where r = θ/τ (dead-time ratio).
Characteristics: Better than Z-N for processes with significant dead time. Still targets relatively fast response. Can produce oscillation for very high dead-time ratios.
IMC / Lambda Tuning
Internal Model Control (IMC) tuning, also called Lambda tuning, is based on a model-based approach developed by Rivera, Morari, and Skogestad. The user specifies a desired closed-loop time constant (λ), which directly controls the tradeoff between speed and robustness. This is the most widely recommended method for industrial process control.
Characteristics: Predictable, smooth response with minimal overshoot. The λ parameter gives the engineer direct control over the response speed. Recommended as the default tuning method for most midstream applications.
Tyreus-Luyben
Published in 1992, the Tyreus-Luyben method uses the same ultimate gain data as Z-N closed-loop but produces more conservative tuning with less overshoot and better robustness:
| Controller | Kc | Ti | Td |
|---|---|---|---|
| PI | Ku / 3.2 | 2.2 × Pu | — |
| PID | Ku / 2.2 | 2.2 × Pu | Pu / 6.3 |
Characteristics: More conservative than Z-N with significantly less overshoot. Good for processes that cannot tolerate oscillation. Particularly useful for distillation column control and interacting multi-loop systems.
4. Method Selection Guide
Choosing the right tuning method depends on the process dynamics, available data, and the desired control performance. This guide helps select the appropriate method for common midstream scenarios.
Decision Flowchart
| Condition | Recommended Method | Rationale |
|---|---|---|
| θ/τ < 0.3 and fast response needed | Ziegler-Nichols (OL) | Process is easy to control; aggressive tuning is safe |
| θ/τ between 0.3 and 0.7 | Cohen-Coon or IMC | Z-N may be too aggressive; C-C handles larger dead time |
| θ/τ > 0.7 | IMC/Lambda (conservative λ) | Process is difficult; conservative tuning prevents instability |
| Smooth response, minimal overshoot needed | IMC/Lambda | Designed for minimal overshoot; tunable via λ |
| Interacting loops (cascade, multi-variable) | Tyreus-Luyben or IMC | Robust to interaction effects; less likely to destabilize |
| Only ultimate gain data available | Tyreus-Luyben | Uses Ku/Pu data; more conservative than Z-N closed-loop |
| Analyzer-based loops (GC, moisture) | IMC/Lambda (large λ) | Very large dead time requires very conservative tuning |
| Unknown dynamics, first commissioning | IMC/Lambda (conservative) | Safest starting point; can be tightened after observation |
Method Comparison Summary
| Feature | Z-N (OL/CL) | Cohen-Coon | IMC/Lambda | Tyreus-Luyben |
|---|---|---|---|---|
| Response speed | Fast | Fast | Adjustable | Moderate |
| Overshoot | ~25% | ~20% | ~5% | ~10% |
| Robustness | Low | Moderate | High | High |
| Best for θ/τ | < 0.3 | 0.3–0.7 | Any | Any (CL data) |
| Input data | Kp, θ, τ or Ku, Pu | Kp, θ, τ | Kp, θ, τ, λ | Ku, Pu |
| Ease of use | Simple | Moderate | Moderate | Simple |
5. Loop Types in Gas Plants
Different process variable types have characteristic dynamic behavior that influences tuning strategy. Understanding these characteristics helps select appropriate controller types and tuning approaches.
Flow Control Loops
Flow loops are the fastest loops in a gas plant, with time constants typically under 5 seconds and very small dead time. They are often the inner loop in cascade configurations.
| Parameter | Typical Value |
|---|---|
| Time constant (τ) | 1–5 seconds |
| Dead time (θ) | 0.5–3 seconds |
| θ/τ ratio | 0.1–0.5 |
| Recommended controller | PI (no derivative) |
| Typical Kc | 0.3–1.0 |
| Typical Ti | 0.1–0.5 min (6–30 sec) |
Flow loop tips: Derivative action is almost never used on flow loops because the signal is inherently noisy from turbulent flow. Use a small amount of signal filtering (1–3 seconds) to reduce noise without adding excessive lag. Square-root extraction is required for differential-pressure flow meters (orifice plates).
Pressure Control Loops
Pressure loop dynamics depend heavily on the volume of the system. Small vessels or pipelines respond quickly; large vessels or high-pressure systems respond slowly.
| Parameter | Small Volume | Large Volume |
|---|---|---|
| Time constant (τ) | 5–30 sec | 1–30 min |
| Dead time (θ) | 1–5 sec | 5–60 sec |
| Controller type | PI | PI or PID |
| Typical Kc | 1–5 | 2–20 |
| Typical Ti | 0.5–5 min | 2–30 min |
Pressure loop tips: Compressor suction and discharge pressure loops often interact. Tune the faster loop (usually suction) first, then tune the discharge loop more conservatively. Gas pipeline pressure control has very large time constants due to line pack effects.
Level Control Loops
Level loops are unique because the process is integrating (non-self-regulating). A constant inflow imbalance causes the level to ramp continuously rather than settling to a new steady state. This fundamentally changes the tuning approach.
| Strategy | Kc | Ti | Application |
|---|---|---|---|
| Tight level control | 2–10 | 1–5 min | Feed drum to distillation, critical levels |
| Averaging level control | 0.5–2 | 5–20 min | Surge drums, buffer tanks |
| P-only control | 1–5 | N/A | Separator level to dump valve (with offset) |
Level loop tips: In most midstream applications, level loops should use "averaging" control to absorb upstream flow variations rather than transmitting them downstream. Tight level control should only be used when the downstream process requires a constant feed rate. Derivative action is almost never used on level loops.
Temperature Control Loops
Temperature loops are typically the slowest loops in a gas plant, with large time constants and significant dead time. They benefit most from PID control with derivative action.
| Application | τ (typical) | θ (typical) | Controller |
|---|---|---|---|
| Amine contactor temperature | 10–30 min | 2–10 min | PID |
| Reboiler/heater temperature | 5–20 min | 1–5 min | PID |
| Air cooler outlet temperature | 5–15 min | 1–3 min | PI or PID |
| Pipeline gas temperature | 30–120 min | 5–30 min | PI (conservative) |
| Chiller/JT temperature | 3–15 min | 1–5 min | PID |
Temperature loop tips: Always use IMC/Lambda tuning for temperature loops during initial commissioning. The derivative action in PID mode is valuable for compensating the large lag, but set the derivative filter to 8–10 times the derivative time to prevent noise amplification. Cascade control (temperature-to-flow) dramatically improves performance.
Composition / Analytical Loops
Composition loops based on gas chromatographs or other analyzers have the largest dead times of any loop type, making them the most challenging to tune:
| Analyzer Type | Typical Dead Time | Recommended Approach |
|---|---|---|
| Gas chromatograph (GC) | 3–15 min cycle time | IMC with λ = 3–5 × cycle time |
| Moisture analyzer | 1–5 min | IMC/Lambda, conservative |
| H2S analyzer | 0.5–3 min | IMC/Lambda or PI |
| BTU analyzer | 2–8 min | IMC with large λ |
6. Worked Example
Tune a temperature controller on an amine contactor outlet at a gas plant. A step test was performed with the following results.
Step 1: Calculate Process Gain
Step 2: Assess Controllability
Step 3: Calculate Tuning Parameters (IMC/Lambda)
Step 4: Compare Methods
| Method | Kc | Ti (min) | Td (min) | Expected Overshoot |
|---|---|---|---|---|
| Z-N Open-Loop | 4.80 | 10.0 | 2.5 | ~25% |
| Cohen-Coon | 5.50 | 10.7 | 1.6 | ~20% |
| IMC/Lambda (λ=30) | 0.67 | 32.5 | 2.3 | ~5% |
| IMC/Lambda (λ=15) | 1.24 | 32.5 | 2.3 | ~10% |
7. Practical Tips & Troubleshooting
Step Test Best Practices
- Step size: Use 3–10% of output range. Smaller steps are safer but harder to analyze. Larger steps give cleaner data but risk process upsets.
- Wait for steady state: Before stepping, wait at least 3–5 time constants for the process to stabilize.
- Record full response: Continue recording for at least 5 time constants after the step to capture the complete response.
- Multiple tests: Perform at least 2–3 step tests (up and down) and average the results to improve accuracy.
- Operating point: Process dynamics often change with operating conditions. Test at the normal operating point, and re-test if operating conditions change significantly.
- Signal filtering: Record unfiltered PV data if possible. DCS signal filters add apparent dead time and increase the apparent time constant.
Common Tuning Problems and Solutions
| Problem | Likely Cause | Solution |
|---|---|---|
| Sustained oscillation | Gain too high or Ti too short | Reduce Kc by 30–50%; increase Ti by 50–100% |
| Slow, sluggish response | Gain too low or Ti too long | Increase Kc by 20–50%; decrease Ti by 25–50% |
| Overshoot on setpoint change | Gain too high or derivative too low | Reduce Kc; increase Td if using PID; or use setpoint filtering |
| Steady-state offset | Missing integral action or integral wind-up | Add or increase integral action (reduce Ti); check for wind-up limits |
| Noise amplification | Derivative gain too high or signal noise | Reduce Td; add derivative filter; increase PV filter time |
| Limit cycling (hunting) | Valve deadband or stiction | Fix valve mechanical issues; add output deadband; use gap control |
| Integral wind-up | Output saturated with integral active | Enable anti-wind-up in DCS; set output limits; use external reset |
| Interaction with other loops | Coupled processes (cascade, multi-var) | Detune the faster loop; add decoupling; consider MPC |
Commissioning Checklist
Before tuning any loop during commissioning, verify the following:
- Valve stroke: Control valve travels full range (0–100%) smoothly. Check for stiction, hysteresis, and deadband. Acceptable deadband is less than 2% for most control valves.
- Valve sizing: Valve is correctly sized for the expected flow range. An oversized valve (operating below 20%) will have poor resolution and limit cycling.
- Transmitter range: Process variable transmitter range is appropriate. PV should normally operate between 20–80% of the transmitter range.
- Signal wiring: Verify correct polarity and signal type (4–20 mA, HART, fieldbus). Confirm controller receives correct PV in correct engineering units.
- Control action: Verify the controller action (direct/reverse) matches the valve action. Test by manually bumping the output and confirming the PV moves in the expected direction.
- Safety systems: Confirm all safety interlocks, trips, and alarm setpoints are functional and independent of the PID loop.
- DCS configuration: Verify gain/PB units, integral time units (minutes vs. seconds vs. repeats), and derivative filter settings.
Advanced Techniques
When single-loop PID control is insufficient, consider these advanced strategies common in midstream facilities:
- Cascade control: Two nested controllers. The outer (primary) loop adjusts the setpoint of an inner (secondary) loop. Used for temperature-to-flow, level-to-flow, and analyzer-to-temperature cascades. Tune the inner loop first (faster), then tune the outer loop (slower, more conservative).
- Feedforward control: Measures the disturbance directly and adjusts the output before the PV is affected. Requires a model of the disturbance-to-PV relationship. Commonly used for flow ratio control and inlet temperature compensation.
- Split-range control: Single controller output drives two or more final elements in sequence. Common for heating/cooling systems (e.g., hot utility valve 0–50%, cold utility valve 50–100%). Requires careful valve characterization.
- Ratio control: Maintains a fixed ratio between two flows. Used for chemical injection, air/fuel ratio, and blend control. Typically implemented as a multiplier on the secondary flow setpoint.
- Override/select control: Multiple controllers compete for a single output, with high or low select logic choosing the active controller. Used for compressor anti-surge, column temperature/differential pressure override.
Derivative Filter
Pure derivative action amplifies high-frequency noise. In practice, derivative action is always implemented with a first-order filter:
Integral Wind-Up Prevention
When the controller output reaches its limits (0% or 100%), the integral term continues to accumulate error, causing "wind-up." When the process eventually returns toward setpoint, the accumulated integral causes a large overshoot before the output can return to the normal range.
Prevention strategies:
- Anti-wind-up limits: Most DCS systems clamp the integral accumulator when the output is saturated. Ensure this feature is enabled.
- External reset feedback: Uses the actual valve position (from a positioner) rather than the controller output for the integral calculation. Eliminates wind-up due to valve limiting.
- Conditional integration: Disables integral action when the error exceeds a threshold. Prevents wind-up during large setpoint changes or process upsets.
- Output tracking: Automatically adjusts the integral term to match the output when the controller is switched from manual to automatic, providing bumpless transfer.
Ready to use the calculator?
→ Launch PID Tuning Calculator