Challenge

Week - 4

1. Control logic of a washing machine using stateflow :

Given condition: 1. Power ON = System gets activated.

2. Water supply is unavailable then indicate through LED.

3. Soaking time = 200 sec

4. washing time = 100 sec

5. rinsing time = 50 sec

6. drying time = 20 sec.

Now modelling of washing machine for the above conditions using simulink :

1. The system is not activated since the power is off.

image

The system is engaged when the power supply is available.

image

2. There is a power source, but there is no water supply.:

image

3.As the water supply is available, this activates the next state "Soaking" for 200 sec :

image

4.Washing ON for 100 sec

image

5.Rinsing for 20 sec :

image

6.Drying for 50 sec :

7. END

image

State flow Chart :

image

2. Make a Simulink chart for the “Gear shift” logic as per below conditions:

As per the given condition,

Speed Range(kmph) Gear

0 to 15 1

16 to 25 2

26 to 40 3

41 to 60 4

Above 61 5

Lets create a simulink model for the Gear shift logic.

These are the following blocks to be used for the setup..


1. State flow chart

2. Slider

3.Constant

4. Display

5. Lamps

The output is as per the given condition:

1st Gear : 0 to 15(kmph)

image

2nd Gear : 16 to 25(kmph)

image

3rd Gear : 26 to 40(kmph)

image

4th Gear : 41 to 60(kmph)

image

5th Gear : above 60(kmph)

image

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.

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.