Challenge

Week - 4

answer 1:- Working principle:- A washing machine by spinning at 800-1600 rpm helps soak the dirt to clean the clothes via centrifugal force and hence centrifugation helps both to clean and partially dry the clothes loaded in it.Thus the processes are electrically controlled, such as the drum, valves, pump, motor and heating. The valve opens again and the dirty water drains out of the drums. The pump works to help get rid of the water. The valve lets clean water in again into the drums. The four process are soaking, washing, rinsing and dryer.

Stateflow provides a graphical language that includes state transition diagrams, flow charts, state transition tables and truth tables. By using stateflow to describe how Matlab algorithms and simulink models react to input signals, events and time-based conditions.

Control logic is model system logic using state machines, flowchart and truth tables.

Stateflow is a simulink tool to implement the state machine. Here model syatem logic of a washing machine using stateflow has been doneas follows:-

Step1:Create a chart and enter the given input conditions which are:

  • If the power supply is available, the system gets activated
  • If the Water supply is not available, stop the process & indicate through LED
  • Soaking time should be 200s followed by Washing time of 100s.
  • Then rinsing happens for next 20s & dryer runs for 50s.

After all the processes have completed turn on the finished LED.

Step 2: After entering the input conditions in the chart, go to symbols pane and assign the given variables.

Step 3: Give the input values for turning on or off for the Power Supply and Water supply.

condition: if value=1, power and water supply will turn on.

if value =0, power and water supply will turn off.

Step 4: Use display block and lamp indicator to display the results.

Results: we took three cases and observed following results.

Case 1 if the power source =0, power supply is not available and system will not activate.

Case 2 If the power source = 1 and water source=0, then power supply will turn on and water supply will not be available and so system will not activate.

Case 3 If both power and water source are 1, then power supply and water supply will be available and so system will activate and after all process completed end lamp will turn on.

answer 2:- A gear shift mechanism for a manual transmission includes a shaft axially movable for selecting shift planes and rotatable for engaging the gears defining the shift planes. The shaft is held in a reference shift plane by two helical springs. Mechanical devices that enable the driver to engage gears in such a way as to obtain the desired transmission ratio are called shifting mechanisms.

Steps followed for gear transmission using stateflow is as follows:

Step 1: Create a chart and enter the given conditions for gear shifting.

Conditions:

Speed Range(kmph) Gear

0 to 15 1

16 to 25 2

26 to 40 3

41 to 60 4

Above 61 5

Step 2: After entering the input conditions in the chart, go to symbols pane and assign the given variables.

Step 3: Connect the slider gain to vary the speed while simulation is running.

Step 4: Create constant and giving value 1 and 0 for turning on and off.

Step 5: Crete lamp to indicate the power is on or off.

Step 6: Use display block to display the gear position.

Results: we took 3 cases and observed the following results.

Case 1: if the key=0, then the power will turn off , lamp indicate the red colour and gear shifting mechanism will not activate.

Case 2: if the key=1, then the power will turn on, lamp indicate green colour and gear shifting mechanism will activate.

Case 3: By varrrying the speed in the speedometer, gear position will change according to the given conditions. For example if we give speed=35km/hr the gear position shows 3. Likewise, changing the speed in the speedometer according to the given condition, gear position will change.

The required model and screenshots of results are uploaded.

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.