Week - 4
MODEL 1:
To 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
SIMULINK MODEL:

STATEFLOW :

PROCESS :
- The power and water supply to the machine are dependent upon the swich conditions which is on and off and it is defined by constant value 0 or 1.
- The signal given with stateflow logic. If the value displayed is 1 then the power and water supply to the machine. If the value is 0 then the machine will not start the process as one of the switches is off.
- when both power and water are at 1 then soaking process start and run for 200 sec and after that washing process begin it will be for 100 sec.
- After compliting washing, rinsing process starts for 20 sec and after that drying process start for 50 sec.
- After completing all the task, the machine turns off.
- For all the different process or states of the machine. The lamp indicates green, for working and red, for not working. this gives better idea to user, now which process is going on the machine.
DIFFERENT STATES OF THE MOODEL :
SOAKING :

WASHING :

RINSING :

DRYING :

IF THE WATER SUPPLY IS OFF :

MODEL 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
STATE-FLOW CHART :

- At initial position, the slider at 0.
- When we increased the speed the innput is given to the stateflow chart where it checks input speed and displays the gear number.
- According to the given data the range of first gear is 0-15 kmph.
- the range of second gear is 15-25 kmph.
- the range of third gear is 25-40 kmph.
- the range of fourth gear is 40-60 kmph.
- the range of fifth gear is greater than 60 kmph.
AT FIRST GEAR :

AT SECOND GEAR :

AT THIRD GEAR :

AT FOURTH GEAR :

AT FIFTH GEAR :
