Week - 4
objective:
- implement control logic of a “washing machine” using Stateflow as per the 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 the next 20s & dryer runs for 50s
After all the processes have been completed turn on the finished LED
2. Make a Simulink chart for the “Gear shift” logic as per the 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.
washing machine:
logic: If the power supply is available, the system gets activated. If the Water supply is not available, stop the process & indicate through the LED. Soaking time should be 200s followed by Washing time of 100s. Then rinsing happens for the next 20s & dryer runs for 50s. After all the processes have been completed turn on the finished LED
Stateflow diagram:

it consists of two state1)power_supply==1 &power_supply==0 it means power is ON and OFF and 2)water_supply==1&water_supply==0 it means water supply available or NOT . the condition solve shocking, washing, rinsing, drying process to run
symbol pane:
symbols give the input and output to be mentioned. the input are power supply, water supply, and the output are power, shocking, washing, dryer, rinsing, washing, and end the process
model:-
1)
initially the power supply and water supply OFF the then the washing machine not working
2)
this time power supply is given but water supply is OFF . washing machine not working
3)
power supply and water supply is ON then the machine process the shocking, washing, rinsing, and drying occurs. the shocking process occurs in 200sec, washing in 100sec, rinsing in 20 sec, drying in 50 sec. it indicates the lamp
Gear shift:
logic: in this logic speed range 0-100 is given by slider switch. the first gear range 0-15, and second gear range 15-25,
3rd gear range 26-40, 4th gear range 41-60 and 5th gear range is above 61
Stateflow model:-

initially speed >16 then gear shift to 1, speed > 26 then gear shift 2, speed >41 then gear shift to 3, speed >41 then gear shift to 4, speed >61 then gear shift to 5 and the indicator shows the gear shift
symbol:-

model:-
1)
initially speed give through the block . the speed value is 7kmph the 1st gear to be selected
2)
then the speed increase to 20kmph then the gear shift to 2nd
3)
speed increase to 32kmph then the gear shift to 3rd
4)
speed increase to 50kmph then the gear shift to 4th
5)
speed increase to 90kmph then the gear shift to 5th
conclusion:
the problem solve by the given data and given condition