主要内容

Model Rechargeable Battery System by Using a State Transition Table

State transition tables model finite state machine machines as tables, where the rows represent states and the columns represent transitions. For more information about finite state machines, see Design Finite State Machines in Stateflow.

In this tutorial, you create a state transition table that models a rechargeable battery system. The system has two batteries that contain multiple operating modes and execute in parallel. The state transition table is a block in a Simulink® model, and receives data from and outputs data to other blocks in the model.

A table that models a rechargeable battery system with main and emergency batteries that operate in parallel. Each battery has multiple layers of hierarchy.

In this tutorial, you start with a basic state transition table and add new functionality.

  1. Create State Transition Tables: Create a state transition table that executes code and shares data.

  2. Log, Verify, and Debug State Transition Tables: Use debugging tools to understand how a table executes.

  3. Create Parent and Child Operating Modes in State Transition Tables: Create a hierarchy of nested states.

  4. Execute States in Parallel in State Transition Tables: Activate multiple states in the same time step.

See Also

Topics