Challenge

Week - 4

  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

After all the processes have completed turn on the finished LED

CONTROL LOGIC:

Control logic is the part of a controller that defines how a reactive system responds to events or conditional changes. Applications for control logic include:

  • Supervising how to switch between different modes of operation
  • Scheduling a sequence of tasks or steps for a system
  • Defining fault detection, isolation, and recovery logic

Common tasks for modeling control logic include:

  • Modeling hierarchical state machines for large-scale systems
  • Adding flow charts to define complex control logic
  • Defining orthogonal states to represent systems with parallelism

STATE FLOW:

Stateflow® provides a graphical language that includes state transition diagrams, flow charts, state transition tables, and truth tables. You can use Stateflow to describe how MATLAB® algorithms and Simulink® models react to input signals, events, and time-based conditions.

Stateflow enables you to design and develop supervisory control, task scheduling, fault management, communication protocols, user interfaces, and hybrid systems.

With Stateflow, you model combinatorial and sequential decision logic that can be simulated as a block within a Simulink model or executed as an object in MATLAB. Graphical animation enables you to analyze and debug your logic while it is executing. Edit-time and run-time checks ensure design consistency and completeness before implementation.

Washing Machine :

A washing machine is a home appliance used to wash laundry. The term is mostly applied to machines that use water as opposed to dry cleaning or ultrasonic cleaners. The user adds laundry detergent, which is sold in liquid or powder form, to the wash water.

Description :

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 rotated very quickly to make the water remove dirt from the clothes.
Clasifications:
Semi automated Washing Machine:
These entry level machines offer a good introduction to washing machines, meeting halfway between a fully-automatic washing machine and hand washing. These washing machines require some manual input during the cycle.
Fully Automated Washing Machine:
A fully automatic washing machine completes the entire clothes washing cycle without any effort from the user. It will rinse, wash, agitate, and spin dry clothes all on its own. ... The fully automatic washing machine is a step up from its precursors, the semi automatic washing machine and the manual washing machine.
Working Principle:
The process uses the centrifugal force to both clean and dry the clothes in the machine. Centrifugation is the process with which we can separate particles depending on their size, shape and density from a solution. ... So, we can say that the working principle of the washing machine is centrifugation.
The main required things to work the washing machine
1) Power supply 2) Water supply
Main Working Stages Of Washing Machine:
1) Soaking:
Soak Function is used to dip clothes in detergent water to remove dirt from the clothes. In this function customer need to select soak from a panel. Soak - This function is available with wash timer, In 42 min of washing 27 min is soak and 15 min machine will wash the clothes.
2) Washing:
it agitates your clothes in a soapy suds and water to remove any dirt and stains before spinning to drain the water after the cycle. ... These are ridges that lie on the edge of the drum and help move your clothes around while being washed. Agitator.
3) Rinsing:
The dirty, soapy water is drained, then the washing machine is refilled and your clothes are "rewashed" in clean water. Spin: All the water is drained completely, then your clothes are spun very fast and excess water is removed thanks to centrifugal force.
4) Driyer:
push warm, dry air through your wet washing to extract moisture, then cool the now humid air in a heat exchanger to condense the moisture, which is collected in a tank or pumped down the drain. The (now dry) air is reheated and the cycle repeats.
EXPLANATION CONTROL LOGIC OF A WASHING MACHINE USING STATE FLOW
Step1: create a flow chart as a given condition To create a flow chart we have to perform that one in chart we can chart in simulink in search option we can find chart and entering into the chart we can create a flow chart as given conditions shown below
in flow chart the conditions
1) If the power supply availabel the system get activated
2) If the water supply availabel its go for next proccess if water supply not availabel it stops its indicates in led
3) Next to the forther steps
Its go to soaking 200sec and after completion its go to next one
Next to washing 100sec after coplition its go to next one
Next to rinsing 20sec after complition its go to next one
Next to drying 50sec after that follwed by finish
This all follwing condition mentioned in flowchart
Coming to the input and out part what we defined in the flowchart are given below
In this we can clearly see input and output parts
were
INPUUTS : P_S
W_S this two acts as input what we given
OUTPUTS: PS , WS , S ,W , R , D , F this are acts like outputs in given condition
Next coming to the values its shown below
VALUE 1 = ON
VALUE 0 = OFF
as shown in above the given conditions for lamp the value 1 is ON position indicating in green colour and value 0 is OFF position indicating in red colour
Next we go for washing machine with several conditions
1) when washing machine with the condition both power supply and water supply in ON the below condition will satify in constant block we can see 1 and in same maner in display we can see as result of given condition
2) When the power supply and water suppl in OFF condition its indicates lamps in red colour in constant block we can see 0 and in display block also we can see 0 as result for given condition
3) When power supply is ON we can see input power supply constant 1 and output power supply display is 1 indicates in green colour and remaining watersupply constant and other display is in OFF condition its shows 0 and indicates in red colouras shown below because only power is given but their is no water supply to run other remaining conditions
4) Finally when water supply is ON condition and power supply OFF conditions their is no work going to happen without power suppl as shown below condition satify
This all working condition of washing machine by using control logic flowchart

