---
title: Terminal Constraints in Optimal Control
url: https://www.emergentmind.com/topics/terminal-assess-constraint
type: topic
---

# Terminal Constraints in Optimal Control

Searching arXiv for recent and foundational papers on terminal constraints in optimal control, MPC, stochastic control, and related formulations.
Terminal constraints are endpoint conditions imposed at the final stage of a control, planning, or optimization problem. In the cited literature, they appear as exact terminal equalities such as \(x(N+1)=\xi\), terminal inequalities such as \(g_I(x(t_f),t_f)\le 0\), terminal set membership conditions such as \(h(x_{t+N|t})\ge 0\), terminal constraints in law of the form \(\Psi(\mathcal L(X_T))\le 0\), and strict stochastic constraints such as \(X_T=0\) or \(X_T\in C\) for a prescribed random subspace [2307.09719]. Across deterministic optimal control, model predictive control, stochastic linear-quadratic control, mean field control, and PDE control, terminal constraints serve different but related roles: exact endpoint feasibility, recursive feasibility, recoverability, safety certification, convergence regularization, and structural characterization of admissible optimal solutions [1801.01383].

## 1. Deterministic optimal control with terminal equality and inequality constraints

A canonical deterministic formulation is the Bolza optimal control problem
\[
J=\varphi(x(t_f),t_f)+\int_{t_0}^{t_f} L(x(t),u(t),t)\,dt
\]
subject to
\[
\dot x=f(x,u,t), \qquad x(t_0)=x_0,
\]
with free terminal time \(t_f\), terminal equality constraint
\[
g(x(t_f),t_f)=0,
\]
or, in the more general case,
\[
g_E(x(t_f),t_f)=0,\qquad g_I(x(t_f),t_f)\le 0
\]
[1801.01383]. In this setting, terminal equality constraints are exact endpoint conditions, whereas terminal inequality constraints may be active or inactive at the optimum. The active-set distinction is central: an inequality is active when the terminal value is zero and inactive when it is strictly interior [1801.07395].

The Variation Evolving Method (VEM) treats the optimal solution as the equilibrium of an infinite-dimensional dynamical system evolving in a fictitious variation time \(\tau\). In the terminal-equality case, admissible variations must satisfy
\[
g_{x_f}\int_{t_0}^{t_f}\Phi_o(t_f,t)f_u(t)\frac{\delta u}{\delta \tau}(t)\,dt + \big(g_{x_f}f(t_f)+g_{t_f}\big)\frac{\delta t_f}{\delta \tau} =0,
\]
which is the feasibility condition in variation time: the evolution must stay on the terminal-constraint manifold [1801.01383]. The resulting evolution law preserves feasibility, decreases the cost monotonically, and converges asymptotically to stationary conditions equivalent to Pontryagin’s necessary conditions [1801.01383].

For terminal inequalities, the VEM treatment is more delicate. The problem includes both equality and inequality endpoint conditions,
\[
g_E(x(t_f),t_f)=0,\qquad g_I(x(t_f),t_f)\le 0,
\]
and only the correct subset of terminal inequalities should be enforced as equality-type conditions in the variation subproblem [1801.07395]. The paper introduces the active index set \(\mathbb I\) and the refined set \(\mathbb I_p\), the latter selecting those active inequalities whose variation constraints are themselves active in the feasibility-preserving evolution optimization problem [1801.07395]. This distinction prevents saturated but ultimately inactive inequalities from being frozen unnecessarily.

The deterministic VEM literature also develops explicit costate-free optimality conditions. In the terminal-equality case they are
\[
p_u+f_u^T\Phi_o^T(t_f,t)g_{x_f}^T\pi=0,
\]
and
\[
\Big(\varphi_t+\varphi_x^T f+L+\pi^T(g_{x_f}f+g_{t_f})\Big)_{t_f}=0,
\]
where \(\pi\) is obtained algebraically from
\[
M\pi=-r
\]
rather than by solving an adjoint two-point boundary value problem [1801.01383]. In the terminal-inequality extension, the same structure persists with equality multipliers \(\pi_E\) and inequality multipliers \(\pi_I\), and the KKT conditions
\[
(\pi_I)_i\,(g_I)_i=0,\qquad (\pi_I)_i\ge 0
\]
appear explicitly [1801.07395].

