This example shows how continuous and discrete states shall be used with care in a Hierarchical State Machine.
Hierarchical State Machine in
QFIRE Studio
can include continuous states like integrators and transfer functions or discrete states like unit delays or discrete transfer functions. But it is necessary to take care when both are mixed in the same model.Consider the diagram in Figure 1.

Figure 1 - Hierarchical State Machine with 2 Finite States and 2 transitions
In the Finite State 1, there is a diagram including an integrator, i.e. a continuous state:

Figure 2 - Diagram from Finite State 1 including a continuous state
In the Finite State 2, the diagram is static. In other words, it has no discrete or continuous states.

Figure 3 - Diagram from Finite State 2
Due to the transitions, the Finite State 1 gets executed at the beginning until 10s and returns to get executed at 15s. The Finite State 2 gets executed at 10s until 15s. These transitions were trigged by steps using input block. The results of this simulation can be seen in Figure 4 and Figure 5:

Figure 4 - Integrator output from Finite State 1

Figure 5 - Constant output from Finite State 2
In Figure 4, the integrator in the Finite State 1 holds the value for 5s while the other Finite State is under execution!
On the other hand, the signal in Figure 5 starts only at 10s because it is when the Finite State 2 starts the execution.
Modeling of hybrid systems shall be made with care if state reset is needed.
About MWF
MWF is a traditional Brazilian company that provides a wide range of electronic and mechatronic products for industry sectors such as automotive, agricultural machinery and aerospace.
Contact Us
Rua Doutor Siqueira, 139 / Sala 804 Campos dos Goytacazes - RJ, Brasil
contact@mwf-technologies.com
© 2018-2026 MWF. All rights reserved.