ModelPredictiveControl v2.5.0
I will release ModelPredictiveControl.jl v2.5.0 soon! ![]()
![]()
![]()
There has been a lot of work under the hood. The underlying QP and NLP problems should be more numerically robust now. All the box constraints are no longer treated as linear inequality constraints (as it was the case before, to simplify the internal logic). They are now defined as proper box constraints, which is, for the MPC:
- the slack variable \epsilon \ge 0
- the input increment bounds \mathbf{\Delta u_{min/max}}
- the terminal constraint \mathbf{\hat{x}}_i(k + H_p), for transcription other than single shooting
and, for the MHE:
- the slack variable \varepsilon \ge 0
- the estimated process noise bounds \mathbf{\hat{w}_{min/max}}
- the arrival estimate \mathbf{\hat{x}}_k(k + N_k + p)
as they should be, to leverage the selected inequality-handling method of the NLP solver, or, to exploit QP solvers that natively support them. Also, the dimensions of the optimization problem is now pretty-printed:
LinMPC controller with a sample time Ts = 4.0 s:
├ estimator: SteadyKalmanFilter
├ model: LinModel
├ optimizer: OSQP
├ transcription: MultipleShooting
└ dimensions:
│ ├ 10 prediction steps Hp
│ ├ 5 control steps Hc
│ ├ 2 manipulated inputs u (0 integrating states)
│ ├ 6 estimated states x̂
│ ├ 2 measured outputs ym (2 integrating states)
│ ├ 0 unmeasured outputs yu
│ └ 1 measured disturbances d
└ optimization: # <--- new section
├ 71 decision variables Z̃ (1 slack variable, 21 bounds)
├ 40 linear inequality constraints A (0 custom)
└ 60 linear equality constraints Aeq
Thanks @cvanaret for the help! Here is the change log:
- added: support box constraint in
LinMPCandNonLinMPC - added: support box constraints in
MovingHorizonEstimator - added: pretty-print optimization problem dimensions for MPC and MHE
- added:
covestimkeyword argument in bothMovingHorizonEstimatorconstructors - debug:
setconstraint!for MHE and softness parameter arguments now works - debug: honor the
P̂_0argument atMovingHorizonEstimatorconstruction - changed:
Cwt=1e4in custom constraints case study - added: dispatch on
covestimtype when inverting \mathbf{\bar{P}} in theMovingHorizonEstimator - doc: added C code generation example in “Manual: Linear Design” (via LinearMPC.jl)
- doc: various minor improvements
- test: improve coverage of predictive controller constraint violation
- bench:
MovingHorzizonEstimatorbenchmark withSteadyKalmanFilterfor the arrival covariance - bench: removed all
LinMPCand MHE withIpopt - bench:
MovingHorizonEstimatorwithcovestim=SteadyKalmanFilter(...) - bench:
add_bridges=trueforOSQP - bench: increase
samplesforLinMPC