# Load Identification Method Based on ISMA-GRNN

Authors: Pengfei Yang; Xianbo Sun; Li Zhu; Yuhan Wu; Baofu Dai
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

The noninvasive load monitoring method carries out load identification after event detection and feature extraction of load data. At present, nonload intrusive load monitoring faces the problems of low load identification accuracy and long load identification time. In order to solve these problems, a load identification method based on the improved slime mould algorithm-generalized regression neural network (ISMA-GRNN) is proposed. Firstly, by adding mutation operation in slime mould algorithm (SMA) position update, the global optimization ability of SMA is improved. Then, the improved slime mould algorithm (ISMA) is used to optimize the smoothing factor of GRNN and find the best smoothing factor. Finally, the best smoothing factor is input into GRNN for load identification, and the load identification results are output. To measure the effect of load identification, load identification precision, load identification accuracy, and load identification time are used as evaluation indicators. The simulation results show that compared with HHO-GRNN and WOA-GRNN, the load identification time of SMA-GRNN is greatly shortened, but the results are not satisfactory. On the basis of SMA-GRNN, ISMA-GRNN has significantly improved the accuracy and precision of load identification. In conclusion, ISMA-GRNN can better adapt to the load identification of multiple electrical equipment scenes.


---

## Body

## 1. Literature Review

With the in-depth research on smart grid and ubiquitous power Internet of things, NILM, as one of the key technologies for building ubiquitous power Internet of things, has become a research hotspot [1–3]. NILM technology can not only realize energy consumption management through the identification of electric equipment on the user side [4], but also predict power demand through load data to realize good interaction between power generation and power consumption [5]. The four steps of data measurement, event detection, feature extraction, and load identification form a NILM. As the core step of noninvasive load monitoring, the load identification method directly affects the effect of load identification [6].The essence of load identification is load classification according to the load characteristics of electrical equipment [7]. Many algorithms such as SVM, Bayesian algorithm, and GRNN are used to deal with classification problems. SVM classifies data by constructing classification hyperplane, which is mainly used to deal with the classification problems of small- and medium-sized data samples, nonlinear and high-dimensional. Zhao et al. [8] used SVM to build a bearing fault diagnosis model and verified the recognition ability of SVM method to a variety of rolling bearing fault types. Bayesian algorithm calculates the probability of different events and selects the one with the greatest probability as the classification result. Jake et al. [9] used Bayesian algorithm to build bipolar short circuit fault location model. This method has the advantages of high precision, few measuring points, and high location accuracy. GRNN is an artificial neural network that uses a radial basis function as an activation function. Yao et al. [10] used clustering algorithm to cluster weather characteristic quantities and GRNN to build photovoltaic power generation prediction model. This method can take into account small sample usage scenarios and has high generalization to realize high-precision prediction of photovoltaic power generation. In the field of load identification, the above-mentioned SVM and Bayesian algorithm have been applied, but there is almost no literature based on the GRNN method.In the field of load identification, many experts and scholars have also done a lot of research. Du et al. [11] selected the fundamental power factor and the third harmonic content difference of voltage current during equipment operation as the load characteristics and combined the improved Gray Wolf Algorithm with FCM clustering algorithm. This method has a high recognition rate for small power loads, but it is prone to feature overlap and local optimal solution when dealing with multiload classification problems. Qiang et al. [12] transformed V-I image features into track coding through DPSH model and used them as load features and then built a load recognition model using CNN. This method can solve the problem of reducing the load identification rate when unknown equipment is added, but the overall accuracy of this method is not high and the load identification time is too long. Zhou et al. [13] used Fourier transform to decompose current data, selected current odd harmonics as load characteristics, and then used AdaBoost algorithm combined with BP neural network to build load identification model. Although this method can effectively improve the identification ability of easily misjudged load, the model training time becomes longer.To sum up, in order to solve the problems of low load identification accuracy and long load identification time in the above methods, a noninvasive load monitoring method based on improved slime mould algorithm-generalized regression neural network (ISMA-GRNN) is proposed. Firstly, the method carries out data processing operations such as denoising, eliminating outliers, event detection, and feature extraction. Then, aiming at the problem that SMA algorithm is easy to fall into local optimization, the smoothing factor of GRNN is optimized after adding mutation disturbance on the basis of SMA, the optimized optimal smoothing factor is input into GRNN for load identification, and the load identification results are output. Finally, the load identification accuracy, load identification precision, and load identification time are compared with HHO-GRNN, WOA-GRNN, and SMA-GRNN, in order to reflect the advantages of ISMA-GRNN in load identification.The rest of this study is organized as follows: Section2 introduces the methods of event detection and feature extraction. Section 3 introduces the theory of SMA and GRNN and introduces the disturbance formula to improve the SMA method. Section 4 establishes the ISMA-GRNN model and describes its process in detail. Multiple indicators are used to measure ISMA-GRNN in Section 5 followed by the conclusion in Section 6.


