Abstract
Real-time monitoring of electricity usage details through load monitoring techniques is a crucial aspect of smart power grid management and monitoring, allowing for the acquisition of information on the electricity usage of individual appliances for power users. Accurate detection of electricity load is essential for refined load management and monitoring of power supply quality, facilitating the improvement of power management at the user side and enhancing power operation efficiency. Non-intrusive load monitoring (NILM) techniques require only the analysis of total load data to achieve load monitoring of electricity usage details, and offer advantages such as low cost, easy implementation, high reliability, and user acceptance. However, with the increasing number of distributed new load devices on the user side and the diversification of device development, simple load recognition algorithms are insufficient to meet the identification needs of multiple devices and achieve high recognition accuracy. To address this issue, a non-intrusive load recognition (NILR) model that combines an adaptive particle swarm optimization algorithm (PSO) and convolutional neural network (CNN) has been proposed. In this model, pixelated images of different electrical V-I trajectories are used as inputs for the CNN, and the optimal network layer and convolutional kernel size are determined by the adaptive PSO optimization algorithm during the CNN training process. The proposed model has been validated on the public dataset PLAID, and experimental results demonstrate that it has achieved a overall recognition accuracy of 97.26% and F-1 score of 96.92%, significantly better than other comparison models. The proposed model effectively reduces the confusion between various devices, exhibiting good recognition and generalization capabilities.
Keywords
Introduction
In recent decades, concerns about energy crises and the consequences of global warming have significantly increased, leading many countries to develop new policies to address these issues [1]. The increased emission of large amounts of carbon dioxide has exacerbated the “greenhouse effect,” further accelerating global warming. To alleviate this situation, it is necessary to reduce greenhouse gas emissions and replace traditional power generation units with more environmentally friendly technologies to use electricity more effectively [2, 3]. Therefore, reducing energy demand by improving energy consumption management is a key measure to address the escalating energy crisis and global warming problems. Developing distributed intelligent power grids is one way to achieve this. The power supply side of the power grid allows for distributed access to various types of power sources to meet the power demand of various platforms. On the load side, with the development of technology, various complex power loads have emerged [4, 5]. As a key component of the construction of intelligent power grids, smart meters are mainly used to collect and record raw energy data and upload it to the computing cloud platform. Currently, smart meters have the functions of measuring and displaying multiple information and uploading to smart terminals in real-time. However, the current smart meters configured for power monitoring can only display the total electricity consumption of a household and cannot trace the electricity consumption of specific devices, making it difficult to provide users with reasonable electricity management plans [6].
For power users, electricity usage details can support personalized energy efficiency management, promote energy efficiency upgrades, and support appliance fault diagnosis [7, 8]. For power companies, it can help them optimize power grid planning, operation, and management, including supporting advanced power markets and intelligent demand-side management (including demand response potential assessment, load precise control, and demand response behavior verification, etc.), improving the accuracy of load models used for power grid security and stability analysis, and achieving more accurate load forecasting and detection of violations (abnormal usage), etc. In addition, electricity usage details are a major source of big data for smart cities, which can provide strong support for many advanced applications such as energy conservation and emission reduction, industrial upgrading, safety warnings, and home-based care [9, 10].
To achieve load monitoring of electricity usage details, traditional solutions require the installation of data measurement sensors with communication capabilities for each (main) appliance inside the power load, which is often referred to as Intrusive Load Monitoring (ILM). This approach is inconvenient for users and comes with high investment costs [11]. To overcome the limitations, non-intrusive load monitoring (NILM) technology has been widely researched. This technology can simultaneously solve the above two problems. NILM technology only requires electricity consumption monitoring at the terminal, and through designed algorithms,it can calculate the various signals that make up the mixed signal. This reduces the use of monitoring sensors and also enables the real-time monitoring of the operating status of various power devices [12, 13]. Based on this technology, residents can plan their indoor electricity usage based on the data, and power companies can locate faulty equipment based on actual electricity usage, achieve reasonable power distribution, and take appropriate measures in response to inadequate peak load shifting capacity in local power grids.
NILM was first proposed by Hart [14], and it can be divided into three main parts. Firstly, suitable load characteristics are selected based on the different load characteristics of different devices, such as transient characteristics including transient power, transient current, and voltage during switching, and steady-state characteristics including steady-state power, steady-state periodic current and voltage waveform data, and current harmonics. The total signal sequence is processed by event detection algorithms to detect the device load signatures when a switching event occurs. Secondly, event detection accurately detects the time when a switching event occurs for a device. Thirdly, load identification identifies the extracted load signatures as corresponding devices through identification algorithms, and determines the on/off states of the devices [15]. In later NILM research, some scholars proposed load identification algorithms that do not require event detection, mainly using clustering algorithms to compare the load signatures of each device with the features in a feature library, and to determine whether the detected device matches the category in the feature library based on distance or density [16].
In power load control, the VI trajectory refers to the trajectory of voltage and current, also known as the P-Q trajectory (active power-reactive power trajectory). In the process of regulating the voltage and current in the power grid to achieve the desired consumption of active and reactive power, the trajectory followed by voltage and current is referred to as the VI trajectory [17]. Traditional manual feature extraction methods have achieved good results, but they rely on prior knowledge and the designed feature extractors may not be robust against noise and artifacts. In contrast, the shape features of the VI trajectory have clear meanings and good recognition capabilities. The rapid development of deep learning (DL) provides a new approach for NILM [18]. Deep neural networks can fully utilize a large number of load data samples to extract features that better express the input-output relationship. By converting the VI trajectory into an image and extracting features, good load recognition performance can be achieved. However, the performance of DL models is heavily related to their hyperparameter settings, and there is currently no universally effective theory to guide hyperparameter settings. The training of DL models is time-consuming, and dependence on traditional experimental combinations is inefficient, and the model may not have the best recognition performance [19]. Therefore, in this paper, an adaptive PSO algorithm and CNN-based NILM method is proposed, which extracts appliance VI trajectories from high-frequency sampling data, converts them into normalized pixel images, and trains the CNN model for feature extraction and load classification. During training, the adaptive PSO optimization algorithm is used to automatically find the optimal network layer number and convolution kernel size in the CNN training process, and a load recognition model is constructed to further improve the recognition performance of the DL model.
Electricity is the lifeblood of modern society, and it is a fundamental guarantee for economic development, people’s lives, and social stability. Electricity cannot be easily stored, so to ensure the stable operation of the power grid, it is necessary to maintain real-time power balance between the power generation side and the load side of the grid. This requires accurate prediction of future electricity demand, and load type recognition is the foundation of demand prediction. Load type recognition can achieve the following goals: 1) analyze the energy consumption of different types of loads and formulate corresponding energy-saving and emission reduction policies to reduce energy waste and environmental pollution. 2) more accurately predict changes in electricity load trends, optimize grid scheduling strategies, and improve grid operating efficiency. 3) achieve real-time monitoring of the power system, promptly detect abnormal situations, and improve the safety and stability of the power system. 4) analyze and predict household electricity consumption behavior to provide basic support for the design and development of smart homes and improve quality of life and convenience. However, with the large-scale access of clean energy to the grid and the increasing number of electric vehicles, the complexity and uncertainty of the grid are increasing, which poses challenges to traditional electric load recognition models. The proposed NILR method that combines adaptive PSO algorithm and CNN has the following innovations: 1) selecting VI trajectories as the input of the CNN model. The voltage and current are normalized to create VI trajectories, which are covered by an n×n grid. By traversing all sampling points and normalizing the values of the grid units, the resulting pixelated images of VI trajectories have continuous values rather than binary values, enabling the CNN model to better extract distinctive features. 2) Based on the powerful feature extraction ability of CNN, we attempt to use adaptive PSO to search for its hyperparameters and established a PSO-CNN load recognition model. During network training, PSO was used to optimize the main hyperparameters of CNN, and the PSO-CNN model was constructed based on the resulting parameters. The performance of the proposed method on the PLAD 2017 public dataset was analyzed and compared for load recognition tasks.
The remaining sections of this paper are arranged as follows. Chapter II introduces related research. Chapter III provides a detailed explanation of the load recognition method proposed in this paper, which combines adaptive PSO and CNN model. Chapter IV validates and compares the proposed method on the public dataset PLAID. Finally, Chapter V summarizes the entire text and points out future research directions.
Related research
Indeed, in NILM research, the main focus is on feature selection and identification algorithms. Hart [14] initially identified events by changes in active power values. However, this feature is relatively simple and limited, and the experiment is only applicable to device groups with significant differences in active power. Load signature [20] is defined as the unique load characteristic of an electrical appliance during operation, reflecting the electrical power state of the device. Ghosh et al. [21] utilized current harmonics as load signature, which greatly improved the accuracy compared to using only power information as load signature. The paper also verifies that power estimation based on switch functions has a significant improvement compared to empirical power estimation. However, since the current harmonic values are generally dominated by the first twenty harmonics, and the higher frequency harmonic values are almost zero, the amount of information contained is relatively small. Therefore, some researchers proposed to extract some of the current harmonic values as load signatures. For instance, Bouhouras et al. [22] proposed to regard the first three odd harmonics obtained by analyzing steady-state current through fast Fourier transform as load identification signatures, which improved computational efficiency while ensuring recognition accuracy. However, as the number of different types of loads gradually increases, using only steady-state data is not sufficient to effectively identify multiple types of loads. Therefore, Wichakool et al. [23] proposed to use voltage and current waveforms as load signatures for continuous variable power loads. The current waveform of these devices is non-sinusoidal and can be accurately identified in the time-frequency domain.
As complex electrical equipment appears in real life, the identification algorithms have also evolved from simple combination comparison methods to pattern matching in machine learning and classification models using neural networks. Srinivasan et al. [24] proposed to use the harmonics of the input current waveform as load signatures and compared the identification algorithms using multilayer perceptron (MLP), radial basis function (RBF) networks, and support vector machines (SVM) with linear, polynomial, and RBF kernels. The experimental results proved that MLP and SVM can effectively identify different types of loads. Suzuki et al. [25] defined the load identification problem as an integer quadratic programming problem and transformed the multi-load state problem into a multi-constraint optimization problem. This approach established a more complete load feature model and improves recognition accuracy, but the drawback is that the multi-constraint optimization problem will significantly increase computational complexity and have some limitations in transferability to different datasets. Therefore, Berges et al. [26] proposed to use K-nearest neighbor (KNN) algorithm and Bayesian classifier to identify load signatures, and compared the load signature when the event occurs with the event label database that has already been measured using distance measurement. However, such algorithm is inadequate when dealing with the identification of similar load characteristics of multiple devices. Kelly [27] used multiple models, including combinatorial optimization (CO) algorithm, factorial hidden Markov model (FHMM), long short-term memory network (LSTM), and denoising autoencoder (DAE) for load disaggregation. The paper elaborated on the advantages and disadvantages of various algorithms and compared them using a unified evaluation metric, concluding that LSTM and DAE perform better than CO and FHMM in accuracy when dealing with such problems.
With the rapid development of DL algorithms in the field of image recognition, some researchers have also try to transform two-dimensional current and voltage information into image information, and solve the NILR problem as image classification task. Lam et al. [28] elaborated on eight shape features such as the asymmetry exhibited by VI trajectories and compared them with traditional power indicators and feature vector methods using hierarchical clustering. The experimental results showed that the shape features of VI trajectories have clear meanings for load characteristics and have good identification capabilities. Hassan et al. [29] proposed to use V-I trajectories as load signatures and adopted CNN algorithm for load identification. The introduction of this load signature greatly expands researchers’ thinking, no longer limited to one-dimensional signals but combining signals into corresponding two-dimensional image signals or even multi-dimensional signals as load signatures. De et al. [30] computed the elliptical Fourier descriptors of the VI trajectory contour and used it as input for the classification algorithm. Li et al. [31] used BP neural network and CNN to extract and fuse features of power and VI trajectories and treated the composite feature as a new feature for load identification. Jia et al. [32] converted current and voltage signals into image form and used CNN for feature extraction and load identification. Du et al. [33] converted the voltage and current sampling data into a two-dimensional V-I trajectory and then maps it into a binary grayscale image using a normalization method. Although the electrical information contained in the binary image is more comprehensive, the low resolution of the image and the normalization process inevitably result in a loss of a significant amount of useful information. In particular, traditional shallow learning methods cannot fully exploit the advanced features of the image, so there is still room for improvement in the accuracy of load identification.
NILM method combining adaptive PSO and CNN
In the proposed method, the dataset was first preprocessed to extract pixelated images of VI trajectories. Then, an adaptive PSO optimization algorithm was combined with a CNN network to find the optimal parameter settings. Specifically, the CNN was used as the basis for load recognition, while the adaptive PSO algorithm was used to identify the optimal recognition model parameters. To obtain the optimized load recognition model, the adaptive PSO was applied with convolutional kernel size and network depth as the problem domains, and the accuracy of load recognition as the optimization algorithm criterion, ultimately returning the optimal convolution size and network depth parameters within a certain iteration range. This process resulted in the optimized network load recognition model. Figure 1 illustrates the flowchart of the proposed method.