A later modification, the Modified Evolution Partial Differential Equation (MEPDE), extends VEM to the infeasible solution domain. It allows initial guesses that violate the dynamics, initial condition, or terminal constraints, and uses first-order stable dynamics to eliminate these infeasibilities [1801.10486]. A distinctive result is that violated terminal inequality constraints that are inactive for the optimal solution enter the feasible domain in finite variation time, whereas active terminal inequalities are achieved asymptotically [1801.10486]. This separates feasibility restoration from asymptotic optimality in a precise way.

## 2. Terminal sets, terminal admissible regions, and terminal regularization in model predictive control

In model predictive control, terminal constraints often appear as terminal sets rather than exact terminal state equalities. One safety-critical formulation uses a discrete-time nonlinear system
\[
x_{t+1}=f(x_t,u_t)
\]
with a signed-distance safety constraint \(d(x)\ge 0\) imposed along the horizon and a terminal control barrier function constraint
\[
h(x_{t+N|t})\ge 0
\]
imposed only at the endpoint [2605.05575]. Here the terminal set is the CBF-safe set
\[
\mathcal C:=\{x\in\mathcal X\mid h(x)\ge 0\},
\]
which is controlled invariant, while the stagewise constraint uses the true geometric unsafe set encoded by \(d(x)\) [2605.05575]. This construction separates actual collision avoidance from terminal recoverability. The terminal CBF condition guarantees recursive feasibility and safety through recoverability, while reducing conservatism relative to stage-wise CBF enforcement [2605.05575].

The same work formalizes horizon-dependent reachable sets. For the proposed MPC-MCI scheme, the one-step reachable sets satisfy
\[
\mathcal R_N\subseteq \mathcal R_{N+1},
\]
whereas for the compared NMPC-DCBF formulation the reachable set is effectively horizon-invariant:
\[
\mathcal R_{N,M}=\mathcal R_{1,1},\qquad \mathcal R_{1,1}=\mathcal R_1
\]
[2605.05575]. The constructive recursive-feasibility proof also yields a warm-start strategy: shift the previous control sequence and append a recovery action from the invariant terminal set [2605.05575]. This suggests that, in safety-critical MPC, the terminal constraint can function as an invariant recovery anchor rather than merely a stabilizing endpoint condition.

A different MPC use of terminal constraints appears in image-based visual servoing of UAVs. There, the error dynamics are
\[
\mathbf e(k+1)=\mathbf A\mathbf e(k)+\mathbf B\mathbf u(k),
\]
and the optimization includes stage cost, terminal cost, state and input bounds, and the terminal-state constraint
\[
|\mathbf e(k+N)|\le \boldsymbol\varepsilon_{\mathrm{term}},
\qquad
\boldsymbol\varepsilon_{\mathrm{term}}=
\begin{bmatrix}
0.5\\
0.5\\
1.0\\
0.5
\end{bmatrix}
\]
[2605.22443]. The terminal admissible region is therefore
\[
\mathcal X_f=\{\mathbf e\in\mathbb R^4: |\mathbf e|\le \boldsymbol\varepsilon_{\mathrm{term}}\}.
\]
This terminal set is described as a near-target admissible terminal region and a convergence regularizer, but the paper does not provide a theorem on recursive feasibility, asymptotic stability, invariant-set construction, or Lyapunov decrease [2605.22443]. The formulation is thus an empirically validated terminal-constrained MPC design rather than a formally developed stability theory.

Learning-based MPC introduces another endpoint interpretation. In collision avoidance with dynamic obstacles, the terminal constraint is a learned approximation of the Hamilton–Jacobi maximal safe set at time \(k+N\):
\[
\hat V_{k+N}(x_{k+N})\ge 0
\]
with
\[
\hat V_{k+N}(x)=F_{k+N}(x)-\hat R_{k+N}(x),
\qquad
\hat R_{k+N}(x)\ge 0
\]
[2508.03428]. Because \(\hat R_{k+N}\ge 0\), one has
\[
\hat V_{k+N}(x)\le F_{k+N}(x),
\]
so every state unsafe according to the signed distance function baseline remains unsafe under the learned terminal approximation [2508.03428]. The resulting terminal set is time-varying, environment-conditioned, and updated online from local obstacle predictions. This shifts terminal constraints away from fixed invariant geometry toward learned safe-set surrogates.

