@@ -246,34 +246,31 @@ end
246246setnonlincon! (:: PredictiveController , :: SimModel ) = nothing
247247
248248@doc raw """
249- moveinput!(
250- mpc::PredictiveController,
251- ry = mpc.estim.model.yop,
252- d = [];
253- D̂ = repeat(d, mpc.Hp),
254- R̂y = repeat(ry, mpc.Hp),
255- R̂u = repeat(mpc.estim.model.uop, mpc.Hp),
256- ym = nothing
257- )
249+ moveinput!(mpc::PredictiveController, ry=mpc.estim.model.yop, d=[]; <keyword arguments>) -> u
258250
259251Compute the optimal manipulated input value `u` for the current control period.
260252
261253Solve the optimization problem of `mpc` [`PredictiveController`](@ref) and return the
262254results ``\m athbf{u}(k)``. Following the receding horizon principle, the algorithm discards
263- the optimal future manipulated inputs ``\m athbf{u}(k+1), \m athbf{u}(k+2), ...`` The
264- arguments `ry` and `d` are current output setpoints ``\m athbf{r_y}(k)`` and measured
265- disturbances ``\m athbf{d}(k)``.
266-
267- The keyword arguments `R̂y` and `D̂` are the predicted output setpoints ``\m athbf{R̂_y}`` and
268- measured disturbances ``\m athbf{D̂}``. They are assumed constant in the future by default,
269- that is ``\m athbf{r̂_y}(k+j) = \m athbf{r_y}(k)`` and ``\m athbf{d̂}(k+j) = \m athbf{d}(k)`` for
270- ``j=1`` to ``H_p``. Current measured output `ym` is only required if `mpc.estim` is a
271- [`InternalModel`](@ref).
255+ the optimal future manipulated inputs ``\m athbf{u}(k+1), \m athbf{u}(k+2), ...``
272256
273257Calling a [`PredictiveController`](@ref) object calls this method.
274258
275259See also [`LinMPC`](@ref), [`NonLinMPC`](@ref).
276260
261+ # Arguments
262+ - `mpc::PredictiveController` : solve optimization problem of `mpc`.
263+ - `ry=mpc.estim.model.yop` : current output setpoints ``\m athbf{r_y}(k)``.
264+ - `d=[]` : current measured disturbances ``\m athbf{d}(k)``.
265+ - `D̂=repeat(d, mpc.Hp)` : predicted measured disturbances ``\m athbf{D̂}``, constant in the
266+ future by default or ``\m athbf{d̂}(k+j)=\m athbf{d}(k)`` for ``j=1`` to ``H_p``.
267+ - `R̂y=repeat(ry, mpc.Hp)` : predicted output setpoints ``\m athbf{R̂_y}``, constant in the
268+ future by default or ``\m athbf{r̂_y}(k+j)=\m athbf{r_y}(k)`` for ``j=1`` to ``H_p``.
269+ - `R̂u=repeat(mpc.estim.model.uop, mpc.Hp)` : predicted manipulated input setpoints, constant
270+ in the future by default or ``\m athbf{r̂_u}(k+j)=\m athbf{u_{op}}`` for ``j=0`` to ``H_p-1``.
271+ - `ym=nothing` : current measured outputs ``\m athbf{y^m}(k)``, only required if `mpc.estim`
272+ is an [`InternalModel`](@ref).
273+
277274# Examples
278275```jldoctest
279276julia> mpc = LinMPC(LinModel(tf(5, [2, 1]), 3), Nwt=[0], Hp=1000, Hc=1);
0 commit comments