Challenge

Week - 4

  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

Below fig shows the control logic of washing machine.

fig=Control logic of washing machine

BLOCK USED IN MODEL:

• Constant-for water and power supply

Lamp: to indicate the signal.

• Slider switch-to turns the machine on and off.

• Stateflow-for control logic. display-to show the output signals.

Part 1 washing machine

power on, Water on, T=0

fig=(T-0)

Power on,water on,T=10 sec soacking

fig=socking

fig=soacking

Power on ,water on , T=230

Washing

fig=washing

fig=washing

power on,water on, t=350

rinsing

fig= Rinsing

fig=rinsing

procedure:

• the power and water supply to the machine are dependent upon the switch conditions which is on or off and it is defined by the constant value 0 or 1.

• the signal with the given state flow logic. if the value displayed is I then the power

and the water supply to the machine. If the value is 0 and 1 then the machine will not start the process as one of the switches is off.

• when both power and water are at 1 then the socking process starts and run for 200 sec after this washing started.

• after 200sec the rinsing process starts, and after this process, the drying process is

started for which the water supply is cut off, after completing all the tasks, the machine turns off.

for all the different process or states of the machine, the lamp indicates green for working ad red for not working, this gives a batter idea to user, now which process

is going on in the machine

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

Below fig shows the control logic of gear box

fig= control logic of gear box

Blocks used in the model:

• constant-To multiply with the slider gain.

• slider gain it acts as a throttle to increase or decrease the speed. • lamp-For indicating the gear number.

.state flow-control logic of gear shifting.

• custom gauge- it's working as the speedometer of the vehicle means to show the. speed of the vehicle.

• Scope-To plot the graph of the speed vs gear shift.

fig= Gear box system control logic

fig=Graph for continous input

Gear 2

16 to 25

fig= Gear2

Gear 3

25-40

fig=Gear3

procedure:

. At the initial position, the slider is at 0.

• when we increased the speed the input is given to the state flow chart where it

checks the input speed and displays the gear number.

according to the given data the range of the first gear is 0-15kmph.

the range of the second gear is 15-25kmph.

the range of the third gear is 25-40kmph.

the range of the fourth gear is 40-60kmph

the range of the fifth gear is greater than 60kmph.

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.