Skip to content

Commit 8118bac

Browse files
committed
doc: minor modification
1 parent 189b6ed commit 8118bac

1 file changed

Lines changed: 5 additions & 16 deletions

File tree

src/controller/transcription.jl

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -344,21 +344,13 @@ each control period ``k``, see [`initpred!`](@ref) and [`linconstraint!`](@ref).
344344
```math
345345
\begin{aligned}
346346
\mathbf{e_x̂} &= \begin{bmatrix}
347-
\mathbf{W}(H_p-1) \mathbf{B̂_u} &
348-
\mathbf{W}(H_p-n_1-1) \mathbf{B̂_u} &
349-
\mathbf{W}(H_p-n_2-1) \mathbf{B̂_u} &
350-
\cdots &
351-
\mathbf{W}(H_p-n_{H_c-1}-1) \mathbf{B̂_u} \end{bmatrix} \\
347+
\mathbf{W}(H_p-1)\mathbf{B̂_u} & \mathbf{W}(H_p-n_1-1)\mathbf{B̂_u} & \cdots & \mathbf{W}(H_p-n_{H_c-1}-1)\mathbf{B̂_u} \end{bmatrix} \\
352348
\mathbf{g_x̂} &= \mathbf{Â}^{H_p-1} \mathbf{B̂_d} \\
353349
\mathbf{j_x̂} &= \begin{bmatrix}
354-
\mathbf{Â}^{H_p-2} \mathbf{B̂_d} &
355-
\mathbf{Â}^{H_p-3} \mathbf{B̂_d} &
356-
\cdots &
357-
\mathbf{0}
358-
\end{bmatrix} \\
350+
\mathbf{Â}^{H_p-2}\mathbf{B̂_d} & \mathbf{Â}^{H_p-3}\mathbf{B̂_d} & \cdots & \mathbf{0} \end{bmatrix} \\
359351
\mathbf{k_x̂} &= \mathbf{Â}^{H_p} \\
360352
\mathbf{v_x̂} &= \mathbf{W}(H_p-1)\mathbf{B̂_u} \\
361-
\mathbf{b_x̂} &= \mathbf{W}(H_p-1) \mathbf{\big(f̂_{op} - x̂_{op}\big)}
353+
\mathbf{b_x̂} &= \mathbf{W}(H_p-1)\mathbf{\big(f̂_{op} - x̂_{op}\big)}
362354
\end{aligned}
363355
```
364356
"""
@@ -392,14 +384,11 @@ function init_predmat(
392384
for j=1:Hp
393385
iRow = (1:ny) .+ ny*(j-1)
394386
K[iRow,:] =*getpower(Âpow, j)
395-
end
387+
end
396388
# --- previous manipulated inputs lastu0 ---
397389
vx̂ = W(Hp-1)*B̂u
398390
V = Matrix{NT}(undef, Hp*ny, nu)
399-
for j=1:Hp
400-
iRow = (1:ny) .+ ny*(j-1)
401-
V[iRow,:] =*W(j-1)*B̂u
402-
end
391+
Q!(V, 0, Hp)
403392
# --- decision variables Z ---
404393
nZ = get_nZ(estim, transcription, Hp, Hc)
405394
ex̂ = Matrix{NT}(undef, nx̂, nZ)

0 commit comments

Comments
 (0)