Challenge

Week - 4

1. Control Logic Of a Washing Machine:-

>In this system(washing machine), a couple of inputs are taken in cosideration for the chart of stateflow "power supply" and "water supply".

>The outputs taken in cosideration for chart are water, soaking, rinsing, dryer, end.

>To run this system we have to select and connect few blocks, they are as follows:

>Constant Blocks:-

>There are two constant blocks used in this sytem, through which the system will get input of power supply and water supply.

>If the value of the blocks is 0, than supply is off and when value of blocks is 1 the supply is on.

>Chart:-

>To run the washing machine simulation we have to give certain commands in the chart, just like if else ladder used in C language, there are blocks in which we can add the information or any condition.

>The values of time is to be inserted as asked in the question, either it's soaking, rinsing, drying or the end of the cycle.

>After connecting all the blocks, the values and postion of both input and output is sorted out in symbols pane.

>Display:-

>As there are six outputs coming out of the chart, there are six different display blocks are used.

>All these six blocks of display are connected with the outputs comming out of the chart.

>Lamp:-

>Lamps are used to identify which output is in action.

>There are six lamps used for six different displays, the colour combition is used same for all the lamps to have a better understanding of model.

>Green colour is assigned when the simulation is ran at that block's time, and red colour is assigned when it;s not recieving any signal from simulation.

>According to question all blocks of chart are assigned some time values, when the simulation runs the output which is inaction sends signal to the display and as display is connected with lamp the led shows the light of that colour.

>>As asked in question all the simulations are ran, soaking after 200s, washing after 100s, rinsing after 20s and dryer after 20. Also the simulation is shown when power or water supply is not given and when the cycle of washing ends.

2.Gear Shift:-

>In this model inputs are taken in terms of speed and the output is shown in the gear change according to the speed

>The blocks used in this model are as follows:-

>Constant:-

>A constant block is used to connect the slider block, so that ait can have a costant value on one end.

>Slider Gain:-

>This block is used to give paramters about speed.

>It gives a range of maximum and minimum, it's set from 0 to 100 to run this simulation.

>To find that gear changes or not the speed input must change, which is done through this block.

>The slider provides the speed input to the chart.

>Chart

>A chart block is used to insert different vlaues and and conditions for change of the gear.

>In this block, a series of different sub-blocks is used named as gea1, gear2, gear3, gear4 and gear5.

>All these sub-blocks are connected one after another, while connecting these blocks conditions are provided to them.

>Like from block1 to block2, speed limition is shown from 15 to 25 and same goes with other blocks, speed varries from 0-15(for 1st gear), 16-25(for second gear), 26-40(for third gear), 41-60(for fourth gear) and 60+(for fifth gear).

>The speed parameter is take as input and the gear parameter is taken as output.

>Display(Gear):-

>The display block is used to find out which gear is there after running the simultion.

>It's connected with the chart block, which sends signal when to shift which gear and at what speed.

>The slider chain sends speed input to chart, than the chart filters down the conditions mentioned in it's blocks and gives output to gear(display)and finally the the display shows what gear is shifted.

>>As mentioned in question the snapshots of speed input in the slider gain is attached with the gear no. displayed, also the all the parameters given in chart for state flow and slider gain is attached.

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.