Week - 4
- 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
ANS:
PROCEDURE:
WORKING PRINCIPLE OF A WASHING MACHINE
washing machine by spinning at 800-1600 rpm helps soap and dirt with it to leave the surface of the cloth via centrifugal force and into outlet pipes hence utilizing centrifugation to both clean and partially dry the clothes loaded in it. Thus the processes are electrically controlled, such as the drum, valves, pump, motor and heating. The valve opens again and the dirty water drains out of the drums. The pump works to help get rid of the water. The valve lets clean water in again into the drums. The four process are:
SOAKING:
It is used to dip clothes in detergent water to remove dirt from the clothes in this function customer need to select soak from a panel Soak- This function is available with wash timer, In 42 min of washing 27 min is soak and 15 min machine will wash the clothes.
WASHING:
During the wash cycle, a large plastic agitator (green) turns around, moving your clothes through the water. When the wash is finished,
the pump drains the water from the outer drum.
RINSING:
The dirty, soapy water is drained, then the washing machine is refilled and your clothes are rewashed" in clean water. Spin: All the water is drained completely, then your clothes are spun very fast and excess water is removed thanks to centrifugal force.
DRYER:
They work by pushing warm dry air through your wet washing to extract moisture, then cooling the now humid air in a heat exchanger to gwarm condense the moisture, which is collected in a tank or pumped down the drain. The (now dry) air is reheated and the cycle repeats.
- SUBSYSTEM

1) STATE-FLOW:
Systematic solution of a problem is possible with sequential, unambiguous and realizable finite process step set. This set is called algorithm and it is one of the most important part of the programming languages In this study, it is represented how to learn algorithm by using Simulink Stateflow. In flow diagram-based algorithm learning.
CONTROL LOGIC OF A WASHING MACHINE:
It checks for the extent of dirt and grease, the amount of soap and water to add, direction of spin, and so on. The machine rebalances washing load to ensure correct spinning. Else, it reduces spinning speed if an imbalance is detected. Even distribution of washing load reduces spinning noise.

Modeling of Washing machine in Simulink:
these are the following things we need for modeling the subs system of washing machine logical block settings:
1. Toggle switch
2. Constant
3. State flow chart
4. Lamps
5. Display

Now following with steps involves the process we go stape by stape
1.If the power supply is available, the system gets activated.

2.If the Water supply is not available, stop the process & indicate through LED

3.Soaking time should be 200s followed by Washing time of 100s.

4.Then rinsing happens for next 20s & dryer runs for 50s

5.After all the processes have completed turn on the finished LED.

CONCLUSION: AFTER DRYING PROCESS (370secs), THE WASHING MACHINE STOPS. SHOWING GREEN LAMP AS AN 'ON STATE AND DISPLAYING 1, INDICATING THAT ALL THE PROCESS HAS BEEN CARRIED OUT IN THE WASHING MACHINE SUCCESSFULLY.
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.
SIMULINK MODEL-2: CONTROL LOGIC OF GEAR SHIFT TRANSMISSION FOR VARYING SPEED LEVELS
Principle: When we push the shifter sleeve towards the desired gear, the gear locks onto the main shaft and rotates it. Thus, the main shaft rotates at the speed of the engaged gear and provides the output as per the gear's ratio. ifting of gear simply means going from gear to another by sliding or clicking the shifter. Downshifting means going to a lower gear i.e decreasing the speed, and upshifting means going to a higher gear i.e increasing the speed.

BLOCKS USED IN THE MODEL:
a. Constant-To multiply with slider gain
b. Slider gain-Act as throttle to increase the speed
c. Lamp-For indicating gear number
d. State Flow-Gear shifting logic
e. Scope - For the graph of speed vs gear shift
f. Custom gauge-For representing speedometer of the vehicle
PROCESS EXPLANATION:
a. The initial position of slider is at O.
b. When we increase the speed, the input is given to state flow chart where it checks the input speed and displays the gear number.
c. According to given data, the first gear speed range is (0-15Kmph).
d. The second gear speed range is (15-25Kmph).
e. The third gear speed range is (25-40kmph).
f. The fourth gear speed range is (40-60kmph).
g. The fifth gear speed range is (greater than 60Kmph).
h. The increase and decrease in the speed can be seen in the speedometer.
i. The speed is decreased by downshifting of gear
0 to 15 FIRST GEAR

16 TO 25 SECOND GEAR

26 TO 40 THIRED GEAR

41 TO 60 FOURTH GEAR

ABOVE 61 FIFTH GEAR

Conclusion: The output are as same given by the question thats how we did the Gear shift logic in sumulink model. As we can see that the lamp lights as the gears shifts respectively and the Gear will run according tp the speed that we select in slider.