Algorithm Search⌘K

Techniqueresearch

Economic MPC

Also called economic model predictive control.

MPC whose cost is a general economic objective, not a distance to a setpoint, with stability shown by dissipativity.

Economic MPC is model predictive control whose stage cost ℓ(x,u)\ell(x, u) is a direct economic measure, such as energy use, raw material cost or lost product, and not a weighted distance to a setpoint. Standard MPC first computes the best steady state and then tracks it with a positive definite cost. Economic MPC optimizes the economic cost along the whole transient, which can earn more on the way. The price is that the usual stability proof breaks: the economic cost is not zero at the steady state and not positive elsewhere, so the optimal value is not a Lyapunov function. The fix is strict dissipativity. If a storage function exists, the cost rotated by it is positive definite, the rotated problem has the same solutions, and the rotated optimal value is a Lyapunov function. Without dissipativity, economic MPC still keeps the average cost no worse than the best steady state, but the closed loop may never settle.

In plain words

Ordinary predictive control is told where to go and is paid for staying close. Economic predictive control is told what costs money and is left to find the best way to run. Often the best long-run choice is still to settle at one operating point, and then the controller finds it on its own and saves money on the way there. But it does not always settle. Sometimes cycling between two points is cheaper than any single point, and then the controller cycles. To prove that it settles, one shows that the cost, after adding a fixed correction that depends on the state, rewards closeness to the best point. That correction does not change which plan is best, so the controller behaves like an ordinary one with a hidden target.

When it applies

  • A plant x+=f(x,u)x^+ = f(x, u) with constraints (x,u)∈Z(x, u) \in \mathbb{Z}, and a stage cost ℓ(x,u)\ell(x, u) that measures money, energy or another real quantity.
  • The best steady state (xs,us)(x_s, u_s), the solution of min⁡ℓ(x,u)\min \ell(x, u) subject to x=f(x,u)x = f(x, u) and (x,u)∈Z(x, u) \in \mathbb{Z}, exists, with value ℓs=ℓ(xs,us)\ell_s = \ell(x_s, u_s).
  • For stability at xsx_s: the system is strictly dissipative with respect to the supply rate ℓ(x,u)−ℓs\ell(x, u) - \ell_s. That is, there is a storage function λ\lambda and a positive definite function ρ\rho with
λ(f(x,u))−λ(x)≤ℓ(x,u)−ℓs−ρ(∣x−xs∣)for all (x,u)∈Z.\lambda(f(x, u)) - \lambda(x) \le \ell(x, u) - \ell_s - \rho(|x - x_s|) \quad \text{for all } (x, u) \in \mathbb{Z}.
  • For the average cost bound alone, no dissipativity is needed.

For a linear plant with a strictly convex cost, a linear storage λ(x)=λTx\lambda(x) = \lambda^T x from the multiplier of the steady state problem works when that problem has strong duality, as shown by Diehl, Amrit and Rawlings (2011).

The template

  1. Steady state. Solve the steady state problem for (xs,us)(x_s, u_s) and ℓs\ell_s, and keep its multiplier λ\lambda of the constraint x=f(x,u)x = f(x, u).
  2. Problem. At the measured xx, solve
VN(x)=min⁡u0,…,uN−1∑k=0N−1ℓ(xk,uk)s.t.x0=x, xk+1=f(xk,uk), (xk,uk)∈Z, xN=xs.V_N(x) = \min_{u_0, \dots, u_{N-1}} \sum_{k=0}^{N-1} \ell(x_k, u_k) \quad \text{s.t.} \quad x_0 = x, \ x_{k+1} = f(x_k, u_k), \ (x_k, u_k) \in \mathbb{Z}, \ x_N = x_s.

A terminal region with a terminal cost VfV_f and a local controller κf\kappa_f can replace xN=xsx_N = x_s, with the condition Vf(f(x,κf(x)))≤Vf(x)−ℓ(x,κf(x))+ℓsV_f(f(x, \kappa_f(x))) \le V_f(x) - \ell(x, \kappa_f(x)) + \ell_s. 3. Apply and repeat. Apply u0u_0 and solve again at the next sample. 4. Check dissipativity to know whether the loop settles at xsx_s. Form the rotated cost

L(x,u)=ℓ(x,u)−ℓs+λ(x)−λ(f(x,u)),L(x, u) = \ell(x, u) - \ell_s + \lambda(x) - \lambda(f(x, u)),

and check that L(x,u)≥ρ(∣x−xs∣)L(x, u) \ge \rho(|x - x_s|).

Why it works.

Average cost. Let u∗u^* solve the problem at xx. The shifted sequence with usu_s appended is feasible at x+=f(x,u0∗)x^+ = f(x, u^*_0), because xN∗=xsx^*_N = x_s and usu_s keeps it there. Its cost is VN(x)−ℓ(x,u0∗)+ℓsV_N(x) - \ell(x, u^*_0) + \ell_s. So

