Challenge

Week - 4

Aim:

  1. Implement control logic of a “washing machine” using Stateflow as per given sequence:
  2. Make a Simulink chart for the “Gear shift” logic as per below conditions:

Objective:

  1. To implement the control logic of a washing machine using stateflow as per given sequence:

a) If the power supply is available, the system gets activated.

b) If the Water supply is not available, stop the process & indicate through LED.

c) Soaking time should be 200s followed by Washing time of 100s.

d) Then rinsing happens for next 20s & dryer runs for 50s.

After all the processes have completed turn on the finished LED.

Model:

Chart:

Here We have given soaking, washing, rinsing, Spin, Finish as Outputs of the chart and Water_supply & Power_supply as Inputs of the chart.

Simulation Time

We have given 500 sec so that it can cover the whole cycle and sufficient time to solve as per the condition.

There are two conditions to solve in this question.

Condition1: when water Supply is OFF.

From the above diagram, we can see that indicator of water_supply indicator is showing Red i.e., When there is no water supply the process was terminated and LED indicator indicates the state.

Condition2: when Water Supply is ON.

We can observe from the above figure, All the process have been executed and the output is captured in th incators showing Green.

TASK 2:

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

Objective:

Making a simulink chart for the Gear Shift for the below mentioned paramters:

Speed Range(kmph) Gear

0 to 15 1

16 to 25 2

26 to 40 3

41 to 60 4

Above 61 5

Model:

Block diagram

chart diagram:

Parameters:

Here Speed is given an Input for the chart.

Here Gear is given an Output for the chart.

Simulation Time parameters:

Here the time is given as 'Inf' for our simulation and will run until we stop it.

Here we are changing my speed values from 0 to 100

OUTPUT:

Gear 1:

Speed range: 0 to 15kmph.

Input speed: 9 kmph.

Gear 2:

Speed range: 16 to 25kmph.

Input speed: 25 kmph.

Gear 3:

Speed range: 26 to 40kmph.

Input speed: 35 kmph.

Gear 4:

Speed range: 41 to 60kmph.

Input speed: 55kmph.

Gear 5:

Speed range: above 60kmph.

Input speed: 90 kmph.

CONCLUSION:

  • Created a State Flow for Gear Shift using Simulink and the results are satisfactory.
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.