Cascaded control - Time separation
This note explains why time-scale separation is key in cascaded control, and how it helps you avoid unexpected oscillations when stacking controllers. It gives an intuitive rule of thumb (and where it comes from) so you can design inner and outer loops that play nicely together—whether you’re tuning simple PIDs or building more advanced control layers.
Cascaded control - The importance of time separation
A common case
Sometimes, you will encounter coupled dynamics that you want to control individually with tow controllers. Let say the dynamics are $G_1(s)$ and $G_2(s)$, and the controllers are $C_1(s)$ and $C_2(s)$. For example :
- $G_1(s)$ is the dynamic of a temperature w.r.t. a valve position,
- $G_2(s)$ is the dynamic of the valve position w.r.t. its motor input,
- $C_1(s)$ is the controller taking a temperature setpoint to define the valve position target,
- $C_2(s)$ is the controller taking the valve position target (from $C_1(s)$) to set the motor input.
With everything connected, we get the following block description of such little systems:
An important rule
The inner loop of this system should have a time constant $\tau_2$ at least 10 times smaller than the one of the outer loop $\tau_1$ :
$$\tau_1\geq 10\cdot \tau_2.$$An explanation
Let’s start simple with a single loop control :
The basic goal of designing a controller $C(s)$ is to set it such that the closed loop dynamic $T(s)$ follow as closely as possible a first-order dynamic with a gain of 1 and a time constant $\tau_c$, where $\tau_c$ has to be selected to that:
- (lower bound on $\tau_c$ ) the controller is not too aggressive,
- (upper bound on $\tau_c$) the controller is not too slow. Choosing $C(s)$ such that the closed loop system has 1st-order dynamic has the following implication: $$T(s) := \frac{C(s)G(s)}{1+C(s)G(s)} \approx \frac{1}{\tau_cs+1} \qquad \Rightarrow \qquad C(s)G(s) \approx \frac{1}{\tau_cs}.$$ With that in mind, let’s do the same thing with the cascaded system of Figure 1. Let’s design the two controllers $C_1(s)$ and $C_2(s)$ such that they control their associated dynamics while ignoring that they are coupled. By doing that, we get: $$C_1(s)G_1(s)\approx\frac{1}{\tau_1s}, \qquad C_2(s)G_2(s)\approx\frac{1}{\tau_2s}. \qquad \qquad (\star)$$Now, let’s see what happens in the coupled system (I define $Y_2$ as the output of $G_2$): $$\left.\begin{array}{l} Y = G_1Y_2 \\ Y_2 = C_2G_2(C_1(R-Y_1)-Y_2)\end{array} \right\} \Rightarrow \quad \left. \begin{array}{l} Y_2 = Y/G_1 \\ Y = G_1C_2G_2(C_1(R-Y) - Y/G1)\end{array} \right\} \Rightarrow \quad Y = \frac{C_1G_1C_2G_2}{1+C_2G_2+C_1G_1C_2G_2}R,$$ which, using the approximation $(\star)$, can be reduced to : $$Y \approx \frac{\frac{1}{\tau_1\tau_2s^2}}{1+\frac{1}{\tau_2s}+\frac{1}{\tau_1\tau_2s^2}} R = \frac{1}{\tau_1\tau_2s^2 + \tau_1s + 1}R \qquad \underbrace{ = \left(\frac{\alpha}{s-r_1} + \frac{\beta}{s-r_2}\right)R}_{\text{rewriting w.r.t. the roots of $\tau_1\tau_2s^2 + \tau_1s + 1$}}.$$Ant this equation tells use when the coupling generates oscillations, i.e., when the roots of $\tau_1\tau_2s^2 + \tau_1s + 1$ are complex. To know if they are, we only need to evaluate if the discriminant $\Delta$ of the polynomial is $\geq 0$. Using the general definition: $$ax^2+bx+c = 0 \qquad \Rightarrow \qquad \Delta := d^2-4ac$$we find for our particular case : $$\Delta = \tau_1^2 -4\tau_1\tau_2 \geq 0 , \qquad \Rightarrow \ \frac{\tau_1}{\tau_2}\left( \frac{\tau_1}{\tau_2} - 4 \right) \geq 0, \qquad \Rightarrow \ \frac{\tau_1}{\tau_2} \geq 4, \qquad \Rightarrow \ \boxed{\ \tau_1 \geq 4 \cdot \tau_2 \ }.$$So, to avoid coupling oscillations in the cascaded scheme of Figure 1, we need at least a ration of 4 between $\tau_1$ and $\tau_2$. But that’s the theoretical limit. In practice we need some margine, hence the general rule of targeting a ratio of 5 of better 10.
Going further
The illustrative example I took at the beginning of this note is very common, and most of us may be already familiar with such cases, as well as with the application of the time separation rule. But have you also considered the cases where :
- The inner loop if your basic/direct regulatory control layer with many PIDs, and the outer loop is the supervisory control layer with its coordination mechanisms like MPC ?