Week - 4
TASK-1
AIM:-To implement control logic of a washing machine using stateflow in simulink.
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 and indiacate through LED.
c)Soaking time should be 200sec followed by the washing time of 100 sec.
d)Then rinsing happens for next 20 secs and dryer runs for 50 secs.
After all the process have completed turn on the finished LED.
REPRESENTATION OF A BLOCK DIAGRAM:-
CHART DIAGRAM:-

PARAMETERS:-

SIMULATION TIME PARAMETERS:-
we used 430 secs so that it can cover the whole cycle and sufficient time to solve the parameters.

OUTPUT:-
there are two conditions asked to solve in the question:-
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 the same green .i.e when there is no water supply the process
is terminated and LED indicater is used to indicate the state.
condition:-when water supply is ON.

as we can observe from the figure that, all the states have been executed and indicating the process completion indicator named as
(cycle) showing silver.
CONCLUSION:-
the simulation of washing machine using stateflow is done and result is given above.
TASK-2
AIM:-To make a simulink chart of 'gear shift' logic.
OBJECTIVE:-Making a simulink chart for gear shift for the below menitioned parameters.
speed(kmph) gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
above 61 5
MODEL:-To file which contains the model of gear shift is attached with this report.
BLOCK DIAGRAM OF MODEL:-

FLOW CHART OF GEAR SHIFT :-

PARAMETERS:-
Here we give speed as an input for the chart.
Here we give speed as an output for the chart.
SIMULATION TIME PARAMETERS:-

INPUT:-

Here we use the slider gain to provide the input to the chart.
OUTPUT:-
the output producedis recorded when it's displaying the each gear.
Gear-1:-
speed range-0 to 15 kmph
speed input-10kmph
colour-green

GEAR 2:-
speed range-16 to 25kmph
input speed -20
colour-blue

GEAR-3
speed range-26 to 40kmph
speed input-30
colour-orange

GEAR-4
Speed range-41 to 60kmph
input speed-41
colour-silver

GEAR-5
Speed range above 60kmph
input speed=80
colour-brown.

CONCLUSION:-
Created a stateflow for the gear shift using simulink and result are given above.