Week - 4
State flow:Stateflow provides a graphical language that includes state transition diagrams,flow charts,state transition tables,and truth tables.it is used to describe how matlab algorithms and simulink models react to input signals evnts, and time -based conditions.State flow you model combinational and sequential decision logic that can be simulated as a block within a simulink model or exececuted as an object in matlab.
Control Logic:Control logic is akey partof a software program that controls the operations of the program.The controllogic responds to commands from the user,and it also acts on its own to perform automated tasks that have been structured into the program.control diagram,which is a form of heirachical state machine.
solution:
Theory:A wasing machine is a home appliance used to wash laundry.The term is mostly applied to machines use water asopposed dry cleaning or ultrasonic cleaners.
1.semi automated washing machine:
The semi automated is needed for your asiistant toget the jobdone.here youwill have to pour in the water manuallyand need to set up the timer.
2.Fully automated washing machine:
The fully automatic washing machines are more convient and other a great range of functionally. you get fully automatic functions that carry out the washing without any manual interference.They are a little more budget-friendly and u spend a normal price.
Fully Automatic washing machines can be further divided into teo types:
Front Load washing machine:
you get front door to put the load into the drum.The drum wash,rinse and spins the laundry.Here you see the different working principle,the clothes are tossing from one direction to the other, as the drum itself is moving.Most of the front load washing machine uses agitatorwashing style to wash and rine the clothes.
Top load washing machine:In a top loading washng machine.you loadthe washing machine from the top.
The drum here does,but the base of machinerotatesthe movesthe clothes thoroughly.Here the machines base take clock wise and anti-clock wise rotation fully wash the dresses.
Procedure steps:
1.create a chart block for defining the stateflow as per the given conditions.
2.inside it the circularjunction is to terminate the signal flow and return a null value.
3.if power is off 0, the process is termnated at the junction else 1 is carry forwarded.
4.if water is off 0, the process is terminated at the junction else 1 is carry forwarded.
5.After this,soak block gets activated and soacking action takes place.
6.After 200 sec of soaking wash block gets activated and washing action takes place.
7.After 100 sec of washing,Rinse block gets activated and rinsing action takes place.
8.After 20 secof rinsing, Dry block gets activated and drying action takes place.
9.After 50 sec of dry,Finish block gets activated.Finish to terminate the signal flow in the process and exists chart.
10. definite power and water as inputs where as soak,wash,dry,finish asoutputs.
11.Connect the chart block with constant blocks for power and water inputs.Input switches connected to them are slider swith and a toggle switch respectively(to ditinguish between the two).Attach lamps to observe the on/off condition.
12.A common scope blockis connected to observe the entire entire washing process and obain the output plot. blue colour in the lamp indicates that the process is complete.
PART-2:
The transmission box which is also known as the gearbox is the second element of the power train in automobile.
It is used to changethe speed and torque of vechicle according to a variety of road and load conditions.
The transmission box changes the engine speed into torque when climbing hills the vechicle required.
MAIN FUNCTIONS OF GEAR BOX:
Provide the torque needed to move the vechicle under a variety of road and load conditions.
It does this bychanging the gear ratio between the engine crankshaft and vechicle drive wheels.
Be shifted into reverse so vehicle move backward.
Be shifted into neutral for starting the engine.
WORKING:In a gearbox,the tertiary shaft is mashed to the clutch with the use of couple of gears.so the countershaft is always in running condition.When the tertiary shaft is brought in contact with the main shaftby the useof meshing gears,the main shaft starts to rotate according to the gear ratio.
PROCEDURE:
1.create chart block for defining the stateflow as per the given conditions.
2.Inside it,the circular junction is to terminate the signal flow and return null value.
3.the process is terminated at the junction else 1 carry forwarded.
4.if speed is less than or equal to 0,the flow is terminated and the gear0 is activated.at the junction 1 is carry forwarded.
5.if speed is greater than 0 and less than or equal to 15,the flow is terminated and gear 1 is activated
6.if speed is greater than 15 and less than or equal to25 the flow is terminated gear 2 is activated.
7.if speed is greater than 25 and less than or equal to40,the flow is terminated and gear 3 is activated
8.if speed is greater than 40 and less than or equal to 60 the flow is terminated gear4 is activated.
9.if speed is greater than60 the flow is terminated gear 5 is activated.
conclusion:
Hence,the given problem was simulated for the washing machine and gear shift mechanism and executing the state flow as per according to given conditions.