Receding Horizon, Terminal Cost, and Stability
A finite-horizon planner can be unstable unless a terminal cost and terminal set are chosen correctly; this is what makes MPC provably safe to run in a loop.
The stability problem
Optimizing over a finite horizon and reapplying each cycle does not by itself guarantee the closed loop is stable - a short-sighted planner can walk the plant toward trouble just beyond its horizon. MPC stability theory fixes this with a terminal cost and a terminal constraint set chosen so the optimal cost acts as a Lyapunov function.
Lyapunov stability ingredients:
Terminal cost V_f(x) = x' P x (from LQR Riccati)
Terminal set x_N in X_f (invariant under LQR gain K)
If, inside X_f, the LQR control keeps x in X_f and
V_f(f(x,Kx)) - V_f(x) <= -( x'Qx + (Kx)'R(Kx) )
then the MPC value function V*(x) decreases each step:
V*(x_{k+1}) - V*(x_k) <= -( x_k'Q x_k + u_k'R u_k ) < 0
Why the terminal set matters
The terminal set is a region where a known stabilizing controller (LQR) keeps the state inside and satisfies all constraints. Requiring the horizon to end in that set means the plan can always be safely continued beyond the horizon by the fallback controller. Together with the terminal cost this yields a decreasing value function - a Lyapunov certificate of stability.
# construct terminal ingredients (schematic)
P = solve_discrete_are(A, B, Q, R) # terminal cost weight
K = lqr_gain(A, B, Q, R)
X_f = max_invariant_set(A - B@K, constraints) # terminal set
# MPC then requires x_N in X_f and uses x_N' P x_N as terminal cost
Practical use in the stack
For the breeder, the terminal set is a neighborhood of the negative-triangularity operating point where the LQR shape/vertical controller holds all margins; MPC plans to arrive there. For the burner, the terminal ingredients are defined around a candidate potential operating point in simulation. The Lyapunov guarantee is what lets MPC run continuously in the loop rather than as an occasional optimizer.
- Terminal cost: LQR Riccati P penalizes end-state deviation.
- Terminal set: invariant region where fallback control is safe.
- Result: value function decreases -> closed-loop stability.
- Feasibility carried forward: a valid plan always extends safely.
These guarantees are for the model; the stack also monitors model-plant mismatch, and if the twin's prediction drifts from reality the MPC shrinks its ambitions and hands off to the safe fallback rather than trusting a stale certificate.