## 2. Event Detection and Feature Extraction

Event detection scans the load data for a period of time by using the algorithm to detect the connection and disconnection system of electrical equipment, which is the premise of noninvasive load monitoring [14]. Niu and Jia [15] proposed a bilateral cumulative sum load event detection method based on sliding window, which can effectively detect high-power load events according to power load data, and the detection of low-power load events is inaccurate. On this basis, the improved mean difference accumulation method can improve the event detection sensitivity of the algorithm and effectively detect low-power load events.In this paper, the sliding window mean difference cumulative sum algorithm is used for load event detection. By setting the load event threshold, when the electrical equipment is connected to the system, the power data fluctuates greatly. After the mean difference accumulation calculation, the threshold will be triggered, and the event detection algorithm can detect the access or exit of the electrical equipment from the system. Define positive load event thresholdh+, negative load event threshold h−, the cumulative function g, and the step size of sliding window sp. Characteristic power sequence during load operation is P1 = [ p1, p2, …, pn]n×1. The matrix after sliding window mean difference processing is X, and its expression is shown in the following equation:(1)X=x1x2…xl1×n−spT,where l = n−sp. When the electric equipment is connected, the load data has a positive offset; that is, xk ≥ xk−1, and the power sequence increases. Then, the positive offset will be accumulated into gk+, and gk+ will continue to increase. On the contrary, if the load data has a negative offset when the electric equipment exits the system, that is, xk < xk−1, and the power sequence decreases, the negative offset will be accumulated into gk− and gk− will continue to increase. When gk+≥h+ or gk+<h−, the system will detect the occurrence of load events. When gk+≥h+, positive load events are recorded. Similarly, when gk+<h−, negative load events are recorded.After data processing operations such as denoising and eliminating outliers, the collected load data is input into the sliding window mean difference cumulative sum algorithm for event detection. Then, the load event data will be input into the feature extraction method for feature extraction.The load characteristics of electrical equipment can generally be divided into transient characteristics and steady-state characteristics. The steady-state characteristics are widely used because of their advantages such as strong repeatability, low cost, and simple acquisition [16]. Hilbert Huang transform (HHT) can transform one-dimensional signal into a two-dimensional complex plane signal, which can better display signal features, and is often used for feature extraction [17]. The improved CEEMDAN algorithm is used for feature extraction [18, 19]. CEEMDAN method uses the estimation of local mean to replace the estimation of mode and uses the local mean of signal to extract k-order mode, which can effectively solve the problem of mode aliasing. Therefore, we use CEEMDAN + HT transform to decompose the current data of load events and extract instantaneous amplitude, instantaneous frequency, and instantaneous phase as the load characteristics of electrical equipment. The digital model is derived as follows.Assuming that the current characteristic of the load event isI(t), the first intrinsic mode component is defined as I1, ε is the adaptive coefficient, ω is the Gaussian white noise added during decomposition, and N is the number of EMD decompositions of the signal. The expressions of I1 and R1(t) are as follows:(2)I1=1N∑i=1NIkit,Rt1=It−IMF1.By repeating the above operation, we can getI1, I2, I3,…, IK+1, where the expressions of RK(t) and IK+1 are as follows:(3)Rkt=Rk−1t−Ik,Ik+1=1N∑i=1NE1Rkt+εkEKωit.If the number of extreme points of residual sequenceRK(t) is less than 2, CEEMDAN decomposition is stopped. The final decomposition of load event current characteristic I(t) is shown in the following equation:(4)It=∑i=1kIk+R1t.Calculate the correlation parameters ofI1, I2, I3, …, IK + 1, according to the Pearson correlation, sort the correlation according to the value, and select the larger first D intrinsic mode components to construct the analytical signal Iit=cit+jc^t=aitejϕit. Then, HT transformation is performed on the selected intrinsic mode components to obtain the characteristics of instantaneous amplitude ai(t), instantaneous phase Φi(t), and instantaneous frequency f(t). The obtained formula is as follows:(5)ait=ci2t+c^i2t,ϕit=arctanc^ticti,ft=12πωt=12πdϕitdt.The load data is subject to the sliding window mean difference cumulative sum algorithm for event detection and CEEMDAN + HT transformation for feature extraction, and the instantaneous amplitude, instantaneous frequency, and instantaneous phase of electrical equipment during operation are extracted as load features. Then, the training set and test set are divided by combining the load label, and the load identification model is input for training and identification.


## 3. ISMA-GRNN Load Identification Model

### 3.1. GRNN