Flowchart of the proposed method.
Compared to other features, VI trajectory features can better reflect the load characteristics of household appliances; therefore, this study selected VI trajectories as the model input. Based on the component composition, household appliances can be mainly divided into linear devices and nonlinear devices [34]. Linear devices are generally composed of pure resistors, capacitors, inductors, and other components, and the load characteristics formed are characterized by a relatively small harmonic content; the current fluctuation is more gentle and stable during steady state. Nonlinear components are composed of nonlinear elements, and the load characteristics formed are characterized by a relatively large harmonic content; many waveform glitches will be produced due to current spikes, resulting in a complex current waveform [35]. These differences in load characteristics can be clearly represented by the VI trajectory. Within a specified time period after turning on the electrical device, the VI trajectory can be obtained by plotting the relationship curve between voltage and current. In addition, in household electrical devices, the behavior of resistive, inductive, and nonlinear loads in the circuit is different, and there are different transient effects during startup. Therefore, they usually exhibit different features in the VI trajectories, including different current and voltage waveforms, power factors, and harmonic distributions. The proposed method converts the VI trajectories into normalized pixel images, which is then input to CNN for recognition, effectively addressing the transient effects of different types of electrical appliances. This is because converting the VI trajectories into pixelated images can transform the transient effects generated by electrical appliances during startup into changes in pixel points, which are easier to learn and recognize by the CNN model. Figure 2 gives examples of VI trajectory plots for different appliances. The horizontal and vertical coordinates, U and I, respectively, are both normalized values. It can be observed that the V-I trajectory plot for a pure resistive load, such as a soldering iron, is a straight line, and the shape of the pure resistive load is symmetrical. For capacitive loads, such as a hair dryer, the direction of the cycle is clockwise, and the area value of the VI trajectory is positive. For nonlinear loads, such as fluorescent lamp and computer, there are many intersections in their V-I trajectory plots, which are generally caused by harmonic currents, and it can be seen from the figure that the shape of the nonlinear load is less smooth.

