Advanced Modeling and Control

🤔 how many measurements are there?

Several layers: regulatory, supervisory, optimization, scheduling.
Regulatory: multi-loop PID controls levels, temperature, flow, pressure. Ensures stability.
Supervisory: sends setpoints to the regulatory layer. May be centralized.
Optimization: real-time monitoring and optimization provide optimal targets for supervision.
Trade-off: plantwide optimization acts slower than local control.
Scheduling: inventory and production planning, often offline.
Use fast regulatory PID loops for stability, and let slower supervisory and optimization layers set plantwide targets and schedules.

Define control objectives: explicit outcomes and implicit plantwide goals.
Select controlled and manipulated variables that support the explicit objectives and fit the plantwide philosophy.
Choose the control architecture: centralized or decentralized.
For decentralized (multi-loop PID) systems, decide controller pairings first to manage interactions, then design the controllers.

Plantwide control design is iterative
Choose initial controller pairings.
note: different pairings may require redesign of individual controllers.
Design and tune controllers.
Simulate and assess plantwide performance.
Use a full-plant simulation to evaluate the complete design.
If targets are not met, revise pairings and retune.
Repeat until objectives are satisfied.
Validate controller pairings with full-plant simulation; if KPIs fall short, revise pairings and retune until objectives are met.
Purpose: Define, prioritize, and measure what “good operation” means for the unit or plant.
Priority order (use as override order)
Typical objectives
| Objective | Indicator variable (unit) | Typical limit or target | Primary MV(s) | Control notes |
|---|---|---|---|---|
| Avoid flooding/weeping in column | Tray dP, % flood [Constraint] | dP < limit, flood < 80% | Reflux, reboiler duty, feed rate | Add dP override selectors on reflux and duty. |
| Protect pump (no cavitation) | NPSH margin (m) [Constraint] | Margin > required | Suction drum level, recycle valve | Use minimum flow recycle and tight level control. |
| Keep reactor safe | T_{reactor} (°C) [CV] | < T_{max}, HH trip at T_{trip} | Coolant flow, jacket duty | Cascade temperature to coolant valve, HH trip independent of PID. |
| Minimize utilities | Steam per ton, kWh per ton [Economic] | ↓ vs baseline | Reboiler duty setpoint, compressor load | Supervisor trims setpoints, bounded by quality and safety. |
| Achieve throughput | Feed rate (t/h) [Throughput] | ≥ plan | Feed valve, upstream schedule | Throughput held unless any constraint controller intervenes. |
| Objective | Indicator variable (unit) | Typical limit or target | Primary MV(s) | Control notes |
|---|---|---|---|---|
| Avoid flooding/weeping in column | Tray dP, % flood [Constraint] | dP < limit, flood < 80% | Reflux, reboiler duty, feed rate | Add dP override selectors on reflux and duty. |
| Protect pump (no cavitation) | NPSH margin (m) [Constraint] | Margin > required | Suction drum level, recycle valve | Use minimum flow recycle and tight level control. |
| Keep reactor safe | T_{reactor} (°C) [CV] | < T_{max}, HH trip at T_{trip} | Coolant flow, jacket duty | Cascade temperature to coolant valve, HH trip independent of PID. |
| Minimize utilities | Steam per ton, kWh per ton [Economic] | ↓ vs baseline | Reboiler duty setpoint, compressor load | Supervisor trims setpoints, bounded by quality and safety. |
| Achieve throughput | Feed rate (t/h) [Throughput] | ≥ plan | Feed valve, upstream schedule | Throughput held unless any constraint controller intervenes. |
Pick CVs and MVs that directly support each objective.
Put constraint controllers in place first (safety, equipment limits, environmental).
Add quality and inventory loops next, then throughput, then cost optimization.
Use override selectors so higher-priority loops take control when limits approach.
Provide simulation or digital twin checks for KPI impact before moving setpoints.
Document alarms and trips (setpoint, alarm, trip) for each safety-critical KPI.
Control strategy must achieve the entire set of objectives


One major task in decentralized control system design → to select controller pairings
Controller pairings are chosen based on 3 main factors:
Improper controller pairings can lead to severe process interaction → causes poor control performance
Factors can be conflicting with each other


🤔
Can we control the top composition using the steam flow, while the bottom composition using the reflux flow? Why ?


