Challenge

Week - 4

AIM: To Implement Control logic of a “Washing Machine” using stateflow as per given sequence.

Objectives:

  1. Understand and implement the logic control of a State machine using stateflow
  2. If the power supply is available, the system gets activated
  3. If the water supply is not available, stop the process and indicate through LED
  4. Soaking time should be 200 seconds followed by washing time of 100 seconds
  5. Then rinsing happens for next 20 seconds and dryer runs for 50 seconds.
  6. After all the processes have completed, turn on the finished LED.

Blocks Used:

Constant: To provide a constant signal to the Simulink environment

Flowchart: Implement logic control of the washing machine

Scope: To view the change of the parameters with respect to time

Lamps: Glows according to the allotted signal

Simulink model:

Sub-systems:

  • This shows the logic of the state washing machine
  • If the water and power supply is available then the machine will proceed its further operation
  • If either of them is absent the machine will stop with an interruption error.
  • The rest of the processes are explained in the above stateflow chart.

Outputs:

  1. When both the power supply and water supply is provided: -

The green light will glow indicating the processes are successfully completed!

  1. When either of the power and water is not provided: -

The red light will glow indicating the interruption in the process.

Conclusion:

  1. The logic control of the state machine could be executed as per required.
  2. The real time changes in the simulation could also be observed if the simulation time is set to infinity.
  3. More features could be added like different modes of washing.

Aim: To make a Simulink chart for the gear shift logic as per given conditions.

Objectives: Following condition are to be satisfied: -

Speed Range(kmph)

Gear

0 to 15

1

16 to 25

2

26 to 40

3

41 to 60

4

Above 61

5

** Given speed input while the simulation is running and display the gear number**

Blocks used:

Slider Gain: To change the input speed value in real time simulation

Display Dashboard: To display the gear associated with a given speed

Scope: To view the shift in gear with respect to time

Chart: To set the control logic for gear shift mechanism

Gauge: To display the real time input speed

Simulink Model:

Subsystem:

The image shows the logic for gear change phenomenon.

Output:

This shows the change in the gears for a time independent varying speed.

Conclusion: -

  1. Many automobile systems could be designed according to the user with the help of state machine.
  2. The above simulation represents the real time representation of a vehicle’s gear shift paradigm.
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.