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

Answer:-

1) Simulink Diagram:-

Theory:-

For making the state flow for washing machine first we have to check condition for power supply and water supply then our system getting start for processing.After this it goes for soaking, rinsing, drying etc. At last we have to give finish block. When all process are processing then green lamp or display=1 showing otherwise it showing red colour and display=0.

Result:-

Aim :-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.

Answer:-

1)Simulink model for gear shift:-

Theory:- In this system given speed range is 0-100 so we use slider gain block for the given input speed. The first gear speed range is 0-15 so the entry of state for the first gear is 0<=speed and 15>=speed it is the exit condition of gear in speed greater than 15. In gear 2 entry state is 16<=speed and 25<=speed the exit condition is between speed<16 to speed<25. Same condition are applied in all gears and the output is gives from display block.

In below simulink diagram i made for speed<=15 it shift into gear1. The five gear states are created in system as gear 1,2,3,4 and 5 respectively.So by changing the speed range we can see all output.

Result:-

Conclusion:-

All the condition are simulated through stateflow chart successfully.

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.