Example: Bouncing Ball-Model

Here, we show an example commonly used for demonstrating the handling of state-events. A ball bounces repeatedly on a surface.

The impact is modeled by the block ThresholdCrossing, which ensures that the time of the hit is determined accurately. This CTDE model shows the combination of continuous and discrete dynamics clearly. Whereas the movement of the ball is modeled with continuous elements and signals; the signaling of impact, calculation of the reflected velocity and inverting the movement is modeled using discrete logic.

Bouncing Ball system model
Bouncing Ball output