VI trajectories of different devices.
In [33], the VI trajectory was mapped to a grid of unit cells, and each cell was assigned a binary value to indicate whether it was traversed by the trajectory. Based on this pixelated VI image, features such as the number of consecutive occupied cells, binary values of left-horizontal and central cells were extracted as inputs for the classification model. Previous methods compressed the information contained in the VI trajectory into limited statistical information. In order to fully utilize the VI trajectory information, this study proposed to make some improvements to get the generated image with continuous values instead of binary values, and the specific processing steps are as follows: Obtain the voltage V and current I of the device during a certain working time interval. Perform normalization of the voltage and the current, V ∈ [-1, 1], I ∈ [-1, 1]:
Where V
m
and I
m
denote the voltage and current values of the m-th sampling point in the data, respectively; max |V| and max |I| represent the maximum absolute values of voltage and current in the data, respectively; v
m
and i
m
are the normalized voltage and current values of the m-th sampling point, respectively. Create the VI trajectory using normalized data. Cover the trajectory with an n × n grid. Traverse all sampling points, and if a sampling point falls within a grid unit range, add 1 to the value of the grid unit. Normalize the value of the grid units so that the maximum value of the grid unit is 1.
The proposed method extracts appliance VI trajectories from high-frequency sampled data and converts them into pixelated images as CNN inputs. During the network training process, adaptive PSO is used to search for the optimal main hyperparameters of the CNN, and the proposed model is constructed based on the search results for load identification. CNN is a powerful tool for image processing [36], and the layer structure consists of the following components: data input layer (preprocessing of raw images), convolutional layer (the most important layer in the CNN that performs feature extraction), activation layer (nonlinear mapping of the output results), pooling layer (used to compress data and the number of parameters, reducing the occurrence of overfitting), and fully connected (FC) layer (acts as the “classifier”). Figure 3 shows the network structure diagram of a seven-layer CNN, consisting of one input layer (Input), two convolutional layers (Convolution), two pooling layers (Pool), and two FC layers. The number of neurons in the output layer is equal to the number of classes in the classification problem, and the configuration of each network layer differs in terms of important parameters such as stride, kernel size, and feature maps for the convolutional layer; stride, kernel size, and pool type for the pooling layer; and the number of neurons for the FC layer.

