Differential Equations with Events
Differential equations with actions at discrete events are used to model piecewise differential equations with jump discontinuities, or impacts and collisions such as a bouncing ball. They can also model hybrid systems with both continuous and discrete dynamics. The discrete dynamics can come from sampled or digital processes, such as a digital controller controlling a continuous process, or the discrete dynamics can represent modes such as a chemical reactor following a recipe. The Wolfram Language symbolically processes differential equations to automatically set up events corresponding to discontinuities, including for the Filippov sliding mode (infinitely fast switching) solutions. In addition, for more detailed modeling, explicit WhenEvent[event,action] statements allow for whole new modeling possibilities.
f0&&pred — when f crosses zero and pred is True
Mod[t,Δt] — sample at regular intervals Δt
DependentVariables — continuously varying solution functions
DiscreteVariables — piecewise constant solution functions