Skip to content

Commit 7edbc14

Browse files
committed
add mention in docs
1 parent 3905dfc commit 7edbc14

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/src/index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,3 +297,21 @@ A video tutorial on how to perform closed-loop analysis is available [here](http
297297
- [`hess_form`](@ref)
298298
- [`frequency_separation`](@ref)
299299
- [`RobustAndOptimalControl.blockdiagonalize`](@ref)
300+
301+
## MPC
302+
This package includes an extension for [LinearMPC.jl](https://darnstrom.github.io/LinearMPC.jl/stable/) that allows you to convert an [`LQGProblem`](@ref) into a linear MPC controller with added constraints. Example:
303+
```@example lqg_mpc
304+
using RobustAndOptimalControl, LinearMPC, LinearAlgebra
305+
306+
sys = ss([1 0.1; 0 1], [0; 0.1], [1 0], 0, 0.1)
307+
lqg = LQGProblem(sys, I(2), I(1), I(2), 0.01*I(1))
308+
309+
mpc = LinearMPC.MPC(lqg; N=20, umin=[-0.3], umax=[0.3])
310+
311+
sim = LinearMPC.Simulation(mpc, N=100, r=[1.0, 0])
312+
313+
using Plots
314+
plot(sim)
315+
```
316+
317+
See the [docs for LinearMPC.jl](https://darnstrom.github.io/LinearMPC.jl/stable/) for more details on how to use the MPC controller and modify its settings.

0 commit comments

Comments
 (0)