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

Answer:

The Stateflow model contains total 8 states - input,power,water, soaking,washing, rinsing,drying and stop.

Power and water inputs are selected using slider switches. The inputs are checked in power and water states and appropriate output is turned on. When both inputs are ready control moved to the soaking state. Soaking state will e active for 200 sec. then washing state will be active for 100 sec. After 100 sec wahing rinsing state will be active for 20 sec. Then drying state ges activated for 50 sec and finally reach the stop state. Each state output is connected to corresponding lamps to indicate the active states.

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

Answer:

This model contains 5 states. Each representing gears. Speed input is provided using slider input. According to the speed corresponding gear wille selected.

speed gear

0-15 1

16-25 2

26-40 3

41-60 4

>60 5

Whenever speed reduced downshifting of gear will occur. Gear output is connected to corresponding lamps to indicate active gear value.

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.