Skip to content

Commit e69dfd4

Browse files
committed
doc cleaning for moveinput!
1 parent 771fe8a commit e69dfd4

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

src/predictive_control.jl

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -246,34 +246,31 @@ end
246246
setnonlincon!(::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
259251
Compute the optimal manipulated input value `u` for the current control period.
260252
261253
Solve the optimization problem of `mpc` [`PredictiveController`](@ref) and return the
262254
results ``\mathbf{u}(k)``. Following the receding horizon principle, the algorithm discards
263-
the optimal future manipulated inputs ``\mathbf{u}(k+1), \mathbf{u}(k+2), ...`` The
264-
arguments `ry` and `d` are current output setpoints ``\mathbf{r_y}(k)`` and measured
265-
disturbances ``\mathbf{d}(k)``.
266-
267-
The keyword arguments `R̂y` and `D̂` are the predicted output setpoints ``\mathbf{R̂_y}`` and
268-
measured disturbances ``\mathbf{D̂}``. They are assumed constant in the future by default,
269-
that is ``\mathbf{r̂_y}(k+j) = \mathbf{r_y}(k)`` and ``\mathbf{d̂}(k+j) = \mathbf{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 ``\mathbf{u}(k+1), \mathbf{u}(k+2), ...``
272256
273257
Calling a [`PredictiveController`](@ref) object calls this method.
274258
275259
See 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 ``\mathbf{r_y}(k)``.
264+
- `d=[]` : current measured disturbances ``\mathbf{d}(k)``.
265+
- `D̂=repeat(d, mpc.Hp)` : predicted measured disturbances ``\mathbf{D̂}``, constant in the
266+
future by default or ``\mathbf{d̂}(k+j)=\mathbf{d}(k)`` for ``j=1`` to ``H_p``.
267+
- `R̂y=repeat(ry, mpc.Hp)` : predicted output setpoints ``\mathbf{R̂_y}``, constant in the
268+
future by default or ``\mathbf{r̂_y}(k+j)=\mathbf{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 ``\mathbf{r̂_u}(k+j)=\mathbf{u_{op}}`` for ``j=0`` to ``H_p-1``.
271+
- `ym=nothing` : current measured outputs ``\mathbf{y^m}(k)``, only required if `mpc.estim`
272+
is an [`InternalModel`](@ref).
273+
277274
# Examples
278275
```jldoctest
279276
julia> mpc = LinMPC(LinModel(tf(5, [2, 1]), 3), Nwt=[0], Hp=1000, Hc=1);

0 commit comments

Comments
 (0)