Nonlinear and time varying systems

Most algorithms (except HeuristicILC) work for nonlinear and/or time varying systems.

Linear time-varying systems (LTV)

To construct an LTV system model, use the constructor LTVSystem. LTVSystems can also be obtained by calling IterativeLearningControl2.linearize on a NonlinearSystem. LTV models are used in exactly the same way for ILC as LTI models.

IterativeLearningControl2.LTVSystemType
LTVSystem(A::Array{T, 3}, B::Array{T, 3}, C::Array{T, 3}, D::Array{T, 3}, Ts)

Construct a time-varying system from the state-space matrices A, B, C, D and sampling time Ts.

Arguments:

  • A: A matrix of size (nx, nx, N) where nx is the state dimension and N is the number of time points.
  • B: A matrix of size (nx, nu, N) where nu is the number of inputs.
  • C: A matrix of size (ny, nx, N) where ny is the number of outputs.
  • D: A matrix of size (ny, nu, N).
  • Ts: The sampling time.
source
LTVSystem(syss::Vector{StateSpace{Discrete}})

Construct a time-varying system from a vector of LTI statspace models.

source

Nonlinear systems

To construct a nonlinear system model, use the constructor NonlinearSystem. To run ILC on a NonlinearSystem, construct a NonlinearILCProblem rather than the standard ILCProblem.

Everything else behaves the same for nonlinear ILC, i.e., you still call the function ilc to run the iterations and the function compute_input to compute the ILC input signal manually.

IterativeLearningControl2.NonlinearSystemType
NonlinearSystem{F, G}

A model representation for a discrete-time nonlinear systems on the form

\[\begin{align} x_{k+1} &= f(x_k, a_k, r_k, p, t) \\ y_k &= g(x_k, a_k, r_k, p, t) \end{align}\]

where x is the state, a is ILC adjustment signal, r is the reference, p is a parameter vector and t is the time.

If you have continuous-time dynamics it must be discretized first, see, e.g., the package SeeToDee.jl for options.

Fields:

  • f::F: The dynamics function
  • g::G: The output function
  • nx::Int: The number of state variables
  • ny::Int: The number of outputs
  • na::Int: The number of ILC adjustment inputs
  • Ts::Float64: The sample time
source

Linearization

A nonlinear system may be linearized around an operating point or around a trajectory using the function IterativeLearningControl2.linearize. This function returns a StateSpace model or an LTVSystem.

When a NonlinearILCProblem is solved, this is performed automatically in the method of compute_input associated with the chosen algorithm (if the algorithm is model based).