Skip to content

Commit 0bc67b8

Browse files
committed
minor doc correction
1 parent 84c6034 commit 0bc67b8

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

docs/src/manual/linmpc.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ These are the integrating states for the unmeasured plant disturbances, and they
8484
automatically added to the model outputs by default if feasible (see [`SteadyKalmanFilter`](@ref)
8585
for details).
8686

87-
[^1]: We could have use an [`InternalModel`](@ref) structure with
88-
`mpc = LinMPC(InternalModel(model), Hp=15, Hc=2, Mwt=[1, 1], Nwt=[0.1, 0.1])` to avoid
89-
state estimator design. It was tested on the example of this page and it gives similar
90-
results.
87+
[^1]: To avoid observer design, we could have use an [`InternalModel`](@ref) structure with
88+
`mpc = LinMPC(InternalModel(model), Hp=15, Hc=2, Mwt=[1, 1], Nwt=[0.1, 0.1])` . It was
89+
tested on the example of this page and it gives similar results.
9190

9291
Before closing the loop, we call [`initstate!`](@ref) with the actual plant inputs and
9392
measurements to ensure a bumpless transfer. Since `model` simulates our plant here, its
@@ -165,10 +164,9 @@ real-life control problems. Constructing a [`LinMPC`](@ref) with `DAQP` and inpu
165164

166165
```@example 1
167166
using JuMP, DAQP
168-
daqp = Model(DAQP.Optimizer)
169-
estim = SteadyKalmanFilter(model, nint_u=[1, 1], nint_ym=[0, 0])
170-
mpc2 = LinMPC(estim, Hp=15, Hc=2, Mwt=[1, 1], Nwt=[0.1, 0.1], optim=daqp)
171-
mpc2 = setconstraint!(mpc2, ymin=[45, -Inf])
167+
daqp = Model(DAQP.Optimizer)
168+
mpc2 = LinMPC(model, Hp=15, Hc=2, Mwt=[1, 1], Nwt=[0.1, 0.1], optim=daqp, nint_u=[1, 1])
169+
mpc2 = setconstraint!(mpc2, ymin=[45, -Inf])
172170
```
173171

174172
leads to similar computational times, but it does accelerate the rejection of the load
@@ -212,7 +210,7 @@ model_ff = setop!(LinModel(sys_ff, Ts, i_d=[3]), uop=[20, 20], yop=[50, 30], dop
212210
A [`LinMPC`](@ref) controller is constructed on this model:
213211

214212
```@example 1
215-
mpc_ff = LinMPC(model_ff, Hp=15, Hc=2, Mwt=[1, 1], Nwt=[0.1, 0.1])
213+
mpc_ff = LinMPC(model_ff, Hp=15, Hc=2, Mwt=[1, 1], Nwt=[0.1, 0.1], nint_u=[1, 1])
216214
mpc_ff = setconstraint!(mpc_ff, ymin=[45, -Inf])
217215
```
218216

0 commit comments

Comments
 (0)