A non-intrusive load identification method, system, electronic device and storage medium

By calculating the Gram matrix, amplitude spectrum, and phase spectrum of the load current waveform, assigning them to the pixel matrices of the B, G, and R channels, and synthesizing a color image, and using the ResNet18 residual network for load identification, the problem of decreased accuracy and efficiency caused by feature loss in the existing technology is solved, and higher load identification accuracy and efficiency are achieved.

CN115980421BActive Publication Date: 2026-05-19WENZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WENZHOU UNIV
Filing Date
2022-12-19
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing non-invasive load identification methods lose the power, amplitude, and phase characteristics of the original data during the process of visualizing electrical signals, resulting in a decrease in the accuracy and efficiency of load identification.

Method used

By calculating the Gram matrix of the load current waveform, the Gram matrix of the amplitude spectrum, and the Gram matrix of the phase spectrum, respectively, and assigning them to the pixel matrices of the B, G, and R channels, a color image is synthesized, and the load is identified using the ResNet18 residual network.

Benefits of technology

It improves the accuracy and efficiency of load identification, avoids confusion caused by feature loss, enhances the ability to identify loads with similar current waveforms, and improves the reliability and construction efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115980421B_ABST
    Figure CN115980421B_ABST
Patent Text Reader

Abstract

The application discloses a non-intrusive load identification method and system, electronic equipment and storage medium, and relates to the technical field of non-intrusive load identification. The method comprises the following steps: calculating the amplitude spectrum and the phase spectrum of a to-be-identified load current waveform by using fast Fourier transform; calculating the Gram matrix of the to-be-identified load current waveform, the Gram matrix of the amplitude spectrum and the Gram matrix of the phase spectrum respectively; assigning the Gram matrix of the to-be-identified load current waveform, the Gram matrix of the amplitude spectrum and the Gram matrix of the phase spectrum to a B-channel pixel matrix, a G-channel pixel matrix and an R-channel pixel matrix respectively; combining the B-channel pixel matrix, the G-channel pixel matrix and the R-channel pixel matrix into a to-be-identified color image; inputting the to-be-identified color image into a load identification model, and identifying the load type corresponding to the to-be-identified color image by using the load identification model. The application can improve the accuracy and efficiency of non-intrusive load identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of non-invasive load identification technology, and in particular to a non-invasive load identification method, system, electronic device and storage medium. Background Technology

[0002] Global climate change and the rapid depletion of fossil fuels have made energy conservation a crucial goal in household energy management. Non-intrusive load monitoring (NIMBY) technology acquires bus load information from a single measurement point and uses algorithms to analyze information from individual electrical devices and user electricity consumption patterns, making it a vital component of household energy management. NIMBY has four main components: event detection, data processing, load decomposition, and load identification. Load identification, as the core task of NIMBY, requires algorithms to accurately identify load categories based on features extracted from electrical signals or manually input. The rapid development of deep learning in recent years has provided new directions for load identification research. Visualizing sequential data and then using image recognition methods from deep learning to achieve load identification is one of the mainstream methods currently used. However, existing sequential data visualization methods can lead to the loss of some features during processing, such as the loss of amplitude features due to numerical normalization and the loss of phase features due to defects in pixel matrix calculation methods. The loss of key features can lead to a decrease in the ability to identify loads with similar power and current waveforms, which in turn can reduce the accuracy of load identification models and the reliability of non-intrusive load monitoring systems.

[0003] A common approach to load identification using convolutional neural networks involves converting time-series electrical signals into numerical matrices using electrical signal visualization techniques. The elements of these matrices are then used as pixel values ​​to create an image, which is fed into the convolutional neural network for training. This approach uses computer vision principles to solve the load identification problem. The current mainstream electrical signal visualization methods are summarized below:

[0004] (I) VI Trajectory

[0005] The VI trajectory is plotted using normalized voltage and current values, representing the correlation between load voltage and current. The process for obtaining the VI trajectory is as follows: Figure 1 As shown.

[0006] The specific calculation method is as follows:

[0007] (1) Extract voltage and active current data for a complete cycle after the load has stabilized, and normalize the extracted data. The calculation formulas are shown in formula (1) and formula (2).

[0008]

[0009]

[0010] In the formula i min and i max These are the minimum and maximum values ​​of the current over one cycle, respectively; v min and v max These are the minimum and maximum values ​​of the voltage over one cycle, respectively.

[0011] (2) Select the resolution of the VI trajectory plot as n×n, multiply the normalized current and voltage data by n and round down to obtain two sets of integers less than n, denoted as i. mf and v mf .

[0012] (3) Create an n×n empty matrix, and place the i-th... mf row and v mf Assign a value of 1 to the column position and a value of 0 to the other positions. Repeat this process to obtain the VI trajectory diagram for this load.

[0013] China Jiliang University has proposed an invention patent, "A Non-Intrusive Load Identification Method Based on VI Trajectory," which uses VI trajectory to visualize load voltage and current, and obtains the closed area, symmetry, slope of the middle part, area of ​​the middle part, and number of self-intersections of the VI trajectory for load identification. Different load VI trajectories can reflect the differences between loads in terms of shape, but the load power characteristics are lost due to numerical normalization.

[0014] (II) Recursion Graph