VN(x+)≤VN(x)−ℓ(x,u0)+ℓs.V_N(x^+) \le V_N(x) - \ell(x, u_0) + \ell_s.

Summing over TT samples gives ∑t<T(ℓ(xt,ut)−ℓs)≤VN(x0)−VN(xT)\sum_{t<T} (\ell(x_t, u_t) - \ell_s) \le V_N(x_0) - V_N(x_T). If VNV_N is bounded below on the feasible set, for example because Z\mathbb{Z} is compact, the average cost of the closed loop is at most ℓs\ell_s in the limit. This holds with or without dissipativity (Angeli, Amrit and Rawlings 2012).

Stability. Sum the rotated cost along any feasible sequence. The storage terms telescope:

∑k=0N−1L(xk,uk)=∑k=0N−1ℓ(xk,uk)−Nℓs+λ(x0)−λ(xN).\sum_{k=0}^{N-1} L(x_k, u_k) = \sum_{k=0}^{N-1} \ell(x_k, u_k) - N \ell_s + \lambda(x_0) - \lambda(x_N).

With xN=xsx_N = x_s fixed, the right side is the economic cost plus a term that depends only on x0x_0. So the rotated problem and the economic problem have the same minimizers, and the controller is the same. The rotated stage cost is positive definite around xsx_s, and the rotated problem is a standard MPC problem with a terminal equality constraint. By the MPC stability theorem, its optimal value V~N(x)=VN(x)−Nℓs+λ(x)−λ(xs)\tilde V_N(x) = V_N(x) - N \ell_s + \lambda(x) - \lambda(x_s) is a Lyapunov function, and xsx_s is asymptotically stable for the closed loop.

What is not proved here. For nonlinear plants, finding a storage function is in general hard, and there is no general recipe. Without a terminal constraint, stability needs a turnpike property and holds only near xsx_s for long horizons. Strict dissipativity is close to necessary: Müller, Angeli and Allgöwer showed that it is needed for optimal steady state operation under a controllability condition. These results are cited and not proved here.

Classic examples

A dissipative scalar plant. Take x+=0.5x+ux^+ = 0.5 x + u and ℓ(x,u)=x2+(u−1)2\ell(x, u) = x^2 + (u - 1)^2. The cost wants x=0x = 0 and u=1u = 1, which is not a steady state. Steady states satisfy u=0.5xu = 0.5 x, and min⁡x2+(0.5x−1)2\min x^2 + (0.5 x - 1)^2 gives xs=0.4x_s = 0.4, us=0.2u_s = 0.2 and ℓs=0.8\ell_s = 0.8. The multiplier is λ=−1.6\lambda = -1.6, and with λ(x)=−1.6x\lambda(x) = -1.6 x,

L(x,u)=x2+(u−1)2−0.8−1.6x+1.6(0.5x+u)=(x−0.4)2+(u−0.2)2.L(x, u) = x^2 + (u - 1)^2 - 0.8 - 1.6 x + 1.6 (0.5 x + u) = (x - 0.4)^2 + (u - 0.2)^2.

So the plant is strictly dissipative, and economic MPC with xN=xsx_N = x_s is exactly tracking MPC with the cost (x−0.4)2+(u−0.2)2(x - 0.4)^2 + (u - 0.2)^2. With N=3N = 3 from x0=2x_0 = 2, the first plan is u=(−87/385, 37/385, 61/385)u = (-87/385, \ 37/385, \ 61/385), and the closed loop goes through x=2,0.7740,0.4874,0.4204,0.4048,0.4011x = 2, 0.7740, 0.4874, 0.4204, 0.4048, 0.4011 toward 0.40.4. With N=5N = 5 the states differ from these by less than 0.0020.002. The economic and the rotated problem give exactly the same inputs at every sample.

A plant that prefers to cycle. Take x+=ux^+ = u, ℓ(x,u)=xu\ell(x, u) = x u and ∣u∣≤1|u| \le 1. Steady states have u=xu = x and cost x2x^2, so the best steady state is xs=0x_s = 0 with ℓs=0\ell_s = 0. But the cycle 1,−1,1,…1, -1, 1, \dots with u=−xu = -x costs −1-1 at every step. With xN=0x_N = 0 and N=4N = 4, the plan from x0=1x_0 = 1 is u=(−1,1,−1,0)u = (-1, 1, -1, 0), with cost −3-3. The closed loop applies only −1-1 and plans again, so it alternates between 11 and −1-1 for ever with average cost −1<ℓs-1 < \ell_s. Even from x0=0x_0 = 0 the first input is ±1\pm 1, with plan cost −2-2: the controller leaves the best steady state. The terminal constraint is met by every plan but never reached, and the average bound holds, but xsx_s is not stable. No storage function exists, since along the cycle the dissipation inequality would sum to 0≤−20 \le -2.

