Week - 4
AIM:-
- 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.
PROCEDURE:
WORKING PRINCIPLE OF WASHING MACHINE :
A washine machine by sprinning at 800-1600rpm helps saap and dirt with it to leave the surface of the cloth via centrifugal force and into outlet pipes hence utilizing centifugation to both clean and partially dry the clothes loaded in it . Thus the processes are electrically controlled ,such as the drum ,values ,pump ,motor and heating .the value opens again and the dirty water drains out the drums the pump works to help get rid of the water .the value lets clean water in again into the drums . the four processes are
SOAKING :-
It is used to dip clothes in detergent water to remove dirt from the clothes .in this function customer need to select soak from a panel soak -this function is available with wash timer ,In 42 min of washing 27 min is soak and 15 min machine will wash the clothes .
WASHING:-
During the wash cycle ,a large plastic agitator (green) 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 completely ,then 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 centrifugai force .
DRYER:-
They work by pushing warm dry air through your wet washing to extract maisture ,then cooling the now humid air in a heat exchanger to condense the moisture ,which is collected in a tank or pumped down the drain .the (now dry ) air is reheated and the cycle repeats.
1) STATE - FLOW:-
Systematic solution of a problem is possible with sequential ,unambiguous and realizable finite process step set .;this called "algorithm" and it is one of the most important part of the programming languages .in this study ,it is represented how to learn algorithm by using simulink stateflow .in flow diagram -based algorithm learnig in figure washing machine 1.
CONTROL LOGIC OF A WASHING MACHINE:-
It checkes for the extent of dirt and grease ,the amount of soak and water to add . direction of spin ,and so an .the machine rebalances washing load to ensure correct spinning .Else .it reduces spining speed if an imbalance is detected .Even distribution of washing load reduces spinning noise in figure washing machine 2 .
The two inputs are given for the power and water supply .Once the inputs are given output are displyed by the flow chart as per the given sequence .the system are observed for sometimes then it is checked and the process is completed by green light as displayed in figure washing machine 3.
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.
AIM:-
In this system mainly used as slider block .it is used for the given input to speed.
Logic:-
in this system given speed range is 0-100 sowe use slider block for the given input speed . the first gear speedv range is 0 to 15 the entry of the state for the 1st gearb is 0<=speed and 15>=speed it is the exit condition of gear in speed greater than 15. in gear 2 entry state is 16<=speed and 25<=speed the exit condition is between speed <16 to speed <25 .Same condition are applied in all gears and the output is gives from lamp and display block .
Stateflow Chart:- figure washing machine 5.
in the above flowchart first start the engine creating input switch E=0/1 through rocker switch which is given the power to engine .then next geatr shift logic is implemented through following states. the five gear states are created in system as gear 1,2,3,4 and 5 rsesp. and their trasition is connected with speed range condition is shown below
The gear transition is decided below
speed>15 shiftto G=2
Speed>25 shift G=3
Speed>40 shift G=4
Speed >60 shift to G=5
when the speed increasing from 0-60 kmph simillarlyin reverse direction as same while simulating gear shifting logic engine E=0 condition given to various speed change values.
SYMBOL PANE:-
1. Gear _first =1
2.Gear_ second= 2
3.Gear_three= 3
4.Gear_ four=4
5.Gear _five=5
6. Poweswitch =6
7.E =1
8.Speed =2
in this output as gear_ first . Gear_ second ,Gear_three, Gear_fourth, Gear_fifith and the input is E,and speed.
MODELS:-
1.In figure washing machine 6.
in this model we shown when the engine start and the speed is goes to 5kmph then the model shown at that speed the engine is it at 1st gear it is indicated through lamp.
2. in figure washing machine7.
in this model speed is 20kmph and it is in 2nd gear the see the only second lamp is on.
3. in figure washing machine 6.
it is at speed nearly 45kmph at engine in3rd gear and below green light and display output as 1.
4.in figure washing machine 8.
in this model the speed of engine is at above 60 then the geare is implemented as 5th and the green light was an and in display block showing 1.
Hence ,all condition are simulated through stateflow chart suceessfully.
Thank you.