Explain the receding-horizon principle and why MPC stability depends on both the prediction horizon and the terminal cost or terminal constraint in the optimization problem.
Think about your answer, then reveal below.
Model answer: The receding-horizon principle: at time k, MPC solves an optimization over k:k+N (a window of N future steps), implements the first optimal control move, then shifts the window to k+1:k+N+1 and resolves. This 'rolling' horizon allows adaptation to disturbances and nonlinearities that emerge, unlike open-loop optimization. However, optimizing only over a finite horizon creates a subtle stability issue: at step k+N−1, the optimal control might steer the state toward a large cost at step k+N, then abandon it (since step k+N is outside the horizon). Without a terminal cost or terminal constraint, the optimizer has no incentive to leave the system in a stabilizable state beyond the horizon — the system can diverge after the prediction window ends. The terminal constraint (forcing the state into a small region, typically near the origin) or terminal cost (penalizing the predicted state at the horizon end as if it were the start of an infinite-horizon problem) closes this loophole, ensuring that the policy computed at each time step is stabilizing over the full infinite time.
This is why seemingly stable MPC implementations sometimes fail: when the horizon is not long enough relative to system dynamics, or when the terminal condition is too loose, the finite-horizon optimization can produce a control sequence that appears optimal locally but is globally destabilizing. Modern MPC software computes the required minimum horizon or chooses terminal conditions automatically, but the underlying issue is fundamental to finite-horizon optimization.