Reflux L holds the distillate composition y_D; changing L also disturbs the bottoms composition x_B.
The bottoms loop reacts: adjust steam/boilup S to bring x_B back to its setpoint.
That change in S disturbs y_D; the reflux loop trims L until y_D returns to setpoint.
\Lambda=K\circ (K^{-1})^{\mathsf T}
K is the steady-state gain matrix of linearized plant. Its entries are the open-loop gains
K^{-1} is the inverse of K
(\cdot)^{\mathsf T} is transpose,
\circ is the Hadamard (element-wise) product.
The RGA element is thus \lambda_{ij}=k_{ij}\,(K^{-1})_{ji}.
\Lambda =\begin{bmatrix}\lambda_{11}&\lambda_{12}\\\lambda_{21}&\lambda_{22}\end{bmatrix}
\lambda_{11}=\lambda_{22}=1-\frac{k_{12}k_{21}}{k_{11}k_{22}} \lambda_{12}=\lambda_{21}=\frac{k_{12}k_{21}}{k_{11}k_{22}}
\lambda_{11}=1 — no coupling.
0<\lambda_{11}<1 — coupling in the same direction as the main effect; severity grows as \lambda_{11}\!\downarrow.
At \lambda_{11}=0.5: very severe.
\lambda_{11}>1 — coupling in the opposite direction; severity grows as \lambda_{11}\!\uparrow.
\lambda_{11}<0 — sign reversal / very strong coupling; risk of closed-loop instability → avoid that pairing.
Choosing pairings for n\times n:
Given a 2\times2 transfer-function matrix (FOPTD elements):
G(s)= \begin{bmatrix} \dfrac{k_{11}e^{-\theta_{11}s}}{\tau_{11}s+1} & \dfrac{k_{12}e^{-\theta_{12}s}}{\tau_{12}s+1} \\[6pt] \dfrac{k_{21}e^{-\theta_{21}s}}{\tau_{21}s+1} & \dfrac{k_{22}e^{-\theta_{22}s}}{\tau_{22}s+1} \end{bmatrix}
Steady-state gain matrix:
K=\begin{bmatrix}k_{11}&k_{12}\\k_{21}&k_{22}\end{bmatrix}
Relative Gain Array:
\Lambda=K\circ (K^{-1})^{\mathsf T} =\begin{bmatrix}\lambda_{11}&\lambda_{12}\\\lambda_{21}&\lambda_{22}\end{bmatrix}
Diagonal element:
\lambda_{11} =\frac{k_{11}}{\underbrace{k_{11}}_{\text{main}}-\underbrace{\dfrac{k_{12}k_{21}}{k_{22}}}_{\text{coupling}}} =\frac{1}{1-\dfrac{k_{12}k_{21}}{k_{11}k_{22}}}
MATLAB:
Good for: assessing the steady-state coupling effect of a configuration.
Applicable when input/output relationships have the same general dynamic behaviors.
Pairing rules
Caution: can be misleading if transfer-function dynamics are significantly different.
Bottom line: RGA is a steady-state measure of process interaction.
G_{11}(s) = \frac{1.0}{100s+1}, \quad G_{12}(s) = \frac{0.3}{10s+1}
G_{21}(s) = \frac{-0.4}{10s+1}, \quad G_{22}(s) = \frac{2.0}{100s+1}
K = \begin{bmatrix} 1.0 & 0.3 \\ -0.4 & 2.0 \end{bmatrix}
\lambda_{11} = \frac{1}{1 - \frac{K_{12}K_{21}}{K_{11}K_{22}}} = \frac{1}{1 - \frac{(0.3)(-0.4)}{(1.0)(2.0)}} = 0.94
\Lambda = \begin{bmatrix} 0.94 & 0.06 \\ 0.06 & 0.94 \end{bmatrix}
When transfer function dynamics differ significantly, steady-state RGA can be misleading.
Dynamic RGA evaluates interaction strength as a function of frequency ω.
Helps identify correct pairings depending on operating frequency range.

