Week - 4
1.washing machine:-
Blocks used to construct a washing machine:
1.Chart
2.display
3.constant
4.lamp
5.rocker switch
CHART:- The washing machine logic is created in this chart.In the chart we construct a control logics. in first state is created with 2 conditions for power switch supply.
One is with power supply avilable (powerswitch==1) and second with water supply avilable(W==1).If the power supply at entry is 1 and water supply is on, then machine will get activated and start the next process of operation.
Display:-The display shows the working position of the washing machine and its components like washingstate, Soaking, washing, rinsing, dryer, washing compleated. if the display shows 1 that component is in running condition and if the display showes 0 that component is in rest position.
Constant:- It was linked with the rocker switchs one is for powerswitch and another one for water switch.iIt generates a real or complex constant value signal.Use this block to provide a constant signal input.
Lamp:-The lamp block display a colour indicating the valu of the input signal. we can use the lamp block with otherdashbord blocks to build an interactive dashbord of controls and indicators for our model.
Rocker switch:-The rocker switch block toggles the value of the connected block parameter between two values during simulation.
The operation states have been created in flow order soaking, washing, rinsing, drying with their time of operation as 200sec for a soaking, 100sec for washing , 20sec for rinsing and 50sec for dry.
After all process has done washing machine completed LED will glow and we can shut the machine off.
Gear shifting:-
Implementation of control logic for gear shift using stateflow processs:
1.Start simulink and create a blank model.
2.Search for CHART block in the state flow categoryof library browser.
3.Open the chart block and select the various features from the stateflow window.
4.Control logic for gear shift is such that it should change the gear when the speed increses of decreses automatically.
5.After finishing the control logic run the stateflow and check the gear shift operation.
BLOCKS used in the construction:
Chart
Display
Constant
Lamp
Rocker switch
Slider
In the above construction we alredy know about the chart, display, constant, lamp, rocker switch. let us know about slider.
Slider:- The slider block tunes the value of the connection block prameter during the simulation. For example, we can connect the slider block to gain block in our model and adjust its value during the simulation.
Exlanation:-The speed range from 0 to 100 and the slider is used to send the input.
For that:- Gear 1 speed 0 to 15
speed>15 shift to G=2
speed>25 shift to G=3
speed>40 shift to G=4
speed>60 shift to G=5
And thus all condition simulated through stateflow chart successfully.
for referance constructed models is attached below.