[0015] Recursive graphs are essentially a time-to-time signal processing method. The idea is to map the trajectory of a high-dimensional motion state onto a two-dimensional plane, thereby intuitively observing the recursive characteristics within a time series. The process of obtaining a recursive graph is as follows: Figure 2 As shown.

[0016] The specific calculation method is as follows:

[0017] (1) According to the embedding theory, the phase space of the time series is reconstructed by selecting an appropriate delay time τ and embedding dimension m. The reconstructed vector is shown in formula (3).

[0018] x i =(x i x i+τ , ..., x i+(m-1)τ ), i = 1, 2, ... N (3)

[0019] In the formula, N = n - (m - 1)τ.

[0020] Define the distance between any two points after reconstruction as:

[0021] Dij =||X i -X j ||,i-1,2,…,N (4)

[0022] By selecting an appropriate threshold ε, the recursion matrix can be obtained as shown in formula (5).

[0023] R ij =θ(ε-D ij (5)

[0024] In the formula, θ(·) represents the Heaviside function, and its function expression is shown in formula (6).

[0025]

[0026] The appropriateness of the threshold ε determines whether the recursive graph will lose information. If the threshold is too large, the similarity between phase spaces will increase significantly; if the threshold is too small, it will be difficult to detect the similarity between states in phase spaces. Both situations will lead to an increased probability of misjudgment.

[0027] (III) Corner Gram

[0028] Gram angle fields represent time series in polar coordinates and calculate the Gram matrix to transform the data dimension. The process of a Gram angle field is as follows: Figure 3 As shown.

[0029] The specific calculation method is as follows:

[0030] (1) Scale the time series in Cartesian coordinates to [-1,1] or [0,1]:

[0031]

[0032]

[0033] (2) Encoding the time series using polar coordinates:

[0034]

[0035] In the formula, X is the original time series, x i For the i-th element of the original time series, Let t be the i-th element of the normalized time series, φ be the angle in polar coordinates, and t be the element of the normalized time series. i Here, N is the timestamp, N is a constant used to adjust the span of the polar coordinate system, and r is the radius of the polar coordinate system.

[0036] (3) Calculate the Gram angle difference field or the Gram angle sum field:

[0037]

[0038]

[0039] In the formula, I is the unit row vector. for The transpose of .

[0040] (4) Remap the elements in the Gram matrix to the pixel range [0, 255] and assign them to the pixel matrices of the R, G, and B channels:

[0041]

[0042] In the formula, G represents the sum of the Gram angles or the difference of the Gram angles, and R represents the sum of the Gram angles or the difference of the Gram angles. (i,j) G (i,j) B (i,j) These represent the values ​​of the red, green, and blue channels of the image at pixel (i, j).

[0043] Shanghai University of Electric Power has proposed an invention patent, "Method, Device and Computer-Readable Medium for Identifying Power User Loads," which uses Gram angle field to convert the reactive part of the current sequence into a two-dimensional image and uses Inception_v3 transfer learning to achieve load identification. Gram angle field can reflect the correlation between time points in the sequence data, but the normalization calculations of formulas (7) and (8) make it impossible to reflect the amplitude differences between different loads in the final image. In addition, the calculation of the Gram matrix using formulas (10) and (11) actually refines the implicit current difference information between every two sampling points in the sequence through trigonometric functions to mine the temporal features of the original data. Therefore, the phase features of the original data cannot be reflected in the final image. The lack of key features such as amplitude and phase features is the key reason that limits the accurate identification of loads.

[0044] In summary, existing methods for visualizing electrical signals have the following problems:

[0045] 1. VI trajectories lose the power characteristics of the original data, making them unsuitable for identifying loads with similar VI trajectory shapes but different power levels. Furthermore, image graininess and color loss are unavoidable problems with VI trajectories; Gram angle fields, on the other hand, cause the loss of amplitude and phase characteristics of the original data, leading to a decrease in recognition rate.

[0046] 2. Although a large number of experiments can be conducted to select the optimal threshold when constructing a recursion graph, this will significantly increase the time cost, and the threshold must be reselected for each new load recognition task.

[0047] The above issues can lead to a decrease in the recognition performance of the load identification model and the efficiency of model construction, thereby reducing the accuracy and efficiency of non-intrusive load identification. Summary of the Invention

[0048] The purpose of this invention is to provide a non-invasive load identification method, system, electronic device, and storage medium to improve the accuracy and efficiency of non-invasive load identification.

[0049] To achieve the above objectives, the present invention provides the following solution:

[0050] A non-invasive load identification method, the method comprising:

[0051] Obtain the waveform of the load current to be identified;

[0052] The amplitude spectrum and phase spectrum of the load current waveform to be identified are calculated using Fast Fourier Transform.

[0053] Calculate the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified, respectively.

[0054] The Gram matrix of the load current waveform to be identified is assigned to the B channel pixel matrix, the Gram matrix of the amplitude spectrum of the load current waveform to be identified is assigned to the G channel pixel matrix, and the Gram matrix of the phase spectrum of the load current waveform to be identified is assigned to the R channel pixel matrix.

[0055] The B-channel pixel matrix, the G-channel pixel matrix, and the R-channel pixel matrix are combined into a single color image to be identified.

[0056] The color image to be identified is input into the load identification model, and the load identification model is used to identify the load type corresponding to the color image to be identified; the load identification model is trained using a set of color images corresponding to different load types; the set of color images includes multiple color images.

[0057] Optionally, each color image in the color image set is obtained by synthesizing a B-channel pixel matrix assigned by the Gram matrix of the load current waveform, a G-channel pixel matrix assigned by the Gram matrix of the amplitude spectrum of the load current waveform, and an R-channel pixel matrix assigned by the Gram matrix of the phase spectrum of the load current waveform.

[0058] Optionally, the step of acquiring the load current waveform to be identified further includes:

[0059] The arithmetic mean filter is applied to the waveform of the load current to be identified to obtain the time series of the current to be identified.

[0060] Optionally, the step of calculating the amplitude spectrum and phase spectrum of the load current waveform to be identified using Fast Fourier Transform specifically includes:

[0061] A fast Fourier transform is performed on the time series of the current to be identified to obtain the amplitude spectrum and the phase spectrum of the load current waveform to be identified.

[0062] Optionally, the calculation of the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified specifically includes:

[0063] The segmented aggregation approximation is used to compress the amplitude spectrum and phase spectrum of the current time series to be identified, the load current waveform to be identified, and the load current waveform to be identified, to obtain the aggregated original data, the aggregated amplitude spectrum, and the aggregated phase spectrum.

[0064] The aggregated original data, the aggregated amplitude spectrum, and the aggregated phase spectrum are normalized and polar coordinate encoded to obtain the normalized original data, the normalized amplitude spectrum, the normalized phase spectrum, the polar coordinate angle corresponding to each element in the original data, the polar coordinate angle corresponding to each element in the amplitude spectrum, and the polar coordinate angle corresponding to each element in the phase spectrum.

[0065] Based on the normalized original data, the normalized amplitude spectrum, the normalized phase spectrum, the polar coordinate angle corresponding to each element in the original data, the polar coordinate angle corresponding to each element in the amplitude spectrum, and the polar coordinate angle corresponding to each element in the phase spectrum, the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified are calculated using the Gram matrix calculation method.

[0066] Optionally, assigning the Gram matrix of the load current waveform to be identified to the B-channel pixel matrix, assigning the Gram matrix of the amplitude spectrum of the load current waveform to the G-channel pixel matrix, and assigning the Gram matrix of the phase spectrum of the load current waveform to the R-channel pixel matrix specifically includes:

[0067] The elements in the Gram matrix of the load current waveform to be identified are remapped to [0,255] and assigned to the B channel pixel matrix;

[0068] The elements in the Gram matrix of the amplitude spectrum of the load current waveform to be identified are remapped to [0,255] and assigned to the G channel pixel matrix;

[0069] The elements in the Gram matrix of the phase spectrum of the load current waveform to be identified are remapped to [0,255] and assigned to the R channel pixel matrix.

[0070] Optionally, the load identification model is a ResNet18 residual network;

[0071] The ResNet18 residual network is trained using color image sets corresponding to different load types. During training, the ResNet18 residual network is trained by taking each color image in the color image set corresponding to different load types as input and taking the load type corresponding to the color image as output.

[0072] The present invention also provides the following solutions:

[0073] A non-invasive load identification system, the system comprising:

[0074] The load current waveform acquisition module is used to acquire the load current waveform to be identified.

[0075] The amplitude spectrum and phase spectrum calculation module is used to calculate the amplitude spectrum and phase spectrum of the load current waveform to be identified using fast Fourier transform.

[0076] The Gram matrix calculation module is used to calculate the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified, respectively.

[0077] The Gram matrix assignment module is used to assign the Gram matrix of the load current waveform to be identified to the B channel pixel matrix, assign the Gram matrix of the amplitude spectrum of the load current waveform to be identified to the G channel pixel matrix, and assign the Gram matrix of the phase spectrum of the load current waveform to the R channel pixel matrix.

[0078] A color image synthesis module is used to synthesize the B-channel pixel matrix, the G-channel pixel matrix, and the R-channel pixel matrix into a single color image to be identified.

[0079] The load type identification module is used to input the color image to be identified into the load identification model, and use the load identification model to identify the load type corresponding to the color image to be identified; the load identification model is trained using a set of color images corresponding to different load types; the set of color images includes multiple color images.

[0080] The present invention also provides the following solutions:

[0081] An electronic device includes a memory and a processor, the memory storing a computer program and the processor running the computer program to cause the electronic device to perform the non-intrusive load identification method.

[0082] The present invention also provides the following solutions:

[0083] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the non-intrusive load identification method.

[0084] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0085] This invention discloses a non-invasive load identification method, system, electronic device, and storage medium. It replaces the originally equal pixel matrices of the B, G, and R channels in a traditional Gram angle field with Gram matrices representing the load current waveform to be identified, the amplitude spectrum of the load current waveform to be identified, and the phase spectrum of the load current waveform to be identified, respectively. Compared to the traditional Gram angle field, it adds the amplitude and phase features of the load during the image processing, improving the identification accuracy of similar loads with different current waveforms. From the perspective of feature fusion, it solves the problem of decreased load identification accuracy caused by feature loss in the Gram angle field, thus improving the accuracy of non-invasive load identification. It utilizes… The color image obtained by synthesizing the B-channel pixel matrix assigned by the Gram matrix of the load current waveform, the G-channel pixel matrix assigned by the Gram matrix of the amplitude spectrum of the load current waveform, and the R-channel pixel matrix assigned by the Gram matrix of the phase spectrum of the load current waveform to train the load recognition model can effectively avoid the confusion phenomenon when the model distinguishes loads with similar current waveforms, and improve the accuracy and reliability of non-invasive load recognition. In addition, since the construction of a recursive graph is avoided, there is no need to conduct a large number of experiments to select the optimal threshold, and there is no need to reselect the threshold for each new load recognition task, thus improving the efficiency of model construction and thus improving the efficiency of non-invasive load recognition. Attached Figure Description

