Challenge

Week - 4

AIM:

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

2.Make a Simulink chart for the “Gear shift” logic as per the 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.

DESCRIPTION:

FOR CONTROL LOGIC OF WASHING MACHINE USING STATE FLOW:

STATE FLOW: It is a graphical representation and language of flow charts, state transition diagrams, state transition tables and truth tables. State flow is used to describe the MATLAB algorithms and simulink model how they react to the input conditions, events and time based conditions.

CONTROL LOGIC: It is a Model with logic system which uses state machines, flow charts and truth tables.

STATE FLOW AND CONTROL LOGIC OF WASHING MACHINE:

STEP1: To create a chart model in the Matlab simulink with the below conditions

  • 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

The model looks as below

STEP2:After giving all the input conditions in the chart model of above, Go back to the chart pane and give the input and output conditions.

STEP3: Giving inputs as Power_supply and Water_Supply for turing ON and OFF.

if value=1, Power or Water supply will turn ON

if value=0, Power or Water supply will turn OFF

STEP4: Using the 'display' and 'Lamp' and connecting them to their respective connections say power supply, water supply, soaking, washing, rinsing, drying than ending the logic as below in the figure

OUTPUTS:

1.If power supply=1 and water supply=0 it means that the power supply is ON but there is no water supply in the system, due to which the system will not able to undergo the further processess.

we can observe in the below model that in the display power is turned ON but as water supply is not available all other processess are unable to carry and display value is 0.

2. So if now i give power supply as 1 and water supply as 1 and the time for simulation as 420seconds than the whole process is getting completely till the end as below. If given simulation time less than 420seconds the whole process is not getting completed which means for whole one cycle for washing machine to complete it takes 420 seconds of time as in figure below

GEAR SHIFT LOGIC SIMULINK MODEL :

MECHANISM: A mechanical system which enables the driver to engage in gears in such a way so as to achieve desired transmission ratio is called as gear mechanism.

STEP1: To create a chart model with the 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

STEP2:After giving all the input conditions in the chart model of above, Go back to the chart pane and give the input and output conditions.

STEP3:Connecting the 'Slider gain' block to vary the speeds during simulation.

STEP4:Adding 'constant' block as Key and giving 0&1 for Turning ON and OFF

STEP5:To add 'Lamp' block to the key to know ignition is ON or OFF.

STEP6:Using the 'display' block to know the gear position.

OUTPUTS:

1.If i give key value as 1 that means the ignition is ON the lamp changes it color to grey which shows the power of the vehicle is on as shown in below figure

2.Now changing the gain slider i.e speedometer to 50kmph speed and running the simulation we get to see that the gear position is 4 which is as according to the condition we gave 41-60kmph is 4th gear.

CONCLUSION:

Hence, the logic models of washing machine and gear shifting mechanism has been completed successfully.

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.