System
Represents and manipulates dynamical systems and their approximations, extending MathematicalSystems and HybridSystems. It covers system approximations (over-/under-approximations of the dynamics, growth bounds and linearizations), local affine approximations, the trait-based controller protocol, ellipsoidal transition synthesis (solve_transition), and trajectories with the closed-loop simulation engine (get_closed_loop_trajectory). Controllers are plain data, so they can be serialized and reloaded.
API reference
Dionysos.System.AbstractAffineApproximationProvider — Type
AbstractAffineApproximationProviderSupertype of the strategies producing local affine approximations of the dynamics; see build_affine_approximation.
Dionysos.System.AffineApproximation — Type
AffineApproximationResult of build_affine_approximation: the local affine system (MathematicalSystems.NoisyConstrainedAffineControlDiscreteSystem), the lipschitz bounds on the linearization error over the local domain, the Uformat/Wformat matrices consumed by the transition-synthesis LMIs, and a provider-specific summary NamedTuple.
Dionysos.System.AffineController — Type
AffineController(map::MathematicalSystems.AffineMap)Static state feedback u = A·x + c (plain data). Wrap a transition-synthesis result with as_controller to simulate it in a closed loop.
Dionysos.System.AnalyticAffineApproximationProvider — Type
AnalyticAffineApproximationProvider(; A, B, f, lipschitz, nw = 1, E = nothing,
ΔW = zeros(nw), Uformat, Wformat)Affine approximation from user-supplied derivative information — the same data UGA's LINEARIZED mode asks for, usable without Symbolics:
A(x̄, ū, w̄),B(x̄, ū, w̄): state and input Jacobians at the linearization point;E(x̄, ū, w̄): noise matrix (defaults to a zeronx × nwmatrix);f(x̄, ū, w̄): the dynamics value, giving the affine offsetc = f − A·x̄ − B·ū − E·w̄;lipschitz: error bound over the local box — either a constant vector or a callable(x̄, ū, w̄, δx, δu) -> Vector;Uformat/Wformat: as inSymbolicAffineApproximationProvider.
Dionysos.System.AutomatonMemoryController — Type
AutomatonMemoryControllerFinite-memory controller over abstract states, fully table-backed — the serializable alternative to a closure-based DiscreteDynamicController for specification-automaton memory (e.g. co-safe LTL):
- the memory follows the specification automaton:
qa′ = step_map[(qa, label)]withlabel = label_of_state[qs](default_labelfor states outside the labeled range); - the control comes from a controller synthesized on the product automaton, looked up through the product-state table
pid[(qs, qa)].
Dionysos.System.ClosedLoopTrajectory — Type
ClosedLoopTrajectoryResult of a closed-loop simulation: the state trajectory x, the input trajectory u, and — for dynamic controllers — the controller-memory trajectory q (nothing for static controllers). Destructures as x_traj, u_traj[, q_traj] = traj.
Dionysos.System.ContinuousTimeCenteredSimulation — Type
ContinuousTimeCenteredSimulation <: ContinuousTimeSystemUnderApproximationA concrete underapproximation of a continuous-time system using center-point simulation.
Simulates only the center of the state set under the system dynamics. Returns a single propagated point after integration over a time step.
Fields
system: A constrained continuous-time control system.
Underapproximation Map
Returns a function of the form: f(rect::LazySets.AbstractHyperrectangle, u::SVector, tstep::Real) -> Vector{SVector} which returns a singleton list with the propagated center point.
Notes
Use discretize to convert this approximation into a discrete-time approximation suitable for use in fixed-step abstraction pipelines.
Dionysos.System.ContinuousTimeGrowthBound — Type
ContinuousTimeGrowthBound <: ContinuousTimeSystemOverApproximationA continuous-time overapproximation based on growth bounds for reachable set propagation.
It estimates how uncertainty evolves through time using a growthbound_map which depends on the radius, input, and time step.
Fields
system: AConstrainedBlackBoxControlContinuousSystemfromMathematicalSystems.jl.growthbound_map: A functionf(radius::SVector, u::SVector, tstep::Real) -> SVectorthat estimates how uncertainty grows over a time step.
Overapproximation Map
Returns a function of the form: f(rect::LazySets.AbstractHyperrectangle, u::SVector, tstep::Real) -> LazySets.Hyperrectangle This function simulates the image of the center and inflates it using the computed growth bound.
Dionysos.System.ContinuousTimeGrowthBound — Method
ContinuousTimeGrowthBound(system; jacobian_bound = nothing, ngrowthbound = DEFAULT_NUM_SUBSTEPS)Build a continuous-time growth-bound overapproximation from a Jacobian bound: the radius dynamics ṙ = jacobian_bound(u) * r are integrated with ngrowthbound RK4 substeps per time step. When jacobian_bound is not provided, it is derived from the system via compute_jacobian_bound (requires an extension providing it).
Dionysos.System.ContinuousTimeLinearized — Type
ContinuousTimeLinearized <: ContinuousTimeSystemOverApproximationA continuous-time overapproximation based on Runge-Kutta linearization of the system dynamics.
The method propagates both the nominal trajectory and its linearized sensitivity over a time step using a 4th-order Runge-Kutta scheme, while bounding the second-order remainder error.
Fields
system: AConstrainedBlackBoxControlContinuousSystemfromMathematicalSystems.jl.linsys_map: A function(x, dx, u, tstep) -> (Fx, DFx)simulating a linearized trajectory and its Jacobian.error_map: A function(r, u, tstep) -> Δcomputing a bound on the nonlinearity-induced error over time.
Overapproximation Map
Returns a function of the form: f(rect::LazySets.AbstractHyperrectangle, u::SVector, tstep::Real) -> LazySets.Hyperrectangle The result is a conservative reachable set from the center using linearization + second-order error correction.
Dionysos.System.ContinuousTimeOverApproximationMap — Type
ContinuousTimeOverApproximationMap <: ContinuousTimeSystemOverApproximationConcrete implementation of a continuous-time overapproximation of a control system.
This type stores a constrained continuous-time system and an overapproximation function that simulates or bounds the system’s behavior over a given time step.
Fields
system: The underlyingConstrainedBlackBoxControlContinuousSystemfromMathematicalSystems.jl.over_approximation_map: A function of the formf(elem::LazySets.LazySet, u::SVector, tstep::Real) -> bounded LazySets.LazySetwhich returns an overapproximated reachable set over the given time interval.
Notes
Use discretize to convert this approximation into a discrete-time overapproximation suitable for use in fixed-step abstraction pipelines.
Dionysos.System.ContinuousTimeRandomSimulation — Type
ContinuousTimeRandomSimulation <: ContinuousTimeSystemUnderApproximationA stochastic underapproximation for continuous-time systems using random point sampling.
Simulates multiple samples from the input set, over a fixed time step.
Fields
system: The underlying continuous-time control system.nsamples: Number of random samples.rng: Optional random number generator for reproducible sampling (nothing= global RNG).
Underapproximation Map
Returns a function of the form: f(rect::LazySets.AbstractHyperrectangle, u::SVector, tstep::Real) -> Vector{SVector} which returns a list of propagated samples.
Notes
Use discretize to convert this approximation into a discrete-time approximation suitable for use in fixed-step abstraction pipelines.
Dionysos.System.ContinuousTimeSystemApproximation — Type
ContinuousTimeSystemApproximation <: SystemApproximationAbstract supertype for approximations of continuous-time systems.
Dionysos.System.ContinuousTimeSystemOverApproximation — Type
ContinuousTimeSystemOverApproximation <: ContinuousTimeSystemApproximationAn abstract type representing an overapproximation of a continuous-time system.
Dionysos.System.ContinuousTimeSystemUnderApproximation — Type
ContinuousTimeSystemUnderApproximation <: ContinuousTimeSystemApproximationAn abstract type representing an underapproximation of a continuous-time system.
Dionysos.System.ContinuousTrajectory — Type
ContinuousTrajectory{T, XVT<:AbstractVector{T}, UVT<:AbstractVector{T}}x is a sequence of points in the state space and u is a sequence of points in the input space.
Dionysos.System.ControlTable — Type
ControlTable(nstates::Int)Plain-data map from an abstract state q ∈ 1:nstates to the list of admissible abstract inputs, the canonical controller_map of a DiscreteStaticController. Callable: table(q) returns the input list; fill with add_control! / set_control!.
Dionysos.System.ControllerKind — Type
ControllerKindTrait: StaticKind() for a stateless feedback map, DynamicKind() for a controller with internal memory (protocol initial_state/update_state).
Dionysos.System.DiscreteDynamicController — Type
DiscreteDynamicController(x0, dom, statemap, outputmap, randomize)Dynamic feedback on abstract states with memory x starting at x0: statemap(x, y) updates the memory, outputmap(x, y) returns the control (or the list of admissible controls), dom contains the valid (x, y) pairs. Closure-backed and therefore not serializable — prefer AutomatonMemoryController for controllers meant to be saved.
Dionysos.System.DiscreteStaticController — Type
DiscreteStaticController(dom, controller_map, randomize)Static feedback on abstract states: controller_map(q) returns the admissible inputs of q (e.g. a ControlTable), dom the set of controlled states.
Dionysos.System.DiscreteTimeCenteredSimulation — Type
DiscreteTimeCenteredSimulation <: DiscreteTimeSystemUnderApproximationA concrete underapproximation that simulates the evolution of the center of the input set under a discrete-time system.
This approximation is very conservative, returning a single propagated point from the center of the input set.
Fields
system: A constrained discrete-time control system (e.g., fromMathematicalSystems.jl).
Underapproximation Map
Returns a function of the form: f(rect::LazySets.AbstractHyperrectangle, u::SVector) -> Vector{SVector} which returns a singleton list with the propagated center point.
Dionysos.System.DiscreteTimeGrowthBound — Type
DiscreteTimeGrowthBound <: DiscreteTimeSystemOverApproximationA discrete-time overapproximation based on growth bounds.
Given a system and a growthbound_map, this approximation inflates the center trajectory by a radius that depends on the current state set's size and the input.
Fields
system: AConstrainedBlackBoxControlDiscreteSystemfromMathematicalSystems.jl.growthbound_map: A functionf(radius::SVector, u::SVector) -> SVectorthat computes how uncertainty in state evolves under the system.
Overapproximation Map
Returns a function of the form: f(rect::LazySets.AbstractHyperrectangle, u::SVector) -> LazySets.Hyperrectangle This function simulates the image of the center and inflates it using the computed growth bound.
Dionysos.System.DiscreteTimeLinearized — Type
DiscreteTimeLinearized <: DiscreteTimeSystemOverApproximationA discrete-time overapproximation based on linearization of the system dynamics.
This model approximates system behavior by propagating the linearized dynamics around the center of the state set and bounding the resulting error.
Fields
system: AConstrainedBlackBoxControlDiscreteSystemfromMathematicalSystems.jl.linsys_map: A function(x, dx, u) -> (Fx, DFx)returning the linearized next stateFxand its JacobianDFxaround perturbationdx.error_map: A function(radius, u) -> Δreturning a bound on the linearization error based on the set radius.
Overapproximation Map
Returns a function of the form: f(rect::LazySets.AbstractHyperrectangle, u::SVector) -> LazySets.Hyperrectangle It evaluates the system at the center, adds linearized spread based on Jacobian, and inflates with the error bound.
Dionysos.System.DiscreteTimeOverApproximationMap — Type
DiscreteTimeOverApproximationMap <: DiscreteTimeSystemOverApproximationConcrete implementation of a discrete-time overapproximation of a dynamical system.
This type wraps a constrained discrete-time system along with an overapproximation map that, given a set of states and a control input, returns a conservative reachable set.
Fields
system: The underlyingConstrainedBlackBoxControlDiscreteSystemfromMathematicalSystems.jl.over_approximation_map: A function of the formf(elem::LazySets.LazySet, u::SVector) -> bounded LazySets.LazySetwhich returns an overapproximated successor set.
Dionysos.System.DiscreteTimeRandomSimulation — Type
DiscreteTimeRandomSimulation <: DiscreteTimeSystemUnderApproximationA stochastic underapproximation of a discrete-time system using random sampling.
Propagates multiple randomly sampled points from the input set to provide a discrete underapproximation of reachable states.
Fields
system: The underlying discrete-time control system.nsamples: Number of samples to draw from the input set.rng: Optional random number generator for reproducible sampling (nothing= global RNG).
Underapproximation Map
Returns a function of the form: f(rect::LazySets.AbstractHyperrectangle, u::SVector) -> Vector{SVector} which returns a list of propagated samples.
Dionysos.System.DiscreteTimeSystemApproximation — Type
DiscreteTimeSystemApproximation <: SystemApproximationAbstract supertype for approximations of discrete-time systems.
Dionysos.System.DiscreteTimeSystemOverApproximation — Type
DiscreteTimeSystemOverApproximation <: DiscreteTimeSystemApproximationAn abstract type representing an overapproximation of a discrete-time system.
Dionysos.System.DiscreteTimeSystemUnderApproximation — Type
DiscreteTimeSystemUnderApproximation <: DiscreteTimeSystemApproximationAn abstract type representing an underapproximation of a discrete-time system.
Dionysos.System.DiscreteTrajectory — Type
DiscreteTrajectory{Q, TT}q_0 is the starting mode and transitions is a sequence of discrete transitions in the system.
Dionysos.System.SymbolicAffineApproximationProvider — Type
SymbolicAffineApproximationProviderAffine approximation from symbolic dynamics fsymbolic(x, u, w): Jacobians are computed symbolically and the Lipschitz constants are bounded over the local domain with interval arithmetic. ΔW is the noise-box radius vector; Uformat / Wformat are the LMI encodings of the input and noise sets (format_input_set / format_noise_set). Requires Symbolics.jl (using Symbolics).
Dionysos.System.SymbolicSystem — Type
SymbolicSystemSystem-definition bundle for solvers that re-linearize the dynamics on the fly (lazy-ellipsoids abstraction): symbolic dynamics (fsymbolic, x, u, w), dimensions, domains X/U/W, local linearization radii ΔX/ΔU/ΔW, forward/backward evaluators, and the LMI formats of U and W. Use get_affine_provider to obtain the corresponding SymbolicAffineApproximationProvider.
Dionysos.System.SystemApproximation — Type
SystemApproximationAbstract supertype for all system approximation types.
Dionysos.System.Trajectory — Type
Trajectory{T}provides the sequence of some elements of a trajectory.
Dionysos.System.TransitionResult — Type
TransitionResultOutcome of one transition-synthesis SDP (solve_transition / solve_transition_backward).
feasible::Bool— whether a certified controller was found;controller— the affine controller as aMathematicalSystems.AffineMapx ↦ Kx + b(withb = ℓ − K·c₁), ornothingif infeasible;cost— upper bound on the worst-case transition cost, ornothing;source— the synthesized source ellipsoid (backward mode only), ornothing.
Dionysos.System.add_control! — Method
Append input u to the admissible inputs of state q.
Dionysos.System.as_controller — Method
as_controller(result::TransitionResult) -> Union{Nothing, AffineController}The synthesized affine controller as a simulatable AffineController, or nothing if the transition was infeasible.
Dionysos.System.build_affine_approximation — Function
build_affine_approximation(provider, x̄, ū, w̄ = nothing; δx, δu) -> AffineApproximationAffine approximation of the dynamics around the linearization point (x̄, ū, w̄), valid on the box of radii δx / δu around it (w̄ = nothing linearizes at zero noise). Implemented per provider.
Dionysos.System.discretize_continuous_system — Method
discretize_continuous_system(system::MS.AbstractContinuousSystem, tstep::Float64; num_substeps = 5)Convert a continuous-time control system to a discrete-time system.
Arguments
system: Continuous-timeAbstractContinuousSystemfrom MathematicalSystems.jltstep: Fixed time step for Euler discretizationnum_substeps: Number of RK4 substeps per time step
Returns
- A
ConstrainedBlackBoxControlDiscreteSystemwith the same state/input constraints
Dionysos.System.format_input_set — Method
format_input_set(U) -> Vector{<:AbstractMatrix}Convert the input set U (LazySets.AbstractHyperrectangle, LazySets.Ellipsoid, or a LazySets.IntersectionArray of those) into the list of matrices Uᵢ encoding the input constraints |Uᵢ·u| ≤ 1 used by the transition-synthesis LMIs.
Dionysos.System.format_noise_set — Method
format_noise_set(rec::LazySets.AbstractHyperrectangle) -> MatrixVertices of the noise polytope rec as an n × 2ⁿ matrix (one vertex per column), the format consumed by the transition-synthesis LMIs.
Dionysos.System.get_affine_provider — Method
get_affine_provider(sys::SymbolicSystem) -> SymbolicAffineApproximationProviderThe affine-approximation provider matching the bundle's symbolic dynamics.
Dionysos.System.get_closed_loop_trajectory — Method
get_closed_loop_trajectory(system, controller, x0, nstep; kwargs...) -> ClosedLoopTrajectorySimulate the closed loop for at most nstep steps and return the visited states/inputs (plus the controller-memory trajectory q for dynamic controllers). The loop stops early when stopping(x) holds, when trajectory_success(x_traj) holds, when the controller returns nothing, or when the successor is nothing/non-finite.
Keyword arguments: meas (measurement map, default identity), stopping, trajectory_success, wrap (state normalization, e.g. periodic wrapping), update_on_next (feed the next measurement to update_state), f_map_override (replace MathematicalSystems.mapping(system) as the step function; may return nothing for "no successor"), verbose.
Dionysos.System.get_over_approximation_map — Method
get_over_approximation_map(overApprox::ContinuousTimeSystemOverApproximation) -> FunctionReturns a function that computes the overapproximation of the system's evolution: f(elem::LazySets.LazySet, u::SVector{M,T}, tstep::T) -> bounded LazySets.LazySet
Dionysos.System.get_over_approximation_map — Method
get_over_approximation_map(approx::DiscreteTimeSystemOverApproximation) -> FunctionReturns a function that computes the overapproximation of the system's evolution: f(elem::LazySets.LazySet, u::SVector{M,T}) -> bounded LazySets.LazySet
Dionysos.System.get_under_approximation_map — Method
get_under_approximation_map(approx::ContinuousTimeSystemUnderApproximation) -> FunctionReturns a function that computes the underapproximation (list of points) of the system's evolution: f(rect::LazySets.AbstractHyperrectangle, u::SVector{M,T}, tstep::T) -> SVector{N,T}[]
Dionysos.System.get_under_approximation_map — Method
get_under_approximation_map(approx::DiscreteTimeSystemUnderApproximation) -> FunctionReturns a function that computes the underapproximation (list of points) of the system's evolution: f(rect::LazySets.AbstractHyperrectangle, u::SVector{M,T}) -> SVector{N,T}[]
Dionysos.System.input_cache — Method
input_cache(approx::DiscreteTimeSystemOverApproximation, r, u)Data the approximation can hoist out of the per-cell loop: whatever depends only on the input u and the (uniform) cell radius r, computed once per input and reused by reach_set across all cells. Defaults to nothing.
Dionysos.System.reach_set — Method
reach_set(approx::DiscreteTimeSystemOverApproximation, elem, u, cache) -> LazySets.LazySetOver-approximation of the successor set of the cell elem under input u, using the per-input cache produced by input_cache. Concrete approximations override both functions as a pair; the fallback ignores the cache and calls the generic over-approximation map.
Dionysos.System.runge_kutta4 — Method
runge_kutta4(dynamics, x, u, tstep, num_substeps::Int)Perform one step of 4th-order Runge-Kutta time integration.
Arguments
dynamics: Functionf(x, u)for the continuous dynamicsx: Current stateu: Control inputtstep: Total time stepnum_substeps: Number of substeps for integration
Returns
- Updated state after time
tstep
Dionysos.System.set_control! — Method
Make u the unique admissible input of state q.
Dionysos.System.solve_transition — Method
solve_transition(affsys, source, target, U, W, cost, sdp_solver) -> TransitionResultSynthesize an affine controller u(x) = K(x − c₁) + ℓ certifying that every state of the source ellipsoid reaches the target ellipsoid in one step of the affine system affsys (x⁺ = Ax + Bu + c (+ Dw)), for every disturbance vertex, while minimizing an upper bound on the worst-case transition cost ‖cost · [x; u; 1]‖².
Arguments
affsys: an affine system ((Noisy)ConstrainedAffineControlDiscreteSystemorConstrainedAffineControlMap);source,target:LazySets.Ellipsoids;U: input constraints — a set (LazySets.AbstractHyperrectangle,LazySets.Ellipsoid,LazySets.IntersectionArray) or a preformatted list (format_input_set);W: disturbance vertices — one per column, or a box (LazySets.AbstractHyperrectangle); mapped through the system's noise matrixDwhen the system has one;cost: the cost factor matrixΛof size(nx+nu+1) × (nx+nu+1), or aUT.QuadraticStateControlFunction;sdp_solver: a JuMP-compatible SDP optimizer (Clarabel, Mosek, …).
Dionysos.System.solve_transition_backward — Method
solve_transition_backward(affsys, target, source_center, u_ref, U, W, cost,
lipschitz, sdp_solver;
maxδx = 100.0, maxδu = 20.0, λ = 0.01,
use_log_det = true) -> TransitionResultSynthesize an affine controller and the largest source ellipsoid centered at source_center that the controller certifiably drives into the target ellipsoid in one step of affsys, robustly to the disturbance vertices W and to the linearization error bounded by lipschitz (the Lipschitz radii of [x; u; 1], scaled by the synthesized state/input deviations δx + δu).
The objective trades the transition-cost bound against the source volume: min λ·J − (1−λ)·logdet(L) (a trace proxy when use_log_det = false). u_ref is the reference input the controller stays δu-close to; maxδx / maxδu cap the synthesized deviations. Other arguments as in solve_transition. Returns a TransitionResult whose source is the synthesized ellipsoid.
Dionysos.System.stabilizing_feedback — Method
stabilizing_feedback(subsys, sdp_solver) -> (feasible, K, P, γ)For a stabilizable affine system, find the state-feedback gain K and the matrix P satisfying the discrete-time Lyapunov inequality (A+BK)'P(A+BK) − P ≺ 0, minimizing the condition number of P (γ is the attained smallest eigenvalue of P⁻¹).
Dionysos.System.DEFAULT_NUM_SUBSTEPS — Constant
Default number of RK4 substeps per time step, shared by every discretize path.