Challenge

Week - 4

Aim:-

1. Implement control logic of a “washing machine” using Stateflow as per the 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 the next 20s & dryer runs for 50s
  • After all the processes have completed turn on the finished LED

2. Make a Simulink chart for the “Gear shift” logic as per the 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:-

1. Washing Machine:-

File Link:- https://drive.google.com/file/d/1o959hXpm3T5SfmL74_ukb75DiA-tdEtT/view?usp=sharing

The flow chart for the washing machine has been shown below. All the states have shown washing machines. The input power supply and water supply have been added according to conditions in transition. The entry and exit show when a state is being activated and deactivated. Here water supply has been deactivated at rinsing(exit:y=0).

As we can see in the picture below, the blocks required for the simulation of the whole washing machine. I run the simulation for 400 sec and we can see the output in the display and lamp. In 400 sec the simulation runs one cycle. The green lamp is showing power is on and red is showing that all the process is completed and it's in finish state.

2. Gear System:-

The state flow chart has been shown below. The condition of speed has been added in the transitional arrow.

File Link:- https://drive.google.com/file/d/1cPVnWCQOYlPfPSLs4hPoh61BG7a_5jJr/view?usp=sharing

Below we can see all the blocks required to simulate the gear system. Here in this picture input (Constant value), speed is above 60kmph and the output is in gear 5.

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.