2. 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.

Shifting Gears:
The basic gear changing rule is 'brakes to slow – gears to go'. As the car increases speed, change up through the gears. When you want to slow down, use the foot brake. You need only change to a lower gear when you need the accelerator again to 'drive' the car
Gear shifting Mechanism:
It is clear that shifting between the gears is required for smooth driving of the vehicle. The mechanism used for gear shifting is called synchronizer. ... Basic purpose of the synchronizer is to engage the teeth of sleeve and gear which are rotating at different speed during shifting of the gear.
Changing connections
Vehicle transmissions require devices to match the ratio, and thus the power available, to the prevailing driving conditions. “Power matching” is one of the four
main functions of a vehicle transmission. In manual gearboxes, changing gear is
controlled and carried out by the driver. Depending on the amount of automation,
in all other gearboxes electronics and actuator systems take over this function partially or completely. Certain transmission functions, such as Neutral, Reverse, and
Park are however still controlled by the driver using a shifting device.
The gearshifting mechanism thus plays an important role in the interface between driver and vehicle. Its handling has a major influence on perceived comfort.
The components used in a gearshifting mechanism depend largely on whether
shifting gear involves interrupting the power flow. Other factors are the type of
vehicle (passenger car or truck), the type of drive (front-wheel or rear-wheel
drive) and the operating conditions. In the following discussion, a distinction is made between

• internal shifting elements:

shifting elements inside the transmission, such as selector bars, swing forks,
synchronizers, multi-plate clutches

• external shifting elements:

shifting elements outside the transmission, such as gearshift levers, gearshift
gate, linkage, four-bar linkages and cable controls.

The concept “shift-by-wire” pertains to the substitution of mechanical gearbox operation with electronic operation .
sliding gear
Synchronizers are a decisive
assembly group in gearboxes that shift with power interruption (MT, AMT) and
are also used in dual clutch transmissions (DCT). This important internal shifting
element is dealt with thoroughly
Dog clutch engagement
pin engagement
we focus on
multi-plate clutches as essential components when shifting without power interruption. The parking lock is an assembly group whose function is to prevent vehicles that have no mechanical coupling between the engine and the output from
rolling away (AT, DCT and CVT). This is the topic of shows

synchronizer without locking mechanism
internal shifting elements for engaging gearwheels into the
power flow. A distinction is made between positive locking clutches (e.g. dog
clutch) and friction clutches (e.g. multi-plate clutch).

Flowchart of Gear shifting
We provided inputs and outputs
inputs as speed
outputs as gear
slider gain
slider gain is used to increase the speed
Model
In first case gear 1 speed range betwwen 0 to 15 we can increase the speed useing the slider gain we can see gear in display
In second case gear 2 speed range between 16 to 25 we can increase the speed using the slider gain we can see gear shifted to 2nd gear in display
In 3rd case gear 3 speed range between 26 to 40 we can increase the speed using the slider gain we can see gear shifted to 3rd gear in display
In 4th case gear 4 speed range between 41 to 60 we can increase the speed using the slider gain we can see gear shifted to 4th gear in display
In 5th case gear 5 speed range between 61 above we can increase the speed using the slider gain we can see gear shifted to 5th gear in display

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 for all conditions we satisfyed

CONCKLUSION:

1) The control logic flowchart by using this we implemented the control logic of a washing machine

2) By using control logic flow chart we satisfiyed different conditions in gear shift

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.