Week - 4
AIM:
- Implement control logic of a “washing machine” using Stateflow as per given sequence.
- Make a Simulink chart for the “Gear shift” logic as per below conditions.
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
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.
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
PICTORIAL REPRESENTATION OF BLOCK DIAGRAM:
CHART DIAGRAM:

PARAMETERS:

We have given water, soak, washing, rinsing, dryer, cycle as Outputs of the chart. We have given our water supply & power supply as Inputs of the chart.
Simulation Time parameters:
We used 430 sec so that it can cover the whole cycle and sufficient time to store and slove the parameters.

OUTPUT:
There are two conditions in the question to solve it.
Condition-1: when Water Supply is OFF.
We should not provide water supply and check for output.

From the above diagram, We can see that indicator of water is showing Red le. When there is no water supply, the process is terminated and LED indicator is used to indicate that state.
Condition-2: when Water Supply is ON.
Now we are providing the water supply and check the output.

As we can observe from the above figure, All the states have been executed and indicating the Process completion indicator (named as cycle) showing Green.
CONCLUSION:
The simulation of the Washing machine using State flow is done and the result is satisfactory.
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.
SIMULINK MODEL:
CHART:

Here we give Speed as an input for the chart.
Here we give GEAR as an Output for the chart.
Simulation Time parameters:
Here we gave time as 'Inf for our simulation should run until we stop it.

I'm changing my speed values from 0 to 100 using slider gain during the simulation.
OUTPUT:
The Output produced is recorded when it's displaying the each gear.
Speed range 0 to 15kmph.
input speed 10kmph.
Color: Green.

GEAR-2:
Speed range 16 to 25kmph
Input spoed 20kmph
Color: Blue
Gear:3:
Speed range: 26 to 40kmph,
Input speed: 30kmph
Color: Light Blue.

Gear-4:
Speed range 41 to 60kmph
Input speed 50kmph
Color: Orange

Gear-5
Speed range obeve 60kmph
nput speed 80kmph
Color: Red

CONCLUSION:
• Created a State Flow for Gear Shift using Simulink and the results are satisfactory.
Note: SIMULINK MODELS ARE ATTACHED