#[non_exhaustive]pub enum Method {
Linearization,
Polynomialization,
}Expand description
How NonlinearReach abstracts the dynamics in each step.
Non-exhaustive: more abstractions may be added.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Linearization
Conservative linearization (Althoff, Stursberg & Buss 2008): the
whole abstraction error ½ Δzᵀ H(ξ) Δz over the time-interval set is
one box, guessed and checked. Needs the Hessians only. The default,
because every Dynamics supports it.
Polynomialization
Conservative polynomialization (Althoff 2013): the second- and
third-order error at the start set stays a polynomial zonotope over
the set’s factors and moves with the set; only what changes during
the step and the Lagrange remainder around the third derivatives at
z* go into the box. Needs Dynamics::third_derivatives. Tighter
for large sets, since the box shrinks from O(w²) to O(w r + w² r)
plus the spread of ∂³f times w³ for a set of width w; that spread
comes from rounding only for fields of degree 3 or less.
§The error decomposition
Let f be three times continuously differentiable, z* = (x*, u*) the
linearization point and [A B] the center of the enclosure of J(z*),
with w ∈ f(z*) − A x* − B u* the model offset. For a trajectory with
x(t_k) = x_k and any input signal u(t) ∈ U, write
Δz(t) = z(t) − z*withz(t) = (x(t), u(t)),s = (x_k − x_m, 0), the start of the trajectory relative to the middlex_mof the start set’s hull, which is constant along the trajectory, andδ(t) = Δz(t) − s = (x(t) − x_k − c, u(t) − u*), what changes, withc = x* − x_mthe half step fromx_mto the linearization point.
Any constant split of Δz would do; this one centers both parts. With
s = (x_k − x*, 0) instead, s would be off-center by the half step and
δ would range over the whole step’s drift [0, r] f, which made the
sets of small starts larger than those of linearization in a trial on
Van der Pol. Centered, δ spans about ±½ r f.
Taylor’s theorem with the Lagrange remainder gives, row by row and for
some ξ(t) on the segment from z* to z(t),
f(z) = f(z*) + J(z*) Δz + ½ Δzᵀ H(z*) Δz + ⅙ Σ_{abc} ∂³f(ξ)_{abc} Δz_a Δz_b Δz_c.With ½ H(z*) ∈ Q ± R_Q, J(z*) ∈ [A B] ± R_J and a point tensor
P ≈ ⅙ ∂³f(z*) (the midpoints, divided by 6 and rounded), write
T_c for an enclosure of 6 P and
⅙ T(ξ) Δz³ = P s³ + ⅙ T_c (Δz³ − s³) + ⅙ (T(ξ) − T_c) Δz³,exact for the real 6 P ∈ T_c. The error of the linear model,
e = f(z) − (A x + B u + w), then splits into
e = ψ_s(x_k) + ψ_d(t),
ψ_s(x_k) = sᵀ Q s + P s³ (static)
ψ_d(t) ∈ sᵀ [±R_Q] s + sᵀ (½H) δ + δᵀ (½H) s + δᵀ (½H) δ (dynamic)
+ ⅙ T_c (Δz³ − s³) + ⅙ (T(ξ) − T_c) Δz³ + [±R_J] |Δz|.The change of the cubic term is bounded through the telescoping
identity Δz_a Δz_b Δz_c − s_a s_b s_c = δ_a Δz_b Δz_c + s_a δ_b Δz_c + s_a s_b δ_c, so it is O(w² r) instead of the O(w³) of the whole
cube over □Δz.
The inputs are never part of s: u(t) may jump anywhere in U during
the step, so only the state at t_k is constant along a trajectory.
Every term with u − u* is dynamic.
§Why the sets enclose every trajectory
The static part is a polynomial of x_k alone. The step computes
Ψ_s = { sᵀ Q s + P s³ | x_k ∈ X } with the quadratic and the cubic
map of the polynomial zonotope X − x_m, joined by exact_plus, which
keeps the factors of X: the point of Ψ_s that belongs to
x_k = X(α, β) uses the same α. Degrees above the cap are
enclosed as independent generators, which only adds points.
The static error acts on the trajectory as a constant input v = ψ_s(x_k).
The step therefore runs the linear reach on the augmented system
x' = A x + v + B u + w + ψ_d, v' = 0, x₀' = 0, from
{ (x_k, ψ_s(x_k), x_k) | x_k ∈ X }, built by one linear map of X
and SparsePolyZonotope::exact_plus,
which keep the shared factors and pair the independent generators of
both copies of x_k. The linear
reach is sound for any input signal in its input set, so with
ψ_d(t) ∈ Ψ̄ for all t of the step, the projection of its sets onto
x holds the trajectory at t_{k+1} and during the step. The static
error never needs a guess: it is exact up to the degree cap, and it moves
with the set rather than being smeared over the whole step as a box.
The dynamic part needs boxes of s, δ and Δz. The step
takes s from the interval hull of X − x_m, Δz from the hull of the
time-interval set R(τ) and U, the input part of δ from U − u*, and
the state part, minus c, from two enclosures of x(t) − x_k,
intersected: the flow,
x(t) − x_k = ∫_{t_k}^t f(z(σ)) dσ ∈ [0, r] · f(□R(τ) × □U)
(enclosed in interval arithmetic), and the hull of x − x₀ over the
augmented time-interval set, where the factors of x_k cancel. Both
hold as long as the trajectory stays in R(τ) up to t with its
error in Ψ̄. That is the same hypothesis the
guess-and-check loop proves for every other term, so the usual argument
closes: if the dynamic error computed over R(τ) lies in the guess Ψ̄,
no trajectory can leave R(τ) during the step, because up to the first
exit its error lies in Ψ̄ and the linear model with an input in Ψ̄
keeps it in R(τ). The remainder evaluates ∂³f over a box that holds
every segment from z* into z* + □Δz, which holds every ξ(t).
The decomposition is exact algebra, every box encloses its quantity, and
every product and sum of boxes is interval arithmetic, outward rounded
with the sound feature. Removing any one term makes the claim false;
the unit tests show that for each term that floating-point rounding does
not dominate.
Trait Implementations§
impl Copy for Method
impl Eq for Method
impl StructuralPartialEq for Method
Auto Trait Implementations§
impl Forget for Method
impl Freeze for Method
impl Move for Method
impl RefUnwindSafe for Method
impl Send for Method
impl Sync for Method
impl Unpin for Method
impl UnsafeUnpin for Method
impl UnwindSafe for Method
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.