GRNN is mainly composed of four layers of neurons: input layer, mode layer, summation layer, and output layer [19] are two transfer functions in the sum. Assuming the input data X = [x1, x2, x3, …, xn], the calculation formula of mode layer data is shown in (6), where σ is the smoothing factor of GRNN.(6)pi=expx−xiTx−xi2σ2,i=1,2,…,n.There are two transfer functions in the summation layer [20]. One is arithmetic summation of the outputs of all mode neurons, and its transfer function is SD=∑i=1npi. The other is weighted summation of all mode neurons, and its transfer function is Snj=∑i=1nyijpi,j=1,2,…,m. The output layer neuron is equal to the output data dimension, and its transfer function is a proportional function: yi=Snj/SD,j=1,2,…,m. Its structure is shown in Figure 1.Figure 1
GRNN structure. GRNN consists of four layers.


### 3.2. SMA

SMA is an optimization algorithm based on the foraging behavior of slime moulds. Slime moulds determine the regional location of food through diffusion behavior and foraging behavior. SMA first updates the location through three steps: approaching food, wrapping food, and obtaining food, and then, it finds the global optimal location by comparing fitness. It has the characteristics of fast convergence speed and strong optimization ability [21].At the stage of approaching food, the approaching behavior of slime moulds is approximate to a mathematical equation, and its contraction rule mode is as follows:(7)Xt+1⟶=Xbt⟶+vb⟶⋅W⟶⋅XAt⟶−XBt⟶,r<p,vc⟶⋅Xt⟶,r≥p,where νb is the random number between [−a, a], νc is a parameter that is linearly decreasing from 1 to 0, t is the number of current iterations, Xb(t) represents the individual position with the best current fitness, X(t) represents the individual position with current slime moulds, XA(t) and XB(t) are two random individual positions, and W represents the weight coefficient of the slime moulds.The control parameterp and parameter a with the weight coefficient W are updated using(8)p=tanhSi−DF,(9)a=arctanh−tmax_t+1,(10)WsmellIndexi⟶=1+r⋅logbF−SibF−wF+1,condition,1−r⋅logbF−SibF−wF+1,others,(11)SmellIndex=sortS,where i∈ 1, 2, …, n, n is the number of populations, S(i) represents the fitness value of the i-th slime moulds individual, and DF is the optimal fitness value achieved. Condition denotes the first half of individuals with fitness in the population, others denote the remaining individuals, r denotes the random number between [0, 1], bF denotes the best fitness value acquired for the current iteration, WF denotes the worst fitness value for the current iteration. SmellIndex(i) is the fitness value sequence (the minima problem is an increasing sequence).During the food-wrapping phase, the location of slime moulds individuals is updated as follows:(12)X∗⟶=rand⋅UB−LB+LB,rand<z,Xbt⟶+vb⟶⋅w⋅XAt⟶−XBt⟶,r<p,vb⟶⋅Xt⟶,r≥p,where UB and LB are upper and lower bounds, random numbers are evenly distributed between 0 and 1, and z is a custom parameter value of 0.03.In the stage of obtaining food, the value ofνb oscillates randomly between [−a, a] and gradually approaches zero with the increase of the number of iterations. The value of νc oscillates between [−1, 1] and finally tends to 0.


### 3.3. ISMA

SMA can only alleviate the problem of falling into local optimal solution to a certain extent. By adding the method of variation disturbance, the variation disturbance is added in the iterative process to make the slime moulds individual jump from local optimal solution, which can improve its global optimization ability, help GRNN find the best smoothing factor, and improve the identification accuracy of load identification method. The added variation disturbance formula is as follows:(13)xit=xit−11+A0.5−rand,t=nT,n=1,2,…,where A is the coefficient of variation, which is mainly used to control the variation amplitude, T is the variation period, and rand is a random number evenly distributed between [0, 1].The main steps for ISMA to optimize GRNN smoothing factor parameters are as follows:Step 1: SMA population initialization and mutation disturbance parameter initialization. After many experiments, the improvement effect is the best whent = 5 and a = 1.Step 2: Sorting the initial fitness parameters after calculating the initial fitness parameters according to the initial value of slime moulds position, and selecting the larger value as the initial parameter.Step 3: Calculating the control parameters,α parameters and weight parameters according to equations (10) to (12).Step 4: Updating the individual position of slime moulds by using equations (9) and (14), calculating the fitness value, comparing it with the initial fitness value, and updating the fitness value.Step 5: Using equation (15) to update the position of variation disturbance, and using the fitness value to update the position of slime moulds and the global optimal value.Step 6: Judging whether the number of iterations reaches the maximum number of iterations. If the number of iterations has been reached, output the best smoothing factor. Otherwise, go to step 3 to continue optimization.


## 3.1. GRNN

