Skip to content

Commit 4631d6d

Browse files
committed
doc : clearer description of NonLinMPC extended vectors
1 parent 1e74323 commit 4631d6d

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/controller/nonlinmpc.jl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,16 @@ NonLinMPC controller with a sample time Ts = 10.0 s:
273273
`model` is a [`LinModel`](@ref)).
274274
275275
The economic cost ``J_E`` and custom constraint ``\mathbf{g_c}`` functions receive the
276-
extended vectors ``\mathbf{U_e}`` (`nu*Hp+nu` elements), ``\mathbf{Ŷ_e}`` (`ny+ny*Hp`
277-
elements) and ``\mathbf{D̂_e}`` (`nd+nd*Hp` elements) as arguments. They all include the
278-
values from ``k`` to ``k + H_p`` (inclusively). They also receives the slack ``ϵ``
279-
(scalar), which is always zero if `Cwt=Inf`.
276+
extended vectors ``\mathbf{U_e}``, ``\mathbf{Ŷ_e}`` and ``\mathbf{D̂_e}`` as arguments.
277+
They also receives the slack ``ϵ`` (scalar), which is always zero if `Cwt=Inf`. The
278+
following table details the vector sizes and the time steps of the first and last data
279+
point in them:
280+
281+
| VECTOR | SIZE | FIRST TIME STEP | LAST TIME STEP |
282+
| :--------------- | :------------- | :-------------- | :------------- |
283+
| ``\mathbf{U_e}`` | `(nu*(Hp+1),)` | ``k + 0`` | ``k + H_p`` |
284+
| ``\mathbf{Ŷ_e}`` | `(ny*(Hp+1),)` | ``k + 0`` | ``k + H_p`` |
285+
| ``\mathbf{D̂_e}`` | `(nd*(Hp+1),)` | ``k + 0`` | ``k + H_p`` |
280286
281287
More precisely, the last two time steps in ``\mathbf{U_e}`` are forced to be equal, i.e.
282288
``\mathbf{u}(k+H_p) = \mathbf{u}(k+H_p-1)``, since ``H_c ≤ H_p`` implies that

0 commit comments

Comments
 (0)