Skip to content

Commit 86404e2

Browse files
committed
minor doc additions
1 parent d42dc75 commit 86404e2

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

docs/src/manual/linmpc.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@ automatically added to the model outputs by default if observability is preserve
9090
structure with `mpc = LinMPC(InternalModel(model), Hp=15, Hc=2, Mwt=[1, 1], Nwt=[0.1, 0.1])`.
9191
It was tested on the example of this page and it gave similar results.
9292

93-
Before closing the loop, we call [`initstate!`](@ref) with the actual plant inputs and
94-
measurements to ensure a bumpless transfer. Since `model` simulates our plant here, its
95-
output will initialize the states. [`LinModel`](@ref) objects are callable for this purpose
96-
(an alias for [`evaloutput`](@ref)):
93+
Before closing the loop, the actual plant input ``\mathbf{u}`` and measurement ``\mathbf{y}``
94+
should initialize the estimates ``\mathbf{x̂}`` at the steady-state solution that leads to
95+
``\mathbf{ŷ}(0) = \mathbf{y}(0)``. This approach results in a bumpless transfer. The
96+
[`initstate!`](@ref) function finds this solution for [`LinModel`](@ref). Since `model`
97+
simulates our plant here, its output will initialize the states. [`LinModel`](@ref) objects
98+
are callable for this purpose (an alias for [`evaloutput`](@ref)):
9799

98100
```@example 1
99101
u, y = model.uop, model() # or equivalently : y = evaloutput(model)

docs/src/manual/nonlinmpc.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,10 @@ nothing # hide
371371
```
372372

373373
The [`setmodel!`](@ref) method must be called after solving the optimization problem with
374-
[`moveinput!`](@ref), and before updating the state estimate with [`updatestate!`](@ref).
375-
The [`SimResult`](@ref) object is for plotting purposes only. The adaptive [`LinMPC`](@ref)
376-
performances are similar to the nonlinear MPC, both for the 180° setpoint:
374+
[`moveinput!`](@ref) and before updating the state estimate with [`updatestate!`](@ref),
375+
that is, when both ``\mathbf{u}(k)`` and ``\mathbf{x̂}_{k-1}(k)`` are available as the new
376+
operating point. The [`SimResult`](@ref) object is for plotting purposes only. The adaptive
377+
[`LinMPC`](@ref) performances are similar to the nonlinear MPC, both for the 180° setpoint:
377378

378379
```@example 1
379380
res_slin = test_slmpc(model, mpc3, [180], plant, x_0=[0, 0])

docs/src/public/plot_sim.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ SimResult
2424

2525
## Plotting Results
2626

27+
The `plot` methods are based on [`Plots.jl`](https://github.com/JuliaPlots/Plots.jl) package.
28+
To install it run `using Pkg; Pkg.add("Plots")` in the Julia REPL.
29+
2730
```@docs
2831
ModelPredictiveControl.plot
2932
```

0 commit comments

Comments
 (0)