Element construction method for non-invasive load monitoring method based on compressed sensing
By constructing a non-intrusive load monitoring technology framework based on compressed sensing, the problems of high-frequency sampling and redundant storage are solved, low-frequency sampling is achieved and storage costs are reduced, thereby improving the accuracy and efficiency of load analysis and meeting the development needs of smart grids.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF ECONOMIC & TECH STATE GRID HEBEI ELECTRIC POWER
- Filing Date
- 2022-08-04
- Publication Date
- 2026-07-10
AI Technical Summary
Existing non-intrusive load monitoring technologies have not fully utilized compressed sensing technology, resulting in high-frequency sampling, high compression costs, and redundant storage at the sampling end, making it difficult to meet the development needs of future smart grids.
By establishing a mathematical optimization model, a non-intrusive load monitoring technology framework based on compressed sensing is designed, including a measurement matrix, sparse basis and reconstruction algorithm. The mathematical optimization model and load identification results are constructed, load analysis vectors are obtained, and the model parameter matrix is constructed and solved to achieve load identification.
It achieves low-frequency sampling, reduces storage costs, is suitable for monitoring equipment, improves the accuracy and efficiency of load analysis, solves the problems of high-frequency sampling and redundant storage, and adapts to the development needs of future smart grids.
Smart Images

