Week - 4
Task-1
Aim:
To implement control logic of a washing machine Using State flow in Simulink.
Objective:
1) To implement the control logic of a washing machine using state flow 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 100s
d)Then rinsing happens have completed turn on the finished LED
M0DEL:
The file which contains the model is attached with this report.
Pictorial Representation of a "Washing machine" seing Stateflow
Control logic
Parameters:
1) Value '1' means there is input.
2) Value '0' means there is no input.
Conditions:
1) When Lamp shows Green, The task in progress.
2) When Lamp shows Red, the task Ends
Chart Diagram:

Working principle of a washing machine:
The working principle of a washing machine is centrifugation is a separation process that uses the action of centrifugal force to promote accelerated settling of particles in a solid-liquid mixture.
Soaking:
It is used to dip clothes in detergent water to remove dirt from the clothes. In this Customer needs to select soak from the panel. Soak-This function is available with wash timer, in 42 min of washing 27 minis soak an 15 min machine will wash clothes.
Washing:
During the wash cycle, a large plastic agitator turns around, moving your clothes through the water. When the wash is finished, the pump drains the water from the outer drum.
Rinsing:
The dirty, soapy water is drained, then the washing machine is refilled and your clothes are "rewashed" in clean water. Spin: All the water is drained completely, then your clothes are spun very fast and excess water is removed thanks to centrifugal force.
Dryer:
A washer dryer is a washing machine with an inbuilt tumble dryer, so if you need to dry clothes quickly, it's a good option as it both washes and dries your clothes in the same cycle – so all you need to do is remove the clothes from the machine and they're ready to wear.

Invthis water soak, washing, rinsing, dryer, cycle are outputs.
In this water water supply, power supply are inputs.
SIMLATION TIME PARMETERS
We used 430 sec. It can cover the whole and sufficient time

Output:
There are two conditions asked to solve in the question.
There are two conditions asked to slove in the question.
CONDITION-1: When wate supply is Off.
We Should not provie water Supply and check for output.
From the above diagram, We can see that indicator of water is showing red. When there is no water supply the process is terminated and indicator is used to indicate the state .
v
Parameters:
1) Value '1' means there is input.
2) Value '0' means there is no input.
Conditions:
1) When Lamp shows Green, The task in progress.
2) When Lamp shows Red, the task Ends
Condition-2:When water Supply is ON.
Now we are providing the water supply and check the output.We can observe the above diagram all states have been executed. And indicate the process completion indicator showing Green.
vv
Parameters:
1) Value '1' means there is input.
2) Value '0' means there is no input.
Conditions:
1) When Lamp shows Green, The task in progress.
2) When Lamp shows Red, the task Ends
Task-2:
AIM: To Make Simulink chart for the “Gear shift” logic.
Objective:
Making a simulink chart for the Gear shift for the below mention parameters.
Seed Range Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
Model:
The file which contains the model of gear shift is attached to the report.
Block diagram:

Chart Diagram:

Parameters:

Simulation Time parameters:
Here we gave time as ‘inf’ for simulation should run until stop it.

INPUT
We use slider gain to provide to the chart

I am changing the speed values from 0 to 100 slider gain during simulation.
Output:
When the Out put is recorded for each gear
Gear-1:
Speed Range: 0 to 15kmph
Input speed: 13kmph
Color: Green

Gear-2:
Speed Range: 16 to 25kmph
Input speed: 24kmph
Color: Blue

Gear-3:
Speed range: 26 to 40kmph
Input speed: 34kmph
Color: Red
Gear-4:
Speed Range: 41 to 60kmph
Input speed: 54kmph
Color: Pink

Gear-5:
Speed Range: above 60kmph
Input speed = 72kmph
Color = Yellow
vv