Systems.Continuous — the general continuous-time system #
The most general continuous-time system the library considers,
ContinuousSystem E U Y—ẋ = F(t, x, u),y = h(t, x, u), witht ∈ ℝ,
with state space E, input space U and output space Y. The linear systems of
LinearSystems.Continuous are special cases. Its discrete-time counterpart is
DiscreteSystem in Systems.Discrete, which carries the same API under the same names.
Special cases #
Each special case is a constructor building the general object from the special data, together with a predicate recognising it inside a general system and a lemma relating the two:
- Time invariance —
tis dropped:timeInvariant f hbuildsF(t, x, u) = f(x, u), andIsTimeInvariantsaysFandhdo not depend on time. - Autonomy —
uis dropped:autonomous f hbuilds a system with input spaceUnit, andIsAutonomoussaysFandhdo not depend on the input.
The two combine: timeInvariant applied to input-free data gives ẋ = f(x).
"Autonomous" here means without input, the control-theory convention. Much of the dynamical-systems literature, including Khalil, uses it for time-invariant instead.
Trajectories #
There are two trajectory predicates, for two kinds of input.
IsTrajectoryOn s u x Iis the derivative form, Mathlib'sIsIntegralCurveOn:ẋ(t) = F(t, x(t), u(t))for everyt ∈ I, the derivative taken withinI. It is the form the Lyapunov machinery works with, and the natural one for continuous inputs. Two caveats: at an isolated point ofIthe derivative withinIis unconstrained, soIshould be a nondegenerate segment[t₀, t₁]or a ray[t₀, ∞); andxmust be differentiable everywhere onI, which excludes the solutions produced by discontinuous inputs (under a step input,ẋ = uhas a corner).IsCaratheodoryTrajectoryOn s u x Iis the integral form: between anya ≤ binI,x(b) - x(a) = ∫ₐᵇ F(τ, x(τ), u(τ)) dτ. It needsEcomplete but notxdifferentiable, so it admits piecewise-constant, sampled-data, bang-bang and merely measurable inputs. Input-driven notions such as input-to-state stability are stated with it.
When τ ↦ F(τ, x(τ), u(τ)) is continuous the two agree on segments and on rays
(isCaratheodoryTrajectoryOn_iff_isTrajectoryOn), via the
integral-solution bridge isIntegralSolution_iff_isIntegralCurveOn. Neither handles
discontinuity in the state, such as discontinuous feedback, which needs Filippov solutions.
Why separate continuous- and discrete-time objects #
The same reasons as for ContinuousLTV and DiscreteLTV: the data is the same
shape, but its reading is not. A continuous trajectory is an integral curve and needs a normed
space; a discrete one is a recursion and needs nothing. A change of coordinates picks up a
time-derivative term in continuous time and none in discrete time. Separate files also keep the
analysis imports out of discrete-time developments, and leave room for further classes, such as
hybrid systems, as files of their own.
Conventions #
- The structure carries no typeclasses: structure on
E,U,Ygoes on the operations that need it. - The API lives in the namespace
ContinuousSystem, so dot notation resolves.
A continuous-time system: the data (F, h) of
ẋ(t) = F(t, x(t), u(t)), y(t) = h(t, x(t), u(t))
with states in E, inputs in U and outputs in Y. The structure is only the data.
Instances For
The time-invariant system ẋ = f(x, u), y = g(x, u).
Instances For
A system built by timeInvariant is time-invariant.
A time-invariant system is built by timeInvariant.
The autonomous (input-free) system ẋ = f(t, x), y = g(t, x), with input space Unit.
Equations
Instances For
The system is autonomous: its equations do not depend on the input.
Equations
Instances For
A system built by autonomous is autonomous.
An autonomous system is input-free data in disguise: its equations are those of some f and
g that do not take an input. It equals autonomous f g only up to the input space, which is
U rather than Unit.
Semantics #
The right-hand side of the state equation under the input signal u,
(t, x) ↦ F(t, x, u(t)): a time-dependent vector field on the state space, the shape the ODE
machinery consumes.
Equations
- s.vectorField u t x = s.F t x (u t)
Instances For
x is a trajectory of s under the input u on the set I: ẋ(t) = F(t, x(t), u(t))
for every t ∈ I, the derivative taken within I.
Stated on a set rather than on all of ℝ, because a map can satisfy the equation on an
interval without being defined for all time. Which set — a segment [t₀, t₁] or a ray
[t₀, ∞) — is chosen by the notions built on this one, not here. The output is
s.outputMap u t (x t); it is not part of this predicate, because the output equation
constrains nothing about x.
Equations
- s.IsTrajectoryOn u x I = IsIntegralCurveOn x (s.vectorField u) I
Instances For
x is a trajectory of s under the input u for all time.
Equations
- s.IsTrajectory u x = IsIntegralCurve x (s.vectorField u)
Instances For
The derivative of a function along the system #
The derivative of V(t, x) along the system at the input value u,
∂V/∂t + ∂V/∂x · F(t, x, u): the rate of change of V along a trajectory through x at time
t while the input takes the value u. It is the Lie derivative (_root_.lieDerivative) of
V along the field F(·, ·, u), so the lemmas of Analysis.LieDerivative apply to it
directly: a trajectory is an integral curve of s.vectorField. Input-free notions such as
Lyapunov stability use u = (); input-to-state notions use a general u.
Equations
- s.lieDerivative V t x u = lieDerivative V (fun (t : ℝ) (x : E) => s.F t x u) t x
Instances For
Well-posedness #
Every solution segment starting at time t₀ in the set S extends to a solution on
[t₀, ∞): such solutions do not escape in finite time.
Forward completeness is kept apart from the notions that need it. Statements about limits as
t → ∞ quantify over solutions on [t₀, ∞), and without it a solution that escapes in finite
time would be silently left out of them.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every solution segment, from any initial time and state, extends to a solution on
[t₀, ∞).
Equations
- s.IsForwardComplete u = ∀ (t₀ : ℝ), s.IsForwardCompleteOn u t₀ Set.univ
Instances For
Solutions are unique forward in time: two solution segments on [t₀, t₁] that agree at
t₀ agree on the whole segment.
Kept apart from the stability notions, which quantify over every solution and so need no uniqueness: theorems that use it assume it.
Equations
- s.HasUniqueSolutions u = ∀ (t₀ t₁ : ℝ) (x y : ℝ → E), s.IsTrajectoryOn u x (Set.Icc t₀ t₁) → s.IsTrajectoryOn u y (Set.Icc t₀ t₁) → x t₀ = y t₀ → Set.EqOn x y (Set.Icc t₀ t₁)
Instances For
Lipschitz right-hand sides have unique solutions. If x ↦ F(t, x, u(t)) is
K-Lipschitz for every t, solutions are unique forward in time.
Globally Lipschitz systems are forward complete. If (t, x) ↦ F(t, x, u(t)) is
continuous and K-Lipschitz in x uniformly in t, every trajectory segment extends to
[t₀, ∞).
Global Lipschitz is what rules out escape in finite time here; a local Lipschitz condition
alone does not (ẋ = x²).
Invariance #
S is forward invariant (positively invariant) under the input u: every trajectory
segment that starts in S stays in S for as long as it is defined. This is for the one input
signal u; robust and controlled invariance quantify over u.
Stated on segments [t₀, t₁] and for every initial time, so it constrains solutions that escape
in finite time up to their escape, and it makes sense for time-varying systems.
Equations
- s.IsForwardInvariant u S = ∀ (t₀ t₁ : ℝ) (x : ℝ → E), s.IsTrajectoryOn u x (Set.Icc t₀ t₁) → x t₀ ∈ S → ∀ t ∈ Set.Icc t₀ t₁, x t ∈ S
Instances For
The unforced system #
The unforced system: the input held at 0, as an autonomous system ẋ = F(t, x, 0),
y = h(t, x, 0). Stability of a system with input is stability of this system; input–output
notions such as input-to-state stability are stated on the system itself.
Equations
Instances For
The unforced system is autonomous.
The trajectories of the unforced system are those of the system under the zero input.
Carathéodory trajectories #
x is a Carathéodory trajectory of s under the input u on the set I: between any two
times a ≤ b in I, the map τ ↦ F(τ, x(τ), u(τ)) is integrable and
x(b) - x(a) = ∫ₐᵇ F(τ, x(τ), u(τ)) dτ.
This is the integral form of IsTrajectoryOn. It does not ask x to be differentiable, so it
admits the solutions produced by discontinuous inputs (piecewise-constant, sampled-data, bang-bang,
or merely measurable and bounded), which have corners where the input jumps and are not classical
trajectories. Input-driven notions such as input-to-state stability need this form. When
τ ↦ F(τ, x(τ), u(τ)) is continuous the two notions agree on every interval
(isCaratheodoryTrajectoryOn_iff_isTrajectoryOn).
Because the equation links every pair of points of I, there is no vacuity at isolated points: on
{0, 1} it ties x 1 to x 0, and on a singleton it says nothing, which is correct.
Completeness of E is required: without it the Bochner integral is 0 by convention, and the
definition would silently say that x is constant.
Equations
- One or more equations did not get rendered due to their size.
Instances For
x is a Carathéodory trajectory of s under the input u for all time.
Equations
- s.IsCaratheodoryTrajectory u x = s.IsCaratheodoryTrajectoryOn u x Set.univ
Instances For
On a segment, the integral and derivative forms agree when τ ↦ F(τ, x(τ), u(τ)) is
continuous there.
On any interval, the integral and derivative forms agree when τ ↦ F(τ, x(τ), u(τ)) is
continuous there.
The interval may be closed, open, half-open, a ray, all of ℝ, or a single point.
Order-connectedness is exactly what is needed: the integral form integrates along [a, b] ⊆ I,
while the derivative form only looks near each point, and on a set with a gap the two differ.