All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
WASHING MACHINE AIM:- To implement control logic for a “washing machine”…
VIKASH SINGH YADAV
updated on 15 Feb 2021
AIM:- To implement control logic for a “washing machine” using Stateflow chart.
OBJECTIVE:- a) To activate the machine when the power supply is ON.
b) To STOP the process and indicate through LED when the Water supply is not available.
c) To set delay time for different states in the Stateflow machine.
d) After all the processes have completed turn on the LED
THEORY:-
An automatic Washing machine switches between different operating states. These states mainly consist of Power Supply, WaterSupply, Soaking, Washing, Rinsing and Drying. The transition and States describes a Washing machine. The beginning and end of the transition arrow denote the source and destination respectively. All these states are followed one after the other and the decisions are made on the transition condition. Logical expressions are used as the temporal logic: conditions that are based on elapsed time. A common temporal logic operator is the after (N,sec) condition, where N is the wait time in seconds.For example:- the after (200,sec) transition condition from Soaking to Washing. For charts in Simulink, time is tracked according to the simulation time of the model.
The default transition specifies the initial state of the Stateflow chart. When a State is added to a blank chart, Stateflow automatically adds a default transition. The stateflow follows the default transition and the state machine now transition between different states. The stateflow chart moves between states and transition which is further related to Simulink. The Simulink manages the chart execution. Since, Simulink has an underlined sample time. The time interval over which the simulink numerical solves takes steps. By default, stateflow chart inherit their sample time from simulink. In this case everytime the simulink solver takes a step, the chart will take a step. However the sample time can be explicitly set in the chart properties from inherited to discrete.
The chart execution result in one of two outcomes:-
When testing transition, all transitions leaving the active state are tested according to their execution order. If a valid transition is found, no more transition are tested. State entry and exit actions occur sequentially when leaving and entering a state. The during action occurs for each consecutive state that a state remains active.
WORKING:-
Fig:-1.1
a) SOAKING
Fig:-1.2
b) WASHING
Fig:-1.3
c) RINSING
Fig:-1.4
d) DRYING
Fig:-1.5
OPERATING STATES:-
a) When PowerSupply is OFF:-
Fig:-1.6
b) When PowerSupply is ON but WaterSupply is OFF:-
Fig:-1.7
c) When PowerSupply and WaterSupply both are ON:-
Fig:-1.8
CONCLUSION:- The control logic of the washing machine is implemented successfully using Stateflow chart. It is evident from the above that the Simulink manages the chart execution successfully.The temporal logic was used to create delay time in Washing Machine. The LED was turned Red when the watersupply is not available and LED lamp turned yellow when all the processes were finished. Thus the simulation is complete when it reaches the Stop time.
AIM:- To make Simulink model for the “Gear shift” logic.
OBJECTIVE:- a) To make use of Simulink chart to implement the “Gear shift” logic in the Simulink model as per below condition:
Speed Range (kmph) |
Gear |
0 -15 |
1 |
16-25 |
2 |
26-40 |
3 |
41-60 |
4 |
Above 61 |
5 |
b) To give Speed input as the Simulation is running and display the gear number.
THEORY:-
Gears are popular form of transmission. The power generated by the engine flows through the transmission i.e, Gears before reaching the drivewheel. The basic function of the transmission is to control the speed and torque available to the drivewheel for different driving conditions. The manual transmission works on the principle of gear ratio i.e, N1/N2=T2/T1.
The stateflow used within Simulink helps to manage Gear shifting for varying speed. Simulink allows us to model continuous change in dynamic system. Stateflow is modeling an instantaneous changes in dynamic system. By combining the two one can capture both in single model.
In order to reduce complexity, it is difficult to programme a code. Instead graphical programming language that allows quickly to create a runnable model of the system in stateflow chart can be used. After completion, press RUN. The chart will animate to show how the state machine behaves. In stateflow, the input and output variables are created in the Symbol pane. The variables Speed and G are used as an input and output by using chart data. The state chart transitions rapidly between the gears. The transitioning of gears depend on the Speed. The transition execution order specifies the sequence in which transitions are tested. The stateflow chart existing as a block in a Simulink model. It receives and sends data via ports just like the other Simulink blocks.
PROCEDURE: -
WORKING:-
The slider gain block has been used to fed varying speed as an input to the Stateflow model. The varying Speed determines the chart behavior. Thus, as the Speed increases the gear state is also changed.The transition between gears is based on the transition condition. This is displayed in the Simulink block.
Fig:-2.1
STATEFLOW CHART:-
Fig:-2.2
CONCLUSION:- The Simulink model for the “GEAR SHIFT” logic is simulated successfully. The charts input and output were connected to appropriate Simulink signals. The gear numbers were visible while the simulation is running for varying speed.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project-1: Powertrain for aircraft in runways
POWERTRAIN FOR AIRCRAFT IN RUNWAYS AIM :- To analyze the aircraft design parameters. OBJECTIVE :- a) To list out the total weight of various types of aircraft. …
30 Mar 2022 07:50 PM IST
Week-11 Challenge: Braking
BRAKING AIM :- To calculate braking energy using a defined drive cycle and contour plots for finding efficiencies…
09 Mar 2022 06:45 AM IST
Week -2
DOORBELL SIMULATION AIM :- To make a simulink model of Doorbell using solenoid block. OBJECTIVE :- a) To create a situation where the switch…
15 Feb 2022 11:09 PM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.