Skip to content

Commit efd3d58

Browse files
committed
doc: SLMPC first linearization at resting position
1 parent 39014c8 commit efd3d58

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/src/manual/nonlinmpc.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,12 @@ the [`LinMPC`](@ref) instance based on repeated online linearization.
338338
The [`setmodel!`](@ref) method allows online adaptation of a linear plant model. Combined
339339
with the automatic linearization of [`linearize`](@ref), a successive linearization MPC can
340340
be designed with minimal efforts. The [`SteadyKalmanFilter`](@ref) does not support
341-
[`setmodel!`](@ref), so we need to use the time-varying [`KalmanFilter`](@ref) instead:
341+
[`setmodel!`](@ref) so we need to use the time-varying [`KalmanFilter`](@ref), and we
342+
initialize it with a linearization at ``θ = ω = τ = 0``:
342343

343344
```@example 1
344-
kf = KalmanFilter(linmodel; σQ, σR, nint_u, σQint_u)
345+
linmodel = linearize(model, x=[0, 0], u=[0])
346+
kf = KalmanFilter(linmodel; σQ, σR, nint_u, σQint_u)
345347
mpc3 = LinMPC(kf; Hp, Hc, Mwt, Nwt, Cwt=Inf, optim=daqp)
346348
mpc3 = setconstraint!(mpc3; umin, umax)
347349
```

0 commit comments

Comments
 (0)