@@ -94,20 +94,20 @@ in which the weight matrices are repeated ``H_p`` or ``H_c`` times:
9494```
9595and with the following nomenclature:
9696
97- | VAR. | DESCRIPTION |
98- | :---------------- | :------------------------------------------------- |
99- | ``H_p`` | prediction horizon |
100- | ``H_c`` | control horizon |
101- | ``\m athbf{ΔU}`` | manipulated input increments over ``H_c`` |
102- | ``\m athbf{Ŷ}`` | predicted outputs over ``H_p`` |
103- | ``\m athbf{U}`` | manipulated inputs over ``H_p`` |
104- | ``\m athbf{R̂_y}`` | predicted output setpoints over ``H_p`` |
105- | ``\m athbf{R̂_u}`` | predicted manipulated input setpoints over ``H_p`` |
106- | ``\m athbf{M}`` | output setpoint tracking weights |
107- | ``\m athbf{N}`` | manipulated input increment weights |
108- | ``\m athbf{L}`` | manipulated input setpoint tracking weights |
109- | ``C`` | slack variable weight |
110- | ``ϵ`` | slack variable for constraint softening |
97+ | VARIABLE | DESCRIPTION | SIZE |
98+ | :--------------- | :------------------------------------------------- | : --------------- |
99+ | ``H_p`` | prediction horizon (integer) | `()` |
100+ | ``H_c`` | control horizon (integer) | `()` |
101+ | ``\m athbf{ΔU}`` | manipulated input increments over ``H_c`` | `(nu*Hc,)` |
102+ | ``\m athbf{Ŷ}`` | predicted outputs over ``H_p`` | `(ny*Hp,)` |
103+ | ``\m athbf{U}`` | manipulated inputs over ``H_p`` | `(nu*Hp,)` |
104+ | ``\m athbf{R̂_y}`` | predicted output setpoints over ``H_p`` | `(ny*Hp,)` |
105+ | ``\m athbf{R̂_u}`` | predicted manipulated input setpoints over ``H_p`` | `(nu*Hp,)` |
106+ | ``\m athbf{M}`` | output setpoint tracking weights | `(ny*Hp, ny*Hp)` |
107+ | ``\m athbf{N}`` | manipulated input increment weights | `(nu*Hc, nu*Hc)` |
108+ | ``\m athbf{L}`` | manipulated input setpoint tracking weights | `(nu*Hp, nu*Hp)` |
109+ | ``C`` | slack variable weight | `()` |
110+ | ``ϵ`` | slack variable for constraint softening | `()` |
111111
112112The ``\m athbf{ΔU}`` vector includes the manipulated input increments ``\m athbf{Δu}(k+j) =
113113\m athbf{u}(k+j) - \m athbf{u}(k+j-1)`` from ``j=0`` to ``H_c-1``, the ``\m athbf{Ŷ}`` vector,
@@ -130,7 +130,7 @@ arguments.
130130- `optim=JuMP.Model(OSQP.MathOptInterfaceOSQP.Optimizer)` : quadratic optimizer used in
131131 the predictive controller, provided as a [`JuMP.Model`](https://jump.dev/JuMP.jl/stable/reference/models/#JuMP.Model)
132132 (default to [`OSQP.jl`](https://osqp.org/docs/parsers/jump.html) optimizer)
133-
133+ ``
134134# Examples
135135```jldoctest
136136julia> model = LinModel([tf(3, [30, 1]); tf(-2, [5, 1])], 4);
@@ -172,6 +172,7 @@ LinMPC controller with a sample time Ts = 4.0 s, KalmanFilter estimator and:
172172 0 measured disturbances d
173173```
174174"""
175+
175176function LinMPC (
176177 estim:: S ;
177178 Hp:: Union{Int, Nothing} = nothing ,
0 commit comments