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

After all the processes have completed turn on the finished LED

answer:

1)To implement control logic we need to add a state flow chart for control logic

2)from the statement we can understand that we need to first add power supply followed by water supply under certain conditions

3)if water system isnt activated then all further procesess will be stopped if water supply is on then,

further processes will be activated soaking,drying etc under some time interval

4)after completion of the stateflow logic we need to add all these parameters in model explorer to acquire input and logic for our system

6)after this step add lamp to all the outputsor the display and connect those to them to check which procesess are active

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.

1)For gear shift logic we will need the following blocks

STATE FLOW CHART

CONSTANT BLOCK

DISPLAY

SLIDER GAIN

SCOPE

2)The logic for chart is quite simple for gear logic,simply add 5 states for 5 respective gears and set the conditions as the speed given in the question

3)add 1 input(speed) and 1 output (a) in the model explorer to acheive input and output

4)

5)set the slider gain as per our required speed

6)connect the output display and slider gain to the scope so that we can see the difference in the input and the output

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.