Cascade Control Simulator Back
Control Engineering

Cascade Control Simulator

Inner loop $G_i(s) = \frac{K_i}{\tau_i s+1}$ nested inside an outer loop — see how dual-loop PID outperforms single-loop in rise time, overshoot, and settling time.

Inner Loop
Kp (inner)
Ki (inner)
Kd (inner)
Time const. τᵢ (s)
s
Outer Loop
Kp (outer)
Ki (outer)
Kd (outer)
Time const. τ₀ (s)
s
Step magnitude
Results
Rise time
Cascade (s)
Overshoot
%
Settling
Cascade (s)
Rise time
Single (s)
Overshoot
%
Settling
Single (s)
Press "Run" — Cascade (solid) vs Single-loop (dashed) Step Response Comparison
Theory & Key Formulas
$$G_i(s) = \frac{K_i}{\tau_i s + 1}$$ $$G_o(s) = \frac{K_o}{\tau_o s + 1}$$ $$C(s) = K_p + \frac{K_i}{s} + K_d s$$

What is Cascade Control?

🙋
What exactly is cascade control? It sounds complicated.
🎓
Basically, it's a control strategy with two feedback loops nested inside each other. Think of it like a manager and a worker. The outer loop (the manager) sets the main goal, like a desired temperature. The inner loop (the worker) controls a related, faster process, like the steam valve position, to achieve it. In this simulator, you can see both loops working together.
🙋
Wait, really? Why not just use one PID controller for everything?
🎓
A single loop has to handle all disturbances at once, which can be slow. For instance, in a chemical reactor, a pressure surge affects temperature. In cascade control, the inner pressure loop corrects the surge before it disturbs the outer temperature loop. Try moving the "Inner Plant Time Constant" slider to a very high value in the simulator—you'll see the cascade performance degrade to match the single loop because the inner loop can't react fast enough.
🙋
So how do you design it? What makes a good inner loop?
🎓
The golden rule is the inner loop must be 3 to 5 times faster than the outer loop. That's why tuning is crucial. In practice, you first tune the inner-loop PID (using the sliders for $K_{p,i}$, $K_{i,i}$, $K_{d,i}$) to get a fast, stable response. Then you tune the outer loop. Play with the simulator: set a fast inner loop and then adjust the outer PID. You'll see a dramatic reduction in settling time and overshoot compared to the single-loop case on the right.

Physical Model & Key Equations

The system is modeled as two first-order processes in series. The inner plant represents a fast-acting process (like a valve or motor), and the outer plant represents the slower primary variable (like temperature or level). Their dynamics are described by simple transfer functions.

$$G_i(s) = \frac{K_i}{\tau_i s + 1}\quad \text{and}\quad G_o(s) = \frac{K_o}{\tau_o s + 1}$$

Here, $K_i$ and $K_o$ are process gains, and $\tau_i$ and $\tau_o$ are time constants. A successful cascade requires $\tau_i \ll \tau_o$ (typically $\tau_o \gt 3\tau_i$).

Each loop uses a PID controller. The controller's job is to calculate an output signal based on the error (difference between setpoint and measurement). Its action is defined by the PID law.

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

$K_p$ is the proportional gain (reacts to present error), $K_i$ is the integral gain (eliminates steady-state error), and $K_d$ is the derivative gain (predicts future error). In the simulator, you tune six PID gains: three for the inner controller and three for the outer.

Frequently Asked Questions

First, adjust the PID of the inner loop (fast response) so that it is stable and follows the target value. Then, adjust the PID of the outer loop (slow response). Since adjusting the outer loop is difficult if the inner loop is not stable, always start with the inner loop first.
Compare the step responses of cascade control and single-loop control under the same process parameters. When a disturbance is applied to the inner loop, you can confirm that cascade control suppresses the disturbance faster than single-loop control and results in smaller overshoot.
The response of the inner loop becomes very fast, making the control prone to instability. Especially if the difference from the outer loop's time constant is too large, oscillation or hunting may occur. Adjust within a realistic range (e.g., τi = 0.5 to 5).
This simulator is a simplified model limited to first-order lag systems. Actual processes include dead time and nonlinearities, so please use it for qualitative trend understanding and learning purposes. It is helpful for promoting understanding before actual equipment tuning.

Real-World Applications

