Challenge

Week - 4

Aim:

The aim of project is to understand the working of stateflow and create two model with the given objectives.

OBJECTIVES:

  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

Control logic of a "washing machine" using Stateflow:

Power supply state is created and if it is 1 (i.e. PS =1) process is initiated. This is followed by the availability of the water supply (WS = 1).

Next four states are created for sokaing, washing , rinsing , and drying for 200s, 100s, 20s and 50s respectively.

When power supply == 0 i.e switch is off. All the LED's will turn red.

When power supply == 1 and water supply ==0 . Even if power is switched on, there is no sufficient amount of water is added so further steps will not be executed unless sufficient water supply is provided.

When both power and water supply == 1 and the simulation is run for 100 sec, soaking has been completed which is shown by green led

When simulation is run for 300 sec, washing is done shown by green led

when the simulation is run for 320 sec, rinsing is done

when the simulation is run for 370 sec, drying is also completed

after all the process have been completed, finished led is turned on which indicates the process has been completed

-------------------------------------------------------------------------------------------------------------------------------------------

OBJECTIVE 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.

PROCEDURE:

According to given condition, neutral state is created with default transition

if speed is in range 0 to 15, gear 1 is selected.

if speed is in range 16 to 25, gear 2 is selected.

if speed is in range 26 to 40, gear 3 is selected.

if speed is in range 41 to 60, gear 4 is selected.

if speed is above 61 , gear 5 is selected.

STATE FLOW CHART

SIMULINK MODEL

Slider gain is used to increase the speed while the simulation is running to fluctuate the speed of bike.

Gear change by the bike with respect to speed given is shown below .

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.