CNN structure.
In order for the CNN to have recognition capabilities, a large amount of training data is needed for learning. Let the training samples be X = (X1, X2, . . . , X
N
) with corresponding labels t = (t1, t2, . . . , t
N
), where X
i
is the pixelated VI trajectory image of each device, and t
i
is the one-of-K encoding of the corresponding label. The goal of the network training is to determine the weights and biases to minimize the cost function, which uses the cross-entropy function [37]:
Where the output y i is determined by all the weights and biases of the CNN. As the predicted outputs y i of N training samples approach the actual outputs t i , the value of L decreases.
Although the above-mentioned CNN provides a new approach for electric load image recognition, in CNN, the setting of training parameters depends entirely on the practical experience, which directly leads to different parameters, resulting in different load recognition accuracy. In this paper, starting from two directions, the convolution kernel and the number of layers in the CNN, the adaptive PSO algorithm is used to search for the optimal parameters that are suitable for the current load recognition model in the process of constructing a CNN-based electric load classification model.
To solve optimization problems in practical engineering, intelligent algorithms have emerged. PSO algorithm is highly regarded in the academic community due to its advantages of simplicity, fast convergence, and few parameters to set [38]. Inspired by the foraging behavior of birds or fish, the PSO algorithm regards the parameters to be optimized as “particles”, and iteratively searches for the optimal solution in the solution space. During the search process, the particles cooperate and share information with each other to eventually obtain the optimal parameters of the load recognition model. In a population, each individual is influenced by its own behavior as well as the behavior of other individuals in the population. Each randomly generated particle has a corresponding objective function value, also known as the fitness value. In each iteration, each individual updates itself based on two optimal values: the first is the best solution P best that the particle has found so far, also known as the individual extreme value; the other is the best solution that all particles have found so far, known as the global extreme value G best . Suppose the population size is S, the number of iterations is I, the dimension of the particle is D, the velocity of the particle is V, and the position of the particle is X. In the i-th iteration, the velocity and position of the d-th dimension of the s-th particle are updated as follows:
Where i ∈ [1, I], s ∈ [1, S], and d ∈ [1, D]. w is the inertia weight, c1 and c2 are the learning factors for the individual and the population, respectively. r and r2 are uniformly distributed random numbers in the interval [0,1], which can increase randomness and avoid getting trapped in local optimal solutions.
The construction process of the load recognition model is roughly divided into three parts: (1) forward propagation; (2) calculation of the loss function value; and (3) backward propagation. The recognition model continuously adjusts the values of weights and biases, and stops iterating and completes the construction of the model when the error is less than a certain set error value. The model construction process is shown in Fig. 4.

