Fuzzy Logic Based Control System for Intelligent Washing Machines

ABSTRACT


Introduction
Fuzzy logic controller has many practical advantages over the other controllers, not only because of its simplicity, effectively, and flexibility, but also it can handle problems with imprecise and incomplete data, giving us a desired data with very accurate and precise results corresponding on a wide range of operating conditions expressed in linguistic terms. As there are many types of fuzzy logic controller, in this paper the most commonly used fuzzy inference system is the so called Mamdani method. In 1974, Professor Ebrahim Mamdani of London University built one of the first fuzzy systems to control a steam engine and boiler combination [1]. The Mamdani fuzzy inference system is designed in four steps: Fuzzification of the input variables, Rule evaluation; Aggregation of the rule outputs, and finally Defuzzification [2]. Alhanjouri and Alhaddad's optimize wash time using fuzzy logic [3]. They suggested that dirt type and degree of dirtiness are inputs of fuzzy controller, whereas the output of fuzzy controller is a wash time. On the other hand, inputs of fuzzy logic controller including, type of dirt, dirtiness of clothes were selected in by researcher Agarwal provided in his proposed system 9 rules for the FLC [4]. Kumar and Haider, in 2013, proposed in order to decrease washing time as a response of fuzzy controller, the quantity of clothes and dirtiness were chosen as input [5]. Rao Farhat was interested in a washing machine with two inputs (Saturation Time and Dirtiness) and one output (Wash Time). For practical purposes type and amount of detergent has been kept manual [6]. Whereas, in 2014, Akram, Habib and Javed used to obtain wash time as a crisp output from a fuzzy input which are type of dirt and degree of dirt [7]. On the other hand, during this year '2014', Demetgul, Ulkir, Waqar found to get best results it is necessary to consider four input parameters of fuzzy logic including: Amount of Dirt, Type of Dirt, Sensitivity of Cloth, Amount of Cloths, and four outputs parameters including: Washing Time, Washing Speed, Amount of Detergent, Amount of Water and Water Hotness [8]. While, in 2015, Hatagar and Halase objected to save lot of time, electricity and water for washing the cloth. So they considered type-of-dirt and dirtiness of clothes as inputs to fuzzy controller [9]. In 2016, Agarwal, Mishra, and Dixit introduce five input variables including Type of Dirt, Turbidity of Cloth, Mass of Cloth, Sensitivity of Cloth, Water Hardness and five output variables including Wash Time, Wash Speed, Amount of Water, Amount of Detergent, Water Hotness[10]. Anita ,and Bhawna Hooda in same year, 2016, have proposed the design of fuzzy logic controller which is having five inputs to give an exact wash, rinse and spin time of fully automatic machine. The objective of this is only to save a lot of time, electricity, detergent and water for washing the cloth. The proposed FLC is simulated using Fuzzy Logic Toolbox of MATLAB. The result of this report is used to calculate the wash time, rinse time and spin time for different type of input conditions [11]. Washing machines are commonly used household appliances. The problem of designing washing machines is how much length of wash time, rinse time and spin time should be based on the different clothes. That's why this study is interesting because it illustrates the process that can be used to get a appropriate washing, rinsing, and spinning time for different types and amount of cloths. So, the paper will cover the characteristic of designing and developing of Fuzzy Logic based washing machine. Such a machine makes use of the Fuzzy Logic mechanism to smartly calculate the amount of washing, rinsing, and spinning time in order to provide a precise real-time for the machine motor. The paper has three different outputs "which are wash time, rinse time and spin time" resultant from three different inputs "which are type of clothes, amount of clothes and amount of dirtiness". These inputs and outputs were controlled by fuzzy logic controller. Depending on the types and amount of clothes and amount of dirtiness of cloths, washing machine will automatically adjust its washing, rinsing, spinning time using Mamdani controller. Consequently, Fuzzy logic control system can be used to calculate the processing time of washing machine for different cloths.

General Idea of Fuzzy Control System For Washing Machine
This work is a control system that provides a solution of run-time optimization problem by placing the system which will be constructed utilizing the Fuzzy Logic Controller. In general when we use washing machine, we load the clothes into the machine, throw detergent in, select the duration of washing time based on type and amount of clothes and type of dirtiness or greasy and run it. Once switch the washing machine on, sensors sense these parameters which are considered in this paper as inputs that will be fed to the fuzzy controller to get the exact outputs which are considered in this paper as wash time, rinse and spin time. For getting correct wash time simply, more accurately and precisely, we use fuzzy logic instead of formulating a mathematical model. As it is very difficult to find out mathematically the relationship between amount of cloths, dirt and the length of washing time required.