Figure CN116930636B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of non-intrusive load monitoring technology, and in particular to an element construction method for a non-intrusive load monitoring method based on compressed sensing. Background Technology
[0002] Non-Intrusive Load Monitoring (NILM) collects electrical signals at the user's inlet and analyzes them to obtain information about the types and specific conditions of loads within the user's premises. Compared to traditional load monitoring methods, NILM has lower equipment installation and maintenance costs, higher operability, and greater user acceptance, making it a primary load monitoring method in future smart grids. It is better suited to the rapid growth in the number of grid load users and the demand for intelligent control of electrical equipment. NILM mainly includes data acquisition, data transmission, and load analysis. Among these, load analysis aims to achieve load identification, which is also the ultimate goal of NILM.
[0003] With the increasing scale and intelligence of power systems, the data collected by NILM (Non-Intrusive Load Monitoring) is growing explosively. Traditional data compression methods can address the problem of massive data in NILM, but they suffer from drawbacks such as complexity and high-frequency sampling. In recent years, with the deepening research and application of Compressed Sensing (CS) in power systems, CS can overcome the shortcomings of traditional compression methods. Compressed sensing is a novel sampling theory that combines signal acquisition and compression, featuring simple compression and low-frequency sampling. However, currently, there is no non-intrusive load monitoring technology based on compressed sensing, making it difficult to adapt to the future development of NILM.
[0004] To realize non-intrusive load monitoring technology based on compressed sensing, its key elements need to be constructed. Integrating core CS (Statistical Sensing) technology with load analysis technology is a key challenge, namely, how to perform load analysis based on CS data. This can be achieved through mathematical optimization models, but the design methodology for such models is lacking. Besides constructing mathematical optimization models, non-intrusive load monitoring technology based on compressed sensing also involves a basic framework and other elements, all of which need to be designed within the framework of non-intrusive load monitoring technology based on compressed sensing. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide an element construction method for a non-intrusive load monitoring method based on compressed sensing. By establishing a mathematical optimization model, the non-intrusive load monitoring technology based on compressed sensing is realized to solve problems such as high-frequency sampling, high compression cost, redundant storage at the sampling end, and inapplicability to monitoring equipment. This clarifies the technical route of compressed sensing in non-intrusive load monitoring and guides the construction of future non-intrusive load monitoring systems based on compressed sensing.
[0006] A first aspect of this invention provides a feature construction method based on a non-intrusive load monitoring method using compressed sensing, comprising:
[0007] Based on a mathematical optimization model, a technical framework for non-intrusive load monitoring based on compressed sensing is designed to obtain the key element types to be constructed in non-intrusive load monitoring based on compressed sensing; wherein, the key element types include: three compressed sensing elements, load analysis vector, model parameter matrix of mathematical optimization model, mathematical optimization model and load identification result;
[0008] The three elements of compressed sensing are designed according to the requirements of non-invasive load monitoring; wherein, the three elements of compressed sensing include: measurement matrix, sparse basis, and reconstruction algorithm;
[0009] Obtain the load analysis vector from the sparse vector;
[0010] Construct multiple model parameter matrices in the mathematical optimization model based on the load sample library;
[0011] Construct multiple mathematical optimization models based on multiple model parameter matrices;
[0012] Solve multiple mathematical optimization models and obtain load identification results.
[0013] In one possible implementation, obtaining the load analysis vector includes:
[0014] When the original load signal type is a current waveform, the load analysis vector is the fundamental current phasor value and the h-th harmonic current phasor value; where h = 2, 3, 5, 7, 9, 11;
[0015] When the original load signal type is instantaneous power, the load analysis vector is the element value of a sparse vector.
[0016] In one possible implementation, constructing multiple model parameter matrices in the mathematical optimization model based on the load sample library includes:
[0017] When the original load signal is a current waveform, the column vector parameter d of the model parameter matrix D is determined based on two average calculation methods: the fundamental current phasor sample value and the h-th harmonic current phasor sample value in the load sample library.e ;
[0018] When the original load signal is instantaneous power, the column vector parameters d of the model parameter matrix D are determined based on two methods of calculating the average values of sparse vector sample values in the load sample library. e Where e = 1, 2...E.
[0019] In one possible implementation, the column vector parameter d of the model parameter matrix D is determined based on two methods of calculating the average values of the fundamental current phasor sample values and the h-th harmonic current phasor sample values in the load sample library. e ,include:
[0020] Two column vector parameters d of the model parameter matrix D are constructed based on two average forms of all feature vector sample values. e Alternatively, construct the two column vector parameters d of the model parameter matrix D based on the average values of all feature vector sample values and the feature vector sample values of the low-quantity segment. e .
[0021] In one possible implementation, the column vector parameters d of the model parameter matrix D are determined based on two methods for calculating the average values of sparse vector sample values in the load sample library. e This includes: constructing the model parameter matrix D from two average values based on all sparse vector sample values, and the two column vector parameters d. e Alternatively, construct the two column vector parameters d of the model parameter matrix D based on two average forms of all sparse vector sample values and low-quantity segment feature vector sample values. e .
[0022] In one possible implementation, when the original load signal is a current waveform, the multiple model parameter matrices in the mathematical optimization model constructed based on the load sample library are...
[0023] Based on the eigenvector sample values I of all corresponding current phasors e-ie The average value is used to construct the column vector parameter d e The first parameter form:
[0024]
[0025] Based on the eigenvector sample values I of all corresponding current phasors e-ie The average current amplitude and the average current phase are used to construct a column vector parameter d. e The second parameter form:
[0026]
[0027] in,
[0028] The current phasor value is in complex form. The phasor value of the h-th harmonic current of the electrical equipment e; This represents the average value of all h-th harmonic current phasors corresponding to electrical equipment e in the load sample library; avg(A eh-ie ) represents the phasor amplitude A of all h-th harmonic currents corresponding to electrical equipment e in the load sample library. eh-ie The average value; The phase angle of the phasor of all h-th harmonic currents corresponding to electrical equipment e in the load sample library. The average value; h = 1, 2, 3, 5, 7, 9, 11, where h = 1 represents the fundamental frequency; ie = 1, 2...W e W e This represents the number of feature vector sample values for electrical device e; e = 1 to E;
[0029] The column vector parameters d of the model parameter matrix D are determined based on two parameter forms. e .
[0030] In one possible implementation, when the original load signal is a current waveform, the construction of multiple model parameter matrices in the mathematical optimization model based on the load sample library includes:
[0031] Based on the eigenvector sample values I of all corresponding current phasors e-ie The average value is used to construct the column vector parameter d e The first parameter form:
[0032]
[0033] d obtained based on the first type of parameter e The first threshold ε is calculated. max-e Second threshold ε 1-e And obtain the feature vector sample values of all low-quantity segments;
[0034] A column vector parameter d is constructed based on the average value of the low-quantity sample data of the corresponding current phasor. e The second parameter:
[0035]
[0036] in,
[0037] The current phasor value is in complex form. The phasor value of the h-th harmonic current of the electrical equipment (ie = 1, 2...W) e ), This is a low-level sample data of the h-th harmonic current phasor value of electrical equipment (ie = 1, 2...R).e ); It is the average value of all h-th harmonic current phasors corresponding to electrical equipment e in the load sample library; This represents the average of all h-th harmonic current phasor values corresponding to the low-level sample values of electrical equipment e in the load sample library; h = 1, 2, 3, 5, 7, 9, 11, with h = 1 representing the fundamental frequency; W e R represents the number of feature vector sample values of electrical equipment e. e This represents the number of low-level feature vector sample values for electrical equipment e; e = 1 to E;
[0038] The column vector parameters d of the model parameter matrix D are determined based on two parameter forms. e .
[0039] In one possible implementation, when the original load signal is instantaneous power, the construction of multiple model parameter matrices in the mathematical optimization model based on the load sample library includes:
[0040] Based on sparse vector sample values {s e-ie The average value of} is used to construct the column vector parameter d. e The first parameter:
[0041] de = [avg(s) e-i (1)),avg(s e-i (2))…avg(s e-i (n))…avg(s e-i (N))] T
[0042] All sparse vector sample values of electrical device e are s e-1 ,s e-2 ,…,s e-We} is transformed into a mutation vector, each containing only high-energy elements.
[0043] Based on the mutation vector {s' 1-i ,s' 2-i ,…,s' e-i Construct column vector parameter d e The second parameter is:
[0044] de = [avg(s' e-i (1)),avg(s' e-i (2))……avg(s' e-i (N))] T
[0045] Among them, {s e-ie}={s e-1 ,s e-2,…,s e-We} represents the sparse vector sample values of electrical equipment e; W e Let s be the number of sparse vector sample values of electrical equipment e in the load sample library. e-i The element value is represented as s e-i =[s e-i (1),s e-i (2),…,s e-i (N)] T i = 1 ~ W e ;avg(s e-i (n)) is the average value of the nth element among all sparse vector sample values corresponding to electrical equipment e in the load sample library; avg(s' e-i (n) is the average value of the energy concentration position of the nth element in the variation vector of all sparse vector sample values corresponding to electrical equipment e in the load sample library; e = 1 ~ E; n = 1 ~ N;
[0046] The column vector parameters d of the model parameter matrix D are determined based on two parameter forms. e .
[0047] In one possible implementation, the sparse vector sample values {s} of the electrical device e are... e-1 ,s e-2 ,…,s e-We} Transformed into a mutation vector containing only high-energy elements include:
[0048] Based on the assignment formula, the sparse vector sample values s of electrical equipment e are... e-i The element values are assigned to obtain the mutation vector s' e-i ;
[0049] The assignment formula is as follows:
[0050]
[0051] s e-i (j) represents the sparse vector sample values s of electrical equipment e. e-i The element; s' e-i (j) is the variogram s' obtained by assigning values to the sparse vector sample values of electrical equipment e. e-i Element.
[0052] In one possible implementation, when the original load signal is instantaneous power, the construction of multiple model parameter matrices in the mathematical optimization model based on the load sample library includes:
[0053] The first parameter is constructed based on the average of the sparse vector sample values:
[0054] de = [avg(s) e (1)),avg(s e (2))...avg(s e (n))...avg(s e (N))] T
[0055] d obtained based on the first type of parameter e The first threshold ε is calculated. max-e Second threshold ε 1-e And obtain the feature vector sample values of all low-quantity segments;
[0056] The second type of parameter is constructed based on the low-segment sample data corresponding to the sparse vector:
[0057]
[0058] Among them, {s e-ie}={s e-1 ,s e-2 ,…,s e-We} represents the sparse vector sample values of electrical equipment e. W represents the sparse vector sample values of the low-quantity segment of electrical equipment e; e R represents the number of sparse vector sample values of electrical equipment e in the load sample library. e The number of sparse vector sample values for the low-quantity segment of electrical equipment e in the load sample library; vector s e-i The element value is represented as s e-i =[s e-i (1),s e-i (2),…,s e-i (N)] T (i = 1 ~ W) e ),vector The element value is represented as avg(s e-i (n)) is the average value of the nth element among all sparse vector sample values corresponding to electrical equipment e in the load sample library; Let be the average value of the nth element in the low-quantity segment of the sparse vector sample values corresponding to the electrical equipment e; e = 1 to E; n = 1 to N;
[0059] The column vector parameters d of the model parameter matrix D are determined based on two parameter forms. e .
[0060] In one possible implementation, the d obtained based on the first parameter e The first threshold ε is calculated. max-e Second threshold ε 1-e ,include:
[0061] Calculate the maximum difference between the average value of the load analysis vector sample of electrical equipment e and the total load analysis vector sample values of electrical equipment e, and denote it as the first threshold ε. max-e ;
[0062] According to the first threshold ε max-e The second threshold ε is determined by the set ratio. 1-e The set ratio is 0.3 to 0.7.
[0063] The obtained load analysis vector sample values for all low-volume segments include:
[0064] The difference between the load analysis vector sample average value of the electrical equipment e and the value of the load analysis vector sample is less than the second threshold ε. 1-e All load analysis vector sample values are recorded as the load analysis vector sample values for the low-volume segment.
[0065] In one possible implementation, constructing multiple mathematical optimization models based on multiple model parameter matrices includes:
[0066] min||dD k a k ||
[0067]
[0068] Among them, D k d is the k-th model parameter matrix; d is a U×1 dimensional vector, which is formed based on sparse vectors to create the load analysis vector; U is the vector length; a k Let a be an E×1 dimensional vector. k =[a k (1),a k (2)...a k (e)...a k [(E)] represents the on / off state of each electrical device; E is the total number of electrical devices; k = 1~2 E .
[0069] In one possible implementation, solving multiple mathematical optimization models and obtaining load identification results includes:
[0070] Based on the load analysis vector and k mathematical optimization modules, calculate the k electrical equipment on / off state vectors a. k ;
[0071] Find the result that appears most frequently among all the on / off state vectors of electrical equipment, and denote it as the on / off state vector of the target electrical equipment;
[0072] Output the reconstructed values of the target electrical equipment's on / off state vector and the original load signal. in, Ψ represents the reconstructed value of the original load signal; Ψ is the sparse basis; s is the sparse vector.
[0073] In one possible implementation, the design of the three elements of compressed sensing based on non-invasive load monitoring requirements includes:
[0074] The measurement matrix is designed as a binary sparse matrix; the sparse basis is designed as a Discrete Fourier Transform (DFT) basis; and the reconstruction algorithm is designed as a convex optimization algorithm or a gradient tracking algorithm.
[0075] In one possible implementation, designing the measurement matrix as a binary sparse matrix includes:
[0076] Set the type of the original load signal to either current waveform or instantaneous power;
[0077] The acquisition time is set to 1 second, the length of the original load signal is N = 2048, and the compression ratio is 0.4 to 0.7.
[0078] The measurement matrix size is determined based on the compression ratio and the length of the original load signal, and a zero matrix is generated based on the measurement matrix size.
[0079] A set number of elements are randomly selected from each column of the zero matrix and assigned the value 1 to form the generated binary sparse measurement matrix; wherein the set number is less than the total number of elements in each column.
[0080] A second aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the element construction method considering the non-intrusive load monitoring method based on compressed sensing as described above.
[0081] A third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the element construction method as described above, which considers a non-intrusive load monitoring method based on compressed sensing.
[0082] This invention provides a method for constructing key elements of non-intrusive load monitoring based on compressed sensing, and designs the construction of each key element. First, it proposes a framework for non-intrusive load monitoring based on compressed sensing and a mathematical optimization model, along with the key elements involved. Second, it proposes a mathematical optimization model for load analysis and the optimal solution based on the most frequently occurring result. Third, it proposes a method for constructing the model parameter matrix in the mathematical optimization model. Fourth, it proposes design methods for other key elements, represented by the CS three elements and the load analysis vector. This invention solves problems such as high-frequency sampling, high compression costs, redundant storage at the sampling end, and inapplicability to monitoring electrical equipment. It enables the construction of a mathematical optimization model based on the load analysis vector sample values of different devices in the sample library during data compression. This model can be solved using traditional artificial intelligence algorithms and 0-1 knapsack problem solving algorithms to obtain decision variables and determine the final result of the on / off state of electrical equipment based on these decision variables, thus completing the load analysis and obtaining the on / off state of each electrical device. Attached Figure Description
[0083] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art 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.
[0084] Figure 1 This is a technical schematic diagram of a non-intrusive load monitoring method based on compressed sensing according to the present invention;
[0085] Figure 2 This is a schematic diagram illustrating the implementation process of an element construction method for a non-intrusive load monitoring method based on compressed sensing, according to an embodiment of the present invention.
[0086] Figure 3 This is a schematic diagram illustrating the implementation process of constructing a model parameter matrix according to an embodiment of the present invention;
[0087] Figure 4 This is provided by one embodiment of the present invention. Figure 2 A schematic diagram of the implementation process of step S203 in the illustrated embodiment;
[0088] Figure 5 A technical flowchart illustrating an element construction method for a non-intrusive load monitoring method based on compressed sensing, provided in another embodiment of the present invention;
[0089] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0090] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0091] NILM comprises key components such as data acquisition, data transmission, and load analysis, with load analysis being the core component. Load analysis primarily aims at load identification, which is also the ultimate goal of NILM. Load identification in NILM refers to determining which individual electrical signals from various electrical devices are included in the integrated electrical signal collected at the user's input point; in other words, determining the on / off status of all electrical devices. In NILM, integrated load data is first acquired using traditional sampling methods, and then this data is transmitted to data analysis equipment for load analysis.
[0092] Compressed sensing (CS) mainly comprises compressed measurement, data transmission, and signal reconstruction, with compressed measurement and signal reconstruction being the core components. CS is a data acquisition technology with compression and reconstruction capabilities, requiring no complex data encoding calculations, making it ideal for applications with limited encoding resources. CS compresses data simultaneously with signal acquisition, and its low sampling frequency reduces the amount of sampled data, saving storage space while still containing sufficient information. When it is necessary to recover the original load signal, a suitable reconstruction algorithm is used to restore it, thereby recovering sufficient data. The measurement matrix, sparse basis, and reconstruction algorithm are the three essential elements of compressed sensing.
[0093] This invention integrates the three core components of NILM with the three components of CS, proposing the basic idea of a non-intrusive load monitoring method based on compressed sensing, and realizing load analysis based on compressed sensing and mathematical optimization models. Figure 1 As shown, the data acquisition of NILM and the compressed measurement of CS are integrated, and the "compressed acquisition process" is performed at the sampling end; the load analysis of NILM and the signal reconstruction of CS are integrated, and the "reconstruction and analysis process" is performed at the data analysis end. With the goal of minimizing the Euclidean distance between the load data of different electrical equipment in the load sample library and the original load data, a mathematical optimization model is established, the mathematical optimization model is solved, and the on / off state of each electrical equipment is obtained by the solution with the most frequent occurrence.
[0094] like Figure 1 As shown, the basic process of the NILM method based on CS and scene recognition is as follows: First, through the measurement matrix Φ∈R of CS... M×N For the original load signal x∈R N×1Compressively sample to obtain a compressed signal \(y\in\mathbb{R}\) M×1 (\(M\ll N\)); where \(y = \varPhi x=\varPhi\varPsi s\); then, reconstruct and analyze the compressed data \(y\). During the reconstruction and analysis process, first use the CS reconstruction algorithm to obtain the \(N\times1\) dimensional sparse vector \(s\) from \(y\), and perform load analysis during the reconstruction process to obtain the reconstructed value of the original load signal Since the sparse vector \(s\) in some sparse bases can represent the eigenvalues of the original load signal, load identification can be achieved without obtaining the reconstructed value . Load identification is achieved by establishing and solving a mathematical optimization model. The original load signal \(x\in\mathbb{R}\) N×1 satisfies the premise that the sparse vector \(s\) in a certain sparse basis \(\varPsi\in\mathbb{R}\) N×N has good sparsity. During the reconstruction process, the reconstruction algorithm needs to call the sparse basis. The number \(K\) of non-zero elements of the sparse vector \(s\) is called the sparsity of the original load signal \(x\) in the sparse basis \(\varPsi\). From Figure 1 and the above basic process, it can be obtained that the key elements of non-intrusive load monitoring based on compressive sensing include: the design of the three elements of compressive sensing (measurement matrix, sparse basis, and reconstruction algorithm), the acquisition of load analysis vectors, the construction of model parameter matrices, the construction of mathematical optimization models, the acquisition of load identification results, etc.
[0095] To illustrate the technical solution of the present invention, the following will be described through specific embodiments. The embodiments of the present invention aim to provide a non-intrusive load monitoring method based on compressive sensing and mathematical optimization models. The solution provided by the embodiments of the present invention mainly includes two processes: compressive sampling and reconstruction and analysis in the implementation process; and mainly includes the three elements of CS and load analysis methods in terms of technical composition. The innovative ideas of the embodiments of the present invention are: first, a framework for non-intrusive load monitoring based on compressive sensing and mathematical optimization models and the key elements involved are proposed; second, a mathematical optimization model for realizing load analysis and an optimal solution result based on the most occurrences are proposed; third, a construction method for the model parameter matrix in the mathematical optimization model is proposed; fourth, a design method for other key elements represented by the three elements of CS and load analysis vectors is proposed
[0096] Embodiment 1
[0097] Figure 2 is a technical flow chart of an element construction method for a non-intrusive load monitoring method based on compressive sensing provided by an embodiment of the present invention. As Figure 2 shown, this embodiment includes the following steps:
[0098] S201, with the mathematical optimization model as the core, design the technical framework for non-intrusive load monitoring based on compressive sensing, and obtain the types of key elements to be constructed in non-intrusive load monitoring based on compressive sensing
[0099] S2011, based on a mathematical optimization model, designs a technical framework for non-intrusive load monitoring using compressed sensing. Specifically, the basic process of the framework is as follows:
[0100] First, the compressed signal is obtained by compressing the original load signal of the measurement matrix.
[0101] Second, sparse vectors are obtained from the compressed signal based on sparse basis and reconstruction algorithm.
[0102] Third, obtain the load analysis vector based on the sparse vector.
[0103] Fourth, establish the parameter matrix of the mathematical optimization model based on the load sample library.
[0104] Fifth, establish a mathematical optimization model based on the parameter matrix of mathematical optimization.
[0105] Sixth, obtain the load identification results based on solving the mathematical optimization model.
[0106] Seventh, output the load identification results and the reconstructed values of the original load signal.
[0107] S2012, Based on the aforementioned basic framework, obtain the key element types to be constructed in non-intrusive load monitoring based on compressed sensing.
[0108] Based on the basic framework designed in S2012, the key element types to be constructed in non-intrusive load monitoring based on compressed sensing are identified and obtained. The key elements to be constructed in non-intrusive load monitoring based on compressed sensing include: design of the three elements of compressed sensing (measurement matrix, sparse basis, and reconstruction algorithm), acquisition of load analysis vectors, construction of the model parameter matrix of the mathematical optimization model, construction of the mathematical optimization model, and acquisition of load identification results based on the solution of the mathematical model.
[0109] In steps S202 to S206, the five key elements of compressed sensing, load analysis vector, model parameter matrix, mathematical optimization model, and load identification result will be constructed respectively.
[0110] S202, designed according to the requirements of non-intrusive load monitoring, incorporates three key elements of compressed sensing: measurement matrix, sparse basis, and reconstruction algorithm.
[0111] First, considering that the acquisition of raw load signals in non-intrusive load monitoring is simple and easy, a binary sparse measurement matrix is designed as the measurement matrix in this embodiment.
[0112] The measurement matrix is one of the three essential elements of CS (Static Conversion). Currently, typical random measurement matrices include Gaussian random matrices, Bernoulli random matrices, partial Hadamard matrices, and binary sparse measurement matrices. Using an M×N dimensional binary sparse measurement matrix Φ, an N×1 dimensional original load signal x can be compressed and acquired to obtain an M×1 dimensional compressed signal y = Φx, where M / N is the compression ratio. This invention employs a binary sparse measurement matrix, which is easy to implement and has good reconstruction performance. In the binary sparse measurement matrix, a set number of elements in each column are randomly selected and assigned a value of 1, i.e., αM elements are assigned a value of 1, and the remaining values are set to 0. Where α << 1.
[0113] Second, considering the type of original load signal in non-invasive load monitoring, the DFT basis is designed as a sparse basis.
[0114] In one possible implementation, the types of raw load signals for non-intrusive load monitoring include: current waveforms and instantaneous power.
[0115] The premise of CS (Sparse Cosine Transform) is that the coefficients s of the original N×1 dimensional load signal x under the N×N dimensional sparse basis Ψ are sparse, where s is an N×1 dimensional sparse vector satisfying x = Ψs. The reconstruction algorithm obtains the sparse vector s by solving y = ΦΨs. Therefore, the sparse basis is the fundamental parameter for obtaining the sparse vector s from the compressed signal y using the reconstruction algorithm, and it is related to the type of the original load signal. The CS sparse basis directly affects the sparse representation effect of the original load signal. With the same measurement matrix and reconstruction algorithm, the lower the sparsity of the original load signal, the higher its reconstruction accuracy. In power systems, the CS sparse basis is represented by the fixed orthogonal transform basis, including the DFT basis, the Discrete Cosine Transform (DCT) basis, and the Discrete Wavelet Transform (DWT). The fixed orthogonal transform is simple to construct, easy to implement, and highly applicable to sinusoidal signals.
[0116] Preferably, in this embodiment of the invention, a DFT basis is used as the sparse basis. The original load signal has good sparsity under the DFT basis, and the obtained sparse vector can be used to extract the load analysis vector.
[0117] Third, considering reconstruction speed and accuracy, the reconstruction algorithm is designed as a convex optimization algorithm or a gradient tracking algorithm.
[0118] The CS reconstruction algorithm solves equation (1) to obtain an N×1 dimensional sparse vector s from the M×1 dimensional compressed signal y. This process requires calling the measurement matrix and sparse basis. The CS reconstruction algorithm mainly includes greedy algorithms (lp=0) and convex optimization algorithms (lp=1). Greedy algorithms include orthogonal matching pursuit algorithm, compressed sampling matching pursuit algorithm, regularized orthogonal matching pursuit algorithm, gradient pursuit algorithm, etc. Convex optimization algorithms include gradient projection sparse reconstruction method, spectral projection gradient method, etc.
[0119]
[0120] In this embodiment of the invention, the reconstruction algorithm aims to obtain sparse vectors with high accuracy or fast speed. Convex optimization algorithms offer high reconstruction accuracy but are slow, while greedy algorithms sacrifice reconstruction accuracy for faster computation, and their reconstruction accuracy meets requirements in most cases. This embodiment of the invention uses either convex optimization or gradient tracing algorithms as the target reconstruction algorithms. When high reconstruction accuracy is required or the original load signal has poor sparsity, convex optimization algorithms are chosen; in most other cases, gradient tracing algorithms are selected.
[0121] S203, obtain the load analysis vector based on the sparse vector.
[0122] The load analysis vector is the foundation for establishing the mathematical optimization model. It is obtained from the sparse vector s and is influenced by the type of the original load signal; that is, the type of load analysis vector differs depending on the type of the original load signal. In this embodiment, the original load signal is either a current waveform or instantaneous power. When the original load signal is a current waveform, the load analysis vector is the feature value vector of the original load signal; when the original load signal is a current waveform, the load analysis vector is the sparse vector of the original load. The feature values of the original load are obtained by feature extraction from the sparse vector s, and the types of the obtained load feature values are shown in Table 1. Table 1 shows the load analysis vector types for different types of original load signals.
[0123] Table 1
[0124]
[0125] In one specific implementation, the original load signal type is a current waveform, which requires extracting the fundamental current phasor value and the h-th harmonic current phasor value (h=2,3,5,7,9,11). The steps are as follows.
[0126] First, search for the extrema of the N-dimensional sparse vector s and their position indices k. i That is, the search satisfies |s(k) i )|≥|s(k i +1)|and|s(k) i )|≥|s(k i-1)| All position labels k i (i = 1, 2, 3...). Where s(k) i ), s(k i +1), s(k) i -1) represent the k-th digit of the N-dimensional sparse vector s. i The element, the kth element i +1 element, k-th element i -1 values of elements, k i ∈[2,N].
[0127] Second, sequentially search for the condition hf-2≤(k) i -1) / T≤hf+2 of k i And the filtered k i Put into set {k h}. Where, k h The spectral line designation representing the fundamental wave or the h-th harmonic is set {k}. h There are 7 elements, namely h = 1, 2, 3, 5, 7, 9, 11, where h = 1 represents the spectral line number of the fundamental wave.
[0128] Third, according to h = 1, 2, 3, 5, 7, 9, 11, find s(k) sequentially. h The larger element among the preceding and following elements is labeled. That is, when s(k) h +1) <s(k h When -1), on the contrary
[0129] Fourth, the correction amount α and the intermediate amount β are calculated using equation (2).
[0130]
[0131] Fifth, the amplitude A of the h-th harmonic current is calculated using equation (3). h and phase When h=1, it represents the fundamental wave, angle[s(k h +1)] represents the complex number s(k) h Complex angles of +1).
[0132]
[0133] Sixth, A h The current amplitudes of the fundamental frequency and each harmonic are... For current harmonic phasors; according to Form a 7-dimensional eigenvalue vector I c .in, For a complex number, it can also be represented as
[0134] When the original load signal is a current waveform, the load analysis vector d is the 7-dimensional eigenvalue vector, i.e., d = I. c .
[0135] In another specific embodiment, when the original load signal is instantaneous power, the reconstructed sparse vector s is used as the load analysis vector, eliminating the need for feature extraction. When the original load signal is instantaneous power, the load analysis vector d is the aforementioned N-dimensional sparse vector, i.e., d = s = [s1, s2, ... s]. i ,...s N ] T .
[0136] S204, construct multiple model parameter matrices in the mathematical optimization model based on the load sample library.
[0137] Mathematical optimization models are crucial for load analysis, with the core parameter being the "model parameter matrix" D. Model parameter matrix D is a U×E dimensional matrix constructed from load analysis vector sample values of different electrical devices in a load sample library. This invention establishes multiple model parameter matrices D through different combinations of load analysis vector sample values from the sample library, thereby creating multiple mathematical optimization models. By solving these multiple mathematical optimization models, multiple load identification results can be obtained, and the most frequently occurring result is selected as the final load identification result. This significantly improves the accuracy of load identification.
[0138] The column vectors of the model parameter matrix D represent the load analysis vectors for the applied electrical equipment in the load sample library, i.e., D = [d1, d2...d...]. E ], where d e This represents the load analysis vector (e = 1, 2...E) corresponding to electrical device e in the load sample library, where E is the total number of electrical devices in the NILM system. When the original load signal is a current waveform, d e The element in the middle represents the phasor value of the h-th harmonic current (h=1,2,3,5,7,9,11) and U=7, d e It consists of feature vector sample values from the sample library; when the original load signal is instantaneous power, d e The elements in the middle represent the elements of a sparse vector and U = N, d e It consists of sparse vector sample values from the sample library. Since the sample library contains a large number of sparse vectors and feature samples, d e The composition of the model parameter matrix D can be varied, thus generating multiple model parameter matrices D.
[0139] The key to the model parameter matrix D lies in constructing column vectors d using the load sample library. e Therefore, a load sample library needs to be established before constructing the model parameter matrix D. For example... Figure 3 As shown, this step specifically includes S2041 to S2045.
[0140] S2041, establish the original load signal sample values, sparse vector sample values, and feature vector sample values in the load sample library.
[0141] First, acquire the historical electrical signal data of all individual electrical devices, use it as the original load sample value, and put it into the load sample library.
[0142] Second, sparse vectors of each original load sample value are obtained by sparse representation of the original load sample values, and these vectors are placed into the load sample library as sparse vector sample values.
[0143] The electrical signals include the current waveforms and instantaneous power of each electrical device. The length and attributes of the original load sample values are the same as those of the acquired original load signals, and the length of the sparse vector sample values is the same as the length of the original sample values.
[0144] Sparse vectors are obtained by sparsely representing the corresponding original load signals. In one possible implementation, the sparse vectors of the E electrical devices e in the load sample library include {s}. 1-i1 ,s 2-i2 ...s e-ie ...s E-iE}. Among them, s 1-i1 ,s 2-i2 ...s e-ie ...s E-iE (e = 1, 2...E) represents the feature vector of electrical equipment e with instantaneous power as the original load signal, and is an N-dimensional column vector. Here, E represents the number of electrical equipment; i1 = 1, 2...W1, i2 = 1, 2...W2, ...ie = 1, 2...W e ..., iE = 1, 2...W E W1, W2...W e ...W E These represent the number of sparse vector sample values for each electrical device.
[0145] Third, obtain the feature value vector of the original load sample values of all individual electrical devices, form the feature vector sample values, and put them into the load sample library.
[0146] The eigenvalue vector sample values are only valid when the original load sample value is a current waveform. In one possible implementation, the load eigenvalue vectors of the E electrical devices in the load sample library include {I} 1-i1 ,I 2-i2 ...I e-ie ...I E-iE}
[0147] Among them, I e-ie (e = 1, 2...E) represents the feature vector sample values of electrical equipment e, with the current waveform as the original load signal. These are all 7-dimensional column vectors, where each element is the phasor value of the h-th harmonic current (including the fundamental wave) (h = 1, 2, 3, 5, 7, 9, 11), calculated from the original load sample values. Here, E represents the number of electrical equipment; i1 = 1, 2...W1, i2 = 1, 2...W2, ...ie = 1, 2...W e ..., iE = 1, 2...W E W1, W2...W e ...W E These represent the number of feature vector sample values for each electrical device.
[0148] S2042, obtain the load analysis vector sample value of each electrical device based on the data in the load sample library.
[0149] Load analysis vector sample value d of electrical equipment e e The following methods are used to obtain (e = 1, 2...E): When the original load signal is a current waveform, the corresponding feature vector sample value is obtained as the load analysis vector sample value; when the original load signal is a current waveform, the corresponding sparse vector sample value is obtained as the load analysis vector sample value.
[0150] S2043, when the original load signal is a current waveform, the column vector parameter d of the model parameter matrix D is determined based on the average value calculation method of two feature vector sample values. e (e = 1, 2...E).
[0151] In one possible implementation, the two column vector parameters d of the model parameter matrix D are constructed based on two average forms of all feature vector sample values. e .
[0152] In one possible implementation, the two column vector parameters d of the model parameter matrix D are constructed based on two average forms: the total number of feature vector sample values and the low-quantity segment feature vector sample values. e .
[0153] In the first embodiment, when the original load signal type is a current waveform, d e There are two construction methods. Specifically, d is constructed based on the average value of all feature vector sample values (current phasors). e The first parameter form, where the current phasor values are in complex form. d is constructed based on the average current magnitude and average current phase of all eigenvector sample values (current phasors). eThe second parameter form. Wherein, the feature vector sample value (current phasor value) I of the electrical device e in the sample library. e-ie The expression is
[0154]
[0155] corresponding Let ie be the phasor value of the h-th harmonic current of the electrical equipment e, where ie = 1, 2...W e W e A represents the number of feature vector sample values for electrical device e; eh-ie The phasor value and amplitude of the h-th harmonic current of the electrical equipment e; The phase angle is the current phasor value, h = 1, 2, 3, 5, 7, 9, 11. When h = 1, it represents the fundamental wave.
[0156] Specifically, when the original load signal is a current waveform, the following steps are included:
[0157] First, the first parameter form is constructed based on the average value of the current phasors as follows:
[0158]
[0159] in, The average value of all fundamental current phasor values corresponding to electrical equipment e in the load sample library (ie = 1, 2...W) e ),Right now The average value, This is the average value of all second harmonics corresponding to electrical equipment e in the load sample library, i.e. The average value... This is the average value of all 11th harmonics corresponding to electrical equipment e in the load sample library, i.e. The average value of all h-th harmonics corresponding to electrical equipment e is calculated using the formula (6), where W e This represents the number of feature vector sample values for electrical equipment e.
[0160]
[0161] Second, the second parameter form constructed based on the average current amplitude and the average phase (two types of averages) is as follows:
[0162]
[0163] Among them, avg(A e1-ie ) represents the average current amplitude of all fundamental frequencies corresponding to electrical equipment e in the load sample library (ie = 1, 2...W). e ),Right now The average value, The phase average of all fundamental frequencies corresponding to electrical equipment e in the load sample library (ie = 1, 2...W) e ),Right now The average value; avg(A) e2-ie ) represents the average current amplitude of all second harmonics corresponding to electrical equipment e in the load sample library, i.e. The average value, This is the phase average of all second harmonics corresponding to electrical equipment e in the load sample library, i.e. The average value; ..., avg(A e11-ie ) represents the average current amplitude of all 11th harmonics corresponding to electrical equipment e in the load sample library, i.e. The average value, This is the phase average of all 11th harmonics corresponding to electrical equipment e in the load sample library, i.e. The average value. Among them, the formula for calculating the average current amplitude of all h-th harmonics corresponding to electrical equipment e is shown in equation (8), and the formula for calculating the average current phase is shown in equation (9), where W e This represents the number of feature vector sample values for electrical equipment e.
[0164]
[0165]
[0166] In the second embodiment, the original load signal type is still a current waveform, d e It includes two construction methods. The first method calculates the average value of all feature vector sample values (current phasors) in the sample library that use current waveforms as the original load signal, and then calculates the maximum deviation ε between this average value and all sample values. max-e As the first threshold, a second threshold ε is constructed that is less than the maximum deviation value. 1-e The original load sample values in the load sample library are segmented based on the sample mean and two thresholds. Optionally, the second threshold ε... 1-e With the maximum deviation value ε max-e The ratio between them is 0.3 to 0.7; optionally, the ratio is 0.3, 0.4, 0.5, 0.6, or 0.7. Preferably, a second threshold ε is constructed that is equally divided with the maximum deviation value. 1-e That is, the ratio is 0.5, ε 1-e =0.5ε max-e .
[0167] Thresholds ε are set sequentially around the average value. 1-e and ε max-e The deviation from the average value shall be less than or equal to ε. 1-eThe deviation of each sample data point (i.e., the deviation of the electrical device e from the average value) is less than or equal to ε. 1-e All feature vector sample values between the two segments are divided into low-quantity sample data, and all sample data (i.e. feature vector sample values) are divided into high-quantity sample data.
[0168] Specifically, the process is as follows:
[0169] First, the first type of parameter, constructed based on the average value of high-volume sample data (current phasors), is:
[0170]
[0171] in, The phasor value of the h-th harmonic current of the electrical equipment (ie = 1, 2...W) e ), The average value of all fundamental current phasor values corresponding to electrical equipment e in the load sample library (ie = 1, 2...W) e ),Right now The average value, This is the average value of all second harmonics corresponding to electrical equipment e in the load sample library, i.e. The average value... This is the average value of all 11th harmonics corresponding to electrical equipment e in the load sample library, i.e. The average value of all h-th harmonics corresponding to electrical equipment e is calculated using the formula (11), where W e This represents the number of feature vector sample values for electrical equipment e.
[0172]
[0173] Second, d is obtained based on the first type of parameter. e The first threshold ε is calculated. max-e Second threshold ε 1-e And obtain the feature vector sample values of all low-quantity segments.
[0174] First, assign the vector g to the vector obtained by the first type of parameter, i.e., g = d. e The maximum difference between the average value of the feature vector samples (current phasors) of electrical equipment e and the value of all feature vector samples of electrical equipment e is calculated by equation (12), which is the first threshold ε. max-e .
[0175]
[0176] Where i = 1, 2...W e W eThis represents the number of feature vector sample values for electrical device e. (0~ε) max-e Find the second threshold ε in the middle 1-e That is, the second threshold ε 1-e With the maximum deviation value ε max-e The ratio between them is 0.3 to 0.7.
[0177] Based on the second threshold, obtain all samples of the low-quantity data, that is, find {I}. e-1 ,Ie-2…I e-We In}, ||I e-i -g||≤ε 1-e All I e-i (i = 1, 2... W) e ), forming a sample set R e This represents the number of samples in the low-quantity segment of electrical equipment e.
[0178] Third, the second type of parameter is constructed based on the average value of the low-quantity sample data (current phasors):
[0179]
[0180] in, This is a low-level sample data of the h-th harmonic current phasor value of electrical equipment (ie = 1, 2...R). e ), This represents the average fundamental current phasor value in the low-quantity sample corresponding to electrical equipment e in the load sample library (ie = 1, 2...W). e ),Right now The average value, This is the average value of the second harmonic in the low-frequency sample corresponding to electrical equipment e in the load sample library, i.e. The average value, ... This is the average value of the 11th harmonic in the low-frequency sample corresponding to electrical equipment e in the load sample library, i.e. The average value of the h-th harmonic in the low-frequency sample corresponding to electrical equipment e is calculated by equation (14).
[0181]
[0182] Among them, R e This represents the number of low-level feature vector sample values for electrical device e. Indicates a low-volume sample library A certain feature vector sample value The element values (h = 1, 2, 3, 5, 7, 9, 11), i.e.
[0183]
[0184] S2044, When the original load signal is instantaneous power, the column vector parameter d of the model parameter matrix D is determined based on the average value calculation method of two sparse vector sample values. e (e = 1, 2...E).
[0185] In one possible implementation, the two column vector parameters d of the model parameter matrix D are constructed based on two average forms of all sparse vector sample values. e .
[0186] In one possible implementation, the two column vector parameters d of the model parameter matrix D are constructed based on two average forms: the total sparse vector sample values and the low-quantity segment feature vector sample values. e .
[0187] In the first embodiment, when the original load signal type is instantaneous power, d e There are two construction methods. Specifically, d is constructed based on the average of all sparse vector sample values of electrical equipment e in the load sample library. e The first parameter form constructs d based on the average of the elements greater than a set value among all sparse vector sample values of electrical equipment e in the load sample library. e The second parameter.
[0188] Let {s e-ie}={s e-1 ,s e-2 ,…,s e-We} represents the sparse vector sample values of electrical equipment e, W e Let s be the number of sparse vector sample values of electrical equipment e in the load sample library, where vector s e-i The element value is represented as s e-i =[s e-i (1),s e-i (2),…,s e-i (N)] T i = 1 ~ W e .
[0189] Specifically, it includes the following steps:
[0190] First, the first type of parameter, constructed based on the average value of sparse vector samples, is:
[0191] de = [avg(s) e-i (1)),avg(s e-i (2))…avg(s e-i (n))…avg(s e-i (N))] T (16)
[0192] Among them, avg(s e-i (1) is the average value of the first element among all sparse vector sample values corresponding to electrical equipment e in the load sample library (i = 1 to W). e ),Right now The average value; avg(s) e-i (2) is the average of the second element among all sparse vector sample values corresponding to electrical equipment e in the load sample library, i.e. The average value; ..., avg(s) e-i (N)) is the average value of the Nth element among all sparse vector sample values corresponding to electrical equipment e in the load sample library, i.e. The average value of W is calculated by equation (17) among all sparse vector sample values corresponding to electrical equipment e. e This represents the number of feature vector sample values for electrical equipment e.
[0193]
[0194] Second, all sparse vector sample values {s} of electrical equipment e e-1 ,s e-2 ,…,s e-We} Transformed into a mutation vector containing only high-energy elements The variation vector s' of the i-th sparse vector sample value of electrical equipment e e-i =[s' e-i (1),s' e-i (2),……,s' e-i (N)] T (i = 1 ~ W) e The element values of ) are obtained by assigning values through equation (18).
[0195]
[0196] Third, based on mutation vectors The second type of parameter is constructed as follows:
[0197] d e =[avg(s' e-i (1)),avg(s' e-i (2))……avg(s' e-i (N))] T (19)
[0198] Among them, avg(s' e-i (1) is the average value of the energy concentration position of the first element in the variation vector of all sparse vector sample values corresponding to electrical equipment e in the load sample library (i = 1 to W). e ),Right now The average value; avg(s' e-i (2) is the average value of the energy concentration position of the second element in the variation vector of all sparse vector sample values corresponding to electrical equipment e in the load sample library, i.e. The average value; ..., avg(s' e-i (N)) represents the average value of the energy concentration position of the Nth element in the variation vector of all sparse vector sample values corresponding to electrical equipment e in the load sample library, i.e. The average value. Wherein, the average value of the j-th element in the variation vector of all sparse vector sample values corresponding to electrical equipment e is obtained through...
[0199]
[0200] Calculate, W e This represents the number of feature vector sample values for electrical equipment e.
[0201] In the second embodiment, when the original load signal type is instantaneous power, d e It includes two construction methods. The first method calculates the average value of all sparse vector sample values in the load sample library, where instantaneous power is the original load signal, and then calculates the maximum deviation ε between this average value and each sparse vector sample value. max-e As the first threshold, a second threshold ε is constructed that is less than the maximum deviation value. 1-e The original load sample values in the load sample library are segmented based on the average value of sparse vector sample values and two thresholds. Optionally, the second threshold ε 1-e With the maximum deviation value ε max-e The ratio between them is 0.3 to 0.7; optionally, the ratio is 0.3, 0.4, 0.5, 0.6, or 0.7. Preferably, a second threshold ε is constructed that is equally divided with the maximum deviation value. 1-e That is, the ratio is 0.5, ε 1-e =0.5ε max-e .
[0202] Thresholds ε are set sequentially around the average value. 1-e and ε max-e The deviation from the average value shall be less than or equal to ε. 1-e The deviation of each sample data point (i.e., the deviation of the electrical device e from the average value) is less than or equal to ε. 1-e All sparse vector sample values between the two segments are divided into low-quantity sample data, and all sample data (i.e., sparse vector sample values) are divided into high-quantity sample data.
[0203] Specifically, the process is as follows:
[0204] First, the first type of parameter, constructed based on the average value of sparse vector samples, is:
[0205] de = [avg(s) e-i (1)),avg(s e-i (2))…avg(s e-i (n))…avg(s e-i (N))] T (twenty one)
[0206] Among them, avg(s e-i (1) is the average value of the first element among all sparse vector sample values corresponding to electrical equipment e in the load sample library (i = 1 to W). e ),Right now The average value; avg(s) e-i (2) is the average of the second element among all sparse vector sample values corresponding to electrical equipment e in the load sample library, i.e. The average value; ..., avg(s) e-i (N)) is the average value of the Nth element among all sparse vector sample values corresponding to electrical equipment e in the load sample library, i.e. The average value of W is calculated by equation (22) among all sparse vector sample values corresponding to electrical equipment e. e This represents the number of feature vector sample values for electrical equipment e.
[0207]
[0208] Second, d is obtained based on the first type of parameter. e The first threshold ε is calculated. max-e Second threshold ε 1-e And obtain the feature vector sample values of all low-quantity segments. First, assign the vector g with the first type of parameter g = d e The maximum difference between the average value of the sparse vector samples of electrical equipment e and the values of all sparse vector samples of electrical equipment e is calculated using equation (23), which is the first threshold ε. max-e .
[0209]
[0210] Where i = 1, 2...W e W e This represents the number of feature vector sample values for electrical device e. (0~ε) max-e Find the second threshold ε in the middle 1-e That is, the second threshold ε 1-e With the maximum deviation value ε max-e The ratio between them is 0.3 to 0.7.
[0211] Based on the second threshold, obtain all samples of the low-quantity data, i.e., find {s}e-1 ,s e-2 …s e-We In}, ||s e-i -g||≤ε 1-e All s e-i (i = 1, 2... W) e ), forming a sample set R e This represents the number of samples in the low-quantity segment of electrical equipment e.
[0212] Third, the second set of parameters is constructed based on low-volume sample data (sparse vectors):
[0213]
[0214] in, These are sparse vector sample values of the low-quantity segment of electrical equipment e; vector The element value is represented as Let $e$ be the average value of the first element in the low-quantity segment of the sparse vector sample values corresponding to the electrical device $e$. The average value; Let $e$ be the average value of the second element in the low-quantity segment of the sparse vector sample values corresponding to the electrical device $e$. The average value; ... Let N be the average value of the Nth element in the low-quantity segment of the sparse vector sample values corresponding to the electrical device e, i.e. The average value of the j-th element in the low-quantity sample of the sparse vector sample value corresponding to the electrical equipment e is calculated by equation (25).
[0215]
[0216] Among them, R e This represents the number of low-level feature vector sample values for electrical device e. Indicates a low-volume sample library A certain feature vector sample value The value of the j-th element in the array (j = 1, 2, 3... N).
[0217] S2045, based on a column vector d with two parameters e Construct the model parameter matrix D.
[0218] In the first embodiment, when the original load signal type is a current waveform, 2 can be constructed. E The model parameter matrix D. Wherein, d is provided in the first embodiment of S2044 above. e The two parameter forms can be used to construct 2 E The model parameter matrix; based on the d provided in the second embodiment of S2044 above.e The two parameter forms can be used to construct 2 E The model parameter matrix D.
[0219] In one specific embodiment, when the number of electrical devices E is 3, p and q represent d respectively. e There are two parameter forms. Each column vector in the model parameter matrix D corresponds to a specific electrical device, and each column vector has two parameter forms to choose from. Based on this, the constructed model parameter matrix D has 8 elements, corresponding to model parameter matrices D1 to D8 as follows:
[0220] D1=[ppp], D2=[ppq], D3=[pqp], D4=[qpp], D5=[pqq], D6=[q pq], D7=[qqp], D8=[qqq].
[0221] In the second embodiment, the original load signal type is a current waveform, which can be used to construct 2 E The model parameter matrix D. Wherein, d is provided in the first embodiment of S2044 above. e The two parameter forms can be used to construct 2 E The model parameter matrix; based on the d provided in the second embodiment of S2044 above. e The two parameter forms can be used to construct 2 E The model parameter matrix D.
[0222] In one specific embodiment, when the number of electrical devices E is 4, p and q represent d respectively. e There are two parameter forms. Each column vector in the model parameter matrix D corresponds to a specific electrical device, and each column vector has two parameter forms to choose from. Based on this, the constructed model parameter matrix D has 16 elements, corresponding to model parameter matrices D1 to D2. 16 as follows:
[0223] D1=[pppp], D2=[pppq], D3=[ppqp], D4=[pqpp], D5=[qppp], D6=[ppqq], D7=[pqpq], D8=[pqqp], D9=[qppq], D 10 =[pqpq], D 11 =[q qp p], D 12 =[pqqq],D 13 =[qpqq], D 14 =[qqpq], D 15 =[qqqp], D 16 =[qqqq].
[0224] S205, construct multiple mathematical optimization models based on multiple model parameter matrices.
[0225] Regardless of whether the original load signal type is a current waveform or instantaneous power, each column vector d in the model parameter matrix e Both can be constructed in two ways, that is, in this embodiment, 2 can be selected. E Model parameter matrix D k (k = 1~2) E ).
[0226] According to different model parameter matrices D k (k = 1~2) E ), respectively establish 2 through equation (26) and equation (27) E A mathematical optimization model:
[0227] min||dD k a k || (26)
[0228]
[0229] Where d is a U×1 dimensional vector, which is the vector composed of the analysis basis of the actual collected load signal, obtained by step S203, and U is the vector length; E×1 dimensional vector a k =[a k (1),a k (2)...a k (e)...a k (E)](k=1~2 E ), representing the on / off state of each electrical device; E is the total number of electrical devices; model parameter matrix. It is a U×E dimensional matrix, and each column is obtained from the load analysis vector corresponding to the electrical equipment e in the load sample library (e=1~E), that is, obtained from step S204.
[0230] In one embodiment, when the original load signal is a current waveform, d, All are the current phasor values of the h-th harmonic (h=1,2,3,5,7,9,11), and when U=7 and h=1, they represent the fundamental current phasor values.
[0231] In another embodiment, when the original load signal is instantaneous power, d = s, The average value is calculated from the sparse vector sample values in step S205, and U = N.
[0232] S206 solves multiple mathematical optimization models and obtains load identification results.
[0233] Optional, such as Figure 4 As shown, step S206 specifically includes S2061 to S2063.
[0234] S2061, according to k = 1, 2... 2 E The 0-1 knapsack problem solution algorithm is used sequentially to solve all 2 E Solving two mathematical optimization models yields 2 E The switching state vector of a single electrical device a k (k = 1~2) E ).
[0235] In the specific calculation process, d is the load analysis vector composed of the actual collected load signals. The mathematical optimization model is constructed according to the above formulas (26) and (27), and based on d and the corresponding selected 2 E Model parameter matrix D k Solving separately, we obtain 2. E The switching state vector a of each electrical device (i.e., using a) k They represent k = 1 to 2 respectively. E ).
[0236] S2062, find the result that appears most frequently from all the on / off state vectors of electrical equipment, and set it as the on / off state vector of the target electrical equipment.
[0237] S2063 outputs the reconstructed values of the target electrical equipment's on / off state vector and the original load signal.
[0238] Among them, the calculated 2 E The switching state vector of a single electrical device a k (k = 1~2) E If there are identical values, the result that appears most frequently is determined by counting and becomes the on / off state vector of the target electrical equipment.
[0239] In one embodiment, when the number of electrical devices E is 4, 2 are selected accordingly. E When calculating the model parameter matrix, the 16 electrical equipment switching state vectors are obtained, namely {a k}(k=1~16). Among them, the elements a1~a4 in the electrical equipment on / off state vector a=[a1,a2,a3,a4] take values of 0 or 1. A value of 0 represents the electrical equipment being off, and a value of 1 represents the electrical equipment being on. The calculated 2 E When the switching state vector 'a' of an electrical device includes multiple 'a=[1,1,1,0]' values and the number of repetitions is the maximum, then the switching state vector of the target electrical device is 'a=[1,1,1,0].
[0240] With the number of electrical devices E being 4, select 2 accordingly.E Taking a model parameter matrix as an example, it includes 16 electrical equipment switching state vectors a k as follows:
[0241] a1 = [1, 1, 0, 0] T a2 = [0,1,0,0] T a3 = [0, 1, 1, 0] T a4 = [1,1,0,0] T a5 = [1,1,0,0] T a6 = [1, 1, 1, 0] T a7 = [1,1,0,0] T a8 = [0, 1, 1, 0] T a9 = [0,1,0,0] T a 10 =[1,1,0,0] T a 11 =[1,1,0,0] T a 12 =[1,1,0,0] T a 13 =[1,1,1,0] T a 14 =[0,1,1,0] T a 15 =[1,1,0,0] T a 16 =[1,1,0,0] T .
[0242] In this embodiment, [1,1,0,0] T This occurred 9 times, therefore the target electrical equipment's on / off state vector is a = [1,1,0,0]. T That is, devices 1 and 2 are in an "open" state, while devices 3 and 4 are in a "closed" state.
[0243] The reconstructed value of the original load signal is based on The reconstructed value of the original load signal is calculated. Ψ and s are the original load signal reconstruction value, sparse basis, and sparse vector, respectively.
[0244] This invention provides a method for constructing elements in a non-intrusive load monitoring method based on compressed sensing. Based on establishing a basic framework and key element types, the method sequentially constructs elements such as the three CS elements, load analysis vector, model parameter matrix, mathematical optimization model, and load identification result acquisition. The model parameter matrix and mathematical optimization model are the core elements. In implementing NILM based on CS, this invention transforms load analysis into a mathematical optimization model. The decision variable 'a' is obtained through the establishment and solution of the mathematical model, and the most frequently occurring 'a' among multiple sets is taken as the final result of the electrical equipment's on / off state. This invention proposes four key points: first, a framework for non-intrusive load monitoring based on compressed sensing and mathematical optimization models, and the key elements involved; second, a mathematical optimization model for implementing load analysis and the optimal solution based on the most frequently occurring result; third, a method for constructing the model parameter matrix in the mathematical optimization model; and fourth, design methods for other key elements, represented by the three CS elements and load analysis vector.
[0245] Example 2
[0246] Figure 5 This paper presents a theoretical block diagram for load analysis without obtaining reconstructed values. The aim is to construct a model parameter matrix from load analysis vector sample values of various electrical devices in a sample library under different device switching states, and then build a mathematical optimization model based on this matrix. The device switching state scheme is determined by combining the mathematical optimization model with the actual acquired load signals, and this determination serves as the load identification result. Figure 5 As shown, the process includes the following steps S501 to S505.
[0247] S501, with mathematical optimization models as its core, designs a technical framework for non-intrusive load monitoring based on compressed sensing.
[0248] S502, Obtain the key element types to be constructed in non-intrusive load monitoring based on compressed sensing: design of the three elements of compressed sensing (measurement matrix, sparse basis and reconstruction algorithm), acquisition of load analysis vector, construction of model parameter matrix of mathematical optimization model, construction of mathematical optimization model, and acquisition of load identification results based on mathematical model solution.
[0249] S503, Establish a load sample library.
[0250] Specifically, this includes: acquiring historical electrical signal data of all individual electrical devices, using them as raw load sample values and placing them in the load sample library; obtaining sparse vectors of each raw load sample value by performing sparse representation on the raw load sample values, and placing them as sparse vector sample values in the load sample library; acquiring feature value vectors of the raw load sample values of all individual electrical devices, forming feature vector sample values, and placing them in the load sample library.
[0251] S504 designs three key elements for non-intrusive load monitoring: a measurement matrix, a sparse basis, and a reconstruction algorithm for compressed sensing. It obtains load analysis vectors based on sparse vectors, constructs multiple model parameter matrices in a mathematical optimization model based on a load sample library, constructs multiple mathematical optimization models based on these model parameter matrices, and solves these multiple mathematical optimization models to obtain multiple on / off state vectors of electrical equipment.
[0252] S505: Find the most frequently occurring result from all electrical equipment disconnection state vectors, set it as the target electrical equipment disconnection state vector, and output the reconstructed value of the target electrical equipment disconnection state vector and the original load signal. in, Ψ and s are the original load signal reconstruction value, sparse basis, and sparse vector, respectively.
[0253] Example 3
[0254] This invention also provides a schematic diagram of the structure of an electronic device. For example... Figure 6 As shown, the electronic device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60. When the processor 60 executes the computer program 62, it implements the steps in the above-described embodiments of the element construction method of the various non-intrusive load monitoring methods based on compressed sensing. Alternatively, when the processor 60 executes the computer program 62, it implements the functions of each module / unit in the above-described device embodiments.
[0255] For example, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 62 in the electronic device 6.
[0256] The electronic device 6 can be a desktop computer, laptop, handheld computer, or cloud server, etc. The electronic device 6 may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 6 This is merely an example of electronic device 6 and does not constitute a limitation on electronic device 6. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0257] The processor 60 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0258] The memory 61 can be an internal storage unit of the electronic device 6, such as a hard disk or memory. The memory 61 can also be an external storage device of the electronic device 6, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 61 can include both internal and external storage units of the electronic device 6. The memory 61 is used to store the computer program and other programs and data required by the electronic device. The memory 61 can also be used to temporarily store data that has been output or will be output.
[0259] Example 4
[0260] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps in the element construction method of the non-intrusive load monitoring method based on compressed sensing, for example... Figure 2 Steps S202 to S206 are shown.
[0261] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0262] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for constructing elements based on a non-intrusive load monitoring method using compressed sensing, characterized in that, include: Based on a mathematical optimization model, a technical framework for non-intrusive load monitoring based on compressed sensing is designed, and the key element types to be constructed in non-intrusive load monitoring based on compressed sensing are obtained. These key element types include: three compressed sensing elements, a load analysis vector, a model parameter matrix of the mathematical optimization model, the mathematical optimization model, and load identification results. The three compressed sensing elements are designed according to the requirements of non-intrusive load monitoring. These three elements include: a measurement matrix, a sparse basis, and a reconstruction algorithm. The load analysis vector is obtained from the sparse vector. Multiple model parameter matrices in the mathematical optimization model are constructed based on a load sample library. Multiple mathematical optimization models are constructed based on the multiple model parameter matrices. The multiple mathematical optimization models are solved, and the load identification results are obtained. The acquisition of the load analysis vector includes: When the original load signal type is a current waveform, the load analysis vector is the fundamental current phasor value and the second... The phasor values of the second harmonic current; among which... ; When the original load signal type is instantaneous power, the load analysis vector is the element value of a sparse vector; The construction of multiple model parameter matrices in the mathematical optimization model based on the load sample library includes: When the original load signal is a current waveform, it is based on the fundamental current phasor sample value in the load sample library and the... Two methods for calculating the average value of the subharmonic current phasor sample values, and two column vector parameters for determining the model parameter matrix D. ; When the original load signal is instantaneous power, the two column vector parameters of the model parameter matrix D are determined based on two methods of calculating the average value of sparse vector sample values in the load sample library. ;in, .
2. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to claim 1, characterized in that, When the original load signal is a current waveform, the construction of multiple model parameter matrices in the mathematical optimization model based on the load sample library includes: Based on the feature vector sample values of all corresponding current phasors The average value is used to construct the column vector parameters. The first parameter form: Based on the feature vector sample values of all corresponding current phasors The column vector parameters are constructed from the average current amplitude and the average current phase. The second parameter form: in, ; The current phasor value is in complex form. For electrical equipment No. Phasor values of subharmonic currents; For electrical equipment in the load sample library All corresponding numbers The average value of the phasor values of the second harmonic current; For electrical equipment in the load sample library All corresponding numbers Phasor amplitude of subharmonic current The average value; For electrical equipment in the load sample library All corresponding numbers Second harmonic current phasor phase angle The average value; , The time is represented as the fundamental frequency; , Indicates electrical equipment The number of feature vector sample values; ; The two column vector parameters of the model parameter matrix D are determined based on two parameter forms. .
3. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to claim 1, characterized in that, When the original load signal is a current waveform, the construction of multiple model parameter matrices in the mathematical optimization model based on the load sample library includes: Based on the feature vector sample values of all corresponding current phasors The average value is used to construct the column vector parameters. The first parameter form: Based on the first type of parameter The first threshold is calculated. Second threshold And obtain the feature vector sample values of all low-quantity segments; Construct a column vector parameter based on the average value of the low-quantity sample data of the corresponding current phasor. The second parameter: in, ; The current phasor value is in complex form. For electrical equipment No. Phasor values of second harmonic currents , For electrical equipment No. Low-level sample data of subharmonic current phasor values. ; For electrical equipment in the load sample library All corresponding numbers The average value of the phasor values of the subharmonic currents; For electrical equipment in the load sample library The low-quantity sample values corresponding to all the first The average value of the phasor values of the subharmonic currents; , The time is represented as the fundamental frequency; Indicates electrical equipment The number of feature vector sample values, Indicates electrical equipment The number of low-quantity segment feature vector sample values; ; The column vector parameters of the model parameter matrix D are determined based on two parameter forms. .
4. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to claim 1, characterized in that, When the original load signal is instantaneous power, the construction of multiple model parameter matrices in the mathematical optimization model based on the load sample library includes: Based on sparse vector sample values { The average value of} is used to construct the column vector parameters. The first parameter: electrical equipment All sparse vector sample values { , , … , } is transformed into a mutation vector, where each element contains only high-energy elements. , , … , }; Construct column vector parameters based on the mutation vector. The second parameter is: in,{ }={ , , … , } refers to electrical equipment sparse vector sample values; Electrical equipment for load sample library The number of sparse vector sample values, vector The element value is represented as , ; For electrical equipment in the load sample library The corresponding sparse vector sample values of the first The average of the elements; For electrical equipment in the load sample library The mutated vector of all corresponding sparse vector sample values is the first The average value of the relative concentration of energy of each element; ; ; The column vector parameters of the model parameter matrix D are determined based on two parameter forms. .
5. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to claim 4, characterized in that, The electrical equipment All sparse vector sample values { , , … , } is transformed into a mutation vector containing only high-energy elements. , , … , },include: Based on the assignment formula, the electrical equipment... The sparse vector sample values The element values are assigned to obtain the mutation vector. ; The assignment formula is as follows: For electrical equipment sparse vector sample values Element; For electrical equipment The mutated vector is obtained by assigning values to the sparse vector sample values. Element.
6. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to claim 1, characterized in that, When the original load signal is instantaneous power, the construction of multiple model parameter matrices in the mathematical optimization model based on the load sample library includes: The first parameter is constructed based on the average of the sparse vector sample values: Based on the first type of parameter The first threshold is calculated. Second threshold And obtain the feature vector sample values of all low-quantity segments; The second type of parameter is constructed based on the low-segment sample data corresponding to the sparse vector: in,{ }={ , , … , } refers to electrical equipment sparse vector sample values, { }={ , , … , } refers to electrical equipment The sparse vector sample values of the low-quantity segment; Electrical equipment for load sample library The number of sparse vector sample values, R e Electrical equipment for load sample library The number of sparse vector sample values in the low-quantity segment; vector The element value is represented as , ,vector The element value is represented as , ; For electrical equipment in the load sample library The corresponding sparse vector sample values of the first The average of the elements; For electrical equipment The first sample in the low-quantity segment corresponding to the sparse vector sample value The average of the elements; ; ; The column vector parameters of the model parameter matrix D are determined based on two parameter forms. .
7. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to claim 3 or 6, characterized in that, The parameter obtained based on the first type of parameter The first threshold is calculated. Second threshold ,include: Computing equipment The average value of the load analysis vector sample and the electrical equipment The maximum difference between all load analysis vector sample values is denoted as the first threshold. ; According to the first threshold The second threshold is determined by the set ratio. Wherein, the set ratio is 0.3 to 0.7; The obtained load analysis vector sample values for all low-volume segments include: Determine the electrical equipment The difference between the average values of the load analysis vector samples is less than the second threshold. All load analysis vector sample values are recorded as the load analysis vector sample values for the low-volume segment.
8. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to any one of claims 3 to 6, characterized in that, The construction of multiple mathematical optimization models based on multiple model parameter matrices includes: in, For the first A model parameter matrix; for The dimensional vector is formed based on sparse vectors to create the load analysis vector; The vector length; when the original load signal is instantaneous power, = 7; When the original load signal is instantaneous power, ; for dimensional vector, This indicates the on / off status of each electrical device; E This represents the total number of electrical devices. .
9. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to claim 8, characterized in that, The process of solving multiple mathematical optimization models and obtaining load identification results includes: Based on the load analysis vector and Each mathematical optimization module solves the calculation. Individual electrical equipment on / off state vector ; Find the result that appears most frequently among all the on / off state vectors of electrical equipment, and denote it as the on / off state vector of the target electrical equipment; Output the reconstructed values of the target electrical equipment's on / off state vector and the original load signal. ;in, The reconstructed value of the original load signal; It is a sparse base; It is a sparse vector.
10. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to claim 1, characterized in that, The three elements of compressed sensing designed according to the requirements of non-invasive load monitoring include: The measurement matrix is designed as a binary sparse matrix; the sparse basis is designed as a Discrete Fourier Transform (DFT) basis; and the reconstruction algorithm is designed as a convex optimization algorithm or a gradient tracking algorithm.
11. The element construction method of the non-intrusive load monitoring method based on compressed sensing according to claim 10, characterized in that, The design of the measurement matrix as a binary sparse matrix includes: Set the type of the original load signal to either current waveform or instantaneous power; Set the data collection time length to 1. s The length of the original load signal is N =2048 and compression ratio of 0.4~0.7; The measurement matrix size is determined based on the compression ratio and the length of the original load signal, and a zero matrix is generated based on the measurement matrix size. A set number of elements are randomly selected from each column of the zero matrix and assigned the value 1 to form the generated binary sparse measurement matrix; wherein the set number is less than the total number of elements in each column.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the element construction method of the non-intrusive load monitoring method based on compressed sensing as described in any one of claims 1 to 11.
13. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the element construction method of the non-intrusive load monitoring method based on compressed sensing as described in any one of claims 1 to 11.