Challenge

Week - 4

AIM:

1. 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

2. Make a Simulink chart for the "Gear shift" logic as per below conditions.

Speed Range (kmph) Gear

O 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.

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.

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.

The two inputs are given for the power and water supply. Once the inputs are given outputs are displayed by the

flow chart as per the given sequence. The system are observed for sometime then it is checked and the process is

completed by green light as displayed.

2) GEAR SHIFT LOGIC:

Model of Gear Shift in Simulink:

Stateflow:

Explanation:

1. To create a Simulink model of gear shift create a Stateflow chart and start with the power block which is connected

to the breakpoint and a junction with power==0 condition and connected to speed block(state) power==1 so that

when the speed is above 1 the process will start flowing to gears.

2. Here I have mentioned speed to Conway our conditions as above speed greater than zero the gear shift should

start the cycle of changing to next gear.

3. In gear one, the breaking point is mentioned up to 16 then it is respectively changing till speed 61.

4. From gear five till gear one there up arrow( breaking point) the speed is decreased toll zero so that we can shift

our gear not only increasing it can be decreased too.

5. Additional state mentioned as Topspeed' So that if the speed is been increased above 80 there is a lamp which

indicates over speed in our Simulink block.

6. After completion of our chart, we can see the inputs power and speed, outputs gear and top speed(Z).

7.1 have connected the two constants to power and speed so that when the switch is on the power will be indicated

from the lamp which is green in color. Speed is connected to a slider which requires manually increasing the speed.

8. From the output of gear, I have connected terminator so that it stops the data flow and to view the gear shifts I

have connected to the gear shift indicator. and top speed (z) is connected to display and the display is connected to

a lamp which shows over speed so that the lamp will indicate when the speed increased above 80.

9. I have connected it to the slider to the speedometer to view the speed in the speedometer.

Results:

Power off:

Power on:

Power on speed 20 kmph:

Power on speed 40 kmph:

Power on speed 60 kmph:

Power on above 80 kmph:

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.