Simulink model for a washing machine using control logic
AIM:
To implement control logic of a “washing machine” using Stateflow as per given sequence
Objective:
- 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
State flow model:

State flow chart is used as the inputs to be provide for the washing machine. The following process of washing maching are giving power then water comes in where soaking starts with a given period of time 200secs, then washing with a period of 100secs follows rinsing and drying of 20secs and 50secs. completion process should be shown.

where in the above simulation the power supply is given 'ON' so the led indicates in green colour and water supply is not given so the led indicated the red which shows the error of not supplying water.

This is the initial simulation of washing machine before giving power supply and water supply.

Where the above simulation shows the working of model where the power, water is on and so the soaking process starts with a time period of 200secs which the soak led indicated of soak process undergoes.

The above simulation shows the completion of all the process involved in washing machine with the led indication.
Gear shift:
AIM:
To make a Simulink chart for the “Gear shift” logic as per the conditions.
Objective:
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.
Flow state chart:

State flow chart is used as the inputs to be provided for the gear shift simulation. Where the command work on the speed range given for each block.

simscape model for gear shift. The blocks used are slider gain, chart, display, scope and goto. The slider gain is used as accelerating or decelerating for the vehicle with given values for a limit of low to high.

where acceleration is given as 26.4 in slider gain the output shows 3 which is the vehicle is running in 3rd gear at a acceleration of 26.4.

where acceleration is given as 52.8 in slider gain the output shows 4 which is the vehicle is running in 4th gear at a acceleration of 52.8
Graph:

The graph is recorded for the gear shifting according to the speed range is shown.
RESULT:
The control logic for washing machine and simulink chart for gearshift is modeled.