GRNN is mainly composed of four layers of neurons: input layer, mode layer, summation layer, and output layer [19] are two transfer functions in the sum. Assuming the input data X = [x1, x2, x3, …, xn], the calculation formula of mode layer data is shown in (6), where σ is the smoothing factor of GRNN.(6)pi=expx−xiTx−xi2σ2,i=1,2,…,n.There are two transfer functions in the summation layer [20]. One is arithmetic summation of the outputs of all mode neurons, and its transfer function is SD=∑i=1npi. The other is weighted summation of all mode neurons, and its transfer function is Snj=∑i=1nyijpi,j=1,2,…,m. The output layer neuron is equal to the output data dimension, and its transfer function is a proportional function: yi=Snj/SD,j=1,2,…,m. Its structure is shown in Figure 1.Figure 1
GRNN structure. GRNN consists of four layers.


## 3.2. SMA

SMA is an optimization algorithm based on the foraging behavior of slime moulds. Slime moulds determine the regional location of food through diffusion behavior and foraging behavior. SMA first updates the location through three steps: approaching food, wrapping food, and obtaining food, and then, it finds the global optimal location by comparing fitness. It has the characteristics of fast convergence speed and strong optimization ability [21].At the stage of approaching food, the approaching behavior of slime moulds is approximate to a mathematical equation, and its contraction rule mode is as follows:(7)Xt+1⟶=Xbt⟶+vb⟶⋅W⟶⋅XAt⟶−XBt⟶,r<p,vc⟶⋅Xt⟶,r≥p,where νb is the random number between [−a, a], νc is a parameter that is linearly decreasing from 1 to 0, t is the number of current iterations, Xb(t) represents the individual position with the best current fitness, X(t) represents the individual position with current slime moulds, XA(t) and XB(t) are two random individual positions, and W represents the weight coefficient of the slime moulds.The control parameterp and parameter a with the weight coefficient W are updated using(8)p=tanhSi−DF,(9)a=arctanh−tmax_t+1,(10)WsmellIndexi⟶=1+r⋅logbF−SibF−wF+1,condition,1−r⋅logbF−SibF−wF+1,others,(11)SmellIndex=sortS,where i∈ 1, 2, …, n, n is the number of populations, S(i) represents the fitness value of the i-th slime moulds individual, and DF is the optimal fitness value achieved. Condition denotes the first half of individuals with fitness in the population, others denote the remaining individuals, r denotes the random number between [0, 1], bF denotes the best fitness value acquired for the current iteration, WF denotes the worst fitness value for the current iteration. SmellIndex(i) is the fitness value sequence (the minima problem is an increasing sequence).During the food-wrapping phase, the location of slime moulds individuals is updated as follows:(12)X∗⟶=rand⋅UB−LB+LB,rand<z,Xbt⟶+vb⟶⋅w⋅XAt⟶−XBt⟶,r<p,vb⟶⋅Xt⟶,r≥p,where UB and LB are upper and lower bounds, random numbers are evenly distributed between 0 and 1, and z is a custom parameter value of 0.03.In the stage of obtaining food, the value ofνb oscillates randomly between [−a, a] and gradually approaches zero with the increase of the number of iterations. The value of νc oscillates between [−1, 1] and finally tends to 0.


## 3.3. ISMA

SMA can only alleviate the problem of falling into local optimal solution to a certain extent. By adding the method of variation disturbance, the variation disturbance is added in the iterative process to make the slime moulds individual jump from local optimal solution, which can improve its global optimization ability, help GRNN find the best smoothing factor, and improve the identification accuracy of load identification method. The added variation disturbance formula is as follows:(13)xit=xit−11+A0.5−rand,t=nT,n=1,2,…,where A is the coefficient of variation, which is mainly used to control the variation amplitude, T is the variation period, and rand is a random number evenly distributed between [0, 1].The main steps for ISMA to optimize GRNN smoothing factor parameters are as follows:Step 1: SMA population initialization and mutation disturbance parameter initialization. After many experiments, the improvement effect is the best whent = 5 and a = 1.Step 2: Sorting the initial fitness parameters after calculating the initial fitness parameters according to the initial value of slime moulds position, and selecting the larger value as the initial parameter.Step 3: Calculating the control parameters,α parameters and weight parameters according to equations (10) to (12).Step 4: Updating the individual position of slime moulds by using equations (9) and (14), calculating the fitness value, comparing it with the initial fitness value, and updating the fitness value.Step 5: Using equation (15) to update the position of variation disturbance, and using the fitness value to update the position of slime moulds and the global optimal value.Step 6: Judging whether the number of iterations reaches the maximum number of iterations. If the number of iterations has been reached, output the best smoothing factor. Otherwise, go to step 3 to continue optimization.


## 4. Load Identification Model Based on ISMA-GRNN

