Skip to content

Commit baf963f

Browse files
authored
Merge pull request #71 from JuliaControl/doc_details
Doc: minor corrections and add preview cleanup workflow
2 parents bd1b76f + 5e30616 commit baf963f

File tree

4 files changed

+43
-12
lines changed

4 files changed

+43
-12
lines changed

.github/workflows/DocCleanup.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Doc Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
doc-preview-cleanup:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout gh-pages branch
12+
uses: actions/checkout@v2
13+
with:
14+
ref: gh-pages
15+
16+
- name: Delete preview and history
17+
run: |
18+
git config user.name "Documenter.jl"
19+
git config user.email "documenter@juliadocs.github.io"
20+
git rm -rf "previews/PR$PRNUM"
21+
git commit -m "delete preview"
22+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
23+
env:
24+
PRNUM: ${{ github.event.number }}
25+
26+
- name: Push changes
27+
run: |
28+
git push --force origin gh-pages-new:gh-pages

docs/src/manual/nonlinmpc.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ model = setname!(NonLinModel(f, h, Ts, nu, nx, ny); u=vu, x=vx, y=vy)
6666
The output function ``\mathbf{h}`` converts the ``θ`` angle to degrees. Note that special
6767
characters like ``θ`` can be typed in the Julia REPL or VS Code by typing `\theta` and
6868
pressing the `<TAB>` key. The tuple `par` is constant here to improve the [performance](https://docs.julialang.org/en/v1/manual/performance-tips/#Avoid-untyped-global-variables).
69-
Note that a 4th order [`RungeKutta`](@ref) differential equation solver is used by default.
70-
It is good practice to first simulate `model` using [`sim!`](@ref) as a quick sanity check:
69+
A 4th order [`RungeKutta`](@ref) method solves the differential equations by default. It is
70+
good practice to first simulate `model` using [`sim!`](@ref) as a quick sanity check:
7171

7272
```@example 1
7373
using Plots
@@ -80,7 +80,9 @@ savefig("plot1_NonLinMPC.svg"); nothing # hide
8080

8181
![plot1_NonLinMPC](plot1_NonLinMPC.svg)
8282

83-
The [`setname!`](@ref) function allows customizing the Y-axis labels.
83+
The [`setname!`](@ref) function allows customized Y-axis labels. The available plotting
84+
options are detailed in the documentation of the corresponding [`plot`](@ref ModelPredictiveControl.plot)
85+
method.
8486

8587
## Nonlinear Model Predictive Controller
8688

@@ -146,6 +148,8 @@ savefig("plot4_NonLinMPC.svg"); nothing # hide
146148

147149
![plot4_NonLinMPC](plot4_NonLinMPC.svg)
148150

151+
See [`sim!`](@ref) documentation for details on the possible simulation scenarios.
152+
149153
## Economic Model Predictive Controller
150154

151155
Economic MPC can achieve the same objective but with lower economical costs. For this case

src/estimator/kalman.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,10 @@ is based on the process model :
451451
```
452452
See [`SteadyKalmanFilter`](@ref) for details on ``\mathbf{v}(k), \mathbf{w}(k)`` noises and
453453
``\mathbf{R̂}, \mathbf{Q̂}`` covariances. The functions ``\mathbf{f̂, ĥ}`` are `model`
454-
state-space functions augmented with the stochastic model, which is specified by the numbers
455-
of integrator `nint_u` and `nint_ym` (see Extended Help). The ``\mathbf{ĥ^m}`` function
456-
represents the measured outputs of ``\mathbf{ĥ}`` function (and unmeasured ones, for
457-
``\mathbf{ĥ^u}``).
454+
state-space functions augmented with the stochastic model of the unmeasured disturbances,
455+
which is specified by the numbers of integrator `nint_u` and `nint_ym` (see Extended Help).
456+
The ``\mathbf{ĥ^m}`` function represents the measured outputs of ``\mathbf{ĥ}`` function
457+
(and unmeasured ones, for ``\mathbf{ĥ^u}``).
458458
459459
# Arguments
460460
!!! info
@@ -483,9 +483,10 @@ UnscentedKalmanFilter estimator with a sample time Ts = 10.0 s, NonLinModel and:
483483
# Extended Help
484484
!!! details "Extended Help"
485485
The Extended Help of [`SteadyKalmanFilter`](@ref) details the augmentation with `nint_ym`
486-
and `nint_u` arguments. Note that the constructor does not validate the observability of
487-
the resulting augmented [`NonLinModel`](@ref). In such cases, it is the user's
488-
responsibility to ensure that the augmented model is still observable.
486+
and `nint_u` arguments. The default augmentation scheme is identical, that is `nint_u=0`
487+
and `nint_ym` computed by [`default_nint`](@ref). Note that the constructor does not
488+
validate the observability of the resulting augmented [`NonLinModel`](@ref). In such
489+
cases, it is the user's responsibility to ensure that it is still observable.
489490
"""
490491
function UnscentedKalmanFilter(
491492
model::SM;

src/plot_sim.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,6 @@ end
614614
Plot the simulation results of a [`PredictiveController`](@ref).
615615
616616
# Arguments
617-
!!! info
618-
Keyword arguments in *`italic`* are non-Unicode alternatives.
619617
620618
- `res::SimResult{<:Real, <:PredictiveController}` : simulation results to plot
621619
- `plotry=true` : plot plant output setpoints ``\mathbf{r_y}`` if applicable

0 commit comments

Comments
 (0)