The Designed System
The fuzzy inference system or FIS, is designed in four steps: first step is fuzzification of the input variables. In this stage, crisp inputs are converted into fuzzy inputs. So, membership functions are created to represent each crisp input depending on linguistic terms and their ranges. Second step is rule evaluation to evaluate the process; Third step is Aggregation of the rule outputs, and finally the fourth step is defuzzification which is the process when the fuzzy inputs are changed into crisp outputs. In this project we use Mamdani style and defuzzification method is centroid. The proposed Fuzzy Logic Controller for washing machine consists of three Linguistic inputs LIs.

Fuzzy Logic Modelling of Washing Machine
In this paper, the control logic was used to checks the system continuously and execute the operation perfectly. The actuation of the Mamdani controller is giving calculations of running time with high accurate.

The Membership Function for Fuzzy Inputs and Fuzzy Outputs
After commencing the proposed system that include three input and three output variables as mentioned above, now we find out membership functions for each variable for the proposed fuzzy system and their corresponding fuzzy memberships. The washing machine fuzzy inference system is shown in figure 1.

Figure1. FIS Editor ToolBox/ MATLAB
In this Fuzzy Logic Modeling of Washing Machine, linguistic terms and their ranges of fuzzy inputs and fuzzy outputs are illustrated as below: 

Fuzzy Inputs
In fuzzy logic, crisp inputs are converted into fuzzy inputs. So, membership functions are created to represent each crisp input depending on linguistic terms and their ranges. In this paper, the parameters are used to define membership function of Type of clothes (

The Mamdani-style fuzzy inference process is performed in four steps
The type of controller used in this model is "Mamdani". The Aggregation is Max. The Implication is Min. The membership functions are triangular, and they are symmetrical.

Fuzzification Method
Fuzzification of input variable is the process when crisp values are changed into fuzzy values. Fuzziness assists us to evaluate the rules.

Control Rules
The evaluation rules in fuzzy design for washing machine are shown in figures (8.a, 8.b, 8.c) in order to derive the output. The system will operate under these rules. As a result, the decisions will be made which represents a controller's response. The fuzzy rules are either the sets of ( If A Then B ) statements, or the sets of ( If A is X AND B is Y Then C is Z) statements, or the sets of of ( If A is X OR B is Y Then C is Z) statements.

Aggregation of the rule outputs
Aggregation is the process of unification of the outputs of all rules which are extracted from membership functions. In order to get only a single fuzzy set, all rules are aggregated to combine them into a particular fuzzy set. The aggregated output fuzzy set is the input for defuzzification process. 

Defuzzification
The fuzzy set that comes out from the aggregation process must be a crisp number. So, the conversion process from a fuzzy set to a crisp set is called defuzzification. So, a single number is the output of defuzzification process which is in turns the controller's response. As there are quite a lot of defuzzification methods, in this paper, we used the most common one which is Centroid method.

 4. Results Toolbox/MATLAB
As it is known, control rules are established by applying Min-Max operator. These rules are pointed up in the form of 3D graphs in next figures. The figure 9. shows the relationship between input and output parameters.

Surface Viewer
By using MATLAB's fuzzy logic toolbox the fuzzy inference system have been created. Consequently, The surface rule views of the fuzzy logic modeling rules for washing machine are shown in figures (10.a, 10.b, 11.a, 11.b, and 12.a, 12.b) as 3D graphs. Each surface view is a response surface of the input output relations.

Figure10.b, Surface Viewer from Fuzzy Logic Toolbox
It can be clearly seen from figure 10.a, washing time isn't affected much by the amount of dirtiness. While, from figure 10.b, that the amount of clothes has a much higher affect in washing time than the type of clothes.

Figure11.b, Surface Viewer from Fuzzy Logic Toolbox
However, figures 11.a and 11.b present the Spin time is very much affected by both the amount and the type of clothes. The amount of dirtiness has no effect at all on Spin time.  Figures (13.a, 13.b, 13.c) show the way the machine will response in different conditions. As sensors sense the input values and using the proposed system , the response of sensors are fuzzyfied and then by using if-else rules and aggregation, and lastly the output values are extracted from defuzzification method.

Conclusion
This paper illustrates fuzzy inference system using Mamdani controller type. From the use of fuzzy logic control, the machine will response in different conditions. This leads to know exactly how much time does the machine needs to finish it's work with best result and more saving consumed power. The conventional washing machines require the human interaction to make a decision about the amount of wash, spin and even rinse time do we need for different type and amount of clothes corresponding to amount of dirt. This makes the washing machine more intelligent and accurate.