Week - 4
Answer 1 :
Control logic of 'washing meachine' using stateflow:
- 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
Let us brefiely discuss about the washing meachine in step by step process
- Prewash
- Soaking
- Washing
- Rinsing
- Spinning
1. Prewash
In this option all the cloths are washed with water firstly, then the next process will be start accordingly in th washing meachine.
2. Soaking
These prewashed cloths are soaked in the washing meachine with water and detergent according to the time that provided to the meachine.
3. Washing
It is the main function in the washing meachine that this process will be held for long time, with the water and detergent the cloths are washed in the washing meachine through the function that was set to the washing meachine and no one can change this mode.
4. Rinsing
In this process all the soapy water is dragged from the cloths and will be saoked again in the meachine and these water will be dragged in from the clothes.
5. Spinning
This is the last process and here the cloths are spinned in tub with rpm per minute, so that the cloths are dried here and the process is complted here.
The components that used in th state flow are
- Chart
- Lamp
- Display
- Constant
- Switch(Toogle)

State flow chart look like

Simuation type if the washing meachine

The final process of the simulation of washing meachine with the given sec.
Answer 2:
Simulink chart for the 'Gear shift logic' using the state flow
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5

State flow process of the Gear shift logic chart

This is how the simulink model look like before the 1st gear.

when speed is <15 it shifts to gear 1

When speed is <25 it shifts to gear 2

When speed is <40 it shifts to gear 3
In this way the gear shift logic will be takes place.
Result:
The simulation is done with state flow chart.