Skip to content

Commit

Permalink
small doc correction
Browse files Browse the repository at this point in the history
  • Loading branch information
franckgaga committed Aug 2, 2023
1 parent 412c16d commit dd2e7a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/src/public/state_estim.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ error with closed-loop control (offset-free tracking).

The estimators are all implemented in the predictor form (a.k.a. observer form), that is,
they all estimates at each discrete time ``k`` the states of the next period
``\mathbf{x̂}_k(k+1)``. In contrast, the filter form that estimates ``\mathbf{x̂}_k(k)`` is
``\mathbf{x̂}_k(k+1)`` (also written ``\mathbf{x̂}_{k+1|k}`` [elsewhere](https://en.wikipedia.org/wiki/Kalman_filter)).
In contrast, the filter form that estimates ``\mathbf{x̂}_k(k)`` is
sometimes slightly more accurate.

The predictor form comes in handy for control applications since the estimations come after
Expand Down
2 changes: 1 addition & 1 deletion src/controller/linmpc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ and with the following nomenclature:
The ``\mathbf{ΔU}`` vector includes the manipulated input increments ``\mathbf{Δu}(k+j) =
\mathbf{u}(k+j) - \mathbf{u}(k+j-1)`` from ``j=0`` to ``H_c-1``, the ``\mathbf{Ŷ}`` vector,
the output predictions ``\mathbf{ŷ(k+j)}`` from ``j=1`` to ``H_p``, and the ``\mathbf{U}``
the output predictions ``\mathbf{ŷ}(k+j)`` from ``j=1`` to ``H_p``, and the ``\mathbf{U}``
vector, the manipulated inputs ``\mathbf{u}(k+j)`` from ``j=0`` to ``H_p-1``. The
manipulated input setpoint predictions ``\mathbf{R̂_u}`` are constant at ``\mathbf{r_u}``.
Expand Down
4 changes: 2 additions & 2 deletions src/estimator/kalman.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ It implements the time-varying Kalman Filter in its predictor (observer) form :
```math
\begin{aligned}
\mathbf{M}(k) &= \mathbf{P̂}_{k-1}(k)\mathbf{Ĉ^m}'
[\mathbf{Ĉ^m P̂}_{k-1}(k)\mathbf{Ĉ^m + R̂}]^{-1} \\
[\mathbf{Ĉ^m P̂}_{k-1}(k)\mathbf{Ĉ^m}' + \mathbf{R̂}]^{-1} \\
\mathbf{K}(k) &= \mathbf{Â M(k)} \\
\mathbf{ŷ^m}(k) &= \mathbf{Ĉ^m x̂}_{k-1}(k) + \mathbf{D̂_d^m d}(k) \\
\mathbf{x̂}_{k}(k+1) &= \mathbf{Â x̂}_{k-1}(k) + \mathbf{B̂_u u}(k) + \mathbf{B̂_d d}(k)
Expand Down Expand Up @@ -643,7 +643,7 @@ substitutions ``\mathbf{Â = F̂}(k)`` and ``\mathbf{Ĉ^m = Ĥ^m}(k)``:
```math
\begin{aligned}
\mathbf{M}(k) &= \mathbf{P̂}_{k-1}(k)\mathbf{Ĥ^m}'(k)
[\mathbf{Ĥ^m}(k)\mathbf{P̂}_{k-1}(k)\mathbf{Ĥ^m}(k) + \mathbf{R̂}]^{-1} \\
[\mathbf{Ĥ^m}(k)\mathbf{P̂}_{k-1}(k)\mathbf{Ĥ^m}'(k) + \mathbf{R̂}]^{-1} \\
\mathbf{K}(k) &= \mathbf{F̂}(k) \mathbf{M}(k) \\
\mathbf{ŷ^m}(k) &= \mathbf{ĥ^m}\Big( \mathbf{x̂}_{k-1}(k), \mathbf{d}(k) \Big) \\
\mathbf{x̂}_{k}(k+1) &= \mathbf{f̂}\Big( \mathbf{x̂}_{k-1}(k), \mathbf{u}(k), \mathbf{d}(k) \Big)
Expand Down

0 comments on commit dd2e7a1

Please sign in to comment.