Methods

Methods

This section describes systems methods implemented in MathematicalSystems.jl.

States

statedim(s::AbstractSystem)

Returns the dimension of the state space of system s.

source
stateset(s::AbstractSystem)

Returns the set of allowed states of system s.

source

Inputs

inputdim(s::AbstractSystem)

Returns the dimension of the input space of system s.

source
inputset(s::AbstractSystem)

Returns the set of allowed inputs of system s.

source
nextinput(input::ConstantInput, n::Int=1)

Returns the first n elements of this input.

Input

  • input – a constant input
  • n – (optional, default: 1) the number of desired elements

Output

A repeated iterator that generates n equal samples of this input.

source
nextinput(input::VaryingInput, n::Int=1)

Returns the first n elements of this input.

Input

  • input – varying input
  • n – (optional, default: 1) number of desired elements

Output

An iterator of type Base.Iterators.Take that represents at most the first n elements of this input.

source

Output

outputdim(m::AbstractMap)

Returns the dimension of the output space of the map m.

source
outputmap(s::SystemWithOutput)

Returns the output map of a system with output.

source

Traits

islinear(s::AbstractSystem)

Specifies if the dynamics of system s is specified by linear equations.

Notes

We adopt the notion from [Section 2.7, 1]. For example, the system with inputs $x' = f(t, x, u) = A x + B u$ is linear, since the function $f(t, ⋅, ⋅)$ is linear in $(x, u)$ for each $t ∈ \mathbb{R}$. On the other hand, $x' = f(t, x, u) = A x + B u + c$ is affine but not linear, since it is not linear in $(x, u)$.

This function uses the information of the type, not the value. So, if a system type allows an instance that is not linear, it returns false by default. For example, polynomial systems can be nonlinear; hence islinear returns false.

[1] Sontag, Eduardo D. Mathematical control theory: deterministic finite dimensional systems. Vol. 6. Springer Science & Business Media, 2013.

source
islinear(m::AbstractMap)

Specifies if the map m is linear or not.

Notes

A map is linear if it preserves the operations of scalar multiplication and vector addition.

source
isaffine(s::AbstractSystem)

Specifies if the dynamics of system s is specified by affine equations.

Notes

An affine system is the composition of a linear system and a translation. See islinear(::AbstractSystem) for the notion of linear system adopted in this library.

This function uses the information of the type, not the value. So, if a system type allows an instance that is not affine, it returns false by default. For example, polynomial systems can be nonlinear; hence isaffine is false.

source
isaffine(m::AbstractMap)

Specifies if the map m is affine or not.

Notes

An affine map is the composition of a linear map and a translation. See also islinear(::AbstractMap).

source

Maps

apply(m::AbstractMap, args...)

Apply the rule specified by the map to the given arguments.

source