Skip to content

Commit

Permalink
minor doc correction
Browse files Browse the repository at this point in the history
  • Loading branch information
franckgaga committed Sep 5, 2023
1 parent 91c51d1 commit 39fa86e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/estimator/internal_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function init_internalmodel(As, Bs, Cs, Ds)
end

@doc raw"""
update_estimate!(estim::InternalModel, u, ym, d=Float64[])
update_estimate!(estim::InternalModel, u, ym, d=Float64[]) -> x̂d
Update `estim.x̂` \ `x̂d` \ `x̂s` with current inputs `u`, measured outputs `ym` and dist. `d`.
Expand Down Expand Up @@ -175,7 +175,7 @@ function update_estimate!(estim::InternalModel, u, ym, d=Float64[])
end

@doc raw"""
initstate!(estim::InternalModel, u, ym, d=Float64[])
initstate!(estim::InternalModel, u, ym, d=Float64[]) -> x̂d
Init `estim.x̂d` / `x̂s` states from current inputs `u`, meas. outputs `ym` and disturb. `d`.
Expand All @@ -192,7 +192,7 @@ function initstate!(estim::InternalModel, u, ym, d=Float64[])
end

@doc raw"""
evaloutput(estim::InternalModel, ym, d=Float64[])
evaloutput(estim::InternalModel, ym, d=Float64[]) -> ŷ
Evaluate `InternalModel` outputs `ŷ` from `estim.x̂d` states and measured outputs `ym`.
Expand Down
6 changes: 3 additions & 3 deletions src/plot_sim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct SimResult{O<:Union{SimModel, StateEstimator, PredictiveController}}
end

@doc raw"""
sim!(plant::SimModel, N::Int, u=plant.uop.+1, d=plant.dop; x0=zeros(plant.nx))
sim!(plant::SimModel, N::Int, u=plant.uop.+1, d=plant.dop; x0=zeros(plant.nx)) -> res
Open-loop simulation of `plant` for `N` time steps, default to unit bump test on all inputs.
Expand Down Expand Up @@ -66,7 +66,7 @@ end
u = estim.model.uop .+ 1,
d = estim.model.dop;
<keyword arguments>
)
) -> res
Closed-loop simulation of `estim` estimator for `N` time steps, default to input bumps.
Expand Down Expand Up @@ -120,7 +120,7 @@ end
ry = mpc.estim.model.yop .+ 1,
d = mpc.estim.model.dop;
<keyword arguments>
)
) -> res
Closed-loop simulation of `mpc` controller for `N` time steps, default to setpoint bumps.
Expand Down
6 changes: 3 additions & 3 deletions src/predictive_control.jl
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ Set the estimate at `mpc.estim.x̂`.
setstate!(mpc::PredictiveController, x̂) = (setstate!(mpc.estim, x̂); return mpc)

@doc raw"""
initstate!(mpc::PredictiveController, u, ym, d=Float64[])
initstate!(mpc::PredictiveController, u, ym, d=Float64[]) -> x̂
Init `mpc.ΔŨ` for warm-starting and the states of `mpc.estim` [`StateEstimator`](@ref).
Before calling [`initstate!(::StateEstimator,_,_)`](@ref), it warm-starts ``\mathbf{ΔŨ}``:
Before calling [`initstate!(mpc.estim, u, ym, d)`](@ref), it warm-starts ``\mathbf{ΔŨ}``:
- If `model` is a [`LinModel`](@ref), the vector is filled with the analytical minimum ``J``
of the unconstrained problem.
- Else, the vector is filled with zeros.
Expand All @@ -352,7 +352,7 @@ end


"""
updatestate!(mpc::PredictiveController, u, ym, d=Float64[])
updatestate!(mpc::PredictiveController, u, ym, d=Float64[]) -> x̂
Call [`updatestate!`](@ref) on `mpc.estim` [`StateEstimator`](@ref).
"""
Expand Down
4 changes: 2 additions & 2 deletions src/sim_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function Base.show(io::IO, model::SimModel)
end

"""
updatestate!(model::SimModel, u, d=Float64[])
updatestate!(model::SimModel, u, d=Float64[]) -> x
Update `model.x` states with current inputs `u` and measured disturbances `d`.
Expand All @@ -118,7 +118,7 @@ function updatestate!(model::SimModel, u, d=Float64[])
end

"""
evaloutput(model::SimModel, d=Float64[])
evaloutput(model::SimModel, d=Float64[]) -> y
Evaluate `SimModel` outputs `y` from `model.x` states and measured disturbances `d`.
Expand Down
6 changes: 3 additions & 3 deletions src/state_estim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ end


@doc raw"""
initstate!(estim::StateEstimator, u, ym, d=Float64[])
initstate!(estim::StateEstimator, u, ym, d=Float64[]) -> x̂
Init `estim.x̂` states from current inputs `u`, measured outputs `ym` and disturbances `d`.
Expand Down Expand Up @@ -329,7 +329,7 @@ init_deterstate(model::LinModel, _ , u, d) = steadystate(model, u, d)
init_deterstate(model::SimModel, estim, _, _) = estim.x̂[1:model.nx]

@doc raw"""
evaloutput(estim::StateEstimator, d=Float64[])
evaloutput(estim::StateEstimator, d=Float64[]) -> ŷ
Evaluate `StateEstimator` outputs `ŷ` from `estim.x̂` states and disturbances `d`.
Expand All @@ -353,7 +353,7 @@ end


@doc raw"""
updatestate!(estim::StateEstimator, u, ym, d=Float64[])
updatestate!(estim::StateEstimator, u, ym, d=Float64[]) -> x̂
Update `estim.x̂` estimate with current inputs `u`, measured outputs `ym` and dist. `d`.
Expand Down

0 comments on commit 39fa86e

Please sign in to comment.