[0086] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0087] Figure 1 Flowchart for obtaining VI trajectory;

[0088] Figure 2 Obtain the flowchart from the recursive graph;

[0089] Figure 3 Here is a flowchart of the Grampian Stadium process.

[0090] Figure 4 This is a flowchart of an embodiment of the non-invasive load identification method of the present invention;

[0091] Figure 5 This is a flowchart illustrating the training process of the improved Gram angle field and load identification model for this invention.

[0092] Figure 6 This is a schematic diagram of the workflow of the present invention;

[0093] Figure 7 A schematic diagram of the confusion matrix obtained from the identification experiment of eleven individual electrical appliances;

[0094] Figure 8 The diagram shows the current waveforms of load 3 and load 9 in the experiment of identifying eleven individual electrical appliances.

[0095] Figure 9 A schematic diagram of the confusion matrix obtained from eight single / combined mixed category recognition experiments;

[0096] Figure 10 A schematic diagram of the current waveforms of load 3 and load 6 in an experiment identifying eight single / combined categories. Detailed Implementation

[0097] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0098] The purpose of this invention is to provide a non-invasive load identification method, system, electronic device, and storage medium to improve the accuracy and efficiency of non-invasive load identification.

[0099] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0100] Example 1

[0101] Figure 4 This is a flowchart of an embodiment of the non-invasive load identification method of the present invention. Figure 4 As shown, this embodiment provides a non-invasive load identification method, including the following steps:

[0102] Step 101: Obtain the waveform of the load current to be identified.

[0103] This step 101 is followed by:

[0104] The arithmetic mean filter is applied to the waveform of the load current to be identified to obtain the time series of the current to be identified.

[0105] Step 102: Calculate the amplitude spectrum and phase spectrum of the load current waveform to be identified using Fast Fourier Transform.

[0106] Step 102 specifically includes:

[0107] Perform a Fast Fourier Transform on the time series of the current to be identified to obtain the amplitude spectrum and phase spectrum of the load current waveform to be identified.

[0108] Step 103: Calculate the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified, respectively.

[0109] Step 103 specifically includes:

[0110] The segmented aggregation approximation is used to compress the amplitude spectrum and phase spectrum of the current time series to be identified, the load current waveform to be identified, and the load current waveform to be identified, to obtain the aggregated original data, the aggregated amplitude spectrum, and the aggregated phase spectrum.

[0111] The aggregated original data, aggregated amplitude spectrum, and aggregated phase spectrum are normalized and polar coordinate encoded to obtain the normalized original data, normalized amplitude spectrum, normalized phase spectrum, polar coordinate angle corresponding to each element in the original data, polar coordinate angle corresponding to each element in the amplitude spectrum, and polar coordinate angle corresponding to each element in the phase spectrum.

[0112] Based on the normalized raw data, the normalized amplitude spectrum, the normalized phase spectrum, the polar coordinate angle corresponding to each element in the raw data, the polar coordinate angle corresponding to each element in the amplitude spectrum, and the polar coordinate angle corresponding to each element in the phase spectrum, the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified are calculated using the Gram matrix calculation method.

[0113] Step 104: Assign the Gram matrix of the load current waveform to be identified to the B channel pixel matrix, assign the Gram matrix of the amplitude spectrum of the load current waveform to the G channel pixel matrix, and assign the Gram matrix of the phase spectrum of the load current waveform to the R channel pixel matrix.

[0114] Step 104 specifically includes:

[0115] The elements in the Gram matrix of the load current waveform to be identified are remapped to [0,255] and assigned to the B channel pixel matrix.

[0116] The elements in the Gram matrix of the amplitude spectrum of the load current waveform to be identified are remapped to [0,255] and assigned to the pixel matrix of the G channel.

[0117] The elements in the Gram matrix of the phase spectrum of the load current waveform to be identified are remapped to [0,255] and assigned to the R channel pixel matrix.

[0118] Step 105: Combine the B-channel pixel matrix, G-channel pixel matrix, and R-channel pixel matrix into a single color image to be identified.

[0119] Step 106: Input the color image to be identified into the load identification model and use the load identification model to identify the load type corresponding to the color image to be identified; the load identification model is trained using a set of color images corresponding to different load types; the set of color images includes multiple color images.

[0120] In step 106, each color image in the color image set is obtained by synthesizing the B-channel pixel matrix assigned by the Gram matrix of the load current waveform, the G-channel pixel matrix assigned by the Gram matrix of the amplitude spectrum of the load current waveform, and the R-channel pixel matrix assigned by the Gram matrix of the phase spectrum of the load current waveform.