\lambda_{11}(\omega) = \frac{1}{ 1 - \frac{|G_{12}(i\omega)||G_{21}(i\omega)|}{|G_{11}(i\omega)||G_{22}(i\omega)|} }
|G(i\omega)| = \frac{K_p}{\sqrt{\tau_p^2 \omega^2 + 1}}
\lambda_{11}(\omega) = \frac{1}{1 + \frac{16.7(100^2\omega^2 + 1)}{100^2\omega^2 + 1}}
Choose pairing between manipulated and controlled variables that results in the least process interactions.
Choose pairing that leads to quick response of controlled variable to manipulated variable (fast dynamic criterion).
Example:
\frac{Y_1}{U_1} = \frac{2 e^{-s}}{10s+1}, \quad \frac{Y_1}{U_2} = \frac{2 e^{-3s}}{12s+1}
Prefer U_1 \sim Y_1 because U_1 responds faster. U_2 has longer deadtime, which reduces achievable control performance.
Choose pairing that is least sensitive to disturbance.
Key Insights
Each configuration has a different sensitivity to a disturbance.
Thick and thin line represent the results of different configurations.
Notice that, the configuration with thick line is less sensitive to disturbance than the one with thin line.
The one that is less sensitive to disturbance is a more efficient configuration (or pairings).
Less sensitive to disturbance is also good because it could lead to lower control action required.

| Configuration | RGA (λ₁₁) | Comment |
|---|---|---|
| (L, B) | 0.94 | Least interactions |
| (L, V) | 25.3 | Severe interactions – coupling effect opposite to main effect |
| (L/D, V/B) | 1.70 | Mild interactions |
| (D, V) | 0.06 | Mild interactions – coupling effect in same direction as main effect; main effect weaker than coupling effect |


L, L/D and V are the least sensitive to feed composition disturbances
L and V have the most immediate effect on the product compositions
L/D and V/B give an intermediate effect
D and B yield the slowest response
Each configuration involves conflicting factors
Therefore, simulation is required to evaluate configuration performance
| Configuration | IAE for Overhead | IAE for Bottoms |
|---|---|---|
| (L, B) | 0.067 | 1.49 |
| (L, V) | 0.250 | 13.3 |
| (L/D, V/B) | 0.095 | 2.00 |
| (D, V) | 0.098 | 1.91 |
There are six main categories of methods to design multi-loop PID control systems:
Each method offers a different balance of: - Simplicity vs. performance
- Handling of interactions
- Practical implementation effort
G = \begin{bmatrix} \frac{12.8 e^{-s}}{16.7s + 1} & \frac{-18.9 e^{-3s}}{21s + 1} \\ \frac{6.6 e^{-7s}}{10.9s + 1} & \frac{-19.4 e^{-3s}}{14.4s + 1} \end{bmatrix}
\Lambda = \begin{bmatrix} 2.0094 & -1.0094 \\ -1.0094 & 2.0094 \end{bmatrix}
Apply Ziegler-Nichols tuning (Matlab Control System Designer) to design two PID controllers
Design PID 1 based on
g_{11} = \frac{12.8 e^{-s}}{16.7s+1}
G_{c1} = 1.2895 \left( 1 + \frac{1}{2s} + 0.4602s \right), \quad GM = 5.02 \, dB, \, PM = 34.9^\circ
Design PID 2 based on
g_{22} = \frac{-19.4 e^{-3s}}{14.4s+1}
G_{c2} = -0.2548 \left( 1 + \frac{1}{5.6s} + 1.4s \right), \quad GM = 4.88 \, dB, \, PM = 40.1^\circ
If F = 2
G'_{c1} = 0.6448 \left( 1 + \frac{1}{2s} + 0.4602s \right), \quad
G'_{c2} = -0.1274 \left( 1 + \frac{1}{5.6s} + 1.4s \right)
If F = 5
G'_{c1} = 0.2579 \left( 1 + \frac{1}{2s} + 0.4602s \right), \quad
G'_{c2} = -0.0510 \left( 1 + \frac{1}{5.6s} + 1.4s \right)
The order of loop closing is critical as it strongly influences overall control performance
Step 1: Identify which loop is faster by comparing open-loop step responses of g_{11} and g_{22}
Use Matlab commands:

use skogestad imc (simc) tuning in matlab control system designer
design pid 2 using g_{22}
g_{c2} = -0.1423 \left( 1 + \frac{1}{16.5s} + 1.3636s \right)
gm = 9.71 \, db, \quad pm = 74.8^\circ
apply a 1-unit step change in r1 and plot t against y1
from this step response, obtain the fopdt parameters (to be used in the next step)