Construction of the load recognition model.
Forward propagation. Forward propagation is divided into three parts: convolutional layer forward propagation, pooling layer forward propagation, and FC layer forward propagation. Convolutional layer forward propagation refers to the convolutional processing of the input image using pre-set convolutional kernel sizes. The propagation calculation formula is as follows:
Where M is the total number of input nodes i, and w
ij
is the total number of convolutional kernels.
Pooling layer forward propagation. The pooling layer, also known as the downsampling layer, reduces the computational complexity of the extracted feature data from the convolutional layer using the max pooling algorithm or average pooling algorithm [39]. This effectively prevents overfitting:
Where
By calculating the loss function of the prediction model and using gradient descent, the weights W and bias b are continuously updated. The parameter update process can be described as:
Where α represents the learning rate, which indicates the degree of refinement with which the model searches for the optimal parameters W and b. grad represents the gradient descent function.
Backpropagation algorithm. When the error between the predicted value and the label value is greater than the set error, the error is propagated back layer by layer, and the error of each layer is calculated and used to update the weight parameters.
Dataset and Evaluation metrics
The model recognition performance was validated based on the publicly available PLAID 2017 [40] dataset. The PLAID dataset includes instantaneous current and voltage values of 17 different types of appliances sampled at 30 kHz in 65 households located in Pittsburgh, Pennsylvania, USA, with up to 1876 measurements taken separately for multiple devices, specifically designed for NILR task. Overall, the dataset contains 330 different devices (i.e., each device model is different for each of the 17 device types), with multiple operating modes detected for some devices. The PLAID dataset has three versions: 2013, 2014, and 2017, with the 2017 version containing both aggregated and disaggregated information. By extracting the disaggregated information from the aggregated data, load type recognition models can be used to accurately determine the load type, which is more conducive to verifying the effectiveness of the algorithm. Therefore, this paper uses device data from the 2017 version of the PLAID dataset. The devices in the dataset are divided into three types: resistive, inductive, and nonlinear, and thirteen electrical appliances, including compact fluorescent lamp, fridge, vacuum, Coffee maker, incandescent light bulb, water kettle, fan, air conditioner, hair iron, laptop and soldering iron, were selected based on the number of instances. The specific load information is shown in Table 1, where N represents non-linear load, R represents resistive load, I represents inductive loads. In addition, in the experiment, the aggregated data in the PLAID dataset was used to obtain steady-state current and voltage waveform data for three cycles after each load event, based on the current value at the zero-crossing point of the voltage. The corresponding active and reactive power were calculated as the averages of the three cycles.
Load information of the PLAID dataset
Load information of the PLAID dataset
Considering the unequal distribution of sample sizes for various electrical appliances in the PLAID dataset, it is easy to result in relatively poor recognition performance for certain devices. Therefore, the synthetic minority over-sampling technique (SMOTE) [41] was adopted to synthesize and expand the minority class samples, resulting in a total of 2,975 samples after expansion. Among them, 390 samples (30 samples per device type) were randomly selected as the test set, and the remaining 2,585 samples were used as the training set. The model’s generalization performance was validated using the leave-one-out cross-validation method. Accuracy (Acc) and F-1 measure were used as the evaluation criteria for the model.
Accuracy represents the proportion of the number of correctly classified samples to the total number of samples [42, 43]:
Where TP denotes the number of correctly classified positive samples. FP denotes the number of misclassified negative samples. FN denotes misclassified positive samples.
The hardware platform used in the experiment had a memory of 16 GB and a CPU of Intel Core i5-9400 with a frequency of 2.90 GHz. The adaptive PSO algorithm was used in combination with CNN to find the optimal convolutional kernels and network layers for recognizing VI pixelated images of electrical loads. For the PSO algorithm, increasing the number of iterations beyond convergence may not significantly improve its performance and may waste computational resources. In this study, we verified this by recording the fitness value after each iteration during the iteration process and observing the trend of the fitness value. It was found that when the number of iterations was 15, the fitness value tended to stabilize, indicating that the adaptive PSO algorithm had converged and found the optimal number of CNN network layers and convolution kernel size. Therefore, the maximum PSO iteration was set to 15 in this study. The basic parameter settings for constructing the model are shown in Table 2.
Basic parameter setting of the proposed method
Basic parameter setting of the proposed method
The recognition performance of the load identification model constructed based on the proposed method on the PLAID dataset is shown in Table 3. From the experimental results in Table 3, it can be seen that the recognition accuracy of the models established with different convolutional neural network parameters varies greatly. The initial recognition model parameters in this paper were set to a 5x5 convolution kernel and a four-layer network structure. The accuracy of using only the convolutional neural network to recognize electrical loads without using optimization algorithms was 86.01%. After optimization with the PSO algorithm, the recognition accuracy of the constructed model reached a maximum of 97.26%. As for the convolution kernels, the overall trend of the recognition accuracy decreases as the convolution kernel size increases, as it cannot extract more feature information. There are two reasons for this: 1) accuracy of feature extraction. The larger the convolution kernel, the more features it can extract, but not every feature may be useful for load recognition. Therefore, if the convolution kernel is too large, it may extract many irrelevant features, leading to a decrease in model performance. 2) overfitting. The larger the convolution kernel, the more parameters the model has, which can easily lead to overfitting of the training data, reducing the model’s generalization ability and resulting in decreased performance. Regarding the network layers, the recognition accuracy significantly improved with the increase of network layers. However, when the number of network layers reached five, the constructed recognition model showed varying degrees of overfitting, which led to a decrease in the accuracy of load recognition.
Recognition accuracy of the proposed method
Recognition accuracy of the proposed method
To test the stability of the adaptive PSO algorithm, 11 cross-validations were performed on the PLAID dataset, and the results are shown in Fig. 5. “Time” refers to the number of cross-validation times, where a certain proportion of samples are randomly selected from the dataset as the training set and test set each time through random sampling. Therefore, the training set and test set of the model obtained each time are different. The 11 randomly selected datasets were used to better evaluate the stability and generalization ability of the model. As can be seen from the figure, the fluctuations of the PSO-CNN model are relatively large in the public dataset, but its recognition accuracy is consistently higher than that of the CNN model, indicating that the proposed algorithm can better leverage information within the dataset to enhance model robustness and generalization capabilities.

