Week - 4
AIM
To implement control logic of a washing machine using Stateflow and to make a Simulink chart for Gear shift logic.
OBJECTIVE
1. Implement control logic of a washing machine using state flow as per given sequence
- If the power supply is available the system gets activated
- If the water supply is not available stop the process and indicate light
- Saoking should be 200s followed by the washing time of 100s
- Then rinsing happens for next 20s and dryer runs for 50s
2. After all the process have completed turn on the finished LED
Make a Simulink chart for the Gear shift logic as per conditions
Speed Range(kmph) Gear
0 to 15 1
16 to 25 2
26 to 40 3
41 to 60 4
Above 61 5
WASHING MACHINE

A Washing machine is a home appliance used to wash laundry. The term is mostly applied to machines that use water as opposed to dry cleanong or ultrasonic cleaners . The users adds laundry detergent which is sold in liquid or powder from to the wash water.
TRANSMISSION

A manual transmission is multi speed transmission where gear changes require the driver to select the gears by manually operating a gear stick and clutch . The alternative manual transmission is the automatic transmission common types of automaic transmission are the hydraulic automatic transmission ,automated manual transmission , dual clutch transmission and continously variable transmission
MODEL
WASHING MACHINE


- We have created a chart using Chart block to define the logic of the washing machine
- The first state is the Power state this is where the program checks whether the power is ON/OFF . If the power is ON the process will go to next state or else it will go further . Here we have defined a Variable P as it will help us to indicate wheter this particular state is going or not
- Now the next state is Soak state this is where the clothes are soaked once the water is filled .Here the defined inside the state when it is enters the state value of varible S will whivh means that this state is going on
- Now next the Wash state is where the clothes are washed here as per the conditions mentioned above after 200s of soaking the wash state takes place . This condition is mentioned from between Soak and Wash state
- The rinse state takes place where teh all the water is drained out here when the state in this state will indicate R-1 once this state is over R-0 and will move next state . Process between wash state and rinse state defined as per conditions above
- To give power aand water as input we have used a slider switch and constant block is used . Each slider switch is connected to each constant block. When the slider switch is on the value in constant block will be 1 and constant block is connected to chart block where the washing machine program is defined
- If the slider switch is off the value in the constant is 0 which indicated there will be no water or power supply . By this way we have defined the inputs . The output are connected each one with each Display block
- To set conditions for teh lamp block double click on its set the conditions
- Now if we rrun the model we will lamps turing into green and red when the particular state is going on.
TRANSMISSION


- We have used Chart block to define the gear shift logic for the conditions given above
- We have defined five states namely Gear 1 Gear 2 Gear 3 Gear 4 Gear 5
- Now to shift from one state to another we have defined the condition of the speed as mentioned above
- We have also defined values inside the state which represent that when that particular state is going on it will display the value that is defined in it. Thsi will help to see that which is gear is teh vehicle when in a particular speed
- Now to give speed as input we have used a Signal builder block where we have defined the different speed
- Now According to these speed the gears in the chart block will change . To indicate this change gears we have used Lamp block
- Now when we run the model we get the results that represent shift gears at sifferent speed


CONCLUSION
- All onjectives are achieved successfully
- Concepts and approach can be used to create state flow and other system
LINKS