Process control. In chemical plants, the economic cost is the price of feed and energy minus the value of product. Economic MPC can exploit cheap periods of energy or move the plant to a better operating point faster than a two-layer scheme of steady state optimization and tracking control.

Variations

  • Terminal region and cost. Replace xN=xsx_N = x_s by a terminal set and cost, which enlarges the feasible set.
  • No terminal ingredients. Use a long horizon and rely on the turnpike property, under which optimal open loop trajectories stay near xsx_s for most of the horizon.
  • Periodic operation. If a periodic orbit is optimal, replace the steady state by that orbit, with a periodic terminal constraint and dissipativity with respect to the orbit.
  • Average constraints. Constrain the average of some quantity over time, such as emissions, instead of each value.
  • Regularized economic MPC. Add a small tracking term to the economic cost so that the rotated cost becomes positive definite, at a small loss of economic performance.
  • Uncertainty. Combine with stochastic MPC for expected economic costs.

Pitfalls

  • Assuming that it settles. Without strict dissipativity the loop can cycle or wander, as in the second example. Check the storage function before relying on convergence.
  • A wrong steady state. The terminal constraint uses xsx_s. If it is not the best steady state, the average bound refers to the wrong value.
  • Nonconvex costs. Economic costs are often linear or nonconvex in the inputs, which can make the problem harder and the inputs jump between bounds.
  • Short horizons without terminal constraints. With a short horizon, the controller can greedily use up resources at the end of the horizon, and the closed loop can be worse than steady operation.
  • Model error. Economic optimization pushes the plant toward its constraints, where model errors matter most. Add back off from the constraints.

Exercises

  1. Find the best steady state of x+=0.5x+ux^+ = 0.5 x + u with ℓ=x2+(u−1)2\ell = x^2 + (u - 1)^2. (Answer: u=0.5xu = 0.5 x, and ddx(x2+(0.5x−1)2)=2.5x−1=0\frac{d}{dx}(x^2 + (0.5 x - 1)^2) = 2.5 x - 1 = 0 gives xs=0.4x_s = 0.4, us=0.2u_s = 0.2 and ℓs=0.8\ell_s = 0.8.)
  2. In exercise 1, verify that λ(x)=−1.6x\lambda(x) = -1.6 x makes the rotated cost (x−0.4)2+(u−0.2)2(x - 0.4)^2 + (u - 0.2)^2. (Answer: ℓ−0.8−1.6x+0.8x+1.6u=x2−0.8x+u2−0.4u+0.2\ell - 0.8 - 1.6 x + 0.8 x + 1.6 u = x^2 - 0.8 x + u^2 - 0.4 u + 0.2, which is the given square sum.)
  3. Show that the plant x+=ux^+ = u with ℓ=xu\ell = x u and ∣u∣≤1|u| \le 1 is not dissipative with respect to ℓ−ℓs\ell - \ell_s at xs=0x_s = 0. (Answer: the inequality for (x,u)=(1,−1)(x, u) = (1, -1) and (−1,1)(-1, 1) gives λ(−1)−λ(1)≤−1\lambda(-1) - \lambda(1) \le -1 and λ(1)−λ(−1)≤−1\lambda(1) - \lambda(-1) \le -1, whose sum is 0≤−20 \le -2.)
  4. Show that with xN=xsx_N = x_s, the economic and the rotated problems have the same minimizers. (Answer: the sums differ by Nℓs−λ(x0)+λ(xs)N \ell_s - \lambda(x_0) + \lambda(x_s), which does not depend on the inputs.)
  5. Derive the average cost bound from VN(x+)≤VN(x)−ℓ(x,u)+ℓsV_N(x^+) \le V_N(x) - \ell(x, u) + \ell_s. (Answer: sum over TT samples, divide by TT, and use that VNV_N is bounded on the feasible set, so (VN(x0)−VN(xT))/T→0(V_N(x_0) - V_N(x_T))/T \to 0.)

References

  1. Moritz Diehl, Rishi Amrit and James B. Rawlings, A Lyapunov function for economic optimizing model predictive control, IEEE Transactions on Automatic Control 56, 703-707, 2011, the rotated cost and the Lyapunov function for economic MPC with a terminal equality constraint under strong duality of the steady state problem
  2. David Angeli, Rishi Amrit and James B. Rawlings, On average performance and stability of economic model predictive control, IEEE Transactions on Automatic Control 57(7), 1615-1626, 2012, the bound on the closed loop average cost, and asymptotic stability under strict dissipativity
  3. James B. Rawlings, David Q. Mayne and Moritz M. Diehl, Model Predictive Control, Theory, Computation, and Design, 2nd edition, Nob Hill Publishing, 2017, the section on economic MPC, with dissipativity and the rotated cost

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples