Version 1.0, August 31, 2001, Copyright, Hugh Jack 1993-2001

23.3.1 State Diagrams Example

 

· A Complex Example - In this case we have a set of traffic lights. The lights will remain green in one direction until a pedestrian cross button is pushed. They will then turn yellow for four seconds and then turn red.

 

 

· First we will describe the system variables. These will vary as the system moves from state to state. Please note that some of these together can define a state (alone they are not the states).

 

 

· We can then use outputs, or controlled variables, to indicate system states (you can also think of these as modes).

 

 

· State transitions are determined based on inputs, and how the system changes. These events cause a change between states. Care must be taken to avoid confusing them with states.

 

 

· The state transition diagram allows us to visually check for continuous loops. In a simple state diagram multiple transitions may lead to alternate paths.

 

 

· For the previous traffic light example, add a speed up signal for an emergency vehicle.

 

 

 

23.3.1.1 - Block Logic Conversion

23.3.1.2 - Single State Equations

23.3.1.3 - Entry and Exit State Equations

23.3.1.4 - State Transition Equations