@@ -103,8 +103,9 @@ in which the weight matrices are repeated ``H_p`` or ``H_c`` times by default:
103103 \m athbf{L}_{H_p} &= \t ext{diag}\m athbf{(L,L,...,L)}
104104\e nd{aligned}
105105```
106- Time-varying weights over the horizons are also supported. The ``\m athbf{ΔU}`` includes the
107- input increments ``\m athbf{Δu}(k+j) = \m athbf{u}(k+j) - \m athbf{u}(k+j-1)`` from ``j=0`` to
106+ Time-varying and non-diagonal weights are also supported. Modify the last block in
107+ ``\m athbf{M}_{H_p}`` to specify a terminal weight. The ``\m athbf{ΔU}`` includes the input
108+ increments ``\m athbf{Δu}(k+j) = \m athbf{u}(k+j) - \m athbf{u}(k+j-1)`` from ``j=0`` to
108109``H_c-1``, the ``\m athbf{Ŷ}`` vector, the output predictions ``\m athbf{ŷ}(k+j)`` from
109110``j=1`` to ``H_p``, and the ``\m athbf{U}`` vector, the manipulated inputs ``\m athbf{u}(k+j)``
110111from ``j=0`` to ``H_p-1``. The slack variable ``ϵ`` relaxes the constraints, as described
@@ -120,9 +121,9 @@ arguments.
120121- `Mwt=fill(1.0,model.ny)` : main diagonal of ``\m athbf{M}`` weight matrix (vector).
121122- `Nwt=fill(0.1,model.nu)` : main diagonal of ``\m athbf{N}`` weight matrix (vector).
122123- `Lwt=fill(0.0,model.nu)` : main diagonal of ``\m athbf{L}`` weight matrix (vector).
123- - `M_Hp=diagm(repeat(Mwt,Hp))` : positive semidefinite symmetric weight ``\m athbf{M}_{H_p}``.
124- - `N_Hc=diagm(repeat(Nwt,Hc))` : positive semidefinite symmetric weight ``\m athbf{N}_{H_c}``.
125- - `L_Hp=diagm(repeat(Lwt,Hp))` : positive semidefinite symmetric weight ``\m athbf{L}_{H_p}``.
124+ - `M_Hp=diagm(repeat(Mwt,Hp))` : positive semidefinite symmetric matrix ``\m athbf{M}_{H_p}``.
125+ - `N_Hc=diagm(repeat(Nwt,Hc))` : positive semidefinite symmetric matrix ``\m athbf{N}_{H_c}``.
126+ - `L_Hp=diagm(repeat(Lwt,Hp))` : positive semidefinite symmetric matrix ``\m athbf{L}_{H_p}``.
126127- `Cwt=1e5` : slack variable weight ``C`` (scalar), use `Cwt=Inf` for hard constraints only.
127128- `optim=JuMP.Model(OSQP.MathOptInterfaceOSQP.Optimizer)` : quadratic optimizer used in
128129 the predictive controller, provided as a [`JuMP.Model`](https://jump.dev/JuMP.jl/stable/api/JuMP/#JuMP.Model)
0 commit comments