Training Course in Stateflow

This self-paced video training provides a faster and more flexible way to learn Stateflow® for function development in production projects. The course is intended for beginners and those who want to refresh their skills. Some programming experience is required. Please consider a Training Course in MATLAB and a Training Course in Simulink as a prerequisite. The practical knowledge and essential features are presented in a didactically structured way. The trainee gains Stateflow® expertise naturally while viewing and repeating the instructions.

You will be able to model the Flow Charts and graphical Functions, handling Interfaces and Data in Model Explorer, define complex and hierarchical Finite State Machines, understand the State Transition Rules with different Data, Events and Logics. This course will provide you with all information you need to become an advanced function developer in Stateflow®.

Chapter SF 13: Flow Charts (40:35)

We focus on explaining how to use Stateflow in production projects including a discussion on both recommended and prohibited features.

  • Flow Charts vs. State Machines
  • Junctions and Transitions
  • Conditions and Actions
  • Handling Interfaces and Data
  • Predefined Flow Patterns
  • Graphical Functions

Exercise 1: Requirements (14:53)

The starting point of the software development in production projects is a set of software requirements.

Here we discuss the unit specification of a thermostat for a heating device. TMS turns the heating device on or off based on temperature set point.

We will review the interfaces, the use-case in natural language and the requirements in semi-formal notation. We will also create a folder structure for the project.

Exercise 2: Simulink (20:32)

Based on the software requirements we implement a Simulink model for TMS. Here we discuss the test-harness and the test-unit for the thermostat.

We prepare the model infrastructure for test-driven development. We implement the unit in Simulink and use the static checker for clean up.

We will create a model which is ready for requirements-based testing.

Exercise 3: Testing (15:43)

We will develop requirements-based tests and perform the verification of the thermostat unit compliant with ISO 26262 Part 6 and Part 8.

We prepare several test-cases, test the requirement, achieve 100% coverage for design ranges and learn how to generate test-cases automatically based on interface ranges. We wil also achieve 100% structural coverage, both Desicion and MCDC. And we will generate cumulative coverage report.

At the end we will generate a consolidated verification report.

Exercise 4: Stateflow (30:52)

Based on the software requirements and Simulink implementation we develop a Stateflow model for TMS. Here we discuss the Stateflow Patterns, the Model Explorer and the Model Coverage during equivalence testing of the thermostat model.

We re-use the model infrastructure for test-driven development which was developed in the previous exercise. We implement the unit in Stateflow and use the static checker for clean up.

We will stimulate the model requirements-based tests to demonstrate the equvalence of different implementations.

Ready for the Training Course in Simulink Standard ISO 26262?