Skip to content

Commit dc2a634

Browse files
committed
doc: additional details
1 parent 5339531 commit dc2a634

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

src/controller/construct.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,9 @@ The matrix appear in the quadratic general form:
536536
```
537537
The Hessian matrix is constant if the model and weights are linear and time invariant (LTI):
538538
```math
539-
\mathbf{H̃} = 2 ( \mathbf{Ẽ}' \mathbf{M}_{H_p} \mathbf{Ẽ}
540-
+ \mathbf{P̃_{Δu}}' \mathbf{Ñ}_{H_c} \mathbf{P̃_{Δu}}
541-
+ \mathbf{P̃_{u}}' \mathbf{L}_{H_p} \mathbf{P̃_{u}} )
539+
\mathbf{H̃} = 2 ( \mathbf{Ẽ'} \mathbf{M}_{H_p} \mathbf{Ẽ}
540+
+ \mathbf{P̃_{Δu}'} \mathbf{Ñ}_{H_c} \mathbf{P̃_{Δu}}
541+
+ \mathbf{P̃_{u}'} \mathbf{L}_{H_p} \mathbf{P̃_{u}} )
542542
```
543543
The vector ``\mathbf{q̃}`` and scalar ``r`` need recalculation each control period ``k``, see
544544
[`initpred!`](@ref). ``r`` does not impact the minima position. It is thus useless at
@@ -641,7 +641,7 @@ Augment manipulated inputs constraints with slack variable ϵ for softening.
641641
642642
Denoting the decision variables augmented with the slack variable
643643
``\mathbf{Z̃} = [\begin{smallmatrix} \mathbf{Z} \\ ϵ \end{smallmatrix}]``, it returns the
644-
augmented conversion matrix ``\mathbf{P̃u}``, similar to the one described at
644+
augmented conversion matrix ``\mathbf{P̃_u}``, similar to the one described at
645645
[`init_ZtoU`](@ref). It also returns the ``\mathbf{A}`` matrices for the inequality
646646
constraints:
647647
```math

src/controller/execute.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ They are computed with these equations using in-place operations:
183183
\mathbf{C_u} &= \mathbf{T}\mathbf{u}(k-1) - \mathbf{R̂_u} \\
184184
\mathbf{q̃} &= 2[ (\mathbf{M}_{H_p} \mathbf{Ẽ})' \mathbf{C_y}
185185
+ (\mathbf{L}_{H_p} \mathbf{P̃_U})' \mathbf{C_u} ] \\
186-
r &= \mathbf{C_y}' \mathbf{M}_{H_p} \mathbf{C_y}
187-
+ \mathbf{C_u}' \mathbf{L}_{H_p} \mathbf{C_u}
186+
r &= \mathbf{C_y'} \mathbf{M}_{H_p} \mathbf{C_y}
187+
+ \mathbf{C_u'} \mathbf{L}_{H_p} \mathbf{C_u}
188188
\end{aligned}
189189
```
190190
"""

src/controller/transcription.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ operating point ``\mathbf{x̂_{op}}`` (see [`augment_model`](@ref)):
4444
where ``\mathbf{x̂}_i(k+j)`` is the state prediction for time ``k+j``, estimated by the
4545
observer at time ``i=k`` or ``i=k-1`` depending on its `direct` flag. This transcription
4646
method is generally more efficient for large control horizon ``H_c``, unstable or highly
47-
nonlinear plant models/constraints. Sparse optimizers like `OSQP` or `Ipopt` are recommended
48-
for large-scale problems.
47+
nonlinear plant models/constraints.
48+
49+
Sparse optimizers like `OSQP` or `Ipopt` are recommended for this method.
4950
"""
5051
struct MultipleShooting <: TranscriptionMethod end
5152

src/estimator/construct.jl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ returns the augmented matrices `Â`, `B̂u`, `Ĉ`, `B̂d` and `D̂d`:
154154
\end{aligned}
155155
```
156156
An error is thrown if the augmented model is not observable and `verify_obsv == true`. The
157-
augmented operating points `x̂op` and `f̂op` are simply ``\mathbf{x_{op}}`` and
158-
``\mathbf{f_{op}}`` vectors appended with zeros (see [`setop!`](@ref)). See Extended Help
159-
for a detailed definition of the augmented matrices.
157+
augmented operating points ``\mathbf{x̂_{op}}`` and ``\mathbf{f̂_{op}}`` are simply
158+
``\mathbf{x_{op}}`` and ``\mathbf{f_{op}}`` vectors appended with zeros (see [`setop!`](@ref)).
159+
See Extended Help for a detailed definition of the augmented matrices and vectors.
160160
161161
# Extended Help
162162
!!! details "Extended Help"
@@ -179,6 +179,13 @@ for a detailed definition of the augmented matrices.
179179
\mathbf{D̂_d} &= \mathbf{D_d}
180180
\end{aligned}
181181
```
182+
and the operating points of the augmented model are:
183+
```math
184+
\begin{aligned}
185+
\mathbf{x̂_{op}} &= \begin{bmatrix} \mathbf{x_{op}} \\ \mathbf{0} \end{bmatrix} \\
186+
\mathbf{f̂_{op}} &= \begin{bmatrix} \mathbf{f_{op}} \\ \mathbf{0} \end{bmatrix}
187+
\end{aligned}
188+
```
182189
"""
183190
function augment_model(model::LinModel{NT}, As, Cs_u, Cs_y; verify_obsv=true) where NT<:Real
184191
nu, nx, nd = model.nu, model.nx, model.nd

0 commit comments

Comments
 (0)