Challenge

Week - 4

Answer:

  1. AIM:-Implement control logic of a “washing machine” using Stateflow.

Explanation:

It is a machine that is capable of handling various tasks like soaking,washing,rising,drying within a short period of time .all the performed by machine is based on the certifugation.It is aseparation process that used centrifual force to promote accelerated setting of the particale in the solid or liquid mixture.

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

INPUT:Data:-

The different states of washing machines

  • Socking-200sec(0-200sec)
  • washung-100sec(200-300sec)
  • Rensing-20sec(300-320sec)
  • Drying-50sec(320-370sec)
  • finish

Stateflow:-

Procedure:-

  1. If fristly created a slider switch that was connected to the two main constants,i.e the power supply and water supply for the washing machine.

2.So whenever we switch off the switch, the constant changes to zero automatically.

3.Now,the next step was to check if the power has been switched on and to check if the water supply has been switched on.

4.Further we then set up, the signal with the given state flow logic.if the value displayed is 1 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.

5.When both power and water are at 1 then the socking process start and runs for 200 sec after this washing started.

6.After 200sec the rinsing process starts and after this process,the deying process is started for which the water supply is cut off.

7.For all the different processes or states of the machine. the lamp indicates green for working and red for not working .,now which process

is going on in the machine.

Stage 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 the next 20s & dryer runs for 50s

After all the processes have completed turn on the finished LED

Stage 2: Next starting the input forms in the chart, Go to Symbole Pane and select the assigned variable. (Example: input data. Output data,etc)

Stage 3: Give the input conditions for turning on or off for the Power Supply and Water Supply.

Condition:

if condition 1, Power and Water Supply will turn On.

if condition- 0. Power and Water Supply will turn off.

Stage 4: Use 'display block and 'Lamp' indicator to represent the effects

OUTPUT:-

Situation 1

If the Power_Supply =0, the Power supply is not available and the system will not activate

Situation 2

If the Power_Supply=1, and Water_Supply=0 then the power supply will turn on and the water supply will not be available and so the system will not be activated.

Situation 3

If the Power_Supply=1, and Water_Supply=1 then the power supply will turn on and the water supply will be available and so the system will be activated.

  1. AIM:- Make a Simulink chart for the “Gear shift” logic.

Data:-

  • 1st gear (0-15kmph)
  • 2st gear (16-25kmph)
  • 3st gear (26-40kmph)
  • 4st gear (41-60kmph)
  • 5th gear(geater than 60kmph)
  • Explanation of gear shifting mechanism using Simulink

    INPUT:-

    Stage 1: Creating chart by using the given gear arrangement

    Speed Range(kmph) Gear

    0 to 15 1

    16 to 25 2

    26 to 40 3

    41 to 60 4

    Above 61 5

  • Stage 2: After entering the information conditions in the graph. Go to Symbols sheet and allot the given variable (Example input information. Yield information)

    Stage 3 Connect the "Slider Gain to fluctuate the speed while the reenactment is running

    Stage 4: Create Constant and giving worth 1 and o for turning on and off

    Stage 5: Create a Lamp to Indicate the force is on or off

    Stage 6 Use a presentation Block to show the Gear position

    OUTPUT:-

    Situation 1

    If the Key=0, then the power will switch off, Lamp indicates the Pink colour and Gear shifting mechanism will not stimulate.

    Situation 2

    If the Key=1.then the power will change on Lamp indicates the Green colour and the Gear Shifting mechanism will be stimulated.

  • Situation 3

    By varying the speed(Parameter) in the speed measurement (Slider Gain), the Gear position will change according to the given condition.

  • Presenting Speed =45 km/hr in the Speed measurment, if the speed is between 41 km/hr to 60 km/hr 4th Gear will begin as per the given condition Gear position is displayed below in the Simulink model

    Likewise changing the speed in speed measurment according to given condition gear position will be 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.