---
title: Monotone Cost Shaping in Optimal Control
url: https://www.emergentmind.com/topics/monotone-cost-shaping-mcs
type: topic
---

# Monotone Cost Shaping in Optimal Control

Monotone Cost Shaping (MCS) refers to a family of methods for modifying the stage cost in optimal control and Model Predictive Control (MPC) by embedding a monotonic, typically time-varying, weight profile or cost-shaping term within the objective. The core principle is to induce or exploit properties such as closed-loop stability, monotonic improvement, or task-driven behavioral bias without relying on explicit terminal constraints or structural modifications to the system dynamics. MCS has been developed and analyzed for nonlinear finite-horizon MPC, infinite-horizon LQR, nonlinear control-affine systems, and application-specific domains such as energy-optimal autonomous underwater vehicle (AUV) navigation in dynamic environments.

## 1. Foundational Principles of Monotone Cost Shaping

Monotone Cost Shaping modifies the finite-horizon or infinite-horizon optimal control criterion by introducing a monotonically increasing or nonnegative shaping term to the stage-wise cost. In the canonical nonlinear MPC setting, the approach is to replace explicit terminal-state constraints and terminal costs with a time-varying polynomial weight profile on the stage cost. For a controlled system with state $x_k \in \mathbb{R}^n$ and input $u_k \in \mathbb{R}^{n_u}$ evolving as $x_{k+1} = f(x_k,u_k)$, and a positive-definite stage cost $\ell(x)$, the MCS-MPC cost is
$$
J_m(u|x_k) = \sum_{i=1}^N w_i\,\ell(x^i_u(x_k)),\qquad w_i = (i/N)^m,\,\quad i=1,\ldots,N
$$
where $m\in\mathbb{N}$ controls the growth rate of the weighting profile from $w_1$ to $w_N=1$. By making $w_i$ sharply increasing near the horizon, the tail of the trajectory is penalized heavily, providing a Lyapunov-like decrease in the cost and asymptotic stability without a terminal constraint [1703.02761].

In the linear quadratic regulator (LQR) context, Monotone Cost Shaping adds a parameterized, positive semi-definite quadratic form to the stage cost:
$$
J_\alpha = J_0 + \alpha\,\sum_{t=0}^{\infty} \gamma^t\,\phi(x_t, u_t),\qquad \phi(x,u) = \frac{1}{2} \begin{pmatrix}x\\u\end{pmatrix}^T H \begin{pmatrix}x\\u\end{pmatrix}
$$
where $H \succeq 0$ and $\alpha\geq 0$. The shaped solution has optimal gains and value determined by modified Riccati and feedback expressions, guaranteeing monotonic improvement in the closed-loop cost under spectral and definiteness conditions [2510.10202].

## 2. Stability and Performance Guarantees

The most fundamental property induced by MCS in nonlinear predictive control is asymptotic stability of the system origin on a predesignated compact set $\mathbb{X}_N$. Provided the stage cost $\ell$ is continuous and positive-definite, and the zero state is $N$-step reachable, MCS allows the closed loop
$$
x_{k+1} = f\left(x_k,\,u^*_0(x_k, m)\right)
$$
to be stabilized by sufficiently large $m$. The optimal cost $V(x) = J_m^*(x)$ serves as a Lyapunov function satisfying
$$
V(f(x, u^*_0)) - V(x) \leq -\frac{1}{N^m}\ell(x_1) - \frac{\gamma}{2}\ell(x_N^*(x))
$$
yielding $V(x_{k+1}) \leq V(x_k) - \alpha(\|x_k\|)$ for some positive definite $\alpha$ [1703.02761].

For infinite-horizon LQR with shaping, provided $H \succeq 0$, $Q \succeq 0$, $R \succ 0$, and the shaped Riccati equation is solvable, the closed-form feedback gain $K(\alpha)$ is monotone nondecreasing in $\alpha$ in the Loewner (semidefinite) order, and the resulting system is globally asymptotically stable. In nonlinear control-affine systems, cost shaping with an auxiliary term $v(x,\theta)$ and associated PDE for the value perturbation $h(x,\theta)$ guarantees global and input-to-state stability for the closed loop if the original controller is stable [2510.10202].

## 3. Weight Profile Design and Tuning Criteria

In finite-horizon MPC, the weight profile $w_i = (i/N)^m$ must satisfy strict monotonicity and growth conditions:
- Monotonicity: $w_{i+1} \geq w_i$ for $i = 1,\ldots,N-1$.
- Exponential growth: The ratio $w_{i+1} / w_i = ((i+1)/i)^m$ becomes large as $m$ increases.
- Growth factor: With $c = (N-1)/N$, set $\psi(m) = 1 - c^m$; as $m \to \infty$, $\psi(m) \to 1$.

Explicit lower bounds on $m$ guarantee that the state reaches the domain of the local control Lyapunov property, ensuring that the overall scheme is stabilizing:
$$
m \geq \max\left\{ \frac{\ln(\bar\rho/\eta)}{\ln c},\,\frac{\ln(\gamma/2)}{\ln c} \right\}
$$
where $\eta$ is the supremum over intermediate stage costs and $\bar\rho$, $\gamma$ come from the local Lyapunov decrease assumption.

