Exported functions and types
Index
IterativeLearningControl2.ConstrainedILC
IterativeLearningControl2.GradientILC
IterativeLearningControl2.HeuristicILC
IterativeLearningControl2.ILCProblem
IterativeLearningControl2.ILCSolution
IterativeLearningControl2.LTVSystem
IterativeLearningControl2.ModelFreeILC
IterativeLearningControl2.NonlinearILCProblem
IterativeLearningControl2.NonlinearSystem
IterativeLearningControl2.OptimizationILC
ControlSystemsBase.linearize
IterativeLearningControl2.compute_input
IterativeLearningControl2.compute_input
IterativeLearningControl2.hankel_operator
IterativeLearningControl2.hv
IterativeLearningControl2.ilc
IterativeLearningControl2.ilc_theorem
IterativeLearningControl2.init
IterativeLearningControl2.init
IterativeLearningControl2.linearize!
IterativeLearningControl2.mv_hankel_operator
Docstrings
IterativeLearningControl2.ILCProblem
— TypeILCProblem
Fields:
r
: Reference signal, a matrix of size(ny, N)
whereny
is the number of outputs andN
is the number of time points.Gr
: Closed-loop transfer function from reference to output. May be either anLTISystem
model from ControlSystemsBase, such as those created usingtf
orss
, or anLTVSystem
model.Gu
: Closed-loop transfer function from plant input to output
IterativeLearningControl2.ILCSolution
— TypeILCSolution
A structure representing the solution to an ILC problem.
Fields:
Y
: Plant responses.Y[i]
is the response during thei
th iteration. The first response is recorded before any ILC input is applied, while the last response is recorded before the last ILC adjustment signal has been computed, i.e.,Y[end]
corresponds to the response to the ILC inputA[end-1]
.E
: Errors.E[i]
is the error during thei
th iteration, i.e.,E[i] = r - Y[i]
wherer
is the reference signal.A
: ILC inputs.A[i]
is the ILC input during thei
th iteration.prob
: TheILCProblem
that was solvedalg
: TheILCAlgorithm
that was used
ControlSystemsBase.linearize
— Methodlinearize(m::NonlinearSystem, x0::AbstractVector, a0::AbstractVector, args...)
Linearize a nonlinear system m
around the operating point (x0, a0)
.
Arguments
m::NonlinearSystem
: The nonlinear system to be linearized.x0::AbstractVector
: The operating point of the state variables.a0::AbstractVector
: The operating point of the ILC input variables.args...
: Additional arguments to be passed to the dynamics functions (such asr, p, t
).
Returns
An instance of ControlSystemsBase.StateSpace
representing the linearized system.
IterativeLearningControl2.compute_input
— Methodcompute_input(prob, alg::ILCAlgorithm, workspace, a, e)
Compute the next ILC input using the learning rule
Arguments:
alg
: The ILC algorithmworkspace
: A workspace created by callinginit
on the algorithm:workspace = init(prob, alg)
.a
: Previous ILC inpute
: Errorr - y
IterativeLearningControl2.hankel_operator
— Methodhankel(sys::LTISystem{<:Discrete}, N::Int)
Return a matrix operator $H$ such that $Hu^T = y^T$ where y = lsim(sys, u)
. $H$ is a Hankel matrix containing the Markov parameters of the system (scaled impulse response).
IterativeLearningControl2.hv
— MethodA little helper function that takes a matrix with dimensions (nsignals, n_timepoints)
and returns a reshaped vector version that is suitable for multiplying the Hankel operator obtained by calling hankel_operator
or mv_hankel_operator
.
IterativeLearningControl2.ilc
— Methodilc(prob, alg; iters = 5, actual=prob)
Run the ILC algorithm for iters
iterations. Returns a ILCSolution
structure.
To manually perform ILC iterations, see the functions
To simulate the effect of plant-model mismatch, one may provide a different instance of the ILCProblem using the actual
keyword argument which is used to simulate the plant response. The ILC update will be performed using the plant model from prob
, while simulated data will be acquired from the plant models in the actual
problem.
IterativeLearningControl2.ilc_theorem
— Functionilc_theorem(alg::HeuristicILC, Gc, Gcact = nothing)
Plot the stability boundary for the ILC algorithm.
Arguments:
alg
: Containing the filters $Q$ and $L$Gc
: The closed-loop system from ILC signal to output. Ifalg.location = :ref
, this is typically given byfeedback(P*C)
while ifalg.location = :input
, this is typically given byfeedback(P, C)
.Gcact
: If provided, this is the "actual" closed-loop system which may be constructed using a different plant model thanGc
. This is useful when trying to determine if the filter choises will lead to a robust ILC algorithm.Gc
may be constructed using, e.g., uncertain parameters, see https://juliacontrol.github.io/RobustAndOptimalControl.jl/dev/uncertainty/ for more details.
IterativeLearningControl2.init
— Methodworkspace = init(prob, alg)
Initialize the ILC algorithm. This function is called internally by the funciton ilc
but manual iterations require the user to initialize the workspace explicitly.
IterativeLearningControl2.linearize!
— Methodlinearize(m::NonlinearSystem, x0::AbstractMatrix, a0::AbstractMatrix, r, p)
Linearizes a nonlinear system m
around the trajectory defined by x0
, a0
, r
, and p
. The resulting linear time-varying (LTV) system is returned.
Arguments
m::NonlinearSystem
: The nonlinear system to be linearized.x0::AbstractMatrix
: The state matrix of size(nx, N)
wherenx
is the number of states andN
is the number of time points.a0::AbstractMatrix
: The input matrix of size(na, N)
wherena
is the number of adjustment inputs.r
: The reference signal matrix.p
: The parameter object.
IterativeLearningControl2.mv_hankel_operator
— Functionmv_hankel_operator(sys::LTISystem{<:Discrete}, N::Int)
Return a matrix operator $H$ such that y == reshape(H*vec(u'), :, sys.ny)'
where y = lsim(sys, u)
. $H$ is a block Hankel matrix containing the Markov parameters of the system (scaled impulse response).
Use of this function requires the user to manually install and load the packages using JuMP, BlockArrays
.