A further MPC-related variation is the generalized terminal constraint in data-driven economic MPC for unknown LTI systems. Instead of forcing the terminal prediction to a fixed optimal equilibrium, the method requires that the final \(n+1\) input-output samples form a constant equilibrium segment:
\[
\begin{bmatrix}
u_{[L-n,L]}(t)\\
y_{[L-n,L]}(t)
\end{bmatrix}
=
\begin{bmatrix}
u_{n+1}^e(t)\\
y_{n+1}^e(t)
\end{bmatrix}
\]
[2212.01099]. The equilibrium \((u^e(t),y^e(t))\) is an optimization variable. This enlarges the feasible region and avoids prior knowledge of the optimal equilibrium, while still supporting asymptotic average performance guarantees [2212.01099].

## 3. Hard, soft, and generalized terminal constraints

A recurring theme in the cited literature is the distinction between hard terminal constraints and soft terminal penalties. In deterministic VEM, the terminal equality
\[
g(x(t_f),t_f)=0
\]
is hard: all iterates must remain on the terminal-constraint manifold once feasibility is imposed [1801.01383]. In contrast, the heat-equation control paper replaces the exact terminal condition
\[
y(\cdot,T)=y_T
\]
by the penalized functional
\[
J_\alpha(u)=\frac12\|u\|_{L^2(Q)}^2+\frac{\alpha}{2}\|y(\cdot,T)-y_T\|_{L^2(0,1)}^2,
\]
and proves convergence of the penalized controls and terminal states to the exact constrained solution as \(\alpha\to\infty\) [2605.14060].

For the one-dimensional heat equation, the hard-constrained minimum-energy solution exists uniquely when the target is admissible, and the soft-constrained modal minimizers are explicit:
\[
u_{\alpha,n}^*(t)=\frac{\alpha d_n}{1+\alpha a_n}g_n(t),
\qquad
y_{\alpha,n}(T)-y_{T,n}=-\frac{d_n}{1+\alpha a_n}
\]
[2605.14060]. The convergence is quantitative:
\[
u_\alpha^*\to u^* \text{ in }L^2(Q),\qquad
y_\alpha(\cdot,T)\to y_T \text{ in }L^2(0,1),
\]
and the paper gives rates \(O(\alpha^{-\theta})\) and the sharp \(O(1/\alpha)\) rate under stronger spectral summability conditions [2605.14060]. This makes the soft-to-hard transition fully explicit rather than purely asymptotic.

The same hard-versus-soft distinction appears in stochastic linear-quadratic control with random terminal subspace constraints. There the hard constraint is
\[
X_T^u\in C=\ker(\xi)\qquad P\text{-a.s.},
\]
with \(C\) a prescribed random linear subspace [2601.03747]. It is approximated by penalized terminal costs
\[
\langle X_T^u,(\theta^n+n\xi)X_T^u\rangle,
\]
which vanish on \(C\) and grow like \(n\) in directions orthogonal to \(C\) [2601.03747]. The singular limit yields a Riccati BSDE with symbolic terminal condition
\[
Y_T=\infty\,\mathbf 1_{C^c}+\theta\,\mathbf 1_C,
\]
made rigorous via quadratic-form blow-up outside \(C\) and domination by \(\theta\) on \(C\) [2601.03747].

A related mean field control note uses a particle formulation where exact terminal measure matching is not imposed. Instead, the empirical terminal measure is matched to a target empirical measure through a Gaussian blob penalty
\[
\frac{1}{\epsilon}\left[ \frac{1}{N^2}\sum_{i,j}\phi_\delta(x_i(1)-x_j(1))
-\frac{2}{N^2}\sum_{i,j}\phi_\delta(x_i(1)-w_j) \right]
\]
[2402.10124]. The terminal condition is therefore a soft nonlocal approximation of a target-measure constraint rather than a hard equality of measures [2402.10124]. This suggests a broader interpretation of terminal constraints as endpoint distribution matching under regularization.

## 4. Stochastic terminal constraints, singular terminal conditions, and terminal constraints in law