[0121] Specifically, the load identification model is a ResNet18 residual network; the ResNet18 residual network is trained using color image sets corresponding to different load types; during training, the ResNet18 residual network is trained by taking each color image in the color image set corresponding to different load types as input and taking the load type corresponding to the color image as output.

[0122] The technical solution of the present invention is illustrated below with a specific embodiment:

[0123] The non-invasive load identification method proposed in this invention is a non-invasive load identification method based on an improved Gram corner field. It reconstructs the pixel matrices of the B, G, and R channels in the traditional Gram corner field, which are equal to the original data Gram matrix (the Gram matrix of the load current waveform). The amplitude and phase spectra of the load current waveform are calculated using Fast Fourier Transform. Then, the current data, amplitude, and phase Gram matrices are calculated separately as the pixel matrices for the B, G, and R primary color channels. Finally, the three channels are combined into a single color image. A ResNet18 residual network model is trained using the color image obtained after processing with the improved Gram corner field of this invention, and the trained model is used for load identification. The process of the improved Gram corner field of this invention is as follows: Figure 5 As shown.

[0124] Figure 5 The improved Gram field method shown pre-calculates the amplitude and phase spectra of the original data (load current waveform), calculates the Gram matrices for the original data, amplitude spectrum, and phase spectrum respectively, and finally assigns the original data Gram matrix, amplitude Gram matrix (the Gram matrix of the amplitude spectrum of the load current waveform), and phase Gram matrix (the Gram matrix of the phase spectrum of the load current waveform) to the B-channel pixel matrix, G-channel pixel matrix, and R-channel pixel matrix respectively, thus synthesizing a color image. Figure 3 In the existing Gram angle field calculation process shown, after normalizing the sequence data, calculating the Gram matrix, and numerical remapping, the original data Gram matrix is ​​directly and simply assigned to the pixel matrix of the three channels B, G, and R. This processing method only focuses on the temporal characteristics of the original data and loses the amplitude and phase characteristics, resulting in a decrease in the identification of similar loads and a decrease in the accuracy of load identification.