Recognition accuracy comparison between CNN and the proposed method.
The model confusion matrix is shown in Fig. 6, where the number in each cell represents the number of devices and the horizontal axis represents the predicted electrical appliance, while the vertical axis represents the actual electrical appliance. From the figure, it can be seen that, compared with the CNN model, the proposed method in the PLAID dataset reduces the number of false negatives (FN) and false positives (FP) for each electrical appliance, as well as the number of devices of each electrical appliance being incorrectly classified. From the figure, it can be seen that the recognition accuracy of most devices has been significantly improved, indicating the effectiveness of the network and the improvement of the network model in effectively extracting the corresponding features. However, both models show that the recognition accuracy of the Water kettle device has not improved and is relatively low. This may be due to the similarity between the VI trajectories of the Kettle device and the Air conditioner device, as their transient state durations are not long and their discriminability is not significant, resulting in misidentification. In addition, both models’ recognition results for laptops were not ideal. This is because the load characteristics of laptops are very similar to water kettles under high-load operation, and similar to incandescent lamps under standby mode. The results indicate that, limited by the feature extraction performance of CNN, PSO parameter optimization cannot help our proposed model achieve optimal load recognition for laptops under these circumstances. In the future, we will continue to explore ways to improve the feature extraction performance of CNN to enhance the recognition accuracy of laptops under different circumstances.