In stochastic control, terminal constraints can be random, set-valued, or distributional. One scalar stochastic LQ problem imposes a partial terminal constraint through a random terminal penalty parameter \(\eta\):
\[
X_T^u=\Xi_T \quad \text{a.s. on }\{\eta=+\infty\}
\]
while on \(\{0\le \eta<\infty\}\) terminal deviation is penalized quadratically in the cost
\[
\eta\,1_{\{0\le \eta<\infty\}}(X_T^u-\Xi_T)^2
\]
[1611.06830]. The paper shows that the classical coupled Riccati/linear-BSDE method breaks down under such partial terminal constraints and replaces it by auxiliary problems indexed by supersolutions of a singular backward stochastic Riccati equation [1611.06830]. The strict terminal event \(\{\eta=+\infty\}\) makes the endpoint condition both random and singular.

The multidimensional stochastic LQ paper with random terminal subspace constraints treats a different hard stochastic endpoint condition:
\[
X_T^u\in C,\qquad P\text{-a.s.},
\]
where \(C(\omega)\) is a random linear subspace of \(\mathbb R^d\) [2601.03747]. Encoding \(C=\ker(\xi)\) for a bounded random \(\xi\in\mathbb S_+^d\) transforms the hard constraint into a singular Riccati BSDE problem. The minimal supersolution \(Y\) characterizes both the value function
\[
v(t,x)=\langle x,Y_t x\rangle
\]
and the optimal feedback
\[
u_t^*=\eta_t^{-1}(Y_t-\phi_t)X_t^*
\]
[2601.03747]. The blow-up of \(Y_t\) near \(T\) is not incidental; it is the analytic expression of the exact terminal restriction.

Terminal constraints can also be imposed on the law of the terminal state rather than on individual sample paths. A controlled diffusion
\[
dX_t=b(t,X_t,\alpha_t)\,dt+\sqrt{2}\,\sigma(t,X_t,\alpha_t)\,dB_t
\]
is subject to the hard terminal law constraint
\[
\Psi(\mathcal L(X_T))\le 0
\]
[2012.10707]. Using convex duality, the paper derives a coupled optimality system consisting of a forward Fokker–Planck equation and a backward HJB equation with terminal condition
\[
\phi(T,x)=\lambda \frac{\delta \Psi}{\delta m}(m(T),x)+\frac{\delta g}{\delta m}(m(T),x),
\]
together with complementarity
\[
\lambda\Psi(m(T))=0,\qquad \Psi(m(T))\le 0,\qquad \lambda\ge 0
\]
[2012.10707]. In this formulation, the terminal constraint acts through a scalar multiplier at the level of measures rather than trajectories.

Extended mean field games with common noise and strict terminal state constraint provide yet another stochastic endpoint regime. The admissible set is
\[
\mathcal A^0(0,T):=\{\alpha\in L^2_{\mathbb F}([0,T];\mathbb R): X_T=0\},
\]
so the terminal constraint is almost sure and exact [2506.07485]. The constrained problem is solved by penalization with
\[
\frac12 L(X_T^\alpha)^2
\]
followed by the limit \(L\to\infty\), yielding a new type of coupled conditional mean field FBSDE with a free backward part [2506.07485]. The limiting state satisfies
\[
X_T^\infty=0,
\]
and the singular behavior of the decoupling field near terminal time enforces exact liquidation [2506.07485].

## 5. Numerical computation and algorithmic structure under terminal constraints

Terminal constraints substantially shape algorithm design. In compact VEM for terminally constrained OCPs, the EPDE is semi-discretized in physical time, converting the infinite-dimensional evolution into a finite-dimensional IVP in variation time that can be integrated with standard ODE solvers [1801.01383]. The method requires an initial feasible trajectory-control pair satisfying the dynamics, initial condition, and terminal constraint, which the paper explicitly notes as a limitation [1801.01383].

The MEPDE removes that limitation by introducing error dynamics for the dynamics defect, the initial state defect, and the terminal constraint residuals [1801.10486]. This suggests a two-layer numerical interpretation: feasibility restoration and optimality descent proceed simultaneously in \(\tau\). The terminal inequality case additionally motivates a numerical soft barrier
\[
\frac{\delta (g_I)_i}{\delta\tau}+k_{g_I}(g_I)_i=0
\]
to damp the numerical error caused by sudden activation of terminal inequalities [1801.07395]. The paper emphasizes that this is a stabilizing correction rather than a logarithmic interior-point barrier [1801.07395].

