Challenge

Week - 4

1.

1.Click on the matlab icon.

2.Click on the simulink icon- select the blank model/To create model.

3.Double click on the model page and type chart,then chart icon is displayed.

4.Double click on the chart icon,then chart model page is opened. From the chart model page desing the state flow.

5. Select the state block icon in the chart model . State block will assign the parameter and then enter, then we will assign a variables.

For example power statevblock : power is parameter. entry:x=1; exit:x=0 is the variables.

6.Again select the state block icon in the chart model .Assign the parameter of water and the variables are entry:y=1; and exit:y=0 for exit.

7.From the state of power to water connections are made clicking on the state block a plus symbol is appeared drag and connect the stateblocks.

8.After connection the arrow to the state block then three symbols are appeared from them select the square brackets for condition statement for the state block 1 (power) to state block 2( water).

9.Again click on the state block icon and assign the parameter of Soaking. and the entry:a=1;.By clicking on the water block plus symbol is appeared and drag the plus to the soaking block. then connection is appeared and select the square bracket is selected for the condition for condition.

10.Again click on the state block icon and assign the parameter of washing. and the entry:b=1;From soaking block to the washing block by clicking on the soakin block plus symbol is appeared and drag the plus to the washing block connected.By clicking on the arrow line ,there we get ? symbol click on that then three dots will appear. from that select first one ( Event name/message name) from that list is appeared as after() is selected. from after assign the time delay as given in the modelling question which is of 200sec.(after(200,sec)).

11.Again click on the state block icon for the remainig states of rinsing , dryer and finish.After all the state blocks assign the parameters and variable.

12.After assign all the parameter and variables and connect the state block and assign the time delay of each state block repeat the step 9 and step 10. (time delays for the washing = 100 sec, rinsing =20sec , dryer=50sec.).

13.After assing the state block flow. log active state a triangle showing (downwards) Click on that then select the symbol pane. By selecting this a excel type format is opened on the right side of the screen. then select the ports of the output data and input data by selecting the type in the table.

14.For this model we have 7 output data. and 2 input data.After these data we will go to display in the simulink model page.

15.In the model page the state flow will appeared with the transparent background in the chart icon.

16.Double click on the model page type constant, display , lamp. After blocks connect all the blocks as per the model diagram.

17.Set the simulation time for this model is (370 sec) by adding the time delays of the soaking washing rinsing and dryer. Click on the run icon. It will show the 1 for all the cases. Except finish state but the lamp is in on state.(as per the condition given in the question).After completing all the process.

18.For completing the finish process we will take the simulation time (400sec). Then all the state show 1 in the display block.

19. For the water is not available.Assign the water input as zero(0) in the constant block. then all states shows 0.water is 1, output of the lamp is on state.

20. These are observation i had done in the simulation and the state flow as per my knowledge.

2.

1.Click on the matlab icon.

2.Click on the simulink icon- select the blank model/To create model.

3.Double click on the model page and type chart,then chart icon is displayed.

4.Double click on the chart icon,then chart model page is opened. From the chart model page desing the state flow.

5. Select the state block icon in the chart model . State block will assign the parameter and then enter, then we will assign a variables.

For example: Gear1 is parameter and the entry:G=1; is the variable. Gear 2 is parameter and the entry:G=2;is the variable.like this we will assign up to gear5.

6. After assiging the parameters and variables ,connect the state flow blocks to each other.And assign the condition as per the speed the gear should changes. By clicking on the arrow line. select the square brackets and assign (if the Speed is >=16 ; and the speed <16;).It shifts from gear1 to gear 2.

7.Assign the condition as per the speed of the gear should changes. By clicking on the arrow line. select the square brackets and assign (if the Speed is >=26 ; and the speed <26;).It shifts from gear2 to gear 3.

8.Again assign the condition as per the speed the gear should changes. By clicking on the arrow line. select the square brackets and assign (if the Speed is >=41 ; and the speed <41;).It shifts from gear3 to gear 4.

9. Again assign the condition as per the speed the gear should changes. By clicking on the arrow line. select the square brackets and assign (if the Speed is >=61; and the speed <61;).It shifts from gear 4 to gear 5.

10.After assign the state flow.Click on the triangle shape symbol(downwards).From that select the symbol pane and assign the input data (S) and output data(G).

11.After all the state flow entered .click on the simulink model. the stateflow chart is showed in the transparent blocks in the chart icon.

12.Double click on the model page type constant , display and slider and lamp. connect the lamp to the display.

13.Double click on the lamp, then the lamp a window will open in that we will select the main -state- adding the(+)symbol for the next gear and colour of the light. by adding up to 5 gear and 5 different colurs are taken. then click on ok.

14. Select the simulation time for infinity because while running the simulation we want see the gear transition.By clicking on the run icon the simulation is running. By change the slider we can see the gear transition in the display block.

15. If we want a fixed gear then we will assign a value of the speed in the constant block.Then the result of the gear number display in the display block.

16.If the simulation time is Infinity then we have to click on the stop icon than only the simulation process is stop.Otherwise it is running until the stop icon is clicked.

17. These are observation i had done in the simulation and the state flow as per my knowledge.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.