Appearance
Cascade Controller
Master-slave PID cascade for improved disturbance rejection
Overview
The Cascade Controller implements a master-slave PID structure where the outer (master) controller's output becomes the setpoint for the inner (slave) controller. This arrangement provides superior disturbance rejection for nested control problems.
When to Use
- Nested process dynamics: When one variable affects another sequentially
- Fast inner loop: When inner variable responds faster than outer
- Better disturbance rejection: When upsets affect the inner loop first
Common Applications
| Master Variable | Slave Variable | Application |
|---|---|---|
| MLSS | DO | Aeration control |
| Effluent TN | Methanol dose | Denitrification |
| SRT | WAS flow | Solids management |
| Temperature | Cooling water | Digester control |
Control Theory
Concept
mermaid
graph LR
SP_M[Master SP] --> M_Sum((+/-))
PV_M[Master PV] --> M_Sum
M_Sum --> Master[Master PID]
Master --> SP_S[Slave SP]
SP_S --> S_Sum((+/-))
PV_S[Slave PV] --> S_Sum
S_Sum --> Slave[Slave PID]
Slave --> MV[Output]
MV --> Inner[Inner Process]
Inner --> Outer[Outer Process]
Inner --> PV_S
Outer --> PV_MMathematical Model
Master Controller: $$u_m(t) = K_{pm} \cdot e_m + K_{im} \int e_m , dt + K_{dm} \frac{de_m}{dt}$$
Slave Controller: $$u_s(t) = K_{ps} \cdot e_s + K_{is} \int e_s , dt + K_{ds} \frac{de_s}{dt}$$
Where:
- $e_m = SP_{master} - PV_{master}$ (master error)
- $e_s = u_m - PV_{slave}$ (slave error = master output - slave PV)
- $u_s$ = Final output to manipulated variable
Parameters
Master Loop
| Parameter | Symbol | Range | Default | Description |
|---|---|---|---|---|
| Setpoint | SP_m | Process dependent | - | Master setpoint |
| Proportional gain | K_pm | 0.1 - 10 | 1.0 | Master Kp |
| Integral gain | K_im | 0.01 - 1 | 0.1 | Master Ki |
| Derivative gain | K_dm | 0 - 1 | 0 | Master Kd |
| Output min | - | Process dependent | 0 | Min slave setpoint |
| Output max | - | Process dependent | 100 | Max slave setpoint |
Slave Loop
| Parameter | Symbol | Range | Default | Description |
|---|---|---|---|---|
| Proportional gain | K_ps | 0.5 - 20 | 2.0 | Slave Kp |
| Integral gain | K_is | 0.1 - 5 | 0.5 | Slave Ki |
| Derivative gain | K_ds | 0 - 1 | 0.1 | Slave Kd |
| Output min | - | Process dependent | 0 | Min MV output |
| Output max | - | Process dependent | 100 | Max MV output |
Tuning Guidelines
Cascade Tuning Procedure
- Place master in manual - Hold slave setpoint constant
- Tune slave first - As standard PID loop
- Verify slave response - Should be 3-5× faster than master
- Close slave loop - Slave now tracks setpoint
- Tune master - As if slave were the process
Rule of Thumb
The master loop should be 3-5× slower than the slave loop:
$$\tau_{master} \approx (3 \text{ to } 5) \times \tau_{slave}$$
Recommended Settings
| Application | Master Kp | Master Ki | Slave Kp | Slave Ki |
|---|---|---|---|---|
| DO cascade | 0.5 | 0.05 | 50 | 10 |
| Temperature cascade | 1.0 | 0.1 | 2.0 | 0.5 |
| Pressure cascade | 0.8 | 0.08 | 3.0 | 1.0 |
Configuration
Example: DO Cascade Control
json
{
"id": "do-cascade-1",
"type": "Cascade",
"enabled": true,
"master": {
"setpoint": 3000,
"kp": 0.5,
"ki": 0.05,
"kd": 0,
"outputMin": 0.5,
"outputMax": 4.0,
"pvNodeId": "aerobic-reactor-1",
"pvVariable": "MLSS"
},
"slave": {
"kp": 50,
"ki": 10,
"kd": 5,
"outputMin": 0,
"outputMax": 1000,
"pvNodeId": "aerobic-reactor-1",
"pvVariable": "DO",
"manipulatedVariable": "airflow",
"targetNodeId": "aerobic-reactor-1"
},
"mode": "auto",
"bumplessTransfer": true
}Integration Example
MLSS-DO Cascade for Aeration
Scenario: Maintain MLSS at 3000 mg/L by adjusting DO setpoint, which in turn adjusts airflow.
- Master loop monitors MLSS
- If MLSS high, master reduces DO setpoint → less aeration → less oxygen for growth
- Slave loop adjusts airflow to meet new DO setpoint
- Fast DO control rejects disturbances before affecting MLSS
Benefits
- Disturbances to airflow are corrected quickly by slave
- MLSS remains stable despite blower variations
- More robust than single-loop MLSS control
Best Practices
- Inner loop must be faster - Verify slave response time
- Start with slave tuning - Get inner loop right first
- Use bumpless transfer - Prevent bumps on mode changes
- Monitor both loops - Track master and slave outputs
- Decouple if needed - Consider if loops interact
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Master oscillates | Master too fast | Reduce master Kp, Ki |
| Slave oscillates | Slave too aggressive | Retune slave alone |
| Slow response | Master too slow | Increase master gains |
| Bumps on startup | No bumpless transfer | Enable bumplessTransfer |
| Interaction | Loops similar speed | Slow down master 3-5× |
Related Controllers
- PID-Controller - Base PID for slave tuning reference
- Feedforward-Controller - For additional disturbance rejection
- Ratio-Controller - For flow-based cascade alternative
References
- Marlin, T.E. "Process Control" (2nd Edition), Chapter 14
- Shinskey, F.G. "Process Control Systems" (4th Edition)