A hybrid appliance identification method by using grey relational artificial neural network

Nowadays, everything is getting smarter such as mobile phones, cars, watches and home appliances. Our powerlines are also getting smarter. There are many smart grid and smart home applications. Designing of recognition devices to identify appliances for these smart networks is a new task to do it. There are many different approaches on recognition and identification these power consumer devices and appliance. This study aims to develop an effective method that does not require any additional hardware. This method has been developed by using powerline parameters such as current, phase angle, voltage, active and reactive power. These data have been classified and normalized by using a validation method and grey relational analysis to train an artificial neural network. This neural network was trained by using power parameters of many different common appliances like heater, coffee machine, television, radio, lamp, computer, fan, refrigerator etc. This identification algorithm can be used within a low-cost embedded system for collecting appliance information over a powerline to provide info for smart homes and smart grids.


Introduction
The households and other buildings use almost 40 % of total energy all over the world. This means we should put more effort on studies about energy saving and planning. Monitoring of energy consumption is essential for these studies. There are many different techniques to monitor and predict energy consumption of a building. According to a review by Zhao and Magoules [1], engineering methods, statistical methods, neural networks, support vector machines and grey models can be used for the prediction. However, one of these techniques is not enough by itself for high accuracy. Being fast enough, applicable and easy to implement are some other problems.
There are many different appliances and devices which consume electrical energy on the same buildings. Therefore, it is need to measure and record hundreds of parameters to be used for smart energy system. A high frequency voltage and current measurement data set [2] has been recently established by Medico et al. This data set contain 17 different appliances in 330 different models. They have also measured combined operations where appliances were active simultaneously. Another database named ACS [3], has been established by measuring 15 different appliances and 225 brand/model in two different session. Ridi et. al. have intentionally used low sampling frequency because of energy saving. On the other hand, an advanced home energy management system [4] has shown that future of smart home system depends on load monitoring and power scheduling. Another study about automatic recognition of electrical loads [5] has also demonstrated the need of recognition techniques for simultaneously working appliances. Studies such as the energy aware smart home [6] and the future renewable electric energy delivery and management system [7] have proved that information based electrical power system will take over soon. Therefore, analyzing electrical parameters such as voltage, current, active and reactive power should be considered as data acquisition rather than a simple measurement. Real-Time recognition and profiling of appliance through a single sensor [8] without complex device and environment is key to smart grids and homes. Low-cost prototype of smart meters for household [9] has already been started to be developed. Because of all these reasons, this study focuses on identification of appliances by using only line parameters such as voltage, current, power, frequency etc. It is also important that detecting which appliance is working when more than one appliance running simultaneously.
Previous studies have used different classification techniques. ACS-F2 [3] database has been used for this study because of its appliance variety and low frequency sampling rate. Ridi et. al. have applied machine learning algorithms which are nearest neighbor (k-NN) and Gaussian Mixture Modelling (GMM). Overall accuracy varying between 70 % and 90 % based on test protocols. They have also mentioned that some appliances were easy to recognize while some were not. Some other researchers who use the same database have achieved better results. An adaptive rate time-domain approach [10] has reached 91.9 % average classification accuracy. However, in this approach some of the appliances were skipped. Another study that uses Hidden Markov Models, which is another machine learning algorithm [11], has achieved relatively better results. A study using moving average for data preparation [12] has reached to 99 % by random forest classification and multilayer perceptron. It is obvious that different pre-processing data techniques and machine learning algorithms have improved the overall accuracy.
Our study, all previous methods and classification techniques have been examined. Appliance data has been pre-processed by using grey relational analysis. This way all data normalized as well as they are pre-processed with a dynamic coefficient. Additionally, a data validation method has been developed to avoid invalid data. After that, a multilayer feed-forward back-propagate ANN has been trained by using these data. By this way, a grey relational neural network has been established for identification of appliances by only using power line parameters with high accuracy.

Methods and techniques
Pattern recognition processes has three main tasks: data pre-processing, data representation and decision making. A simple feed-forward neural network can be trained for pattern recognition tasks such as image processing and biometric identification [13]. ANNs can be described as non-linear machine learning methods. Therefore, they are more effective and successful than the conventional methods for pattern recognition.
In this study, grey relational analysis has been used as data pre-processing to create dynamic coefficients that specify the correlation of input samples. Then, a data validation technique has been applied to measurement data because some measurements results are mistaken due to transient regime of the appliances. Besides, appliances are not working all the time. Therefore, ANN should be trained by using the right data. By this way, a new highly accurate hybrid identification method has been derived.

Grey relational analysis
Hybrid analysis methods are recently popular due to their high accuracy and reliability. Normalization techniques such a grey relational analysis (GRA) in neural network [14] significantly improves quality of multi-objective optimization. GRA is also used for many different areas like product design [15], analysis for multivariate time series [16], optimization of operating rules for powerplants [17].
GRA calculates correlation between input sequences dynamically. There are three different initial approach; higher is better Eq. (1), smaller is better Eq. (2) or nominal value is better Eq. (3). The best approach can be determined by researcher according to the data sequence [18]: where ( ) is the original input value, max ( ) is the maximum value of the sequence, min ( ) is the minimum value of the sequence, ( ) is the pre-processed data, is the desired normalize value, = 1, 2, 3… is a integer number of parameters and = 1, 2, 3,… is a integer number of the samples.
In other word, GRA is a calculation of grey relation grades for a data sequence as pre-processing. These grades determine the relational degree between different sequences Eq. (4). Finally, average value of these coefficients for n different values determines the grey relational rank Eq. (5): where is grey relational grade, Δ is deviation sequence of | ( ) − ( )|, Ϛ is optimizing coefficient between 0 and 1, is grey relational coefficient. By this way, multiple input data can be converted into a single grey relation grade that shows the correlation of data. This method can be used for various problems such as calculating the initial values of weights in an artificial neural network [19], building power systems strategies in distribution systems [20] and hybrid forecasting modelling for wind power [21].

