Challenge

Week - 4

  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

solutions:

Given below is the stateflow chart developed considering the conditions as per the question:

In the above logic it can be observed that the inputs which are to be given are,

  • switchpos (which is used as a power button to turn ON or OFF the system)
  • watersupply (which is used to open the connection of the supply of water to washing machine)

The outputs which has to be taken into account for the entire system to run are:

power, watersupply, soaking, washing, rinsing, drying and to complete the process, finish.

Also as per the logic if water supply is on the system will run and if the water supply is off the system will stop keeping the power on.

The simscape model is given below:

As per the inputs given in the state flow logic if the rocker switch is on constant value will become 1 and the system starts its process and when the constant value is 0 the system will stop.

Also as per the logic if water supply is ON the system will run which will be indicated in green colour and if the water supply is off the system will stop keeping the power ON, which means the power button will indicate green and rest of the process will indicate red.

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.

solution:

Given below is the stateflow chart developed considering the conditions as per the question:

In the above logic it can be observed that the inputs which are to be given is speed.

The outputs which has to be taken into account for the entire system to run are gear1, gear2, gear3, gear4, gear5.

if the speed became greater than a perticular value the gear will shift automatically and the gear varies as per the given speed input.

The simscape model is given below:

A slider button is given to vary the speed and as the speed changes the gear will shift according to the condition given.

THE LINK OF GOOGLE DRIVE TO ACCESS THE FILE IS GIVEN BELOW:

WASHING MACHINE:

https://drive.google.com/file/d/15ObkD5qarhJvu4reCKoIaQvEUXdMAAAT/view?usp=sharing

GEAR SHIFT:

https://drive.google.com/file/d/1PvnDgcbOq4dLZNTVTQZ_m8kianQhOYxG/view?usp=sharing

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.