State machine modeling for real time systems

By Youssef Edward
May 25, 2019

Real time systems have to respond to events occurring at irregular intervals. these stimuli or events cause the system to transition to different state. For this reason, state machine modeling is used as a way to describe real time systems. At that way, the system is described as a set of discrete states in which a certain event cause the system to transition between one state and another.


State modelling assumes that the system at any one time is in one of possible defined state. The state define a set of variables to be in one or more values. For instance, for thermoelectric control, one state may be defined as the temperature under 20 degree. Another state is defined as the temperature is over 100 degrees. More variables can define a state in more complex systems. For instance, a state may be defined as the temperature is over 50 degrees and the pressure is lower 10 Bars.

When stimulus occurs, it will result in transition from one state to another. The stimulus is defined simply as any external change in the environment surrounding the system. For instance a valve may go from open state to closed state when an operator gives a command to the controller. Also the relay may go from closed to open when the temperature goes lower than 20 degrees. In the latter example, the state is defined by the relay status that may control a heater or refrigerator. The stimulus is defined by the temperature value.

One disadvantage of state modeling approach is that the number of possible states may go large. This will complicate the design of the system. In this way structuring may be necessary. In this way one or more states will falls below one parent state. For instance, for oven control system, there are two main possible states; either the heater is on or off. If the heater is on, some states will be feasible to occur and will be drawn beyond that state. If it is off new states will exist that cannot occur if the heater is on. In this way the state is filtered to occur under main parent states only.

One advantage of state machine modeling is that is is language independent to describe real time systems. For that reason, it is integral part for designing real time systems.

Leave a Reply

Your email address will not be published. Required fields are marked *