Week - 4
TASK.1
AIM:
Make a simulate the process of washing machine with given condition.
OBJECTIVE:
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.
CONTROL LOGIC MODEL EXPLANATION:
In the above control logic block diagram starting state is created with two transition conditions,1st is power supply and 2nd is water supply.that means both water and power supply are on.the second states soaking,in this state the water supply is required so we give water supply.after completion soaking and water supply are off.as per given condition we gave time 200 sec. for this process with the help of transition condition.
The third state is washing,in this state only washing is done with already available water in washing machine this process is took 100 sec. time per given transition condition and water drains from the machine.the fourth state is raising,in this process repeated washing has happened so we required water supply here. the water supply is off after 20 sec. and rinsing state also done as per given transition condition.
The fifth state is dryer,in this process the cloths are dry in 50 sec. as per given transition condition after completion of the process dryer would off with the help of state conditon
PARAMETER SYSMBOLS:
1.Input data:- water supply,power supply
2.Output data:- water,soaking,washing,rinsing,dryer,cycle.
WASHING MACHINE MODEL :
In this model we use stateflow chart to create control logic for washing machines.we used two switches to operate power and water supply.Lmaps are used to watch power and water supply state which is on or off.The switch and lamp are connected to constant block.constant block is connected with control logic.
All process ports are connected with display and display is connected with lamp to watch the process of washing machine with respect to given time.After completion of all process cycle light would apper green.we run this simulation for 400 seconds.
CONCLUSION:
We can conclude that we simulate the washing machine control logic with the help of stateflow and got satisfactory results.
TASK.2
AIM:
Make a simulink chart for the 'Gear shift' logic as per below conditions.
OBJECTIVE:-
Simulink chart for the ' Gear shift ' logic as per below condition:
speed range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
above 61 5
speed input while the simulation is runnig and display the gear shift.
CONTROL LOGIC MODEL:
As per given condition for gear shifting,we created stateflow diagram with help transition to give condition with respect to speed.
PARAMETER SYSMBOLS:
1.Input data-speed
2.Output data-gear
GEAR SHIFTING MODEL EXPLANATION:
In the above model we used slider gain block for variable speed and connect to control logic stateflow block.Display block is connected to control logic to see which gear is running and also used lamp for better graphical presenatation to user.use different colour lamp for different gear.when we put input in slider gain block speed is 10 than first lamp indicated in red colour and display show the 1st gear. when we change the input speed is 20 than second lamp is indicated in yellow than display show 2nd gear and again we change input speed is 35 second than 3rd lamp indicated purple colour and dispaly show 3rd gear.now we change input speed is 50 than lamp indicated in sky blue and display show 4th gear.when we increse input speed in 80 than lamp indicated green and display show 5th gear.
CONCLUSION:
we can conclude that we simulate the gear shifting control logic with the help of stateflow and got satisfactory results.