Skip to content

Commit 08aa5e3

Browse files
committed
deleted useless example folder
1 parent 39fa86e commit 08aa5e3

File tree

5 files changed

+19
-245
lines changed

5 files changed

+19
-245
lines changed

example/juMPC.jl

Lines changed: 0 additions & 214 deletions
This file was deleted.

example/matlab.mat

-8.47 KB
Binary file not shown.

example/test.jl

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/controller/linmpc.jl

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,28 +92,12 @@ in which the weight matrices are repeated ``H_p`` or ``H_c`` times:
9292
\mathbf{L}_{H_p} &= \text{diag}\mathbf{(L,L,...,L)}
9393
\end{aligned}
9494
```
95-
and with the following nomenclature:
96-
97-
| VARIABLE | DESCRIPTION | SIZE |
98-
| :--------------- | :------------------------------------------------- | :--------------- |
99-
| ``H_p`` | prediction horizon (integer) | `()` |
100-
| ``H_c`` | control horizon (integer) | `()` |
101-
| ``\mathbf{ΔU}`` | manipulated input increments over ``H_c`` | `(nu*Hc,)` |
102-
| ``\mathbf{Ŷ}`` | predicted outputs over ``H_p`` | `(ny*Hp,)` |
103-
| ``\mathbf{U}`` | manipulated inputs over ``H_p`` | `(nu*Hp,)` |
104-
| ``\mathbf{R̂_y}`` | predicted output setpoints over ``H_p`` | `(ny*Hp,)` |
105-
| ``\mathbf{R̂_u}`` | predicted manipulated input setpoints over ``H_p`` | `(nu*Hp,)` |
106-
| ``\mathbf{M}`` | output setpoint tracking weights | `(ny*Hp, ny*Hp)` |
107-
| ``\mathbf{N}`` | manipulated input increment weights | `(nu*Hc, nu*Hc)` |
108-
| ``\mathbf{L}`` | manipulated input setpoint tracking weights | `(nu*Hp, nu*Hp)` |
109-
| ``C`` | slack variable weight | `()` |
110-
| ``ϵ`` | slack variable for constraint softening | `()` |
111-
11295
The ``\mathbf{ΔU}`` vector includes the manipulated input increments ``\mathbf{Δu}(k+j) =
11396
\mathbf{u}(k+j) - \mathbf{u}(k+j-1)`` from ``j=0`` to ``H_c-1``, the ``\mathbf{Ŷ}`` vector,
11497
the output predictions ``\mathbf{ŷ}(k+j)`` from ``j=1`` to ``H_p``, and the ``\mathbf{U}``
11598
vector, the manipulated inputs ``\mathbf{u}(k+j)`` from ``j=0`` to ``H_p-1``. The
11699
manipulated input setpoint predictions ``\mathbf{R̂_u}`` are constant at ``\mathbf{r_u}``.
100+
See Extended Help for a detailed nomenclature.
117101
118102
This method uses the default state estimator, a [`SteadyKalmanFilter`](@ref) with default
119103
arguments.
@@ -150,6 +134,23 @@ LinMPC controller with a sample time Ts = 4.0 s, OSQP optimizer, SteadyKalmanFil
150134
Manipulated inputs setpoints ``\mathbf{r_u}`` are not common but they can be interesting
151135
for over-actuated systems, when `nu > ny` (e.g. prioritize solutions with lower economical
152136
costs). The default `Lwt` value implies that this feature is disabled by default.
137+
138+
The objective function follows this nomenclature:
139+
140+
| VARIABLE | DESCRIPTION | SIZE |
141+
| :--------------- | :------------------------------------------------- | :--------------- |
142+
| ``H_p`` | prediction horizon (integer) | `()` |
143+
| ``H_c`` | control horizon (integer) | `()` |
144+
| ``\mathbf{ΔU}`` | manipulated input increments over ``H_c`` | `(nu*Hc,)` |
145+
| ``\mathbf{Ŷ}`` | predicted outputs over ``H_p`` | `(ny*Hp,)` |
146+
| ``\mathbf{U}`` | manipulated inputs over ``H_p`` | `(nu*Hp,)` |
147+
| ``\mathbf{R̂_y}`` | predicted output setpoints over ``H_p`` | `(ny*Hp,)` |
148+
| ``\mathbf{R̂_u}`` | predicted manipulated input setpoints over ``H_p`` | `(nu*Hp,)` |
149+
| ``\mathbf{M}`` | output setpoint tracking weights | `(ny*Hp, ny*Hp)` |
150+
| ``\mathbf{N}`` | manipulated input increment weights | `(nu*Hc, nu*Hc)` |
151+
| ``\mathbf{L}`` | manipulated input setpoint tracking weights | `(nu*Hp, nu*Hp)` |
152+
| ``C`` | slack variable weight | `()` |
153+
| ``ϵ`` | slack variable for constraint softening | `()` |
153154
"""
154155
LinMPC(model::LinModel; kwargs...) = LinMPC(SteadyKalmanFilter(model); kwargs...)
155156

src/predictive_control.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function moveinput!(
257257
R̂y::Vector = repeat(ry, mpc.Hp),
258258
::Vector = repeat(d, mpc.Hp),
259259
ym::Union{Vector, Nothing} = nothing
260-
)
260+
)
261261
validate_setpointdist(mpc, ry, d, R̂y, D̂)
262262
getestimates!(mpc, mpc.estim, ym, d)
263263
predictstoch!(mpc, mpc.estim, d, ym)

0 commit comments

Comments
 (0)