[0125] exist Figure 5 In the calculation process of this invention shown, the amplitude spectrum and phase spectrum are first required, that is, the amplitude spectrum and phase spectrum of the characteristic variables must be calculated first. Let the original time series data (the current time series obtained after filtering the load current waveform by arithmetic mean) be D=[d1,d2,…,d n Perform a Fast Fourier Transform on the sequence to obtain the real part sequence R = [r1, r2, ..., r]. n The imaginary part sequence I = [i1, i2, ..., i] n Then, by performing the calculations shown in formulas (13) and (14), its amplitude spectrum M = [m1, m2, ..., m] can be obtained. n and phase spectrum P = [p1, p2, ..., p n ].

[0126]

[0127]

[0128] Secondly, it is necessary to calculate the pixel matrix of the B, G, and R channels. The size of the Gram matrix is ​​equal to the length of the time series. In order to avoid the Gram matrix being too large due to the excessive length of the time series, the piecewise aggregation approximation (PAA) is used to compress the original time series data (the current time series obtained after arithmetic mean filtering of the load current waveform), as shown in formulas (15) to (17).

[0129]

[0130]

[0131]

[0132] In the formula: d j m j p j These represent the original data, amplitude spectrum, and phase spectrum, respectively, all with a length of k×i, d′ i m′ i p′ i These are the aggregated original data, the aggregated amplitude spectrum, and the aggregated phase spectrum, respectively, each with a length of i.

[0133] The aggregated original data, amplitude spectrum, and phase spectrum are normalized and polar coordinate encoded using formulas (18) to (23).

[0134]

[0135]

[0136]

[0137]

[0138]

[0139]

[0140] In the formula: These represent the normalized original data, amplitude spectrum, and phase spectrum, respectively, φ di φ mi φ pi These represent the polar coordinate angles corresponding to each element in the original data, amplitude spectrum, and phase spectrum, respectively.

[0141] Formulas (24) to (26) are the original data Gram matrix G. D Amplitude Gram matrix G Mand phase Gram matrix G P The calculation model is mainly based on the Gram matrix calculation method shown in formula (10).

[0142]

[0143]

[0144]

[0145] Finally, G D G M G P The values ​​in are mapped to [0,255] and assigned to the B channel pixel matrix, G channel pixel matrix and R channel pixel matrix respectively, as shown in formulas (27) to (29).

[0146]

[0147]

[0148]

[0149] In the formula: B, G, and R represent the pixel matrices of the three channels B, G, and R, respectively.

[0150] At this point, the calculation of the B, G, and R three-channel pixel matrix is ​​complete. After being synthesized into a color image, it can be used as a sample to participate in the training of the load recognition model.

[0151] The training of the load identification model is as follows:

[0152] The recognition model used in this invention is the ResNet18 residual network. Residual networks are a type of deep convolutional neural network for image recognition. They introduce information from upper-layer networks through residual skip connections to alleviate gradient vanishing, while increasing the number of layers without causing network degradation, thus improving the network's feature extraction capabilities. The ResNet18 residual network is the most concise in structure among residual networks and can achieve convergence with minimal time cost. The structural parameters of the ResNet18 residual network are shown in Table 1.

[0153] Table 1. Parameters of each layer in ResNet18

[0154]

[0155]

[0156] The original data is processed using an improved Gram angle field to obtain an image sample set (color image set). After adjusting the model's parameter optimizer, learning rate, batch size, and epoch as needed, the image sample set is input into the model for training. After training, the image samples to be identified (color images to be identified) are input into the model to output the model's predicted load category (load type).

[0157] The specific workflow of this invention is as follows:

[0158] The specific implementation steps for processing the original data and training the model using this invention are as follows:

[0159] (a) Read the measured load current waveform and perform arithmetic mean filtering to obtain the current time series.

[0160] (ii) Perform a fast Fourier transform on the current time series to obtain the amplitude spectrum and phase spectrum.

[0161] (iii) Perform segmented aggregation approximation on the current time series, amplitude spectrum, and phase spectrum, and compress the sequence length as needed.

[0162] (iv) Calculate the Gram matrix of the compressed current time series, amplitude spectrum and phase spectrum to obtain the original data Gram matrix, amplitude Gram matrix and phase Gram matrix.

[0163] (v) Remap the elements in the three matrices to [0,255], assign the original data Gram matrix to the B channel pixel matrix, the amplitude Gram matrix to the G channel pixel matrix, and the phase Gram matrix to the R channel pixel matrix.

[0164] (vi) Use the merge command of the Python OpenCV toolkit to combine the B-channel pixel matrix, G-channel pixel matrix, and R-channel pixel matrix into a single color image.

[0165] (vii) After performing the above operations on all samples, divide the total sample set into training set, validation set and test set, create labels, and send them into the ResNet18 residual network for training.

[0166] (viii) Use the trained ResNet18 residual network to identify the color images processed in steps (i) to (v) to obtain the category label of the load (type label of the load).

[0167] The workflow diagram of this invention is as follows: Figure 6 As shown.

[0168] To verify the effectiveness of the non-intrusive load identification method based on the improved Gram angle field proposed in this invention, this invention uses the Python 3.7.12 programming environment and the Tensorflow 2.1.0 deep learning framework to build models for experiments, setting up experiments to identify eleven single electrical appliances and eight single / combined mixed categories.

[0169] The eleven individual appliance identification experiments and their results are as follows:

[0170] Eleven individual electrical appliance sample sets were created based on self-collected load current waveforms of different types, and their categories (types) and labels are shown in Table 2. The residual network ResNet18 was trained after preprocessing the original data using both traditional Gram angle field and the improved Gram angle field of this invention.

[0171] Table 2. Categories and Labels of Eleven Individual Electrical Appliances

[0172]

[0173]

[0174] After training, the model is tested using the test set, and the confusion matrix is ​​obtained as follows: Figure 7 As shown, Figure 7 Part (a) represents the confusion matrix for traditional Gram's angle field classification. Figure 7 Part (b) represents the improved Grammy angle field classification confusion matrix. The confusion matrix records the prediction results for each step. The vertical axis of the confusion matrix represents the true label, and the horizontal axis represents the label predicted by the model. When the label predicted by the model is the same as the true label, a one is incremented at the corresponding position on the diagonal; when the label predicted by the model is different from the true label, a one is incremented at the corresponding position other than the diagonal.

[0175] Depend on Figure 7 It can be seen that the model trained using traditional Gram angle field data visualization incorrectly identified load 3 (tablet computer) as load 9 (laptop computer) 17 times. The reason for this is the high similarity in current waveforms between the two loads. The current waveforms of load 3 and load 9 are as follows: Figure 8 As shown, Figure 8 Part (a) shows the current waveform of load 3. Figure 8 Part (b) shows the current waveform of load 9.

[0176] from Figure 8It can be seen that the current waveforms of the two loads are very similar in shape, with differences only in amplitude and other information. This indicates that if key features such as amplitude and phase are lost, it is very easy to cause confusion in the identification of their load types. Using the improved Gram angle field, the amplitude Gram matrix and phase Gram matrix of load 3 and load 9 were calculated. In the process, the Gram matrix with missing features was optimized. The pixel matrix of the three channels B, G, and R after image processing was reconstructed as shown in formulas (15) to (29). The lost amplitude and phase features were retained and enhanced. The trained model correctly identified load 3, thus solving the problem of failure in identifying similar waveform loads caused by the loss of key features such as amplitude and phase in the traditional method.

[0177] The experiments and results for eight types of single / combined category recognition are as follows:

[0178] This invention also conducted comparative experiments on the identification of single / combined mixed-category loads. Eight sample sets of single / combined mixed-category loads were created based on self-measured load current waveform data. Their categories (types) and labels are shown in Table 3. After training, the model was tested using the test set, and the confusion matrix was obtained as follows: Figure 9 As shown, Figure 9 Part (a) represents the confusion matrix for traditional Gram's angle field classification. Figure 9 Part (b) represents the improved Gram angle field classification confusion matrix.

[0179] Table 3. Categories and Labels of Eight Individual / Combined Electrical Appliances

[0180]

[0181] Depend on Figure 9 It can be seen that the model trained using traditional Gram angle field data visualization incorrectly identified load 3 (tablet) as load 6 (smartphone + laptop) 76 times. The reason is still the similarity of the current waveforms of load 3 and load 6. The current waveforms of load 3 and load 6 are as follows: Figure 10 As shown.

[0182] Depend on Figure 10 It can be seen that the current waveforms of load 3 and load 6 are very similar in shape, differing only in amplitude and other information. The loss of key features such as amplitude and phase caused the model to mistakenly identify load 3 as load 6. After using the improved Gram angle field, the pixel matrix of the three channels B, G, and R after image processing was reconstructed as shown in formulas (15) to (29), and the originally lost amplitude and phase features were added. The distinguishability of load 3 and load 6 increased, and the trained model correctly identified load 3, avoiding confusion when the load model identified loads with similar current waveforms.

[0183] This invention addresses the problem that "existing methods for image processing sequence data often lose some features during the processing of the original data, such as the loss of amplitude features due to numerical normalization and the loss of phase features due to defects in pixel matrix calculation methods. The loss of key features leads to a decrease in the identification of loads with similar power and current waveforms, which in turn reduces the accuracy of load identification models and the reliability of non-intrusive load monitoring systems." The invention proposes an improved Gram angle field method and a non-intrusive load identification method based on this improved method. Its innovation lies in replacing the originally equal pixel matrices of the B, G, and R channels in the traditional Gram angle field with the original data Gram matrix, amplitude Gram matrix, and phase Gram matrix, respectively. Compared to the traditional Gram angle field, this method adds the amplitude and phase features of the load during the image processing, improving the identification of loads with similar current waveforms. Compared to traditional Gram corner fields, this invention solves the problem of decreased load identification accuracy caused by feature loss in Gram corner fields from the perspective of feature fusion. Using images processed by this invention to train the load identification model can effectively avoid confusion when the model distinguishes loads with similar current waveforms, thereby improving the accuracy and reliability of non-invasive load identification.

[0184] This invention improves the matrix calculation method for the B, G, and R channels of the traditional Gram angle field, solving the problem of lost amplitude and phase characteristics of the original data when using the traditional Gram angle field for sequential data visualization. Compared to the traditional Gram angle field, this invention enables the load identification model to more clearly distinguish loads with similar current waveforms.

[0185] This invention is characterized by its ease of execution and efficient and stable algorithm, and can effectively solve the problem of decreased recognition accuracy of load identification models for individual similar loads.

[0186] This invention is applied to the load identification portion of non-invasive load monitoring. This portion is based on deep learning algorithms, using pre-processed raw data for model training, and then using the trained model to identify load types from similarly pre-processed data. This invention innovates the data preprocessing method by reconstructing the three-channel pixel values ​​in Gram angle field, a widely used method for image representation of sequential data.

[0187] The load identification method of the present invention has the following advantages:

[0188] 1. Avoids feature loss after image processing.

[0189] Compared to the traditional Gram angle field, the improved Gram angle field changes the composition of the pixel values ​​in the B, G, and R channels by calculating the amplitude Gram matrix and the phase Gram matrix. This allows the two-dimensional image to contain the original data amplitude and phase features that were originally lost, thus improving the recognition of similar loads.

[0190] 2. Avoids confusion when identifying similar loads.

[0191] Compared to traditional Gram angle fields, using improved Gram angle fields to process the raw data effectively avoids confusion when the trained model distinguishes loads with similar current waveforms, thus improving the accuracy of distinguishing loads with similar current waveforms.

[0192] 3. Does not increase the burden of model training.

[0193] This invention is essentially an improvement on the data preprocessing method, so it does not increase the number of parameters in the model to be trained, and the training time cost and hardware memory usage are not increased compared to the previous version.

[0194] Example 2

[0195] In order to implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, a non-invasive load identification system is provided below, which includes:

[0196] The load current waveform acquisition module is used to acquire the load current waveform to be identified.

[0197] The amplitude spectrum and phase spectrum calculation module is used to calculate the amplitude spectrum and phase spectrum of the load current waveform to be identified using the Fast Fourier Transform.

[0198] The Gram matrix calculation module is used to calculate the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified, respectively.

[0199] The Gram matrix assignment module is used to assign the Gram matrix of the load current waveform to be identified to the B-channel pixel matrix, the Gram matrix of the amplitude spectrum of the load current waveform to be identified to the G-channel pixel matrix, and the Gram matrix of the phase spectrum of the load current waveform to be identified to the R-channel pixel matrix.

[0200] The color image synthesis module is used to synthesize the B-channel pixel matrix, G-channel pixel matrix and R-channel pixel matrix into a single color image to be recognized.

[0201] The load type recognition module is used to input the color image to be recognized into the load recognition model, and use the load recognition model to identify the load type corresponding to the color image to be recognized. The load recognition model is trained using a set of color images corresponding to different load types. The set of color images includes multiple color images.

[0202] Example 3

[0203] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the non-intrusive load identification method of Embodiment 1.

[0204] The aforementioned electronic device may be a server.

[0205] Example 4

[0206] Embodiment 4 of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the non-intrusive load identification method of Embodiment 1.

[0207] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0208] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A non-invasive load identification method, characterized in that, The method includes: Obtain the waveform of the load current to be identified; The amplitude spectrum and phase spectrum of the load current waveform to be identified are calculated using Fast Fourier Transform. Calculate the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified, respectively. The Gram matrix of the load current waveform to be identified is assigned to the B channel pixel matrix, the Gram matrix of the amplitude spectrum of the load current waveform to be identified is assigned to the G channel pixel matrix, and the Gram matrix of the phase spectrum of the load current waveform to be identified is assigned to the R channel pixel matrix. The B-channel pixel matrix, the G-channel pixel matrix, and the R-channel pixel matrix are combined into a single color image to be identified. The color image to be identified is input into the load identification model, and the load identification model is used to identify the load type corresponding to the color image to be identified; the load identification model is trained using a set of color images corresponding to different load types; the set of color images includes multiple color images.

