Skip to content

Commit 2bc4513

Browse files
committed
doc: adding info about NonLinMPC decision vars
1 parent 40570bf commit 2bc4513

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/controller/nonlinmpc.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Both [`NonLinModel`](@ref) and [`LinModel`](@ref) are supported (see Extended He
109109
controller minimizes the following objective function at each discrete time ``k``:
110110
```math
111111
\begin{aligned}
112-
\min_{\mathbf{ΔU}, ϵ}\ & \mathbf{(R̂_y - Ŷ)}' \mathbf{M}_{H_p} \mathbf{(R̂_y - Ŷ)}
112+
\min_{\mathbf{Z}, ϵ}\ & \mathbf{(R̂_y - Ŷ)}' \mathbf{M}_{H_p} \mathbf{(R̂_y - Ŷ)}
113113
+ \mathbf{(ΔU)}' \mathbf{N}_{H_c} \mathbf{(ΔU)} \\&
114114
+ \mathbf{(R̂_u - U)}' \mathbf{L}_{H_p} \mathbf{(R̂_u - U)}
115115
+ C ϵ^2
@@ -120,6 +120,12 @@ subject to [`setconstraint!`](@ref) bounds, and the custom inequality constraint
120120
```math
121121
\mathbf{g_c}(\mathbf{U_e}, \mathbf{Ŷ_e}, \mathbf{D̂_e}, \mathbf{p}, ϵ) ≤ \mathbf{0}
122122
```
123+
and the slack ``ϵ`` and the ``\mathbf{Z}`` vector as the decision variables:
124+
125+
- ``\mathbf{Z} = \mathbf{ΔŨ}`` if the transcription method is `:singleshooting`
126+
- ``\mathbf{Z} = [\begin{smallmatrix} \mathbf{ΔŨ}' & \mathbf{X̂}' \end{smallmatrix}]'`` if the transcription method is `:multipleshoting`
127+
- ``\mathbf{Z} = [\begin{smallmatrix} \mathbf{ΔŨ}' & \mathbf{X̂}' & \mathbf{Ĉ}' \end{smallmatrix}]'`` if the transcription method is `:directcollocation`
128+
123129
The economic function ``J_E`` can penalizes solutions with high economic costs. Setting all
124130
the weights to 0 except ``E`` creates a pure economic model predictive controller (EMPC).
125131
As a matter of fact, ``J_E`` can be any nonlinear function to customize the objective, even

0 commit comments

Comments
 (0)