Challenge

Week - 4

1) AIM: 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

EXPLANATION:

  • State flow: stateflow provides a graphical language that includes state transition diagrams,flowcharts, state transition tables.

by using state flow to describe how matlab algorithms and simulink models react to input signals events, and time based conditions.

  • control logic: control logic is a model system logic of a washing machine using state flow.

WASHING MACHINE: it is a machine which is 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 centrifugal force to promote accelerated setting of the particle in the solid or liquid mixtue.

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.

given data:

the different states of washing machines

  • socking 200sec(0 to 200sec)
  • washing 100sec (200 to 300sec)
  • rensing 20sec(300 to 320sec)
  • drying 50sec(320 to 370sec)
  • completed

MODEL:

STATEFLOW:

STATEFLOW INPUT AND OUTPUT SYMBOLS PANS:

BLOCK USED IN MODEL:

  • constant: for water and power supply
  • Lamp: to indicate the signal.
  • slider switch: to turns the machine on and off.
  • stasteflow: for control logic.
  • display: to show the output signals.

Different states of the model:

power:

socking:

washing:

Rinsing:

Drying:

End:

2) AIM :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.

SIMULINK MODEL:

STATEFLOW-CHART:

STATEFLOW-CHART SYMBOLS PANE:

BLOCKS USED:

1) SLIDER SWITCH:

The Slider Switch block toggles the value of the connected block parameter between two values during simulation.

For example, you can connect the Slider Switch block to a Switch block in your model and change its state during simulation.

Use the Slider Switch block with other Dashboard blocks to create an interactive dashboard for your model.

2) CONSTANT:

The Constant block generates a real or complex constant value signal.

Use this block to provide a constant signal input.

3) DISPLAY:

The Display block shows the value of the input data. You can specify the frequency of the display.

For numeric input data, you can also specify the format of display.

4) LAMP:

The Lamp block displays a color that indicates the value of the connected signal.

5) SLIDER BLOCK:

The Slider block tunes the value of the connected block parameter during simulation.

7) CUSTOM GAUGE:

The Circular Gauge block displays the value of the connected signal on a circular gauge that you can design to look like a gauge in a real system.

GEAR SHIFTING RESULT:

when the speed is below 16 km/hr:

when the speed is below 25 km/hr:

when the speed is below 30 km/hr:

when the speed is below 60 km/hr:

when the speed is below 90 km/hr:

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.