Stateflow for Logic Driven System Modeling

Learn to model complex decision logic and finite state machines using Stateflow

Complimentary Services: Post training email support & 1-hr consultation session within 1 month after the course completion!

TechSource Systems Pte Ltd


This two-day course shows how to implement complex decision flows and finite-state machines using Stateflow®. The course focuses on how to employ flow charts, state machines, truth tables, and state transition tables in Simulink® designs. Topics include:

  • Flow charts
  • State machines
  • Hierarchical state machines
  • Parallel state machines
  • Events in state machines
  • Functions in state machines
  • Truth tables
  • State transition tables
  • Component-based modeling
TechSource Systems Pte Ltd

Who Should

Engineers who are designing logic driven algorithms or behavioral algorithms.

TechSource Systems Pte Ltd


MATLAB Fundamentals and Simulink for System and Algorithm Modeling.

TechSource Systems Pte Ltd


Upon completion of the course, the participants will be able to:

  • Create decision logic using flow charts
  • Create state machines using state transition charts
  • Incorporate hierarchy and parallelism in state charts
  • Control the execution of components using events
  • Create reusable functions and components in Stateflow charts
  • Create decision logic and state machines in tabular form
  • Work with data types and structured data in Stateflow charts


TechSource Systems Pte Ltd
TechSource Systems Pte Ltd

TechSource Systems is MathWorks Authorised Reseller and Training Partner

Upcoming Program

  • Please keep me posted on the next schedule
  • Please contact me to arrange customized/ in-house training

Course Outline

Modeling Flow Charts

Objective: Implement decision flows with flow charts.

  • Junctions and transitions
  • Flow chart behavior
  • Stateflow interface
  • Conditions and condition actions
  • Chart data
  • Common patterns
TechSource Systems Pte Ltd
TechSource Systems Pte Ltd

Modeling State Machines

Objective: Implement state machines with state transition diagrams.

  • State machine behavior
  • State and transition actions
  • Chart initialization
  • Action execution order
  • Flow charts within states
  • Mealy and Moore charts

Hierarchical State Diagrams

Objective: Implement hierarchical diagrams to improve the clarity of state machine designs.

  • Superstates and substates
  • State data
  • History junction
  • Transition priority
  • Action execution order
TechSource Systems Pte Ltd
TechSource Systems Pte Ltd

Parallel State Diagrams

Objective: Implement parallel states to model multiprocessing designs.

  • Benefits of parallel states
  • Chart/state decomposition
  • Parallel state behavior

Using Events in State Diagrams

Objective: Use events within a Stateflow diagram to affect chart execution.

  • Using events in state diagrams
  • Broadcasting events
  • Behavior of state diagrams that contain events
  • Implicit events
  • Temporal logic operators
TechSource Systems Pte Ltd
TechSource Systems Pte Ltd

Calling Functions from Stateflow

Objective: Create functions in a Stateflow chart out of Simulink blocks, MATLAB code, and flow charts.

  • Types of functions
  • Simulink functions
  • MATLAB functions
  • Graphical functions

Truth Tables and State Transition Tables

Objective: Create flow charts and state transition diagrams in tabular form.

  • Truth tables
  • Conditions, decisions, and actions
  • State transition tables
  • States, transitions, and actions
TechSource Systems Pte Ltd
TechSource Systems Pte Ltd

Component-Based Modeling in Stateflow

Objective: Reuse Stateflow designs, constrain chart semantics, and interact with structured Simulink data.

  • Bus signals
  • Data types
  • Atomic subcharts
  • Data mapping
  • Chart reuse