Chemical Reactor Temperature Control: The outer loop controls reactor temperature, while the inner loop controls the coolant flow valve position. This setup quickly rejects disturbances in coolant supply pressure before they can affect the critical reactor temperature, ensuring product consistency and safety.

Automotive Cruise Control: The outer loop maintains the vehicle's set speed. The inner loop directly controls the throttle actuator. This allows the system to quickly compensate for changes in road gradient or wind resistance, providing a smoother ride than a single-loop system.

Distillation Column Control: The outer loop manages the composition of the top product. The inner loop regulates the reflux flow rate. This cascade structure minimizes the impact of upstream pump fluctuations on the delicate separation process, improving purity and yield.

Paper Machine Basis Weight Control: The outer loop controls the final paper weight (grams per square meter). The inner loop adjusts the thick stock flow valve. By having a fast inner loop on the flow, the system can quickly correct for pulp consistency variations, leading to more uniform paper quality.

Common Misconceptions and Points to Note

When you first encounter cascade control, there are a few common pitfalls you can easily fall into. A major misconception is the idea that as long as the outer loop is tuned well, the inner loop can be tuned roughly. This is absolutely wrong. If the inner loop is sluggish, from the outer loop's perspective, it's like having a subordinate who doesn't respond promptly to commands and whose behavior is unpredictable. For example, an ideal combination would be an inner loop time constant $\tau_i$ of 1 second and an outer loop time constant $\tau_o$ of 10 seconds, which works well. However, if the inner loop response is slow, say $\tau_i$ is 5 seconds, the difference from the outer loop (10 seconds) becomes too small, and the benefits of cascade control are almost lost. If you try drastically lowering the inner loop gain and raising the outer loop gain in the simulator, you should quickly see it start to oscillate.

Next is misidentifying the disturbance injection point. Cascade control demonstrates its power when disturbances enter at a point where they can be detected and corrected by the inner loop. Conversely, if disturbances enter the process directly at the outer loop, the results can be similar to those of a single-loop control. In practice, it's crucial to carefully examine the process flow to determine what disturbances enter through which paths.

Finally, there's an implementation mistake: setting the sampling periods of the inner and outer loops to be the same. The inner loop requires fast response, so its control period should be short (e.g., 100ms). The outer loop controls a slower process, so a slightly longer period (e.g., 1 second) is often sufficient. Running both at the same fast rate only adds unnecessary computational load and can, in some cases, cause instability in the outer loop control, so be careful.

How to Use

  1. Set the inner (slave) loop PID gains using num-ikp, num-iki, num-ikd sliders to stabilize the actuator dynamics with time constant tau (num-itau, typically 0.05–0.2 s for servo valves).
  2. Set the outer (master) loop PID gains using sl-ikp, sl-iki, sl-ikd sliders; start with Kp around 0.5–2.0 and Ki lower to avoid integral windup on the cascade setpoint.
  3. Click "Run Simulation" to compare cascade response (two-loop feedback) versus single-loop PID on the same reference step input; observe rise time, overshoot %, and settling time (2% band) in real-time metrics pane.

Worked Example

Consider a hydraulic pressure control loop with inner valve servo (tau=0.08 s) and outer pressure controller. Inner loop tuned: Kp=4.5, Ki=8.0, Kd=0.12. Outer loop: Kp=1.2, Ki=0.3, Kd=0.05. Step reference 100 bar to 120 bar. Cascade result: rise time 0.32 s, overshoot 6.8%, settling time 0.78 s. Single-loop PID with same outer gains yields rise time 0.28 s but 18% overshoot and 1.4 s settling—cascade decouples disturbances in valve response, reducing overshoot by 62%.

Practical Notes

  1. Tune inner loop first (aggressive, Kd helps reject actuator friction ripple) until it tracks setpoint within 5 Hz bandwidth; then tune outer loop conservatively to avoid cascading instability.
  2. If inner Kd is too high (>0.3 for servo), noise amplification degrades real sensor signals; cap derivative action below 10× the proportional term.
  3. Monitor integral action in both loops—outer loop Ki should be 30–50% of inner loop Ki to prevent windup when outer setpoint saturates the inner reference.
  4. Cascade excels under load disturbance (e.g., pump pressure drop affecting valve flow); single-loop struggles because it sees combined lag; cascade inner loop rejects it before outer loop acts.