[ANN] ModelPredictiveControl.jl

ModelPredictiveControl v.0.21.0

I’m super excited to announce two new major features:

  1. linear model adaptation of controller/estimator at runtime
  2. model linearization at non-equilibrium points

These features allow adaptive MPC based on online parameter estimation (e.g. recursive system identification). Furthermore, successive linearization MPC can now be implemented with minimal effort. It’s a great feature since e.g. MATLAB also supports it, but the analytical expressions of the Jacobians are required (hidden in the “Successive Linearizer” block). This is not the case here with the AD-based linearize function. Also, similar functionalities are available for the MovingHorizonEstimator.

A massive and long refactoring of the operating points and the mathematical notation was required to support linearization at non-equilibrium points. It was totally worth it since the successive linearization MPC on the pendulum is about 125 times faster than the NMPC counterpart, with similar closed-loop performances! It’s a great application of Julia’s AD tools and its first class linear algebra library!

BREAKING CHANGE
All the keyword arguments related to initial values e.g. σP0, x0 and x̂0 now require an underscore e.g. σP_0, x_0, x̂_0 (to clearly differentiate from deviation vectors around operating points)

  • Added: setmodel! for runtime model adaptation of controller/estimator based on LinModel
  • Added: linearize and setop! now support non-equilibrium points
  • Added: successive linearization MPC with the new setmodel! and linearize functions
  • Added: successive linearization MHE with the new setmodel! and linearize functions
  • Added: linearize! method for in-place model linearization (to reduce allocations)
  • Added: 6 args. LinModel constructor now support scalars (similarly to ss function)
  • Added: ExtendedKalmanFilter now compute the Jacobians in-place (to reduce allocations)
  • Changed: struct state data x and state estimate renamed to x0 and x̂0
  • Debug: ExplicitMPC with non-Float64 now works
  • Debug: accept integers in linearize arguments
  • Debug: call empty! on JuMP.Model to support re-construction of MPC instances
  • Doc: new setmodel!, setop! and linearize function documentation
  • Doc: example of model adaptation with successive linearization on the pendulum (very efficient!)

other changes, since my last post on discourse:

  • Added: print info on controller and estimator constraint softening (slack var. ϵ)
  • Added: custom estimator for the approximation of the arrival covariance in the MHE
  • Added: improve performance of LinMPC and MHE with new JuMP batch update methods
  • Various allocation reductions
  • Changed: MHE now default to an UnscentedKalmanFilter for the arrival covariance estimation (instead of an EKF)
  • Debug: MHE with NonLinModel update covariance with the correct state estimate
7 Likes