### 4.1. Input and Output of ISMA-GRNN

Load data such as voltage, current, and power are input into NILM method after denoising and eliminating abnormal values. The load events are detected by the sliding window mean difference cumulative sum algorithm, and the instantaneous amplitude, instantaneous phase, and instantaneous frequency are extracted as load characteristics by CEEMDAN + HT transformation. Through many experiments, we find that the load identification accuracy is the highest when extracting the first five-dimensional intrinsic mode functions, so the input dimension of the load identification method is 15.The load data used in this paper includes 9 kinds of electrical equipment, a total of 17 load states. The output of multiclass classification problems generally includes binary coded output and direct output. Binary encoded output is often used to identify situations where there are fewer electrical devices. Because there are many load states corresponding to the load data used in this paper, the direct output label is adopted, and the output dimension of the load identification method is 1. In order to facilitate the subsequent representation of electrical equipment and status, the electrical load and its status are numbered, and the corresponding labels are shown in Table1.Table 1
Correspondence table of electrical equipment and status label.
Load typeMicrowave ovenElectric fanKettleIncandescent lampEnergy saving lampWater dispenserLoad statusHeatingHeat preservation1st gear2nd gearTurn onTurn onTurn onHeatingLabel12345678Load typeWater dispenserAir-conditionerHair dryerTelevisionLoad statusRefrigerationHeating and coolingRefrigerationAuxiliary heat1-hot1-cold2-hot2-coldTurn onLabel91011121314151617


### 4.2. ISMA-GRNN Implementation Process

After the load data is input into the NILM method, data preprocessing operations such as denoising and eliminating outliers are carried out in the first stage to reduce the impact of load data acquisition error on load identification results. In the second stage, the sliding window mean difference cumulative sum algorithm is used to detect the load event of power load data, and the access state of useless electrical equipment in the load process is eliminated. In the third stage, CEEMDAN + HT transform is used to decompose the current data of load events, extract instantaneous amplitude, instantaneous frequency, and instantaneous phase as load characteristics, and then the extracted load characteristic data set is divided into training set and test set. In the fourth stage, ISMA-GRNN is used for load identification, and then the load identification results are output. The main process of ISMA-GRNN is shown in Figure2.Figure 2
Main processes of ISMA-GRNN. NILM consists of four steps.The fitness function of ISMA is shown in the following equation:(14)Acc=CZ,where C represents the number of correct classification groups in the load identification results and Z represents the total number of load data groups input into the load identification method.In ISMA-GRNN, firstly initialize SMA and variation disturbance, then calculate the initial fitness value, control parameters,α, and weight parameters, and update the individual position and fitness of slime mould by using equations (9), (14), and (10). Finally, judge whether the preset number of iterations is reached. If the preset number of iterations is reached, output the best smoothing factor. If the preset number of iterations is not reached, repeat equations (9), (14), and (10) to update the slime mould position.


### 4.3. Evaluation Index

Load identification is essentially a classification problem. On the binary classification problem, the classification methods are mainly evaluated by accuracy, precision (P), recall (R), and F1 [22]. For multiple-class classification problems, the average values of accuracy, precision, recall, and F1 are generally used to measure the performance of the algorithm. The average value is mainly calculated by micro average and macro average. Macro average calculates the accuracy, precision, recall, and F1 of each category and then calculates the average value. This calculation method can treat each category equally. The micro average is calculated by combining the contribution value of the category [23]. In NILM, the category of each piece of electrical equipment exists independently, so it is more reasonable to use Macro-P, Macro-R, accuracy, and Macro-F measurement models. The macro parameters are calculated as follows:(15)macro−P=1n∑i=1nPi,macro−R=1n∑i=1nRi,macro−F=2×macro−P×macro−Rmacro−P+macro−R.The confusion matrix [24] is the most intuitive and simplest way to measure the results of a multiple-class classification method. References [25, 26] used a confusion matrix to measure the load identification results, but due to the inconsistency in the number of sample groups for multiple classified loads, their consistency needed to be tested using the kappa. Kappa is a statistical index to measure classification accuracy based on confusion matrix calculation. In this paper, we use Kappa to analyze the consistency of load identification accuracy of different power devices.Load identification time is an important index to measure the performance of load identification methods. In engineering applications, generally by comparing the recognition accuracy and running time of different algorithms, the algorithm with high recognition accuracy and short recognition time is selected as load identification method [27, 28].In summary, we use the confusion matrix and kappa to represent the accuracy of load identification and use the accuracy of load identification and load identification time to evaluate the quality of load identification methods.


## 4.1. Input and Output of ISMA-GRNN

