Week - 4
Tutorial 1
AIM:
- 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
PROCEDURE:
WORKING PRINCIPLE OF A WASHING MACHINE:
A 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 condense the moisture, which is collected in a tank or pumped down the drain. The (now dry) air is reheated and the cycle repeats.
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 in the process we go step by step:
1. Switced OFF when non opertaional

2. Power ON

3. Water Supply ON

3. Soaking

4. Washing ON

5. Rinsing

6. Drying

7. END process

This is what it looks like in the State flow chart:

Tutorial 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.
Answer -
The Transmission operating mechanism:
To effect a gear change, selecting first gear, for example, the driver depresses the clutch, disengaging the input shaft. Using the shift lever, the driver selects the first gear, 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.
As 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 gear. Changing to 3rd 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.

Before we go into the Simulink for the transmission box simulation w need to follow the below conditions for the setup.
Speed Range(km) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
and by doing so we do that in a coded pttern in the state flow chart wich we get to see below:

These are the following block setup did we need for the setup:
1. State flow chart
2. Slider
3.Constant
4. Display
5. lamps
and the output is just as similar as it is
0 to 15 1st gear

16 to 25 2nd gear

26 to 40 3rd gear

41 to 60 4th gear

Above 61 5th gear

and that's how we did the Gear shift logic in the simulink. As we can see the lamp is lit according to the gear it shows and the gear is at the current running according to the speed we selected from slider.