Challenge

Make a Simulink chart for the “Gear shift” logic and logic of a “washing machine”

Question 1:-

  1. Implement control logic of a “washing machine” using Stateflow as per given sequence:
  • 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

Answer:-

Logic:- To controlling Washing machine system ON/OFF use Rocker switch. When the switch is ON all system are run and its indicate through Lamp. Then water start enter in machine if the water is not available then sysytem also OFF automatically and indicating through lamp water is available or not available. if available the go on next process soaking, washing, rinsing, drying after all process done end lamp will indicate the process is complete.

Stateflow chart:-

In the above control logic first created two states 1] Power==1 /Power==0 its use for activation of supply to system. Power==1 it means Power on and Power==0 it means Power off.

2] W==1/W==0 its for to know water is available or not. When both are activate then machine start to process run.

Then next four states are created for the flow order of the Soaking, Washing, Sinking, Drying with their time of operation for soaking 200 sec, for washing 100 sec, for rinsing 20 sec and for drying 50 sec.

Then create exit condition of the state kept as zero. at the enter of state then the operation state is zero and when its complete the is one.

after all process done then its all shows through Lamp, and then we can shut the machine off.

Symbol Pane:-

In this symbol pane we created Output of power start, water start, soaking, washing, rinsing, drying and input as power switch, water switch for displaying output. they connect to display block.

Model:-

1]

In this model the power switch and water control switch are off so they are shown through lamp. red light is on it means full system is off. and when the system is off then also constant input is 0.

2]

In this model the power switch is on and water control switch is off when water control switch is off the n the all system also off.

3]

In this model the power and water control switch are on so full system are run and they indicate through lamp. It completes a cycle through as first soaking for 200 sec then washing for 100 sec and then the use water goes out from machine new fresh water enter in machine it all shows through lamp indicator then rinsing will be done for 20 s and the drying for 50 sec and then the cycle is end and it also indicate through lamp.

Question 2:-

Make a Simulink chart for the “Gear shift” logic as per below conditions:

Speed Range(kmph) Gear

0 to 15 1

16 to 25 2

26 to 40 3

41 to 60 4

Above 61 5

Give speed input while the simulation is running & display the gear number.

Answer:-

In this system mainly used as slider block. It is used for the given input to speed.

Logic:-

In this system given speed range is 0-100 so we use slider block for the given input speed. The first gear speed range is 0 to 15 so the entry of state for the 1st gear is 0<=speed and 15>=speed it is the exit condition of gear in speed greater than 15. In gear 2 entry state is 16<=speed and 25<=speed the exit condition is between speed<16 to speed<25.Same conditions are applied in all gears and the output is gives from lamp and dispaly block.

Stateflow Chart:-

In the above flowchart first start the engine creating input switch E=0/1 through rocker switch which is gives the powerto engine. then next gear shift logic is implemented through following states. The five gear states are created in system as gear 1,2,3,4,and 5 rsesp. and their trasition is connected with speed range condition is shown below

The gear transition is decided below

Speed>15 shift to G=2

Speed>25 shift to G=3

Speed>40 shift to G=4

Speed>60 shift to G=5 when the speed increasing from 0-60kmph simillarly in reverse direction as same.

while simulating gear shifting logic engine E==0 condition given to various speed change values.

Symbol pane:-

In this output as gear_first, Gear_second, Gear_third, Gear_fourth, Gear_fifith and the input is E, and speed.

Models:-

1]

In this model we shown when the engine start and the speed is goes to 5kmph then the model shown at that speed the engine is it at 1st gear it is indicated through lamp.

2]

In this model speed is 20kmph and it is in 2nd gear the see the only second lamp is on.

3]

It is at speed nearly 45kmph at engine in 3rd gear and glow green light and display output as 1.

4]

In this model the speed of engine is at above 60 then the gear is implemented as 5th and the green light was on and in display block showing 1.

hence all condition are simulated through stateflow chart successfully.

Thank You

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.