|
18 | 18 |
|
19 | 19 | Mutating state function ``\mathbf{f̂}`` of the augmented model. |
20 | 20 |
|
21 | | -By introducing an augmented state vector ``\mathbf{x̂_0}`` like in [`augment_model`](@ref), the |
22 | | -function returns the next state of the augmented model, defined as: |
| 21 | +By introducing an augmented state vector ``\mathbf{x̂_0}`` like in [`augment_model`](@ref), |
| 22 | +the function returns the next state of the augmented model, defined as: |
23 | 23 | ```math |
24 | 24 | \begin{aligned} |
25 | 25 | \mathbf{x̂_0}(k+1) &= \mathbf{f̂}\Big(\mathbf{x̂_0}(k), \mathbf{u_0}(k), \mathbf{d_0}(k)\Big) \\ |
26 | 26 | \mathbf{ŷ_0}(k) &= \mathbf{ĥ}\Big(\mathbf{x̂_0}(k), \mathbf{d_0}(k)\Big) |
27 | 27 | \end{aligned} |
28 | 28 | ``` |
29 | 29 | where ``\mathbf{x̂_0}(k+1)`` is stored in `x̂0next` argument. The method mutates `x̂0next`, |
30 | | -`û0` and `k0` in place. The argument `û0` is the input vector of the augmented model, |
31 | | -computed by ``\mathbf{û_0 = u_0 + ŷ_{s_u}}``. The argument `k0` is used to store the |
32 | | -intermediate stage values of `model.solver` (when applicable). The model parameter vector |
33 | | -`model.p` is not included in the function signature for conciseness. |
| 30 | +`û0` and `k0` in place. The argument `û0` stores the disturbed input of the augmented model |
| 31 | +``\mathbf{û_0}``, and `k0`, the intermediate stage values of `model.solver`, when applicable. |
| 32 | +The model parameter `model.p` is not included in the function signature for conciseness. See |
| 33 | +Extended Help for details on ``\mathbf{û_0, f̂}`` and ``\mathbf{ĥ}`` implementations. |
| 34 | +
|
| 35 | +# Extended Help |
| 36 | +!!! details "Extended Help" |
| 37 | + Knowing that the augmented state vector is defined as |
| 38 | + ``\mathbf{x̂_0} = [ \begin{smallmatrix} \mathbf{x_0} \\ \mathbf{x_s} \end{smallmatrix} ]``, |
| 39 | + the augmented model functions are: |
| 40 | + ```math |
| 41 | + \begin{aligned} |
| 42 | + \mathbf{f̂}\Big(\mathbf{x̂_0}(k), \mathbf{u_0}(k), \mathbf{d_0}(k)\Big) &= \begin{bmatrix} |
| 43 | + \mathbf{f}\Big(\mathbf{x_0}(k), \mathbf{û_0}(k), \mathbf{d_0}(k), \mathbf{p}\Big) \\ |
| 44 | + \mathbf{A_s} \mathbf{x_s}(k) \end{bmatrix} \\ |
| 45 | + \mathbf{ĥ}\Big(\mathbf{x̂_0}(k), \mathbf{d_0}(k)\Big) &= |
| 46 | + \mathbf{h}\Big(\mathbf{x_0}(k), \mathbf{d_0}(k), \mathbf{p}\Big) + \mathbf{y_{s_y}}(k) |
| 47 | + \end{aligned} |
| 48 | + ``` |
| 49 | + in which: |
| 50 | + ```math |
| 51 | + \begin{aligned} |
| 52 | + \mathbf{û_0}(k) &= \mathbf{u_0}(k) + \mathbf{y_{s_u}}(k) \\ |
| 53 | + \mathbf{y_{s_u}}(k) &= \mathbf{C_{s_u} x_s}(k) \\ |
| 54 | + \mathbf{y_{s_y}}(k) &= \mathbf{C_{s_y} x_s}(k) |
| 55 | + \end{aligned} |
| 56 | + ``` |
| 57 | + The ``\mathbf{f}`` and ``\mathbf{h}`` functions above are in fact the [`f!`](@ref) and |
| 58 | + [`h!`](@ref) methods, respectively. |
34 | 59 | """ |
35 | 60 | function f̂!(x̂0next, û0, k0, estim::StateEstimator, model::SimModel, x̂0, u0, d0) |
36 | 61 | return f̂!(x̂0next, û0, k0, model, estim.As, estim.Cs_u, x̂0, u0, d0) |
|
0 commit comments