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

After all the processes have completed turn on the finished LED.

Solution:

The obtained simulink model for the above said conditions is ahown below:

When power is off & water availability is off, the system does not enter any washing process as seen below

When power is on and wate is not available, display shows high and water nil lamp glows

when both power and water are available to the system it starts entering the washing process and after 400seconds of stop time it displays finished staus via display and LED.

The inner subsystem using stateflow chart, performing washing operation with proper timing delay is 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.

The simulink model developed and case1 output is shown below:

case1: Speed: 0 to 15 Gear: 1

case2: Speed: 16 to 25 Gear: 2

case3: Speed: 26 to 40 Gear: 3

case4: Speed: 41 to 60 Gear: 4

case5: Speed: > 60 Gear: 5

The inner level subsystem using stateflow chart for implementing this gear control logic is shown below:

Thus using simulink and stateflow options two different control logics have been implemented.

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.