Two Stage FSM

Parent Previous Next

VisualSim                                                                                                                              


Two Stage FSM


Tutorial Goals

  1. Designing two stage FSM Controller
  2. Evaluating the FSM model results

Model Location

The model is located in $VS/doc/Training_Material/FSM/BouncingBall/ModalModel.xml.  

Constructing 2-stage Hierarchical FSM

This FSM-Hierarchical has two modes, "clean" and "noisy". In the "clean" mode, it generates samples of a clean (noiseless) sinusoid at regular sample intervals. In the "noisy" mode, it generates a noisy sinusoid. It switches modes at random times according to a Poisson process.

The top-level of the Model using the Discrete Event (DE) as the timing simulator is shown along with the simulation controls.


The FSM-Hierarchical has been defined as a FSM and is shown below. The block is created by placing the FSM-Hierarchical block from the FSM Library and using the "Look Inside" from the Context Menu. The State and transitions are used to describe the switch control.  

Each bubble represents a "mode" of operation of this modal component. Each mode has a "refinement" which gives the behavior of the component when the component is in this mode. In the Debug menu, you can turn on animation to view the mode switching.

The actions to be performed at each state is described using a hierarchical block by using the "Add Refinement" from the Context Menu.  This is described using blocks.

In this mode, the model simply generates a noiseless sinusoid by calculating the sine of an increasing sequence.