@@ -44,7 +44,7 @@ The predictive controllers support both soft and hard constraints, defined by:
4444 \m athbf{u_{min} - c_{u_{min}}} ϵ ≤&&\ \m athbf{u}(k+j) &≤ \m athbf{u_{max} + c_{u_{max}}} ϵ &&\q quad j = 0, 1 ,..., H_p - 1 \\
4545 \m athbf{Δu_{min} - c_{Δu_{min}}} ϵ ≤&&\ \m athbf{Δu}(k+j) &≤ \m athbf{Δu_{max} + c_{Δu_{max}}} ϵ &&\q quad j = 0, 1 ,..., H_c - 1 \\
4646 \m athbf{y_{min} - c_{y_{min}}} ϵ ≤&&\ \m athbf{ŷ}(k+j) &≤ \m athbf{y_{max} + c_{y_{max}}} ϵ &&\q quad j = 1, 2 ,..., H_p \\
47- \m athbf{x̂_{min} - c_{x̂_{min}}} ϵ ≤&&\ \m athbf{x̂}_{i} (k+j) &≤ \m athbf{x̂_{max} + c_{x̂_{max}}} ϵ &&\q quad j = H_p
47+ \m athbf{x̂_{min} - c_{x̂_{min}}} ϵ ≤&&\ \m athbf{x̂}_i (k+j) &≤ \m athbf{x̂_{max} + c_{x̂_{max}}} ϵ &&\q quad j = H_p
4848\e nd{alignat*}
4949```
5050and also ``ϵ ≥ 0``. The last line is the terminal constraints applied on the states at the
@@ -435,7 +435,7 @@ The model predictions are evaluated from the deviation vectors (see [`setop!`](@
435435 &= \m athbf{E ΔU} + \m athbf{F}
436436\e nd{aligned}
437437```
438- in which ``\m athbf{x̂_0}(k) = \m athbf{x̂}_{i} (k) - \m athbf{x̂_{op}}``, with ``i = k`` if
438+ in which ``\m athbf{x̂_0}(k) = \m athbf{x̂}_i (k) - \m athbf{x̂_{op}}``, with ``i = k`` if
439439`estim.direct==true`, otherwise ``i = k - 1``. The predicted outputs ``\m athbf{Ŷ_0}`` and
440440measured disturbances ``\m athbf{D̂_0}`` respectively include ``\m athbf{ŷ_0}(k+j)`` and
441441``\m athbf{d̂_0}(k+j)`` values with ``j=1`` to ``H_p``, and input increments ``\m athbf{ΔU}``,
@@ -453,8 +453,9 @@ terminal states at ``k+H_p``:
453453 &= \m athbf{e_x̂ ΔU} + \m athbf{f_x̂}
454454\e nd{aligned}
455455```
456- The ``\m athbf{F}`` and ``\m athbf{f_x̂}`` vectors are recalculated at each control period
457- ``k``, see [`initpred!`](@ref) and [`linconstraint!`](@ref).
456+ The matrices ``\m athbf{E, G, J, K, V, B, e_x̂, g_x̂, j_x̂, k_x̂, v_x̂, b_x̂}`` are defined in the
457+ Extended Help section. The ``\m athbf{F}`` and ``\m athbf{f_x̂}`` vectors are recalculated at
458+ each control period ``k``, see [`initpred!`](@ref) and [`linconstraint!`](@ref).
458459
459460# Extended Help
460461!!! details "Extended Help"
@@ -529,7 +530,7 @@ function init_predmat(estim::StateEstimator{NT}, model::LinModel, Hp, Hc) where
529530 # Apow_csum 3D array : Apow_csum[:,:,1] = A^0, Apow_csum[:,:,2] = A^1 + A^0, ...
530531 Âpow_csum = cumsum (Âpow, dims= 3 )
531532 # helper function to improve code clarity and be similar to eqs. in docstring:
532- getpower (array3D, power) = array3D[:,:, power+ 1 ]
533+ getpower (array3D, power) = @views array3D[:,:, power+ 1 ]
533534 # --- state estimates x̂ ---
534535 kx̂ = getpower (Âpow, Hp)
535536 K = Matrix {NT} (undef, Hp* ny, nx̂)
0 commit comments