A trajectory with a rule change
An event may do more than mark a time: a bouncing ball changes velocity at impact, and a controller may switch its governing equation at a threshold.
Definition 2.5.1
(Hybrid system, guard and reset)
A hybrid system has a finite set of modes. In each mode the state evolves continuously by that mode's differential equation. A guard can trigger a change of mode together with a reset , where and are the pre- and post-event values.
The trajectory may jump at the event even when is a continuous map. A complete model also specifies event direction, which guard has priority if several fire, and what to do when a reset lands on a guard. These rules cannot be inferred from the differential equation alone.
On an accepted pre-event step, a continuous dense interpolant defines . A sign-changing bracket and bisection locate a zero of , not necessarily the exact event of . A code can restart at the bracket midpoint using . The midpoint is generally not exactly a zero even of . The code must discard the unused part of the pre-event step and start the post-event solver anew; continuing the old interpolant past a reset describes the wrong mode.
Common mistake
(Continuing the pre-event interpolant past the reset)
After a located event, the remainder of the accepted pre-event step belongs to the wrong mode. Evaluating the old interpolant at later times, or accepting the old step's endpoint, mixes two vector fields. Restart a fresh post-event step from .
One crossing: a conditional error estimate
The following result isolates one event. It does not say the event was detected, or that a numerical trajectory chose the right mode. Those are hypotheses to check separately.
Theorem 2.5.2
(Error after a single transverse reset)
Let the exact pre-event solution , continued by the pre-event equation across the event if necessary, satisfy on an interval , and let have a zero . Assume is continuously differentiable and on . Let a continuous interpolant obey on , and let be continuous and Lipschitz in state with constant for and states within of . A bisection bracket contained in encloses a zero of ; its midpoint satisfies .
Suppose is Lipschitz on the relevant inputs: . Assume is the first qualifying exact hybrid event, the exact state resets to , and both paths enter the same post-event mode with no further events before . Let . Assume both restarted solutions exist through ; on , in a state set containing them, let be Lipschitz in with constant and satisfy . If a numerical post-event approximation at differs by at most from the exact post-event solution started at , then its error relative to the exact hybrid solution at is at most
Proof
(Event-time error, reset error and a common comparison time)
Since , . The mean value theorem, using and the derivative lower bound on the interval between and , gives . Hence . Also
The two reset values consequently differ by at most . The resets occur at different times. Set and advance whichever reset occurred first to . Its displacement is at most , so the distance between the two post-event solutions at the common time is at most . Grönwall's inequality for the same post-event equation bounds the distance at by times that quantity. Replacing by the larger and adding the separate numerical post-event error proves the displayed bound. The estimates apply only while the assumed solutions exist in the region where the constants hold.
Proof X-ray
Why compare at a common time?
Comparing reset values alone misses the time for which one post-event trajectory has already evolved. The term pays for that mismatch before the usual Lipschitz stability estimate can compare both states at the same time. Tightening bisection only reduces ; it does not remove the interpolation error or the later integration error .
The derivative condition is a quantitative transversality assumption: the exact guard value crosses zero at a speed bounded away from zero on . If is continuously differentiable and the pre-event vector field is continuous, the chain rule gives along the exact trajectory. Thus is continuous, and supplies such a bound on a sufficiently small interval. It does not by itself certify that a chosen numerical bracket contains the corresponding root or that no earlier event occurred.
Counterexample mode
Without transversality the event can vanish
Claim: the restart error tends to zero with the interpolation error even when the guard is tangent. Take , , so , with guard , reset and post-event mode . The exact guard value reaches zero at , so the exact hybrid state at is . The interpolant with has , so no event is detected and the numerical path stays in the pre-event mode, ending at . The error does not tend to zero as . Here , so no exists on an interval containing ; the transversality hypothesis is exactly what excludes this failure.
Worked examples
Worked example 2.5.3
(A shifted event changes the restarted path)
Let , , and trigger on the upward crossing . The exact event is . Reset by and change to the mode . At the exact hybrid state is .
Suppose an accumulated error gives on . Its guard has root . Assume bisection finds it exactly, so and . The numerical reset is , and exact integration of the new mode gives at . The error is , despite exact root finding and exact post-event integration. Here , , . The theorem gives the valid, conservative bound .
Worked example 2.5.4
(Stopping bisection early)
Keep the model and the interpolant , but stop after two bisections of , with bracket and midpoint , so . The numerical reset is , and exact integration of gives at . The error is still : with this reset, for every , because the reset reverses the state while both modes have unit speed. The bound grows to , which remains valid.
With the reset instead, the same bracket gives the numerical value , against the exact ; the error now depends on . Here and , so the theorem gives . Whether early stopping costs accuracy depends on how the post-event flow reacts to a time shift, which the factor accounts for only in the worst case.
Worked example 2.5.5
(A reset that lands on its own guard)
Let , with , , guard on downward crossings, and reset . The exact first impact is at , where and , so . The restart state lies on the guard: at the restart time. A rule that treats every zero of as an event fires again immediately at . The direction rule resolves it, since is an upward motion.
After a bounce with upward speed , the height returns to zero after . The speeds are , so the flight times are and the impact times are , accumulating at . Infinitely many events occur before . The single-reset theorem cannot be iterated to reach , and a code that locates each impact would take infinitely many restarts. Such a model needs additional analysis or a modified model beyond the accumulation time.
Detection and model pitfalls
A step whose endpoint guard values have the same sign can contain two crossings; a tangency can touch zero without a sign change. For example, has two zeros on , while has a tangential zero there. Neither is found by a single endpoint sign test. At the tangency , so the theorem's linear event-time bound does not apply. Subdivision can help but cannot guarantee finding every root of an arbitrary continuous guard.
A reset that places the state back on the same guard may immediately retrigger it, as in the bouncing model above. Multiple or accumulating events require additional analysis.
Common mistake
(Suppressing every later event to stop retriggering)
Direction rules, a physically justified guard rearming rule, or a more complete model may resolve immediate retriggering. Simply ignoring all subsequent events changes the model: in the bouncing model it would let the height become negative after the first bounce.
The single-reset bound assumes the numerical and exact paths use the same prescribed post-event mode and that no further reset intervenes before .
Exercises and solutions
Quick check
(Suppose , , , and the bisection bracket has width . Bound .)
Solution · Answer
, so , provided the theorem's interval and root assumptions hold.
Quick check
(In the first worked example take instead, keeping the post-event equation and . Find the exact and numerical values at .)
Solution · Answer
The exact value is ; the numerical value is . Their difference is : even identical reset states started at different times need not agree later.
Quick check
(Let and with . What happens to the event?)
Solution · Answer
has a tangential event at , while has no zero. Uniformly small perturbations can remove a tangential event entirely; there is no positive derivative lower bound on an interval containing it.