2. The non-invasive load identification method according to claim 1, characterized in that, Each color image in the color image set is obtained by synthesizing a B-channel pixel matrix assigned by the Gram matrix of the load current waveform, a G-channel pixel matrix assigned by the Gram matrix of the amplitude spectrum of the load current waveform, and an R-channel pixel matrix assigned by the Gram matrix of the phase spectrum of the load current waveform.

3. The non-invasive load identification method according to claim 1, characterized in that, The process of acquiring the waveform of the load current to be identified further includes: The arithmetic mean filter is applied to the waveform of the load current to be identified to obtain the time series of the current to be identified.

4. The non-invasive load identification method according to claim 3, characterized in that, The calculation of the amplitude spectrum and phase spectrum of the load current waveform to be identified using Fast Fourier Transform specifically includes: A fast Fourier transform is performed on the time series of the current to be identified to obtain the amplitude spectrum and the phase spectrum of the load current waveform to be identified.

5. The non-invasive load identification method according to claim 4, characterized in that, The calculation of the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified specifically includes: The segmented aggregation approximation is used to compress the amplitude spectrum and phase spectrum of the current time series to be identified, the load current waveform to be identified, and the load current waveform to be identified, to obtain the aggregated original data, the aggregated amplitude spectrum, and the aggregated phase spectrum. The aggregated original data, the aggregated amplitude spectrum, and the aggregated phase spectrum are normalized and polar coordinate encoded to obtain the normalized original data, the normalized amplitude spectrum, the normalized phase spectrum, the polar coordinate angle corresponding to each element in the original data, the polar coordinate angle corresponding to each element in the amplitude spectrum, and the polar coordinate angle corresponding to each element in the phase spectrum. Based on the normalized original data, the normalized amplitude spectrum, the normalized phase spectrum, the polar coordinate angle corresponding to each element in the original data, the polar coordinate angle corresponding to each element in the amplitude spectrum, and the polar coordinate angle corresponding to each element in the phase spectrum, the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified are calculated using the Gram matrix calculation method.