Load data such as voltage, current, and power are input into NILM method after denoising and eliminating abnormal values. The load events are detected by the sliding window mean difference cumulative sum algorithm, and the instantaneous amplitude, instantaneous phase, and instantaneous frequency are extracted as load characteristics by CEEMDAN + HT transformation. Through many experiments, we find that the load identification accuracy is the highest when extracting the first five-dimensional intrinsic mode functions, so the input dimension of the load identification method is 15.The load data used in this paper includes 9 kinds of electrical equipment, a total of 17 load states. The output of multiclass classification problems generally includes binary coded output and direct output. Binary encoded output is often used to identify situations where there are fewer electrical devices. Because there are many load states corresponding to the load data used in this paper, the direct output label is adopted, and the output dimension of the load identification method is 1. In order to facilitate the subsequent representation of electrical equipment and status, the electrical load and its status are numbered, and the corresponding labels are shown in Table1.Table 1
Correspondence table of electrical equipment and status label.
Load typeMicrowave ovenElectric fanKettleIncandescent lampEnergy saving lampWater dispenserLoad statusHeatingHeat preservation1st gear2nd gearTurn onTurn onTurn onHeatingLabel12345678Load typeWater dispenserAir-conditionerHair dryerTelevisionLoad statusRefrigerationHeating and coolingRefrigerationAuxiliary heat1-hot1-cold2-hot2-coldTurn onLabel91011121314151617


## 4.2. ISMA-GRNN Implementation Process

After the load data is input into the NILM method, data preprocessing operations such as denoising and eliminating outliers are carried out in the first stage to reduce the impact of load data acquisition error on load identification results. In the second stage, the sliding window mean difference cumulative sum algorithm is used to detect the load event of power load data, and the access state of useless electrical equipment in the load process is eliminated. In the third stage, CEEMDAN + HT transform is used to decompose the current data of load events, extract instantaneous amplitude, instantaneous frequency, and instantaneous phase as load characteristics, and then the extracted load characteristic data set is divided into training set and test set. In the fourth stage, ISMA-GRNN is used for load identification, and then the load identification results are output. The main process of ISMA-GRNN is shown in Figure2.Figure 2
Main processes of ISMA-GRNN. NILM consists of four steps.The fitness function of ISMA is shown in the following equation:(14)Acc=CZ,where C represents the number of correct classification groups in the load identification results and Z represents the total number of load data groups input into the load identification method.In ISMA-GRNN, firstly initialize SMA and variation disturbance, then calculate the initial fitness value, control parameters,α, and weight parameters, and update the individual position and fitness of slime mould by using equations (9), (14), and (10). Finally, judge whether the preset number of iterations is reached. If the preset number of iterations is reached, output the best smoothing factor. If the preset number of iterations is not reached, repeat equations (9), (14), and (10) to update the slime mould position.


## 4.3. Evaluation Index

Load identification is essentially a classification problem. On the binary classification problem, the classification methods are mainly evaluated by accuracy, precision (P), recall (R), and F1 [22]. For multiple-class classification problems, the average values of accuracy, precision, recall, and F1 are generally used to measure the performance of the algorithm. The average value is mainly calculated by micro average and macro average. Macro average calculates the accuracy, precision, recall, and F1 of each category and then calculates the average value. This calculation method can treat each category equally. The micro average is calculated by combining the contribution value of the category [23]. In NILM, the category of each piece of electrical equipment exists independently, so it is more reasonable to use Macro-P, Macro-R, accuracy, and Macro-F measurement models. The macro parameters are calculated as follows:(15)macro−P=1n∑i=1nPi,macro−R=1n∑i=1nRi,macro−F=2×macro−P×macro−Rmacro−P+macro−R.The confusion matrix [24] is the most intuitive and simplest way to measure the results of a multiple-class classification method. References [25, 26] used a confusion matrix to measure the load identification results, but due to the inconsistency in the number of sample groups for multiple classified loads, their consistency needed to be tested using the kappa. Kappa is a statistical index to measure classification accuracy based on confusion matrix calculation. In this paper, we use Kappa to analyze the consistency of load identification accuracy of different power devices.Load identification time is an important index to measure the performance of load identification methods. In engineering applications, generally by comparing the recognition accuracy and running time of different algorithms, the algorithm with high recognition accuracy and short recognition time is selected as load identification method [27, 28].In summary, we use the confusion matrix and kappa to represent the accuracy of load identification and use the accuracy of load identification and load identification time to evaluate the quality of load identification methods.


## 5. Experiments and Analysis