linearized model for loop 1:
g'_{11} = \frac{6.53 \, e^{-s}}{5.25s + 1}
design pid 1 using the linearized model g'_{11}
g'_{11} = \frac{6.53 e^{-s}}{5.25s + 1}
g_{c1} = 0.4405 \left( 1 + \frac{1}{5.7s} + 0.456s \right)
gm = 9.92 \, db, \quad pm = 74.6^\circ
the plots show comparison between sql tuning and the previous detuning method
sql demonstrates substantial improvement in closed-loop performance compared to detuning

Independent tuning method relies on the Effective Open-Loop Transfer Function (EOTF)
For a 2×2 MIMO transfer function matrix:
G = \begin{bmatrix} g_{11} & g_{12} \\ g_{21} & g_{22} \end{bmatrix}
Reduce to decentralized form:
G = \begin{bmatrix} g_{e11} & 0 \\ 0 & g_{e22} \end{bmatrix}
g_{e11} = g_{11} - \frac{g_{12} g_{21}}{g_{22}}, \quad g_{e22} = g_{22} - \frac{g_{12} g_{21}}{g_{11}}
Controllers G_{c1} and G_{c2} are designed independently based on g_{e11} and g_{e22}
Existing SISO tuning formulas can be used
Next, we illustrate application of independent tuning for the Wood and Berry column example
G = \begin{bmatrix} \dfrac{12.8 e^{-s}}{16.7s+1} & \dfrac{-18.9 e^{-3s}}{21s+1} \\ \dfrac{6.6 e^{-7s}}{10.9s+1} & \dfrac{-19.4 e^{-3s}}{14.4s+1} \end{bmatrix}
Effective Open-Loop Transfer Functions (EOTFs):
g_{e11} = \dfrac{12.8 e^{-s}}{16.7s+1} - \dfrac{\left( \dfrac{-18.9 e^{-3s}}{21s+1} \right) \left( \dfrac{6.6 e^{-7s}}{10.9s+1} \right)} {\dfrac{-19.4 e^{-3s}}{14.4s+1}}
g_{e11} = \dfrac{12.8 e^{-s}}{16.7s+1} - \dfrac{6.43 (14.4s+1) e^{-7s}}{(21s+1)(10.9s+1)}
Approximation is required to simplify the EOTF
Equalize delays of main and coupling transfer functions
Assume general formula:
g = \dfrac{k_p e^{-(\theta_1+\theta_2)s}}{(\tau_1 s+1)(\tau_2 s+1)} \;\; \approx \;\; \dfrac{k_p e^{-\theta_1 s}}{(\tau_1 s+1)(\tau_2 s+1)(\theta_2 s+1)}
Applying to coupling transfer function:
g_{e11} \approx \dfrac{6.43 (14.4s+1) e^{-s}}{(21s+1)(10.9s+1)(6s+1)}
Overall EOTF for loop 1:
g_{e11} = \left[ \dfrac{12.8}{16.7s+1} - \dfrac{6.43(14.4s+1)}{(21s+1)(10.9s+1)(6s+1)} \right] e^{-s}
This simplified transfer functions can be used in Matlab Control System Designer since they contain only a single delay term
The second EOTF can be derived in the same manner
Overall EOTF for loop 2:
g_{e22} = \left[ \dfrac{-19.4}{14.4s+1} + \dfrac{9.745(16.7s+1)}{(21s+1)(10.9s+1)(6s+1)} \right] e^{-3s}
Controller Design using Skogestad IMC Tuning
G_{c1} = 0.775 \left( 1 + \dfrac{1}{8.5s} + 0.471s \right)
GM = 8.96 \, dB, \quad PM = 75.2^\circ
G_{c2} = -0.16 \left( 1 + \dfrac{1}{9.3s} + 1.258s \right)
GM = 9.27 \, dB, \quad PM = 78.7^\circ
Decentralized or multi-loop PID control is widely applied in process industries
Multi-loop control is often implemented at the regulatory layer, crucial for achieving stability
Proper controller pairing is essential in decentralized design to handle process interactions
Relative Gain Array (RGA) is used to address the configuration issue
Use steady-state RGA when transfer function dynamics are comparable
Use dynamic RGA when transfer function dynamics differ significantly
Correct pairing and RGA analysis are critical for robust and stable multi-loop control
Advanced Modeling and Control