Challenge

Week - 4

1. Implement control logic of a “washing machine” using Stateflow as per given sequence:

AIM: -

Make a Simulate the process of the washing machine with a given condition.

  1. OBJECTIVE: -

To 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 been completed turn on the finished LED

MODEL:-

  1. EXPLANATION: -
  • In the above control logic block diagram starting state is created with two transition conditions, 1st is power supply = 1 and 2nd is water supply = 1. That means both water and power supply are on
  • The second state is soaking, in this state, the water supply is required so we give water supply. After completion soaking and water supply are off. As per the given condition, we gave time 200 sec for this process with the help of the transition condition.
  • The third state is washing, in this state, only washing is done with already available water in the washing machine this process is taking 100 sec time per given transition condition. And water drains from the machine.
  • The fourth state is raining, in this process, repeated washing has happened so we required water supply here. The water supply is off after 20 sec and the rinsing state is also done as per the given transition condition.
  • (Note: - we are using water supply in rinsing which is not mentioned in the condition.)
  • The fifth state is dryer, in this process, the clothes are dry in 50 sec as per the given transition condition after completion of the process dryer would off with the help of state condition.

  1. MODEL: -
  • In this model we use a Stateflow chart to create control logic for washing machines. We used two switches to operate the power and water supply.
  • Lamps are used to watch power and water supply state which is on or off. The switch and lamp are connected to a constant block. The constant block is connected with control logic.
  • All process ports are connected with the display and the display is connected with a lamp to watch the process of the washing machine at a given time.
  • After completion of all process cycle light would appear green. We run this simulation for 400 sec.

RESULTS: - The results have attached the model with the challenge.

CONCLUSION: -

We can conclude that we simulate the washing machine control logic with the help of Stateflow and got satisfactory results.

2. Make a Simulink chart for the “Gear shift” logic as per below conditions:

  1. AIM: -

Make a Simulink chart for the “Gear shift” logic with the given condition

  1. OBJECTIVE: -

Make a Simulink chart for the “Gear shift” logic as per the below conditions:

Speed Range(km/HR) 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.

3. CONTROL LOGIC

The Stateflow diagram is created according to the given condition concerning the speed.

4. PARAMETER SYMBOLS

Speed is the input

Gear is the output

5. MODEL

In the above model, we used a slider gain block for variable speed and connect it to the control of the logic Stateflow block. The display block is connected to the control logic to see which gear is running and also used the lamp for better graphical presentation to the user.

7. RESULTS: -

To see the results I have attached the model with the challenge.

8. CONCLUSION: -

We can conclude that we simulate the gear shifting control logic with the help of Stateflow and got satisfactory results.

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.