Data validation
ACS-F2 database has measured power parameters of 15 different appliance within 15 different brands for each category. These parameters are line frequency, angle between voltage and current, real power, reactive power, rms current and rms voltage of the related appliance as seen on Table 1. Researchers have measured the parameters for one hour with 10 second interval in two separate sessions. This makes a comprehensive database. However, database contains uncertain values as well. Therefore, derivative values such as apparent power Eq. (6), power factor Eq. (7), active Eq. (8) and reactive power Eq. (9) should be calculated by using measured parameters for validation: = cos , where is the apparent power, is active power, is reactive power, cos is power factor, root mean square current and is root mean square voltage value. After the calculation, difference between measured and calculated values Eq. (10) and coefficient for the difference Eq. (11) can be determined by using sigmoid function Eq. (12) and its derivative Eq. (13). These coefficients will determine the accuracy of the sample: where is the difference, is measured value, is the calculated value, is the number of the sample and is the number of the parameter, is validation error coefficient. is sigmoid function and ′ is first derivative while is the gain value for the function.

Grey relational artificial neural network
ANN is a mathematical method that can learn critical information from multi-dimensional data sequences. They can also process noisy and incorrect data with high error tolerance [ ANNs are very good to work with any other analysis methods. They can determine the importance of the data and decide how it effects to the output. The principal parameters of an ANN are input data, weight matrixes, bias values and activation function. They can also adjust their initial weights by using various techniques such as back propagation and genetic algorithms [27]. General mathematical function for an ANN cab be stated as below Eq. (14). Here, you can change the way how weights affect to sum or how much bias value should be added. The various different kind of activation function and technical indicators can also be used [28]: where is the bias value, is the input, is the weight and is the activation function. is the number of input = 1, 2, 3,…, . The Grey Relational Artificial Neural Network (GRANN) uses grey relational grades and validation error value as input. Validation error coefficients are also used as hidden layer's bias. This way, ANN can avoid uncertain and unstable measurement values. On the other hand, GRA coefficient work as output's bias to create a threshold for the sample whether it should be labeled or not. A four-layered feed forward back propagated ANN is constructed as seen in Fig. 1.   Fig. 1. Architecture of GRANN Here, ( ), ℎ( ) and ( ) are transfer function. We have used different type of transfer function which will be presented in the next section to get best accuracy. We have also used two coefficients as threshold to improve the response of the ANN. Validation error coefficient ( ) makes hidden neurons values zero for invalid samples and grey-relational coefficients ( ) makes output values zero for invalid samples. Relationship between layers and neurons as follows: where is the number of input neurons, is the number of first hidden layer's neurons, is the number of the second hidden layer's neurons, is the bias for hidden layers, is the bias for output layer. Grey models and neural networks are typical examples on time series analysis for prediction and identification [29]. Recently, grey relational analysis has been adopted by many different research areas to be used within ANNs coupled with other optimization techniques. Prediction of surface roughness composite material [30], prediction of maintenance workforce size [31], estimation of human impedance body parameters are some of these areas.

Result and discussion
The ACS-2 database [32] has 15 different categorical appliances. Therefore, we have created 15 different class for each category and we added one zero class for invalid measurement. These measurements include transient regimes, standby modes and uncertain values that affect output negatively. These values have been labeled as zero by using validation error and grey-relational coefficients. Although, we have tried different multidimensional optimization algorithm, the best result was obtained by Levenberg-Marquardt algorithm which works with gradient vector and Jacobian matrix. Performance of different training algorithms and activation functions can be seen on Table 3. In Table 3 parameter MSE is the mean square error, MLR is the multiple linear regression, is slope coefficient, is the model's error: (20) Fig. 2. MLR graphic of training Fig. 3. MLR graphic of testing MLR results show that the most of miss predictions are very close to real data because total difference between classes is equal to one. These differences have been truncated by using bias values. The other miss predictions have been caused by zero class which were representation of the invalid input data. This class has more samples than combination of all other classes because appliances were not working all the time. We have also excluded the transient values and labeled them as class zero by using validation technique. Fig. 4 presents the confusion matrix plot [33] of test result. The average response of GRANN for each class is shown on Table 4.

Conclusions
ANNs are very useful for solving of multi variable problems. Unlike machine learning, they can adapt and change their parameters to get best result. There are many different architectures, training algorithms and transfer functions for different approaches. In this study, GRA has been used for normalization. Besides, GRA provides a dynamic coefficient to determine the correlation of input samples for each class. Furthermore, a validation technique has been developed for avoiding invalid data. Hybridization of different methods is very useful to get better accuracy on recognition and identification problems.
The hybrid GRANN can predict appliance with more then 99 % accuracy by using only power parameters such as current, voltage, active and reactive power. The total accuracy was around 84 % without validation and grey-relational analysis. Pre-processing and preparation of data are dramatically important for ANNs. The training algorithm and transfer function should be chosen according the type and range of these data as well. This study has presented a hybrid appliance identification method which can be used within an embedded system for smart home and smart grids. Further study will focus on implementation of this method for real-life application.
[15] Lin Y., Yeh C. Grey relational analysis based artificial neural networks for product design: A comparative study.