Confusion matrix comparison.
The accuracy of load recognition is related to the inherent properties of the algorithm. Six common load classification algorithms were selected and compared with the proposed method, as shown in Fig. 7. KNN, NB, LR, SVM, DT, and RF respectively represent k-Nearest Neighbor, Naive Bayes, Logistic Regression, Support Vector Machine, Decision Tree, and Random Forest algorithms. KNN is an instance-based learning method, which determines the class of a sample based on the majority class of its K nearest neighbors in the feature space. However, this method only considers the nearest neighbors and ignores the overall distribution of samples, which may lead to poor performance when there is randomness in the nearest neighbor’s class. It works by comparing the input load data with known load data of appliances, finding the K most similar load data, and then assigning the input load data to the most frequent appliance class among the K load data. LR uses the Maximum Likelihood Estimation (MLE) method to train the model, which adjusts the model parameters to maximize the likelihood function of the input data. In load prediction, it learns a function based on known load data and their corresponding appliance labels, which maps the input load data to the probability of belonging to a certain appliance class. NB is a classification method based on Bayes’ theorem and the assumption of feature independence, which assumes that all features are independent of each other, but this assumption may not hold in practical applications. It works by calculating the prior probability and conditional probability based on sample data, then using the Bayes’ theorem to calculate the posterior probability, and finally assigning the input data to the appliance class with the highest probability. SVM is a linear classifier in the feature space with the maximum margin, which can also be used as a nonlinear classifier by using kernel functions. The learning strategy of SVM is based on maximizing the margin, which can be formulated as a convex quadratic programming problem. SVM works by mapping the input data to a high-dimensional space, then finding the optimal hyperplane that maximizes the distance between different class data points on the hyperplane. Finally, the input data is assigned to the appliance class adjacent to the hyperplane. DT is a basic classification and regression method that can visualize decision-making and possible outcomes, including event outcomes, resource costs, and utilities. In the tree structure, each internal node represents a decision based on an attribute, each branch represents the output of a decision result, and each leaf node represents a classification result. In load recognition, DT constructs a decision tree based on the feature values of the input data, starts from the root node, and traverses down along the branch path until reaching a leaf node, and then assigns the input data to the appliance class represented by the leaf node. RF is an ensemble learning method that improves prediction accuracy and prevents overfitting by constructing multiple decision trees and averaging their results. In load prediction, RF constructs multiple decision trees by randomly sampling and selecting features, and combines these decision trees by voting to assign the input data to the appliance class with the most votes. It can be seen that the proposed algorithm has the highest recognition accuracy, followed by the LR and KNN algorithms. The accuracy of DT, NB, and RF algorithms is relatively low. The SVM algorithm has the lowest recognition accuracy among all the classification algorithms, with an accuracy of less than 40%. The recognition accuracy comparison of the above seven algorithms verifies the effectiveness of the proposed method in load classification.