For exact terminal state constraints in unknown discrete-time LQ control, the Q-learning formulation incorporates the terminal equality by introducing a Lagrange multiplier \(\lambda\) and learning a Q-function quadratic in the augmented variable \((x,u,\lambda)\) [2307.09719]. The optimal controller has the affine form
\[
u(k)=K(k)x(k)+K_1(k)\lambda^*,
\]
where \(\lambda^*\) solves
\[
\Phi(0,N)x-G(0)\lambda^*=\xi
\]
[2307.09719]. Here the terminal equality is enforced exactly, not approximately, and the extra feedforward term \(K_1(k)\lambda^*\) is the direct algebraic imprint of the endpoint condition [2307.09719].

Terminal constraints also alter solver structure in linear MPC. For a terminal ellipsoidal constraint
\[
(x_N-c)^\top P(x_N-c)\le r^2,
\]
a sparse ADMM solver imposes the consensus condition
\[
P^{1/2}(z_f-v_f)=0
\]
instead of \(z_f-v_f=0\), so that the terminal subproblem becomes a weighted projection onto the ellipsoid [2105.08419]. The projection has the explicit form
\[
v^*=
\begin{cases}
a, & \text{if } a\in E(P,c,r),\\[0.5em]
\dfrac{r(a-c)}{\sqrt{(a-c)^\top P(a-c)}}+c, & \text{otherwise,}
\end{cases}
\]
as derived in the paper’s appendix [2105.08419]. This is a solver-level example of how terminal constraint geometry can dictate the algebraic structure of the numerical method.

## 6. Interpretation, roles, and recurring distinctions

Several distinctions recur across the literature.

**Hard versus soft terminal conditions:** Hard constraints appear as \(g(x(t_f),t_f)=0\), \(X_T=0\), \(X_T\in C\), or \(\Psi(\mathcal L(X_T))\le 0\). Soft terminal conditions appear as quadratic penalties such as \(L(X_T)^2\) or \(\alpha\|y(\cdot,T)-y_T\|^2\) [2605.14060]. The cited papers repeatedly use soft penalties as approximations to hard constraints, but only some provide quantitative or structural convergence results [2605.14060].

**Equality versus inequality terminal constraints:** Equality constraints define exact terminal manifolds. Inequality constraints require activity analysis, KKT multipliers, and often active-set logic [1801.07395]. The deterministic VEM papers show that active terminal inequalities behave like equality constraints at first order, whereas inactive inequalities should re-enter the feasible domain and remain nonbinding [1801.07395].

**Pathwise versus law constraints:** Pathwise conditions restrict almost every realization, as in \(X_T=0\) or \(X_T\in C\). Law constraints only restrict \(\mathcal L(X_T)\), as in \(\Psi(\mathcal L(X_T))\le 0\), and therefore induce adjoint terminal conditions at the level of measure derivatives [2012.10707]. This suggests a separation between endpoint feasibility of trajectories and endpoint feasibility of distributions.

**Terminal sets versus terminal equalities in MPC:** Some MPC formulations use a terminal invariant set, admissible region, or safe set, such as \(\mathcal C=\{h\ge 0\}\), rather than a pointwise equality [2605.05575]. Others enforce a tolerance box in error space or a learned safe set approximation [2605.22443]. A plausible implication is that, in constrained receding-horizon control, terminal constraints often function more as recoverability certificates than as precise target equations.

**Feasibility restoration versus feasibility preservation:** Feasible-domain VEM preserves terminal feasibility once attained [1801.01383]. MEPDE restores it from infeasible initial guesses [1801.10486]. Terminal constraint handling thus depends strongly on whether the algorithm assumes feasible initialization.

**Terminal constraints as structural sources of singularity:** In stochastic LQ control, exact terminal subspace constraints, strict liquidation conditions, and partial infinite penalties all generate singular terminal behavior in Riccati equations, BSDEs, or decoupling fields [2601.03747]. This suggests that singular terminal conditions are not technical artifacts but analytic encodings of hard endpoint restrictions.

Terminal constraints therefore constitute a unifying endpoint mechanism across multiple control theories, but not a single mathematical object. Depending on the setting, they may be terminal equalities, terminal inequalities, admissible terminal regions, invariant recovery sets, law constraints, random-subspace constraints, or penalized surrogates. The cited literature consistently treats them as decisive structural elements rather than optional boundary decorations: they determine optimality systems, feasibility logic, reachable sets, solver architecture, and, in stochastic settings, the singular terminal behavior of the adjoint equations.

Source: https://www.emergentmind.com/topics/terminal-assess-constraint