# \[ANN\] ModelPredictiveControl.jl

**URL:** <https://discourse.julialang.org/t/ann-modelpredictivecontrol-jl/100147>\
**Category:** Package Announcements\
**Tags:** control, jump, controlsystems, nmpc\
**Created:** [June 10, 2023, 6:10pm UTC](https://discourse.julialang.org/t/ann-modelpredictivecontrol-jl/100147 "2023-06-10T18:10:43Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![franckgaga](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/franckgaga/32/218241_2.png) [@franckgaga](https://discourse.julialang.org/u/franckgaga)\
**Post date:** [November 23, 2023, 7:58pm UTC](https://discourse.julialang.org/t/ann-modelpredictivecontrol-jl/100147/16 "2023-11-23T19:58:41Z")

</div>

**ModelPredictiveControl v0.13.0**

I watched @baggepinnen presentation at JuliaCon 2023 (nice presentation Fredrik btw!) and it gave me the idea of a new cool feature : the `linearize` function. Gain scheduling should be quite easy with this. It is not possible to modify the plant model of a `LinMPC` instance right now, but I will probably add this feature soon. Gain scheduling is still possible using multiple `LinMPC` objects.

Also, I did a major refactoring of the code to support generic number types across the package. Note that most solvers in `JuMP` only support `Float64` numbers. Thus, `PredictiveController` objects still default to `Float64`-based optimizers, even if the plant model or state estimator uses other number types.

In short, the new features are:

- added: linearization of `NonLinModel` based on `ForwardDiff.jl`
- added: generic number types in all `SimModel`, `StateEstimator` and `PredictiveController` objects
- doc: example of `linearize` on the [pendulum](https://franckgaga.github.io/ModelPredictiveControl.jl/stable/manual/nonlinmpc/#Linearizing-the-Model)
- doc: example of solving MPC with unstable plant model using `DAQP`
- tests for `linearize` function
- tests with `Float32` numbers

I will register the new version soon.

---

_[View the full topic](https://discourse.julialang.org/t/ann-modelpredictivecontrol-jl/100147)._