Recognition performance comparison of different algorithms.
To verify the effectiveness of the proposed method, comparisons were made with load recognition algorithms in [22, 31], and [32], and the recognition accuracy of each algorithm is shown in Table 4. It can be found from the results in the table that the proposed method has higher recognition accuracy and F1 score than other models. In the experiment, except for the proposed method, other methods have relatively low recognition accuracy for air conditioner, fan, and refrigerator devices. The reason is that these three types of devices can switch between multiple working modes, which makes their electrical characteristics complex and thus increases the difficulty of load recognition. Considering that the method in [22] only relies on harmonic characteristics for classification and does not use other features to assist recognition, its recognition accuracy is the worst. Different from using a single feature for recognition, the load recognition schemes in [30, 31], and [33] all used multi-feature fusion, which improved the recognition accuracy of the algorithm. Compared with these DL-based methods, the proposed method improves feature extraction and model training from two aspects, using pixelated images of VI trajectories with continuous values and adaptive PSO optimized CNN to achieve the extraction and fusion of multidimensional and advanced features, significantly enhancing the algorithm’s identification capabilities. Therefore, the proposed method has better load recognition performance than the other four methods.
Recognition performance of different methods
This paper introduces the application of deep learning to the field of electrical load recognition, proposing a novel method that combines adaptive PSO and CNN to fully consider the complex correlation between different device load features. The main conclusions drawn from this study are as follows: Firstly, the PSO-CNN recognition framework constructed in this paper achieves an recognition accuracy of 97.26%, effectively improves the accuracy of load recognition compared to other comparison methods. Secondly, compared with CNN networks that rely on complicated hyperparameters settings, the accuracy of CNN networks optimized by the adaptive PSO algorithm is significantly improved, effectively avoiding the adverse effects of manually selected parameters. In future work, the use of time and power of electrical appliances will be considered to assist in judgment, further improving the recognition effect of electrical equipment with limited sample data.
Data availability
The data used to support the findings of this study are included within the article.
Conflicts of interest
The author declares that there is no conflict of interest regarding the publication of this paper.
Funding statement
There is no external funding
