An appliance recognition method based on a channel attention mechanism residual convolutional network
By constructing three types of appliance features and designing a channel attention mechanism residual convolutional network, the problems of lack of typical features and insufficient information mining in existing appliance recognition methods are solved, and efficient recognition of multiple appliances is achieved.
Patent Information
- Application Number
- CN202211532995.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-01
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2042-12-01
AI Technical Summary
Existing methods for identifying electrical appliances suffer from problems such as a lack of typicality in feature construction and insufficient feature information mining, resulting in low identification accuracy.
Three types of electrical appliance features are constructed: weighted VI trajectory map, Markov transfer field map, and current amplitude-frequency sequence encoding map. A channel attention mechanism residual convolutional network is designed, which includes an energy scaling module and a squeeze excitation module. The feature information mining capability is improved through iterative training.
It improves the accuracy of appliance recognition, especially for appliances such as vacuum cleaners, hair dryers, microwave ovens, irons, electric kettles, electric fans, and rice cookers, with recognition accuracy reaching 91.67% to 100%.
Smart Images

Figure CN115795308B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of appliance recognition, and particularly relates to an appliance recognition method based on a channel attention mechanism residual convolutional network. BACKGROUND
[0002] With the development of the times, the world is facing huge energy challenges, so a large number of researches are devoted to improving the energy supply system, aiming to optimize the use of energy. Studies have shown that obtaining detailed information on the energy use side can help the supply side optimize the scheduling scheme, thereby saving energy.
[0003] The rise of non-intrusive load monitoring technology provides an opportunity for low-cost monitoring of the energy use side, and appliance recognition is an important topic, but the existing recognition methods either lack typicality in constructing features or the recognition model does not fully mine the constructed feature information. SUMMARY
[0004] The application aims to overcome the shortcomings of the prior art and provides an appliance recognition method based on a channel attention mechanism residual convolutional network.
[0005] The application provides new design ideas from the load characteristics and the recognition model. On the one hand, based on the voltage and current data of a single appliance, three types of appliance features are constructed, including a weighted V-I trajectory graph reflecting the joint characteristics of voltage and current, a Markov transition field graph embodying the time jump characteristics of the V-I trajectory, and a current amplitude frequency sequence encoding graph embodying the energy distribution characteristics of the appliance in the frequency domain. On the other hand, in order to fully mine the information of the constructed features, a residual convolutional network with a channel attention mechanism is designed. The built-in energy scaling module and squeezing excitation module of the network fully capture the information of the constructed features to increase the recognition performance of the basic model.
[0006] An appliance recognition method based on a channel attention mechanism residual convolutional network specifically includes the following steps:
[0007] Step one, obtain the current and voltage information sample set of a single appliance through an event detection algorithm, and divide it into a training set and a test set.
[0008] Step two, based on the current and voltage information of the training set, construct three types of appliance features for each type of appliance.
[0009] Step three, construct a channel attention mechanism residual convolutional network with multiple built-in modules.
[0010] Step four, input the three types of appliance features into the channel attention mechanism residual convolutional network, and iteratively train the channel attention mechanism residual convolutional network multiple times until the network reaches the pre-set accuracy, and save the network.
[0011] Step five, the three kinds of appliance features constructed by the test set are input into the saved network to perform appliance recognition, and the appliance recognition task is completed.
[0012] Preferably, the plurality of appliance features are weighted V-I trajectory graph, Markov transition field graph and current amplitude frequency sequence encoding graph, and the specific process is as follows:
[0013] (1) The V-I trajectory of the current and voltage is mapped in a single grid with a size of w x w.
[0014] (2) The weight g of the number of V-I trajectory sampling points in the shadow cell in the rth row and the cth column accounts for the total sampling points. r,c .
[0015] (3) The proportion of the number of V-I trajectory sampling points in each cell is counted to obtain the weighted V-I trajectory graph WVI.
[0016] (4) The current and voltage are mapped in a single grid with a size of v x v.
[0017] (5) The transition probability p of the V-I trajectory sampling points from the jth sub-cell S j to the kth sub-cell S k is calculated. j,k .
[0018] (6) The transition probability between each two sub-cells is counted to obtain the Markov transition field graph MTF.
[0019] (7) The fast Fourier transform is performed on the current to obtain the current amplitude frequency sequence X.
[0020] (8) The improved angle coding transform is performed on the current amplitude frequency sequence X to obtain the current amplitude frequency sequence encoding graph I-GAF.
[0021] Preferably, the plurality of modules are energy expansion and contraction modules and extrusion excitation modules.
[0022] Preferably, in the process of iterative training of the channel attention mechanism residual convolutional network, a regularization term is added to the loss function to prevent network overfitting.
[0023] The beneficial effects of the present application are: the present application constructs three types of appliance features from the time domain and frequency domain of appliance electrical signals according to different characteristics to solve the problem that the appliance features constructed by most recognition methods lack typicality. A channel attention mechanism residual convolutional network suitable for recognition is proposed for the constructed appliance features to mine feature information and improve the appliance recognition accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 is the appliance feature extraction principle diagram (1) of the present application;
[0025] Figure 2 is the electrical appliance feature extraction schematic diagram (2) of the present application;
[0026] Figure 3 is the channel attention mechanism residual convolutional network structure diagram of the present application;
[0027] Figure 4 is the energy scaling module structure diagram of the present application;
[0028] Figure 5 is the extrusion excitation module structure diagram of the present application. DETAILED DESCRIPTION
[0029] The electrical appliance recognition method based on the channel attention mechanism residual convolutional network of the present application specifically comprises the following steps:
[0030] Step 1: Obtain a single electrical appliance information sample set, including high-frequency steady-state current, high-frequency steady-state voltage and its own electrical appliance label, and divide it into a training set and a test set.
[0031] Step 2: Construct electrical appliance features according to the high-frequency steady-state current and high-frequency steady-state voltage of the training set electrical appliance, including weighted V-I trajectory diagram, Markov transition field diagram and current amplitude frequency sequence coding Figure three Figure 1 Figure 2 Take a compact fluorescent lamp as an example, and the specific electrical appliance feature construction steps are as follows:
[0032] Step 1: Refer to Figure 1 , wherein Figure 1 the curve in is the V-I trajectory curve of the compact fluorescent lamp, and the V-I trajectory of the current and voltage is mapped in a single cell grid with a size of w x w, Figure 1 the shaded cell in is one of the sub-cells, and the present application takes the calculation of the weight at the shaded cell as an example to further illustrate the construction process of the weighted V-I trajectory diagram.
[0033] Step 2: Calculate the weight g of the number of V-I trajectory sampling points in the shaded sub-cell in the rth row and cth column accounting for the total sampling points r,c , the calculation formula is as formula (1), wherein z r,c is the number of V-I trajectory sampling points in the rth row and cth column of the shaded sub-cell, and u is the total number of V-I trajectory sampling points:
[0034] g r,c = z r,c / u (1)
[0035] Step 3: Calculate the proportion of the number of V-I trajectory sampling points in each cell, and obtain the weighted V-I trajectory diagram WVI:
[0036]
[0037] Step4: Refer to Figure 2 Map the current and voltage in a cell grid with size v x v.
[0038] Step5: Calculate the transition probability p j from the jth sub-cell S k to the kth sub-cell S j,k , the calculation formula is shown in (3) and (4):
[0039]
[0040]
[0041] where q t is the V-I trajectory curve sampling point at time t, and Δt is the time interval.
[0042] Step6: Calculate the transition probability between two sub-cells to obtain the Markov transition field map MTF, refer to formula (5), where n=v 2 :
[0043]
[0044] Step7: Perform fast Fourier transform on the high-frequency current I to obtain the current amplitude-frequency sequence X, the transformation process is shown in formula (6), where the symbol f(·) is the fast Fourier transform, and x i is the amplitude of the ith harmonic:
[0045] X = f(I) = (x1...x i ...x m ) (6)
[0046] Step8: Perform improved angle coding transformation on the current amplitude-frequency sequence X to obtain the current amplitude-frequency sequence coding map I-GAF, the coding process is shown in formula (7), where M is a 1 x m vector, and all elements inside are the maximum element x * in X:
[0047]
[0048] Let The final coding feature can be represented as formula (8):
[0049]
[0050] Step three, inputting three kinds of electrical appliance features into the channel attention mechanism residual convolutional network for iterative training, in the embodiment, the channel attention mechanism residual convolutional network structure is as shown in Figure 3 The channel attention mechanism residual convolutional network comprises an energy scaling module, a squeezing excitation module and a residual convolutional network, the energy scaling module is inputted with the current amplitude-frequency sequence coding graph, and the weighted V-I trajectory graph and the Markov transition field graph are respectively inputted into the squeezing excitation module, and finally inputted into the residual convolutional network.
[0051] In the embodiment, the energy scaling module structure is as shown in Figure 4 , which comprises a convolutional layer, a max-pooling layer and a deconvolutional layer adopting a “Sigmoid” activation function; the squeezing excitation module structure is as shown in Figure 5 , which is composed of a global average pooling layer and two fully connected layers; the residual convolutional network is specifically a group of convolutional layers combined with a max-pooling layer, a group of deconvolutional layers combined with a max-pooling layer, a fully connected layer with a “Relu” activation function and a fully connected layer with a “Sigmoid” activation function. The loss function definition formula of the model is as shown in formula (9):
[0052]
[0053]
[0054] L = λ∑||θ|| 2 (11)
[0055] Wherein, M is the total number of samples, N is the number of sample categories, a kd is the probability that the predicted sample k belongs to the category d, L is the regularization term, λ is a constant factor for adjusting the two regularization terms, θ is the weight of each layer of the model, which represents that the excessive weight value should be properly reduced to prevent the overfitting problem of the network.
[0056] Step four, inputting three kinds of electrical appliance features into the channel attention mechanism residual convolutional network, and iteratively training the channel attention mechanism residual convolutional network until the network reaches the pre-set accuracy, and saving the network.
[0057] Step five, extracting the test set to input the saved network to construct three kinds of electrical appliance features for electrical appliance recognition, and completing the electrical appliance recognition task. In the case, seven kinds of electrical appliances including a vacuum cleaner, an electric hair dryer, a microwave oven, an iron, an electric kettle, an electric fan and an electric rice cooker are used as the recognized electrical appliances, and the recognition results obtained by using the method are shown in the following table. The results show that the method has good recognition effect for each kind of electrical appliance.
[0058] Electrical appliance recognition performance table
[0059] Electric appliance Vacuum cleaner Hairdryer Microwave oven Iron Electric kettle Electric fan Electric rice cooker Accuracy rate 100% 97.64% 96.91% 96.15% 91.67% 94.95% 100%
Claims
1. An appliance recognition method based on a channel attention mechanism residual convolutional network, characterized in that Specifically comprising the following steps: Step one, obtaining the current and voltage information sample set of single appliance through the event detection algorithm, and dividing into training set and test set; Step two, based on the current and voltage information of the training set, three kinds of appliance characteristics of each type of appliance are constructed; The three kinds of appliance characteristics are weighted V-I trajectory graph, Markov transition field graph and current amplitude frequency sequence coding graph, and the specific process is as follows: (1) mapping the V-I trajectory of current and voltage in a cell grid of size ; (2) Calculate the weight of the number of V-I trajectory sampling points in the shadow sub-cell in the rth row and the cth column accounting for the total sampling points ; (3) Calculate the proportion of the number of V-I trajectory sampling points in each cell to obtain the weighted V-I trajectory graph; (4) mapping the current and voltage in a cell grid of size ; (5) Calculate the transition probability of V-I trajectory sampling point from the jth sub-cell to the kth sub-cell at time t ; (6) Calculate the transition probability between two sub-cells to obtain the Markov transition field graph; (7) Perform fast Fourier transform on the current to obtain the current amplitude frequency sequence X; (8) Perform improved angle coding transformation on the current amplitude frequency sequence X to obtain the current amplitude frequency sequence coding graph; Step three, constructing a channel attention mechanism residual convolutional network with multiple modules; Step four, inputting the three kinds of appliance characteristics into the channel attention mechanism residual convolutional network, and iteratively training the channel attention mechanism residual convolutional network multiple times until the network reaches the pre-set accuracy, and saving the network; Step five, inputting the three kinds of appliance characteristics constructed from the test set into the saved network to perform appliance recognition, and completing the appliance recognition task; The multiple modules in step three are energy scaling module and squeezing excitation module; The energy scaling module includes convolutional layer, max pooling layer and deconvolutional layer with Sigmoid activation function; The squeezing excitation module is composed of global average pooling layer and two fully connected layers; The channel attention mechanism residual convolutional network first inputs the current amplitude frequency sequence coding graph into the energy scaling module, then inputs the weighted V-I trajectory graph and Markov transition field graph into the squeezing excitation module respectively, and finally inputs into the residual convolutional network.
2. The method of claim 1, wherein the method comprises: During the iterative training process of the channel attention mechanism residual convolutional network, the loss function increases the regularization term, and the loss function is defined as follows: where, is the total number of samples, is the number of sample classes, is the predicted sample belongs to class probability, is the regularization term, is a constant factor to adjust the regularization term, is the weight of each layer of the model, which represents that the excessive weight value is properly reduced to prevent the overfitting problem of the network.