@@ -131,17 +131,16 @@ include the manipulated inputs, predicted outputs and measured disturbances, ext
131131 \m athbf{Ŷ_e} = \b egin{bmatrix} \m athbf{ŷ}(k) \\ \m athbf{Ŷ} \e nd{bmatrix} , \q uad
132132 \m athbf{D̂_e} = \b egin{bmatrix} \m athbf{d}(k) \\ \m athbf{D̂} \e nd{bmatrix}
133133```
134- since ``H_c ≤ H_p`` implies that ``\m athbf{Δu}(k+H_p) = \m athbf{0}`` or ``\m athbf{u}(k+H_p)=
135- \m athbf{u}(k+H_p-1)``. The vector ``\m athbf{D̂}`` comprises the measured disturbance
136- predictions over ``H_p``. The argument ``\m athbf{p}`` is a custom parameter object of any
137- type, but use a mutable one if you want to modify it later e.g.: a vector.
134+ The vector ``\m athbf{D̂}`` comprises the measured disturbance predictions over ``H_p``. The
135+ argument ``\m athbf{p}`` is a custom parameter object of any type, but use a mutable one if
136+ you want to modify it later e.g.: a vector.
138137
139138!!! tip
140139 Replace any of the arguments of ``J_E`` and ``\m athbf{g_c}`` functions with `_` if not
141140 needed (see e.g. the default value of `JE` below).
142141
143- See [`LinMPC`](@ref) for the definition of the other variables. This method uses the default
144- state estimator :
142+ See [`LinMPC`](@ref) Extended Help for the definition of the other variables. This method
143+ uses the default state estimator :
145144
146145- if `model` is a [`LinModel`](@ref), a [`SteadyKalmanFilter`](@ref) with default arguments;
147146- else, an [`UnscentedKalmanFilter`](@ref) with default arguments.
@@ -199,10 +198,12 @@ NonLinMPC controller with a sample time Ts = 10.0 s, Ipopt optimizer, UnscentedK
199198
200199 The economic cost ``J_E`` and custom constraint ``\m athbf{g_c}`` functions receive the
201200 extended vectors ``\m athbf{U_e}`` (`nu*Hp+nu` elements), ``\m athbf{Ŷ_e}`` (`ny+ny*Hp`
202- elements) and ``\m athbf{D̂_e}`` (`nd+nd*Hp` elements) as arguments. If `LHS` represents
203- the result of the left-hand side in the inequality ``\m athbf{g_c}(\m athbf{U_e},
204- \m athbf{Ŷ_e}, \m athbf{D̂_e}, \m athbf{p}, ϵ) ≤ \m athbf{0}``, the function `gc` can be
205- implemented in two possible ways:
201+ elements) and ``\m athbf{D̂_e}`` (`nd+nd*Hp` elements) as arguments. The last two time
202+ steps in ``\m athbf{U_e}`` are forced to be equal, that is ``\m athbf{u}(k+H_p) =
203+ \m athbf{u}(k+H_p-1)``, since ``H_c ≤ H_p`` implies that ``\m athbf{Δu}(k+H_p) =
204+ \m athbf{0}``. If `LHS` represents the result of the left-hand side in the inequality
205+ ``\m athbf{g_c}(\m athbf{U_e}, \m athbf{Ŷ_e}, \m athbf{D̂_e}, \m athbf{p}, ϵ) ≤ \m athbf{0}``,
206+ the function `gc` can be implemented in two possible ways:
206207
207208 1. **Non-mutating function** (out-of-place): define it as `gc(Ue, Ŷe, D̂e, p, ϵ) -> LHS`.
208209 This syntax is simple and intuitive but it allocates more memory.
0 commit comments