6. The non-invasive load identification method according to claim 1, characterized in that, The step of assigning the Gram matrix of the load current waveform to be identified to the B-channel pixel matrix, assigning the Gram matrix of the amplitude spectrum of the load current waveform to the G-channel pixel matrix, and assigning the Gram matrix of the phase spectrum of the load current waveform to the R-channel pixel matrix specifically includes: The elements in the Gram matrix of the load current waveform to be identified are remapped to [0,255] and assigned to the B channel pixel matrix; The elements in the Gram matrix of the amplitude spectrum of the load current waveform to be identified are remapped to [0,255] and assigned to the G channel pixel matrix; The elements in the Gram matrix of the phase spectrum of the load current waveform to be identified are remapped to [0,255] and assigned to the R channel pixel matrix.

7. The non-invasive load identification method according to claim 1, characterized in that, The load identification model is a ResNet18 residual network; The ResNet18 residual network is trained using color image sets corresponding to different load types. During training, the ResNet18 residual network is trained by taking each color image in the color image set corresponding to different load types as input and taking the load type corresponding to the color image as output.

8. A non-invasive load identification system, characterized in that, The system includes: The load current waveform acquisition module is used to acquire the load current waveform to be identified. The amplitude spectrum and phase spectrum calculation module is used to calculate the amplitude spectrum and phase spectrum of the load current waveform to be identified using fast Fourier transform. The Gram matrix calculation module is used to calculate the Gram matrix of the load current waveform to be identified, the Gram matrix of the amplitude spectrum of the load current waveform to be identified, and the Gram matrix of the phase spectrum of the load current waveform to be identified, respectively. The Gram matrix assignment module is used to assign the Gram matrix of the load current waveform to be identified to the B channel pixel matrix, assign the Gram matrix of the amplitude spectrum of the load current waveform to be identified to the G channel pixel matrix, and assign the Gram matrix of the phase spectrum of the load current waveform to the R channel pixel matrix. A color image synthesis module is used to synthesize the B-channel pixel matrix, the G-channel pixel matrix, and the R-channel pixel matrix into a single color image to be identified. The load type identification module is used to input the color image to be identified into the load identification model, and use the load identification model to identify the load type corresponding to the color image to be identified; the load identification model is trained using a set of color images corresponding to different load types; the set of color images includes multiple color images.

9. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the non-invasive load identification method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the non-intrusive load identification method as described in any one of claims 1-7.