Methods

This section describes systems methods implemented in HybridSystems.jl.

Switched Systems

The following method makes it easy to create specific kind of hybrid systems called switched systems

HybridSystems.discreteswitchedsystemFunction
discreteswitchedsystem(A::AbstractVector{<:AbstractMatrix})

Creates the discrete switched linear system defined by

\[x_{k+1} = A_{\sigma_k} x_k, \sigma_k = 1, \ldots, m.\]

where m is the length of A.

discreteswitchedsystem(A::AbstractVector{<:AbstractMatrix}, S::AbstractVector)

Creates the state dependent discrete switched linear system defined by

\[x_{k+1} = A_{\sigma_k} x_k, \sigma_k = 1, \ldots, m, x_k \in S[\sigma_k].\]

where m is the length of A and S.

discreteswitchedsystem(A::AbstractVector{<:AbstractMatrix}, G::AbstractAutomaton)

Creates the constrained discrete switched linear system defined by

\[x_{k+1} = A_{\sigma_k} x_k,\]

where $\sigma_1, \ldots, \sigma_k$ is a valid sequence of events of the automaton G.

discreteswitchedsystem(A::AbstractVector{<:AbstractMatrix}, G::AbstractAutomaton, S::AbstractVector)

Creates the state-dependent constrained discrete switched linear system defined by

\[x_{k+1} = A_{\sigma_k} x_k, x_k \in S[q_k]\]

where $q_0, \sigma_1, q_1, \ldots, q_{k-1}, \sigma_k, q_k$ is a valid sequence of events of the automaton G with intermediate states $q_0, \ldots, q_k$.

source

Continuous sub-systems

MathematicalSystems.inputsetFunction
inputset(s::AbstractSystem, u::Int)

Returns the set of allowed inputs of the system at mode u.

source
inputset(s::AbstractSystem, t)

Returns the set of allowed inputs for the transition t.

source

Hybrid automata

Modes

HybridSystems.statesFunction
states(A::AbstractAutomaton)

Returns an iterator over the states of the automaton A. It has the alias modes.

source
HybridSystems.nstatesFunction
nstates(A::AbstractAutomaton)

Returns the number of states of the automaton A. It has the alias nmodes.

source
HybridSystems.modeFunction
mode(hs::HybridSystem, u::Int)

Returns the mode of the dynamical system at discrete state u.

source

Transitions

HybridSystems.transitionsFunction
transitions(A::AbstractAutomaton)

Returns an iterator over the transitions of the automaton A.

transitions(A::AbstractAutomaton, q, r)

Returns an iterator over the transitions from state q to state r of the automaton A.

source
HybridSystems.has_transitionFunction
has_transition(A::AbstractAutomaton, t::AbstractTransition)::Bool

Returns a Bool indicating whether the automaton A has the transition t.

has_transition(A::AbstractAutomaton, q, r)::Bool

Returns a Bool indicating whether the automaton A has a transition from state q to state r.

source
HybridSystems.eventFunction
event(A::AbstractAutomaton, t::AbstractTransition)

Returns the event/symbol of the transition t in the automaton A. It has the alias symbol.

source

Guards and Assignments

Utilities

HybridSystems.switchingsFunction
switchings(s::HybridSystem, k::Int, v0::Int, forward::Bool=true)

Iterates over all the forward switching of length k starting at mode v0.

source