The software simulation platform used in this paper is Matlab 2018b, the hardware platform is intel i7-9700 3.0 GHz, and the RAM is 16 g. A total of 2743 groups of load data are collected. After data preprocessing, event detection, and feature extraction, the number of data groups input into the load identification method is 1988. The number of data groups corresponding to electrical equipment and load status is shown in Table2.Table 2
Data group number table corresponding to electrical equipment and load status.
Label1234567891011121314151617Group number3932335858746363195952206258135631066844We divide the processed feature dataset into training set and test set, then optimize it in the GRNN processed by the input optimization algorithm, output the best smoothness factor, and finally test the optimized GRNN using the test set data to get the load identification results. To highlight the superiority of ISMA-GRNN, the advantages of load identification in scenes of multiple electrical equipment are verified by comparing it with HHO-GRNN, WOA-GRNN, and SMA-GRNN using confusion matrix, precision (P), recall (R), F1, and load identification time as evaluation indexes.In order to reflect the fairness of the result comparison, the initial population number of the four optimization algorithms is set to 30, the maximum number of iterations is set to 100, the upper limit of the smoothing factor is set to 1000, and the lower limit is set to 0.1. The simulation result confusion matrix is shown in Figure3.Figure 3
Confusion matrix results of four load identification methods. (a) Confusion matrix of HHO-GRNN. (b) Confusion matrix of WOA-GRNN. (c) Confusion matrix of SMA-GRNN. (d) Confusion matrix of ISMA-GRNN.
(a)(b)(c)(d)In Figure4, we can draw the following conclusions: in the load identification of multiple electrical equipment use scenes, the load identification effect of ISMA-GRNN is significantly better than the other three load identification methods. In Figure 4, the other three methods do not have high recognition accuracy for label 16, which is easy to misidentify as label 17. At the same time, WOA-GRNN can easily misidentify label 17 as label 16. The main reason is that these two kinds of electrical equipment have similar load data characteristics and have similar intrinsic mode functions when extracting features, so they are easy to misidentify. But ISMA-GRNN alleviates this problem to some extent, and its load identification accuracy for labels 16 and 17 is higher than 90%.Figure 4
Recognition results under four methods. (a) HHO-GRNN results. (b) WOA-GRNN results. (c) SMA-GRNN results. (d) ISMA-GRNN results.
(a)(b)(c)(d)The main reason for misidentification of SMA-GRNN is that there are similar loads on the four load devices (Label 3, Label 6, Label 7, and Label 11), which leads SMA to fall in locally optimal solution when searching for smoothing factor, resulting in different degrees of misidentification in load identification. ISMA improves the accuracy of load identification for Label 3, Label 6, and Label 7 by increasing the update of mutation operation, taking into account the global optimum. In ISMA-GRNN, only the identification accuracy of tag 11 is 87%, and the load identification rate of other electrical equipment and states is more than 90%.However, because the number of load data groups of different load labels is unbalanced, we need to use kappa to check the consistency of confusion matrix. Kappa under the four methods is shown in Table3.Table 3
Kappa under four methods.
MethodsHHO-GRNNWOA-GRNNSMA-GRNNISMA-GRNNKappa0.96060.95180.93220.9711It is obvious from Table3 that the kappa of ISMA-GRNN is the highest, indicating that, in the confusion matrix obtained by ISMA-GRNN load identification method, the prediction results are almost the same as the actual classification results, and the results have high credibility. At the same time, the kappa of the four load identification methods is greater than 0.93, which shows that the identification results of the four load identification methods have good repeatability, and their prediction results are highly consistent with the actual classification results.When the number of load data groups of different electric equipment is uneven, the confusion matrix cannot fully reflect the identification ability of the load identification method in the scenes of multiple electrical equipment. In order to reflect the rationality of the comparison of different load identification methods, we use precision (P), recall (R), and F1 to comprehensively evaluate the algorithm performance of the four load identification methods. The test results of the four load identification methods are shown in Table 4.Table 4
Test results of four load identification methods.
HHO-GRNNWOA-GRNNSMA-GRNNISMA-GRNNPRF1PRF1PRF1PRF110.930.980.951.000.991.000.880.980.930.981.000.9920.980.990.990.991.001.000.961.000.981.000.980.9930.960.900.930.960.960.961.000.830.910.971.000.9840.930.930.930.960.930.940.970.970.971.000.970.9850.911.000.950.961.000.980.940.970.960.971.000.9860.960.870.911.000.940.970.960.810.881.000.970.9870.990.960.980.991.000.990.920.810.861.001.001.0080.930.960.940.760.900.830.740.930.830.950.940.9490.980.980.980.970.960.960.850.870.860.960.980.97100.970.990.981.000.970.990.930.980.960.990.980.99110.990.970.980.980.900.940.960.810.880.940.870.90120.950.920.930.950.960.960.950.900.920.880.930.91130.930.980.960.940.860.900.940.940.940.940.990.96140.920.940.930.971.000.980.870.900.880.980.970.97150.970.980.980.970.980.980.911.000.951.000.980.99160.950.840.890.820.850.840.870.850.860.910.940.93170.910.950.930.880.860.870.890.910.900.940.910.92In Table4, after comparing the identification effects of the four load identification methods on 17 load states, it is found that the identification effect of ISMA-GRNN is better, and its precision, recall, and F1 are higher than those of the other three methods. The minimum value of the classification index is usually used to measure the identification effect of the load identification method. The greater the minimum value, the better the performance of the classification model and the more applicable to different use scenarios.By comparing the minimum values of the three classification indexes under the four load identification methods, it is found that the recall andF1 of ISMA-GRNN are higher than those of the other three methods, and the precision is only slightly lower than that of HHO-GRNN, indicating that ISMA-GRNN is more suitable for scenes of multiple electrical equipment use than the other three methods.In engineering application, the less time it takes for load identification, the faster the iterative optimization process of the algorithm, and the stronger the performance of the algorithm. In addition, the parameters in Table4 are mainly used to describe the identification effect of the load identification method on a single electrical equipment, which cannot well reflect the overall effect of the load identification model. Therefore, we use macro average and load identification time to comprehensively describe the overall performance of the load identification model in the scenes of multiple electrical equipment. The macro average and load identification time under the four load identification methods are shown in Table 5.Table 5
Macro average and load identification time.
Macro-P (%)Macro-R (%)Accuracy (%)Macro-F (%)Time (s)HHO-GRNN94.9994.9292.4594.88376.02WOA-GRNN94.7994.5492.5694.60243.37SMA-GRNN91.3890.9293.8690.90231.99ISMA-GRNN96.5396.4997.3896.48233.62It can be seen from Table5 that, among the four methods, there is little difference in macro average parameters between HHO-GRNN and WOA-GRNN, but there is a great difference in load identification time. The main reason is that the update strategy of HHO is more complex, which results in longer updates per iteration, so HHO-GRNN takes longer to reach 376.02s. Compared with HHO-GRNN and WOA-GRNN, SMA-GRNN improves the accuracy and time of load identification, but other indicators decrease accordingly. ISMA-GRNN, on the basis of SMA-GRNN, makes SMA take into account both global optimization and local development capabilities by adding mutation operation to the location update, which improves the macro average greatly. However, due to the addition of location mutation operation, the iteration time becomes longer, resulting in a load identification time of 1.63s longer than SMA-GRNN.The load identification result figure is represented by comparing the load identification output label with the test set label, which can intuitively represent the identification effect of the load identification method. The identification results of the four load identification methods are shown in Figure4.If the characteristics of two pieces of electric equipment are similar, the load identification method is easy to misjudge them, and both of them are misjudged as each other. It can be seen from Figure4 that the main misjudgment of HHO-GRNN is on label 6, label 7, and label 12, but we believe that the reason for the misjudgment is that the possibility of misidentification caused by similar load characteristics is very small. The main reason for the misjudgment of label 8 and label 13 in WOA-GRNN is that the number of data sample groups of tag 8 accounts for a large proportion, resulting in the misidentification of label 13. The results of SMA-GRNN show complex false recognition results. The main reason is that the algorithm falls into local optimum and cannot find the best smoothing factor, resulting in false recognition. Compared with the other three methods, the load identification result of ISMA-GRNN is the best. There is only misidentification of individual electrical equipment, and the identification error range is within the acceptable range.


