Challenge

Week - 4

  1. Implement control logic of a “washing machine” using State flow 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

  1. 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:

AIM;

To implement control logic of a “washing machine” using State flow as per given sequence

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

OBJECTIVE:

  1. In simulink Implement the control logic of a washing machine using state flow as per given input condition. Create a model and opearte the model logic system and display the output of the results by using lamp indicator.
  2. Create a model for great shifting logic as per given conditions. Given the the speed input while simulation is running and display the gear number.

Introduction :

Stateflow can be best explained as a graphical reprsentation of a machine of states transitions and conditions. A stateflow chart can be created to defined how a MATLAB or a SIMULINK model reacts to external input signal, events and time- based conditions.

EXPLANATION:

STUDY-1

State flow;

Stata flow provides a graphical language that includes state transition diagram, flow charts, state transition tables, and truth tables. By using stateflow to describe how MATLAB algorithms and simulink model react to input signal, events, and time-based conditions.

CONTROL LOGIC:

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

EXPLANATION FOR CONTROL LOGIC OF A WASHING MACHINE USING STATE FLOW:

Washing machine;

It is a machine which a capable of handling various tasks like soaking washing rinsing ,drying within a short period of time. All the task performed by machine is based on the centrifugation . It is a separation process thar used centrifugal force to promote accelerated settling of the piratical in the solid or liquid mixture.

In other words , a washing machine is a machine that washes dirty clothes it contains a barrel into which the clothes are placed this barrel is filled with water and then rotates very quickly to make the water remove the dirt from the cloths, these can help make the clothes cleaner.

State flow is a simulink tool to implement the state machine. Here model system logic of a washing machine using state flow has been done.

Step 1:

Create a chart and enter the given input conditions.

Given input 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.

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

Step 2:

After entering the input condition is the chart, Go to symbols pane and assign the given variable. (example: input data, output data, etc..)

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.

STUDY-2:

Mechanical devices that enable the driver to engage gears in such a way as to obtain the desired transmission ration are called shifting mechanisms.

EXPLANATION FOR GEAR SHIFTING MECHANISM USING SIMULINK; when we push the shifter towards the desired gear the gear into the man shaft and rotates it, thus the main shaft rotates at the speed of engaged gear and provides the output the output as per the gear ration . Shifting of gear means going from one to another by sliding or clicking the shifter. Downshifting means going to lower gear and decreasing the speed and upshifting means going to a higher gear and increase the speed.

Step 1:

Create a chart and enter the given condition for gear shifiting.

Given condition;

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 condition is the chart, Go symbols pane and assign the given variable. (example: input data, output data, etc..)

Step 3:

Connect the ‘slider gain’ to vary the speed while simulation is running.

Step 4:

Create constant and given value 1 and 0 for turning on &off.

Step 5:

Create ‘Lamp’ to indicate the power is on or off.

Step 6:

Use ‘Display’ block to display the gear position.

Output:

Study-1;

Control logic of a washing machine using state fiow has been implemented.

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 available and so system will not activate.

Case-3;

If the power source=1 and water source=1, then power supply will turn on and water supply will be available and so system will activate and after all process completer end lamp will turn on.

Study-2

Gear shifting logic has been created and by using “slider Gain” to vary the speed while vary the speed while running the simulation.

Case-1;

If the key=0,then the power will turn off, lamp indicate the red color and gear shifting mechanism will not activate.

Case-2;

If the key =1,then the power will turn on ,lamp indicate green color and gear shifting mechanism will activate.

Case-3

By varying the speed (paramater)in the speedometer(slider gain)gear position will change according to the given condition . Gear position is displayed below in the simulink model

.

Giving speed=30km/hr in the Speedometer, if the speed is between 25km/hr -40km/hr 3rd gear will activate as per the given condition . Gear position is displayed below in the sumilink model.

Likewise, changing the speed in the speedometer according to the given condition gear position will change.

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.