Challenge

Week - 4

1. AIM:-Implement control logic of a “washing machine” using Stateflow.

Explanation:

It is a machine that is capable of handling various tasks like soaking,washing,rising,drying within a short period of time .all the performed by machine is based on the certifugation.It is aseparation process that used centrifual force to promote accelerated setting of the particale in the solid or liquid mixture.

In other word,a washing machine is a machine that washes dirty clothes .it contain a barrel into which the clothes are placed.this barrel is filled with water and then rotates very quickly to make the remove the dirt from the cloths.these can help make the clothes cleaner.

Data:-

The different states of washing machines

  • Socking-200sec(0-200sec)
  • washung-100sec(200-300sec)
  • Rensing-20sec(300-320sec)
  • Drying-50sec(320-370sec)
  • finish

Stateflow:-

Procedure:-

1. If fristly created a slider switch that was connected to the two main constants,i.e the power supply and water supply for the washing machine.

2.So whenever we switch off the switch, the constant changes to zero automatically.

3.Now,the next step was to check if the power has been switched on and to check if the water supply has been switched on.

4.Further we then set up, the signal with the given state flow logic.if the value displayed is 1 then the power and the water supply to the machine.if the value is 0 and 1 then the machine will not start the process as one of the switches is off.

5.When both power and water are at 1 then the socking process start and runs for 200 sec after this washing started.

6.After 200sec the rinsing process starts and after this process,the deying process is started for which the water supply is cut off.

7.For all the different processes or states of the machine. the lamp indicates green for working and red for not working .,now which process

is going on in the machine.

2. AIM:- Make a Simulink chart for the “Gear shift” logic.

Data:-

  • 1st gear (0-15kmph)
  • 2st gear (16-25kmph)
  • 3st gear (26-40kmph)
  • 4st gear (41-60kmph)
  • 5th gear(geater than 60kmph)

Model:-

Stateflow:-

Procedure:-

  • at the intial position,the slider is at 0.
  • according to the given data,the range of the frist gear is 0-15kmph
  • The range of the second gear is 15-25kmph.
  • The renge of the third gear is 25-40kmph.
  • the renge of the fourth gear is 40-60kmph.
  • The renge of the fifth gear is greater than 60kmph.

At 1st gear:-When the slider move in between 0 to 15kmph then gear 1st is working lamp shows green signal to the output. Other lamp signal are in red color.

At 2st gear:-When the slider move in between 16 to 25kmph then gear 2st is working lamp shows green signal to the output.Other lamp signal are in red color.

At 3st gear:-When the slider move in between 26 to 40kmph then gear 3st is working lamp shows green signal to the output.Other lamp signal are in red color.

At 4st gear:-When the slider move in between 41 to 60 kmph then gear 4st is working lamp shows green signal to the output.Other lamp signal are in red color.

At 5st gear:-When the slider move in greater than 60 kmph then gear 5st is working lamp shows green signal to the output.Other lamp signal are in red color.

Conclusion:- From the output ,we can say that the gear shifthing takes place according to the given speed input change.

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.