Skip to content

Commit e98514c

Browse files
authored
Merge pull request #88 from JuliaControl/doc_details
minor doc additions
2 parents 4794783 + 86404e2 commit e98514c

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
@@ -373,9 +373,10 @@ nothing # hide
373373
```
374374

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

380381
```@example 1
381382
x_0 = [0, 0]; x̂_0 = [0, 0, 0]; ry = [180]

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)