State flow model for Automatic Washing Machine & Gear Shifting Mechanism
Aim:
- To implement control logic of a “washing machine” using State flow as per the inputs provided in power & water supply.
- Make a Simulink chart for the “Gear shift” logic. Give speed input while the simulation is running & display the gear number.
Theory:
State-Flow: State-flow provides a graphical language that includes state transition diagrams, flow charts, state transition tables, and truth tables.
State-flow for Washing Machine:

Input Conditions: -
- If the power supply is available, the system gets activated
- If the Water supply is not available, stop the process & indicate through LED
- Soaking time should be 200s followed by washing time of 100s.
- Then rinsing happens for next 20s & dryer runs for 50s
After all the processes have completed turn on the finished LED
Steps:
- Create a chart in Simulink which satisfies all the above mentioned conditions.
- Open the ‘Symbols panel’ and assign proper data. (i.e input or output).
- Connect LED lamps to each process and set them accordingly.
- Provide the output as a display.
- In order to view the output we have provided display block and lamps.
Values 1 & 0 are given as input which switch ON and switch OFF the supply of power and water respectively.
State-flow for Gear Shifting:

Input Conditions: -
Speed Range (kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Steps:
- Create a chart in Simulink which satisfies all the above mentioned conditions.
- Open the ‘Symbols panel’ and assign proper data. (i.e input or output).
- Provide the output as a display and also provide a scope view the graph.
Output:
WASHING MACHINE MODEL: -
For Condition where Power=1 & Water=1

For Condition where Power=0 & Water=1

For Condition where Power=1 & Water=0

For Condition where Power=0 & Water=0

Input & Output ports:

GEAR SHIFT MODEL: -
For speed < 15 (Gear 1):

For speed < 25(Gear 2):

For speed < 40(Gear 3):

For speed < 60(Gear 4):

For speed > 60(Gear 5):

Input & Output ports:

Variation in Gear Shift:

CONCLUSION:
Thus we have successfully prepared a Simulink model for an automatic Washing Machine which can perform various operations if proper input is provided by the user.
Thus we have successfully prepared a Simulink model for a gear shifting mechanism which changes the gear for different ranges of speed.