Skip to content

Commit 422958d

Browse files
committed
doc: added detailed def of augmented matrices in augment_model
1 parent 81c2bcc commit 422958d

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

src/estimator/construct.jl

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ manipulated input and measured outputs. The function returns the state-space mat
1111
```math
1212
\begin{aligned}
1313
\mathbf{x_{s}}(k+1) &= \mathbf{A_s x_s}(k) + \mathbf{B_s e}(k) \\
14-
\mathbf{y_{s_{u}}}(k) &= \mathbf{C_{s_{u}} x_s}(k) \\
15-
\mathbf{y_{s_{ym}}}(k) &= \mathbf{C_{s_{ym}} x_s}(k)
14+
\mathbf{y_{s_{u}}}(k) &= \mathbf{C_{s_{u}} x_s}(k) \\
15+
\mathbf{y_{s_{y}}}(k) &= \mathbf{C_{s_{y}} x_s}(k)
1616
\end{aligned}
1717
```
1818
where ``\mathbf{e}(k)`` is an unknown zero mean white noise and ``\mathbf{A_s} =
19-
\mathrm{diag}(\mathbf{A_{s_{u}}, A_{s_{ym}}})``. The estimations does not use ``\mathbf{B_s}``,
19+
\mathrm{diag}(\mathbf{A_{s_{u}}, A_{s_{y}}})``. The estimations does not use ``\mathbf{B_s}``,
2020
it is thus ignored. The function [`init_integrators`](@ref) builds the state-space matrices.
2121
"""
2222
function init_estimstoch(
@@ -119,7 +119,30 @@ returns the augmented matrices `Â`, `B̂u`, `Ĉ`, `B̂d` and `D̂d`:
119119
```
120120
An error is thrown if the augmented model is not observable and `verify_obsv == true`. The
121121
augmented operating points `x̂op` and `f̂op` are simply ``\mathbf{x_{op}}`` and
122-
``\mathbf{f_{op}}`` vectors appended with zeros (see [`setop!`](@ref)).
122+
``\mathbf{f_{op}}`` vectors appended with zeros (see [`setop!`](@ref)). See Extended Help
123+
for a detailed definition of the augmented matrices.
124+
125+
# Extended Help
126+
!!! details "Extended Help"
127+
Using the `As`, `Cs_u` and `Cs_y` matrices of the stochastic model provided in argument
128+
and the `model.A`, `model.Bu`, `model.Bd`, `model.C`, `model.Dd` matrices, the
129+
state-space matrices of the augmented model are defined as follows:
130+
```math
131+
\begin{aligned}
132+
\mathbf{Â} &= \begin{bmatrix}
133+
\mathbf{A} & \mathbf{B_u C_{s_u}} \\
134+
\mathbf{0} & \mathbf{A_s} \end{bmatrix} \\
135+
\mathbf{B̂_u} &= \begin{bmatrix}
136+
\mathbf{B_u} \\
137+
\mathbf{0} \end{bmatrix} \\
138+
\mathbf{Ĉ} &= \begin{bmatrix}
139+
\mathbf{C} & \mathbf{C_{s_y}} \end{bmatrix} \\
140+
\mathbf{B̂_d} &= \begin{bmatrix}
141+
\mathbf{B_d} \\
142+
\mathbf{0} \end{bmatrix} \\
143+
\mathbf{D̂_d} &= \mathbf{D_d}
144+
\end{aligned}
145+
```
123146
"""
124147
function augment_model(model::LinModel{NT}, As, Cs_u, Cs_y; verify_obsv=true) where NT<:Real
125148
nu, nx, nd = model.nu, model.nx, model.nd

0 commit comments

Comments
 (0)