Week - 4
AIM-
1. To implement control logic of a “washing machine” using Stateflow.
2. To make a Simulink chart for the “Gear shift” logic.
OBJECTIVES -
1. Implement control logic of a “washing machine” using Stateflow as per given sequence:
- 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
2. Make a Simulink chart for the “Gear shift” logic as per below conditions:
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Give speed input while the simulation is running & display the gear number.
THEORY And WORKING -
1. Implement control logic of a "Washing Machine" using stateflow chart.
Create a Simulink blank model and click on library browser and type chart in search in a library browser. When chart symbol is created, double click on the chaart symbol. Now we nee to create the flow chart to create stste flow model for Washing Machine. The model of flow chart is shown in the figure bellow.

Here "ps"(Power Supply) and "ws"(Water Supply) are the INPUT DATA and Power, Water, Soaking,Washing Rinsing, Dryer and End are the OUTPUT DATA.

Above figure shows the simulink model of washing machine implementation using stateflow.
Based on the above figure power supply PS=0 and water supply WS=0 then the system will not gets activated as shown in the figure bellow.

If PS=1 and WS=0, then

If PS=1, and WS=1, then the all tasks i.e. Soaking, Washing, Rinsing,Drying are conducted as programmes in a state flow model properly.

2. Make a Simulink chart for the “Gear shift” logic as per below conditions:
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Give speed input while the simulation is running & display the gear number.
Procedure -
1. Create a chart according to the given conditions in the question as shown in the figure bellow.

2. Go to symbol pane to assign the input output data.
3. Create an input signal such as Slider Gain etc. for the acceleration so that we can observe the gear transmission in the display.
4. Run the simulation for Infinite time petiod.