Practical tuning thus proceeds by:
- Selecting the smallest $N$ with $N$-step reachability,
- Choosing $\ell(x)$ and local $q(x)\geq\gamma\ell(x)$,
- Estimating $\eta$,
- Computing $m$ as above,
- Implementing the cost profile [1703.02761].

## 4. Application of MCS in Nonlinear and Linear-Quadratic Settings

The scope of Monotone Cost Shaping includes:
- **Nonlinear finite-horizon MPC**: MCS replaces terminal constraints/costs by polynomial weights; proven stability under standard regularity and reachability assumptions [1703.02761].
- **Infinite-horizon LQR**: Additional positive semidefinite terms shape the optimal feedback law. The explicit formula for the shaped gain is
  $$
  K(\alpha) = [R(\alpha) + \gamma B^T P(\alpha) B]^{-1} [\gamma B^T P(\alpha)A + M(\alpha)^T]
  $$
  where $Q(\alpha),\,R(\alpha),\,M(\alpha)$ are augmented by the shaping term [2510.10202].
- **Nonlinear control-affine systems**: By enforcing the value perturbation PDE for the shaping term, the optimal feedback law shifts by $-\frac{1}{2}R^{-1}g^T\nabla h(x,\theta)$ and preserves stability and, under mild scaling, input-to-state stability.
- **Closed-loop performance index shaping**: A general framework for analytical linking and systematic shaping of the performance index, including an efficient gradient-based tuning algorithm for trajectory-level objectives, with monotone improvement guaranteed at each step [2510.10202].

## 5. MCS in Domain-Specific Predictive Control: Ocean Current-Aware MPC

In domain-adapted predictive control, MCS enables exploitation of task-relevant environment features. For energy-optimal AUV navigation in time-varying ocean currents, MCS is integrated into a stage-gated MPC objective where a real-time "helpfulness" scalar $s_k$ (measuring alignment and strength of current with the goal direction) gates relaxation and energy rebate terms:
$$
\Delta\ell_k^{\text{MCS}} = -s_k\left[\lambda_{\text{relax}} \|e_{\parallel,k}\|_{Q_{\text{pos}}}^2 + w_{\text{reb}} \phi(u_{k,\mathrm{lin}})\right]
$$
with $0 \leq s_k, \lambda_{\text{relax}} \leq 1$, and $\phi(u_{k,\mathrm{lin}})$ a bounded rebate function. This construction decreases the objective whenever $s_k>0$, ensuring that MCS is non-worsening,
$$
J_{\text{base}} + \sum_k \Delta\ell_k^{\text{MCS}} \leq J_{\text{base}}
$$
and provides explicit bounds on energy rebate per stage. The entire cost is $C^1$, tunable, and compatible with standard NLP-based MPC frameworks. Additional terms, such as Speed-to-Fly (STF) shaping, can be composed with MCS [2602.00823].

## 6. Theoretical Context and Analytical Properties

MCS methods preserve or enhance optimal control properties without the complexity of terminal constraint design. In LQR and affine-nonlinear settings, the induced feedback law's monotonicity with respect to shaping parameterization is analytically verifiable through explicit Riccati and Lyapunov analyses:
- All gain and value mappings are monotone in the shaping parameter under definiteness conditions.
- In the nonlinear case, the closed-loop system remains globally asymptotically stable and ISS, as proven via construction of an ISS-Lyapunov function and PDE-constrained value perturbation [2510.10202].
- For gradient-based tuning, each update step is guaranteed to monotonically improve the selected trajectory-level performance metric.

## 7. Summary Table: MCS Formulations

| Context                          | Stage/Objective                  | Shaping Mechanism                                          |
|-----------------------------------|----------------------------------|-----------------------------------------------------------|
| Nonlinear MPC [1703.02761]        | $J_m(u|x)=\sum_{i=1}^N w_i \ell(x^i)$ | Polynomial increasing weight, $w_i = (i/N)^m$              |
| Infinite-Horizon LQR [2510.10202] | $J_\alpha = J_0 + \alpha \!\!\sum \gamma^t \phi(x_t,u_t)$ | Parametric quadratic, $\phi$ with $H \succeq 0$            |
| Nonlinear affine [2510.10202]     | $V_0 + \int v(x,\theta)dt$         | Gradient-based shaping via Lyapunov PDE                    |
| Ocean-aware MPC [2602.00823]      | Baseline $+$ help-gated rebates       | Stagewise gate $s_k$, relaxation, energy rebate            |

Each MCS variant maintains or improves closed-loop performance under established stability, monotonicity, and robustness criteria, with explicit tuning rules, non-worsening properties, and smooth parameterizations suitable for first-principles analysis and domain-specific design.

Source: https://www.emergentmind.com/topics/monotone-cost-shaping-mcs