Techniqueresearch
Stochastic MPC
Also called chance-constrained MPC.
MPC with random disturbances that minimizes an expected cost and asks that each constraint hold with a given probability.
Stochastic MPC is model predictive control for a plant with random disturbances whose distribution is known, at least in part. It minimizes the expected cost, and it replaces each hard constraint by a chance constraint: the constraint must hold with a probability of at least . Robust MPC, such as tube MPC or min-max MPC, protects against the worst disturbance, which is rare and often far from typical. Stochastic MPC accepts a small, chosen rate of violations and in return uses the constraint range much better. For a linear plant with Gaussian noise and a fixed feedback, the expected cost is the nominal cost plus a constant, and each chance constraint becomes a deterministic constraint on the nominal state, tightened by a multiple of the standard deviation of the error. For other distributions, the tightening comes from a distribution-free inequality or from sampled scenarios.
In plain words
When the disturbance is random, the worst case can be very unlikely but very large. Planning for it wastes most of the room you have. Stochastic predictive control plans for the usual case and allows a limit to be crossed only rarely, for example in one case out of twenty. It works out how far the real state can drift from the plan, as a spread of possible values, and keeps the plan away from each limit by a few times that spread. The spread is smaller than the worst case, so the plan can come closer to the limits. When little is known about the disturbance, a cruder rule or a set of sampled disturbances replaces the exact spread. The cost is an average over the random disturbances, not the cost of one bad case.
When it applies
- A plant with independent disturbances of zero mean and covariance , with a known distribution or at least a known covariance.
- Constraints whose rare violation is acceptable, such as a quality limit, a comfort band or an energy limit. Safety limits that must never be crossed need robust methods.
- A cost on the average behavior, .
- For the analytic tightening below, a feedback with Schur, and either Gaussian noise or a distribution-free bound.
The template
- Split the state. Write for planned inputs and split into a nominal part with and an error with .
- Propagate the covariance. and . This is computed once, offline. As grows, increases to the solution of the Lyapunov equation .
- Tighten the constraints. Replace the chance constraint by
with for Gaussian noise, where is the standard normal distribution function, or for any distribution with the given covariance. 4. Write the expected cost. It equals the nominal cost of plus terms that do not depend on . 5. Solve and apply. Solve the resulting QP for , apply , and repeat at the next sample.
Why it works. The error does not depend on the planned inputs, it has zero mean, and its covariance is by induction: , since is independent of .
Cost. . The input gives in the same way .
Gaussian constraints. If the are Gaussian, so is , with mean 0 and variance . Then , which is at least exactly when .
Any distribution. The one-sided Chebyshev inequality, also called Cantelli's inequality, gives for every . With the bound is , so the tightened constraint again implies the chance constraint.
What is not proved here. The chance constraints hold for the prediction made at each sample, given the state measured then. The fraction of violations along the closed loop is a different quantity and needs a separate argument. With noise of unbounded support, such as Gaussian noise, no plan can stay feasible for every disturbance, so recursive feasibility does not follow from the shifted plan. Common remedies are to choose between the measured state and the last predicted nominal state, to impose the first step robustly for a bounded noise, or to soften the constraints. Stability holds in a mean-square or average sense, not for every path. Joint chance constraints over several rows or steps need either a split of by Boole's inequality or a harder, nonconvex formulation.
Classic examples
Scalar tightening. Take with Gaussian of standard deviation , the feedback so that , and the chance constraint . Then , and :
| step | Gaussian tightening | Cantelli tightening | |
|---|---|---|---|
| 1 | 0.01 | 0.1645 | 0.4359 |
| 2 | 0.0125 | 0.1839 | 0.4873 |
| 3 | 0.013125 | 0.1884 | 0.4994 |
| 0.013333 | 0.1899 | 0.5033 |
So in steady state the planned state may go up to with Gaussian noise, and up to when only the variance is known. For comparison, if the noise were bounded by , three standard deviations, the robust tube of tube MPC would need a margin of .
The scenario approach. Instead of an analytic tightening, draw disturbance sequences and require the constraints for all of them. For a convex problem with decision variables, Campi and Garatti (2008) showed that the probability, over the draw of the samples, that the solution violates the constraint with a probability above is at most when
For and , the smallest numbers of scenarios are:
| 1 | 2 | 5 | 10 | 20 | |
|---|---|---|---|---|---|
| 270 | 326 | 459 | 643 | 962 |
For the condition is . The count grows roughly linearly in and in , and only with the logarithm of . The method needs no knowledge of the distribution beyond the ability to sample it, but the online problem grows with .
Variations
- Affine disturbance feedback. Optimize instead of fixing . The problem stays convex and is less conservative.
- Joint chance constraints. Ask that all constraints hold together with probability . Split among the rows by Boole's inequality, or use scenarios.
- Bounded noise. With bounded support, combine robust constraints for the first step with chance constraints later, which gives recursive feasibility.
- Nonlinear plants. Propagate means and covariances by linearization or by the unscented transform, or use polynomial chaos expansions.
- Expected value of other costs. Use economic costs, or risk measures such as the conditional value at risk instead of the mean.
- Output feedback. Use a Kalman filter estimate, and add the estimation error covariance to .
Pitfalls
- Wrong distribution. The Gaussian tightening is exact only for Gaussian noise. With heavier tails, the violation rate can be higher than , more often for small . Use the Cantelli factor when unsure.
- Unbounded noise and hard constraints. With Gaussian noise, any hard state constraint will be violated eventually, and a hard constraint in the QP can make it infeasible. Use soft constraints or a feasible fallback.
- Confusing the two probabilities. The chance constraint is about the next prediction, not about the closed loop over time.
- Many joint constraints. Splitting over many rows and steps makes each tightening large. Check how conservative the split is.
- Too few scenarios. The scenario bound depends on the number of decision variables. For long horizons with many inputs, the number of samples and the online cost grow fast.
Exercises
- For with , find the stationary variance. (Answer: gives , with standard deviation .)
- Find the Gaussian tightening at step 1 in the scalar example. (Answer: , so .)
- Show that the expected cost of with is . (Answer: the cross term has expectation , and .)
- Find the number of scenarios for , and . (Answer: gives , so .)
- Two rows must hold jointly with probability . Give a tightening factor for Gaussian noise. (Answer: by Boole's inequality, give each row , so for each row.)
References
- Ali Mesbah, Stochastic model predictive control, an overview and perspectives for future research, IEEE Control Systems Magazine 36(6), 30-44, 2016, the overview of expected costs, chance constraints, analytic tightening, scenario methods and the open questions
- James B. Rawlings, David Q. Mayne and Moritz M. Diehl, Model Predictive Control, Theory, Computation, and Design, 2nd edition, Nob Hill Publishing, 2017, the chapter on robust and stochastic MPC
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.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag YWC263 Edit this page History Report an error Markdown