Documentation Center

  • Trial Software
  • Product Updates

Model Hybrid Systems with Model Logic

Here are the tasks for modeling hybrid systems containing mode logic in continuous time using Stateflow® charts.

StepTaskExample in Bouncing Ball Model

Configure the chart to update in continuous time.

Task 1: Configure the Bouncing Ball Chart for Continuous Updating

Decide whether to detect zero crossings.

Task 2: Decide Whether to Enable Zero-Crossing Detection for the Bouncing Ball

Define continuous-time variables.

Task 3: Define Continuous-Time Variables for Position and Velocity

Choose a solver that supports continuous states (see Choose a Solver in the Simulink® User's Guide documentation).

Task 4: Choose a Solver for the Bouncing Ball Chart

Add system dynamics.

Task 5: Add Dynamics for a Free-Falling Ball

Expose continuous states to a Simulink model.

Task 6: Expose Ball Position and Velocity to the Simulink Model

Validate semantics, based on design considerations for continuous-time simulation.

Task 7: Validate Semantics of Bouncing Ball Chart

Simulate the chart.

Task 8: Simulate Bouncing Ball Chart

Debug and revise.

Task 9: Check for the Bounce

Was this topic helpful?