Challenge

Week - 4

1. washing machine::

the .slx file has been shared on the browse through google drive.

Aim:

to 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

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

A washing machine (laundry machine, clothes washer, washer, or simply wash) is a home appliance used to wash laundry. The term is mostly applied to machines that use water as opposed to dry cleaning(which uses alternative cleaning fluids and is performed by specialist businesses) or ultrasonic cleaner. The user adds laundry detergent,which is sold in liquid or powder form, to the wash water.

Removal of soap and water from the clothing after washing was a separate process. First, soap would be rinsed out with clear water. After rinsing, the soaking wet clothing would be formed into a roll and twisted by hand to extract water. The entire process often occupied an entire day of hard work, plus drying and ironing.

How to Use a Washer – Step-by-Step Guide
  1. Separate Your Laundry. Sorting your laundry into different piles based on fabric type and color is step number one. ...
  2. Choose the Right Washing Cycle. ...
  3. Set the Water Temperature. ...
  4. Add Detergent and Fabric Softener. ...
  5. Load the Washing Machine. ...
  6. Turn on the Washer. ...
  7. Clean Your Washing Machine.

given data:-

the different states of washing machines

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

MODEL:-


STATEFLOW:-

BLOCK USED IN MODEL:-

BLOCK USED IN MODEL:-

  • Constant:-for water and power supply
  • Lamp:-to indicate the signal.
  • Slider switch:-to turns the machine on and off.
  • Stateflow:-for control logic.
  • display:-to show the output signals.

procedure:-

  • the power and water supply to the machine are dependent upon the switch conditions which is on or off and it is defined by the constant value 0 or 1.
  • 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.
  • when both power and water are at 1 then the socking process starts and run for 200 sec after this washing started.
  • after 200sec the rinsing process starts. and after this process, the drying process is started for which the water supply is cut off.
  • after completing all the tasks, the machine turns off.
  • for all the different process or states of the machine. the lamp indicates green for working ad red for not working. this gives a batter idea to user, now which process is going on in the machine

Different states of the model:-

socking:-


washing:-


Rinsing:-


Drying:-

2.Draw Simulink chart for the “Gear shift” logic as per the given conditions:-

when we push the shifter towards the desired gear.

the .slx file has been shared in the browse through google drive.

given data:-

  • 1st gear-(0-15kmph)
  • 2nd gear-(15-25kmph)
  • 3rd gear-(25-40kmph)
  • 4th gear-(40-60kmph)
  • 5th gear-(greater than 60kmph)

MODEL:-


STATEFLOW :-


Blocks used in the model:-

  • constant - To multiply with the slider gain.
  • slider gain -It acts as a throttle to increase or decrease the speed.
  • lamp-For indicating the gear number.
  • state flow - control logic of gear shifting.
  • custom gauge - it's working as the speedometer of the vehicle means to show the speed of the vehicle.
  • Scope-To plot the graph of the speed vs gear shift.

procedure :-

  • At the initial position, the slider is at 0.
  • when we increased the speed the input is given to the state flow chart where it checks the input speed and displays the gear number.
  • according to the given data the range of the first gear is 0-15kmph.
  • the range of the second gear is 15-25kmph.
  • the range of the third gear is 25-40kmph.
  • the range of the fourth gear is 40-60kmph.
  • the range of the fifth gear is greater than 60kmph.

At 1st gear:-


At 2nd gear:-


At 3rd gear:-


At 4th gear:-

At 5th gear:-

output:-

conclusion:- From the output, we can say that the gear shifting takes place according to the given speed input.

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.