MaximaLabsOpen app

Dynamic Matrix Control (MIMO DMC)

A receding-horizon MPC over an identified step-response (FIR) model: build the dynamic matrix from MV step tests, solve the constrained QP each control tick, and only implement the first move (receding horizon) before re-solving on the next tick.

apcmpcdmc
Concept

Dynamic Matrix Control predicts every controlled variable's (CV) future trajectory from each manipulated variable's (MV) step-response model, then solves for the MV moves that minimize weighted tracking error plus move suppression — receding horizon: only the first move per MV is actually implemented before the whole optimization re-runs next control tick.

The math
Show the governing equations
Δu=(GQG+R)1GQe\Delta u = (G^\top Q G + R)^{-1} G^\top Q e
H=GQG+R(solved by Cholesky factor-and-solve)H = G^\top Q G + R \quad \text{(solved by Cholesky factor-and-solve)}
G is the (p·n_cv × m·n_mv) dynamic matrix built from lower-triangular Toeplitz step-response blocks per CV/MV pair; Q/R are diagonal CV-tracking and MV-move-suppression weights; e is the predicted error trajectory. R > 0 makes the Hessian H positive definite even when G is rank-deficient.
Execution

Multivariable — every CV sees every MV's effect simultaneously, not one SISO loop at a time. This is the same linear algebra a constrained QP spends most of its solve time in.

How to Setup (GUI)

From an identified model to a running loop

  1. With a loop's MVs/CVs configured and identified (see System Identification), set Prediction Horizon (p) and Control Horizon in the General tab — how far ahead the controller predicts, and how many of those future moves it actually optimizes over.
  2. Set the move weight (R) to trade tracking aggressiveness against valve wear — higher R means smaller, gentler moves.
  3. Choose mode: simulation runs the QP against the flowsheet's own dynamic solver (safe to test against); live writes moves out over the mapped OPC-UA connection to real actuators.
  4. Click Start Loop (shown as Stop Loop once running) to toggle the loop between disabled and enabled — this is the real on/off switch; there isn't a separate "shadow" mode beyond running in simulation first.
  5. Watch predicted vs. actual moves, active constraints, and the CV trajectory live in the control-room's status card, or pop it into its own window via /detached?view=control-room or ?view=analytics.
Troubleshooting & Common Errors
loop won't enableNeeds at least one MV and one CV, and a fitted model (run System Identification first) — the loop stays disabled until both are satisfied.
predicted trajectory looks stale/wrongThe step-response model is out of date relative to current plant behavior (equipment fouling, a changed operating point) — re-run identification, or use closed-loop re-identification without stopping the loop.
MVs hit their limits immediatelyu_min/u_max or move_max are tighter than what's needed to track the CV setpoints — the QP will do its best within the box constraints, but persistent saturation means the limits (or the setpoints) need revisiting.
singular_jacobian / ill-conditioned HessianR (move weight) at exactly zero on a rank-deficient G can leave the Cholesky factorization degenerate — keep R strictly positive.