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

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.

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

Model:

Stateflow:

Explaination:

1. The model of washing machine works consists of Toggle Switch that starts/stops the power and water supply, a stateflow between water filling, soaking, washing, rinsing and drying states. Finally, lamps/leds to depict the output or condition of the system.

2. When the power supply is on and water supply is off as shown in the figure below, the system stops and the lamp for water shows the red signal.

3. The soak time is 200 seconds, Washing time is 100 seconds, rinsing time is 20 seconds and drying time is 50 seconds.

Result:

When the Power and water supply, both are switched on, complete cycle takes place as shown below.

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.

Model:

Stateflow:

Explaination:

1. To input speed, I have used a slider block that allows feeding speed during the simulation runs using Step Forward to run the simulation.

2. The speed is fed into the stateflow and as per speed, it is passed on to the block which outputs the gear number in the display.

Result:

When the speed is in the range of 0 kmph and 15 kmph

When the speed is in the range of 16 kmph and 25 kmph

When the speed is in the range of 26 kmph and 40 kmph

When the speed is in the range of 41 kmph and 60 kmph

When the speed is above 60 kmph

Conclusion:

The gear is shifted during run time as the speed is increased or decreased.

Simulink model files can be accessed through following links

Washing Machine model

Gear Shifting Model

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.