Week - 4
question 1
Aim : To Implement control logic of a “washing machine” using Stateflow as per given sequence
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
A washing machine is a home appliance used to wash clothes without any physical effort. It is a machine that washes dirty clothes. It contains a tub into which the clothes are placed. This tub is filled with water and then rotated very quickly by the use of a motor to make the water remove dirt from the clothes. Most washing machines are made so that detergent(liquids or powders) can be put into the machine. These can help make the clothes cleaner.
Steps inculded in washing the clothes (washing machine).
There are different stages of washing machine which inturn helps you to understand better way and simple way.
- prewashing
- washing
- rinsing
- spinning
Prewash :
- The prewash step includes filling the washing machine's tub with water and mixing in the detergent. This option helps us to wash out all dirty present in the clothes.
- Front-loading washing machines and top-loaders use different methods for determining the water level for a given load. Front-loading washers depend upon the setting designated by the user.
- Current model top-loaders are equipped with water level sensors to fill the tub with the amount of water necessary to clean the load and no more.
Washing :
- During the wash cycle the machine uses to mix the water and detergent as well as to move the clothing around the tub and against other clothing to clean the load.
- Top-loading washing machines often contain an agitator in the middle of the tub to move the load in alternating directions while front-loaders based upon the rotation of the entire tub to provide the agitation necessary for cleaning. The duration of the wash cycle varies among washer types and the setting chosen by the user.
- The wash cycle for heavy cleaning will last longer. Light cleaning cycles are shorter in duration.
Rinsing :
- Rinsing the stage is usually a multi-step procedure. First the soapy water must be spun from the clothing and wash tub. During the particular time, fresh water is sprayed into the tub to rinse the clothing.
- The rinse cycle uses intervals of spraying and spinning to force the soapy water and detergent out of the washer. The final stage of agitation with plain water is the last step in rinsing.
Spinning :
- Spinning is necessary for clothing getting it dry as possible before the end of the wash.and several machines as differnt speeds to spin the clothes which is caluculated in rpm.
Simulink model of washing machine :
The blocks used in model are :
1) Toggle switch
2) State flow chart
3) Lamps
4)Constant
5) Dispaly
State flow chart:

Steps involved in the process :
1) when switch is off (i.e no operation)
2) when the power is ON :

4) Soaking:
5) when the washing is on:
6) Rinsing:
7) End process:
Question 2
Aim : To 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.
Transmission operating mechanism
- It consist of different gear stages operated accordingly to speed.The basic rule is that you change up through the gears as the speed of the car increases and down when you need more power from the engine.
- For example, you would change down to a lower gear when climbing a hill or pulling away at low speed. The gears determine the amount of power available from the engine.
- To effect a gear change selecting first gear for example the driver depresses the clutch the input shaft. Using the shift lever the driver selects the first gea and the linkage moves the shift fork to connect the 1st, 2nd locking collar with 1st gear, locking it to the output shaft. Now when the clutch is released engaging the input shaft the output shaft turns because 1st gear is locked to the output shaft by the locking collar.when the driver speeds up selecting 2nd gear simply involved repeating the process but moving the shift lever to 2nd gear.
- The shift shaft moves the shift fork to disengage 1st gear and engage 2nd gear. Releasing the clutch engages the input shaft again this time routing power through 2nd Changing to 3rd gear. gear involves using a second shift linkage, shift fork, and locking collar, this one between 3rd and 4th gears.Because the countershaft and output shaft turn at different speeds moving from 1st to 2nd gear trying to engage a higher gear while the vehicle is moving slower would be like trying to turn the shaft at two different speeds, which is impossible. Synchronizer rings are like tiny clutches using friction to bring the locking collar and the gear to the same speed at which point they easily mesh and power can be reapplied.
The conditions for the gear transmission:
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
The blocks used in the gear transmission:
1) state flow chart
2) constant
3) slider
4) lamps
5)display
State flow chart of gear shift :
Now according to conditions
1) 0 to 15 : 1st gear:
2) 16 to 25 : 2nd gear:
3) 26 to 40 : 3rd gear:
4) 41 to 60 : 4th gear
5) above 61 : 5th gear
This how we did the gear shift logic in the simulink . as we can see that the lamp is glow according to the gear it shows and gear is at the current running speed we slected from the slider.
Conclusion: According to the question I have implemented the control logic of a washing machine using state flow as per the sequence.according to question no 2 i have prepared a simulink chart for the gear shift as per conditions