Challenge

Week - 4

Task-1

Objectives : 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.

Answer:

Simulink model- The simulink model file is attached below-

Chart diagram:

Parameters:

We have given water,soak,washing,rinsing,dryer,cycle as outputs of the chart and water_supply & power_supply as inputs.

Simulation time parameters: We used 430 seconds so that it can cover the whole cycle and sufficient time to store and solve parameters.

Output: There are two conditions asked to solve in the questions.

condition 1: when water supply is off .

we should not provide water supply and check for output.

From the diagram we can see that indicator of water is showing RED. when there is no water supply the process is terminated and LED indicator is used to indicate that state.

Condition 2: Now we are providing the water supply and check the output.

As we can observe from the fig. All the states have been executed and indicating the process completion indicator showing green.

Conclusion:

The simulation of the washing machine using state flow is done and the result is satisfactory.

********************************************************************************************************************************************************************************************************

Task 2:

Objectives:

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.

Answer:

Simulink model:

Chart diagram:

Parameters:

Here we give Speed as an input data and Gear as output data.

Simulation time parameters:

Here we gave time as 'Inf'. Our simulation should run until we stop it.

Input:

We use slider gain to provide input to the chart.We are changing speed values from 0 to 100 using slider gain during the simulation.

Output:

Gear 1:

Speed range : 0-15 kmph

Input speed : 10 kmph

color : Green

Gear 2:

Speed range : 16-25 kmph

Input speed : 20 kmph

color : Blue

Gear 3:

Speed range : 26-40 kmph

Input speed : 30 kmph

color : Red

Gear 4:

Speed range : 41-60 kmph

Input speed : 50 kmph

color : Yellow

Gear 5:

Speed range : Above 60 kmph

Input speed : 80 kmph

color : Violet

conclusion:

Created a state flow for 'Gear Shift' using Simulink and the results are satisfactory.

****************************************************************************************************

google drive link for files:

https://drive.google.com/drive/folders/1v2yPwylupy2ircurlTfPubOMwpq8ZuoD?usp=sharing

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.