## 6. Conclusion

In this paper, a noninvasive load monitoring load identification method based on ISMA-GRNN is proposed. Firstly, load event monitoring and feature extraction are carried out for load data, then mutation operation is added in the position update process of SMA, ISMA is used to optimize the smoothing factor of GRNN, and finally ISMA-GRNN is used for load identification, and the identification results are output. The load data we use includes 9 kinds of electrical equipment and a total of 17 power consumption states. The load identification accuracy, load identification precision, and load identification time are used as evaluation indexes. Through simulation experiments, the following conclusions are obtained:(1)
Compared with HHO-GRNN and WOA-GRNN, SMA-GRNN has the highest load identification accuracy and the shortest load identification time, but the load identification precision is reduced.(2)
After adding mutation operation, ISMA can move off the local optimal solution to a certain extent and find the best smoothing factor. Based on SMA-GRNN, the load identification accuracy of ISMA-GRNN is improved by 3.52%, the load identification precision is improved by 5.15%, and the load identification time is only increased by 1.63s.(3)
For label 11 and label 12, the four methods have misidentification. The possible reason is that there is a certain time difference between the collection of operation data of electric equipment and the recording of load label when collecting load data for different power consumption states of the same electric equipment, resulting in load misidentification. Next, we will consider using the algorithm to record the load tag to reduce the time difference between running data collection and label recording.



---

*Source: 8056696-2022-03-30.xml*