Challenge

Week - 4

1. Washing machine (WM)

Fig1: Chart for the logic of WM operations

Here the Power_supply and Water_supply are implemented as inputs with user control.

States inside power, water, soaking, washing, rinsing, drying,finishing_LED are output data.

If power_supply and water_supply are given 1 by the user then the following actions will be performed for the given time period as in after() functions.

1.power_supply and water_supply are 1

Fig2: Results of lamps excited when Power_supply and Water_supply are on

For a simulation period of 400 sec, it completes all the WM operations according to the state flow diagram and results are shown in Fig2 in green colors.

2. If the power_supply and water_supply are 0

No lamps are powered because there is no supply of power and water without that other operations also cant be performed.

3. If the power_supply=1 and water_supply=0

No water means we cant do further operations.

Fig: State flow modified to show no water available separately

when Power_supply=1 and water_supply =0

When power supply=1 and water supply=0

2. Gear Shift

Fig1:Gear shift state flow

Speed Range(kmph) Gear

0 to 15 1

16 to 25 2

26 to 40 3

41 to 60 4

Above 61 5

State flow is generated according to the above conditions

Fig: Simulink and Stateflow model

A slider gain is used to give the input speed according to the user with infinite time allotted and it will stop when the stop press button is pressed. According to the speed, gears changes automatically.

When speed is 78 kmph gear shifts into 5th gear as shown in the display

when speed=40 the gear shows 3 as per state flow condition because it lies in the range of 26-40.

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.