Non-invasive load monitoring method based on compressed sensing

CN116930638BActive Publication Date: 2026-09-29INST OF ECONOMIC & TECH STATE GRID HEBEI ELECTRIC POWER +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210933521.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-04
Publication Date
2026-09-29
Estimated Expiration
2042-08-04

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明实施例提供了一种基于压缩感知的非侵入负荷监测方法,通过测量矩阵实现原始负荷信号压缩采集,通过重构算法和稀疏基实现获取稀疏向量,建立基于稀疏向量滑动观察的事件探测并实现负荷分解,通过特征提取从稀疏向量中获取负荷特征并通过对特征进行机器学习实现负荷识别,可在基于压缩感知的非侵入负荷监测中同时实现负荷分解和负荷识别,解决高频采样、压缩成本高、采样端冗余存储、不适用于监测用电设备等的问题,明确压缩感知在非侵入式负荷监测中的技术路线,引导未来基于压缩感知的非侵入式负荷监测系统的构建

Benefits of technology

[0066]本发明实施例提供了一种基于压缩感知的非侵入负荷监测方法,通过测量矩阵实现原始负荷信号压缩采集,通过重构算法和稀疏基实现获取稀疏向量,建立基于稀疏向量滑动观察的事件探测并实现负荷分解,通过特征提取从稀疏向量中获取负荷特征并通过对特征进行机器学习实现负荷识别。一是提出基于压缩感知的非侵入式负荷监测的实现框架,利用重构的中间信号实现负荷分解和负荷识别;二是针对稀疏向量提出了基于滑动窗和阈值判断的事件探测方法,以判断是否发生设备开断状态的变化;三是提出了基于事件探测结果的负荷分解方法;四是提出了针对稀疏向量进行特征提取的方法,并通过特征值向量实现负荷识别。本发明解决了高频采样、压缩成本高、采样端冗余存储、不适用于监测用电设备等的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116930638B_ABST
    Figure CN116930638B_ABST
Patent Text Reader

Abstract

The application provides a non-invasive load monitoring method based on compressed sensing, which comprises the following steps: setting an original load signal type and acquisition parameters, generating a binary sparse measurement matrix, and obtaining a compressed signal by compressed acquisition of integrated original load signals; reconstructing the compressed signal according to the binary sparse measurement matrix, a sparse basis and a target reconstruction algorithm to obtain an integrated sparse vector; performing event detection on the integrated sparse vector according to sliding window observation and threshold judgment, performing load decomposition according to the event detection result to obtain a single sparse vector of a single electrical equipment; obtaining a load characteristic value from the single sparse vector to form a characteristic value vector; identifying the type of the electrical equipment corresponding to the single sparse vector according to a machine learning algorithm, the characteristic value vector and a characteristic vector sample value; and outputting a load decomposition result of the electrical equipment, a type identification result of the electrical equipment and a reconstructed value of the integrated original load signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of non-invasive load monitoring technology, and in particular to a non-invasive 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 is the core component and ultimate goal of NILM, encompassing load decomposition and load identification.

[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 massive data problem in NILM, but they suffer from drawbacks such as complexity and high-frequency sampling. In recent years, with the deepening research into the 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. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a non-intrusive load monitoring method based on compressed sensing. This method achieves compressed acquisition of the original load signal through a measurement matrix, obtains sparse vectors through a reconstruction algorithm and sparse basis, establishes event detection based on sparse vector sliding observation and achieves load decomposition, extracts load features from the sparse vectors through feature extraction, and achieves load identification through machine learning on the features. This method can simultaneously achieve load decomposition and load identification in non-intrusive load monitoring based on compressed sensing, solving problems such as high-frequency sampling, high compression costs, redundant storage at the sampling end, and unsuitability for monitoring electrical equipment. It 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.

[0005] A first aspect of this invention provides a non-intrusive load monitoring method based on compressed sensing, comprising: setting an original load signal type and acquisition parameters and generating a binary sparse measurement matrix; compressing and acquiring an integrated original load signal to obtain a compressed signal; reconstructing the compressed signal according to the binary sparse measurement matrix, a sparse basis, and a target reconstruction algorithm to obtain an integrated sparse vector; performing event detection on the integrated sparse vector based on sliding window observation and threshold judgment; performing load decomposition based on the event detection results to obtain a single sparse vector for a single electrical device; obtaining load feature values ​​from the single sparse vector to form a feature value vector; identifying the type of electrical device corresponding to the single sparse vector according to a machine learning algorithm, the feature value vector, and feature vector sample values; and outputting the load decomposition result of the electrical device, the identification result of the electrical device type, and the reconstructed value of the integrated original load signal.

[0006] In one possible implementation, the step of performing event detection on the integrated sparse vector based on sliding window observations and threshold judgments, and obtaining a single sparse vector for a single electrical device by load decomposition based on the event detection results, includes:

[0007] For the integrated sparse vector, the required sliding windows for event detection are set sequentially;

[0008] Calculate each sequence element s in each sliding window t The number of non-zero numerical elements cd t ;

[0009] Calculate the adjacent sequence elements s in each sliding window sequentially. t The difference ch t ;

[0010] According to cd t and ch t Threshold judgment is performed on each sliding window, and in cd t and ch t When the event conditions are met, the corresponding sliding window is identified as the event window.

[0011] Calculate a single sparse vector for a single electrical device based on the integrated sparse vectors before and after the event, and achieve load decomposition by continuously calculating the single sparse vector to obtain the sparse vectors of all corresponding electrical devices.

[0012] In one possible implementation, the event occurrence condition is:

[0013]

[0014] Among them, ch t =||s t+1 -s t||, t=ta-3~ta+3; s ta-3 ~s ta+4 For the sequence elements within the sliding window ta-3; cd t Let t be the number of non-zero numerical elements corresponding to each sequence element within the sliding window ta-3, where t = ta-3 to ta+4; cd represents the average value of a single sparse vector for the e-th electrical device in the sample database; i with cd j When the difference is less than the deviation value ε, cd i ≈cd j ε is determined based on the sparsity of the integrated sparse vectors for different load scenarios in the sample library.

[0015] In one possible implementation, calculating the single sparse vector of the electrical device based on the integrated sparse vectors before and after the event includes:

[0016] Calculate the single sparse vector of electrical equipment using the following formula:

[0017] Δs=[(s ta+2 +s ta+3 +s ta+4 )-(s ta-1 +s ta-2 +s ta-3 )] / 3

[0018] Where Δs represents a single sparse vector of electrical equipment; s ta+2 s ta+3 s ta+4 s ta-1 s ta-2 s ta-3 These represent the sequences at corresponding times within the sliding window ta-3; s ta The moment the event occurred.

[0019] In one possible implementation, the step of setting the original load signal acquisition parameters and generating a binary sparse measurement matrix, and compressing the original load signal to obtain a compressed signal, includes:

[0020] Set the type of the original load signal to either current waveform or instantaneous power;

[0021] 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.

[0022] 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.

[0023] A predetermined 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 predetermined number is less than 10% of the total number of elements in each column.

[0024] The compressed signal y is obtained according to y = Φx, where Φ is the binary sparse measurement matrix and x is the original load signal.

[0025] In one possible implementation, the output of the electrical equipment load decomposition result, the electrical equipment type identification result, and the reconstructed value of the integrated original load signal includes:

[0026] The reconstructed value of the single sparse vector The output is the load decomposition result; the output is the equipment type corresponding to the single sparse vector as the equipment type identification result, and the output is the reconstructed value of the integrated original load signal based on the integrated sparse vector s.

[0027] In one possible implementation, obtaining the load feature values ​​from the single sparse vector to form a feature value vector includes:

[0028] When the original load signal is a current waveform, the fundamental current phasor value, the h-th harmonic current phasor value, and the total harmonic distortion rate are obtained from the single sparse vector as the load characteristic values, and an 8-dimensional characteristic value vector is formed; where h = 2, 3, 5, 7, 9, 11.

[0029] When the original load signal is instantaneous power, the average power, maximum power and total power factor are obtained from the single sparse vector as the load characteristic values, and a 3-dimensional characteristic value vector is formed.

[0030] In one possible implementation, when the original load signal is a current waveform, the fundamental current phasor value, the h-th harmonic current phasor value, and the total harmonic distortion rate are obtained from the single sparse vector as the load characteristic values, forming an 8-dimensional characteristic vector, including:

[0031] Search for the extrema of a single sparse vector Δs and their position labels k. i ; where position number k i Satisfy |Δs(k) i )|≥|Δs(k i +1)|and|Δs(k) i )|≥|Δs(k i -1)|;Δs(k i ), Δs(k i +1), Δs(k) i -1) represents the k-th sparse vector Δs. i The kthi +1 element, k-th element i -1 element values, k i ∈[2,N]; i=1,2,3...;

[0032] Search sequentially for the condition hf-2≤(k) i The position label k of -1) / T≤hf+2 i And the filtered k i Put into set {k h}; where k h The spectral line designation represents the fundamental frequency or the h-th harmonic; set {k h There are 7 elements in total, h = 1, 2, 3, 5, 7, 9, 11, where h = 1 represents the spectral line number of the fundamental wave;

[0033] Following the sequence h = 1, 2, 3, 5, 7, 9, 11, find Δs(k) sequentially. h The label of the larger element value between the preceding and following elements. Where, when Δs(k h +1)<Δs(k h When -1), on the contrary

[0034] pass

[0035]

[0036] Calculate the correction α and the intermediate β; Δs(k h ), The k-th sparse vector Δs is a single sparse vector. h The value of the nth element; is the nth element in a single sparse vector Δs. The value of each element;

[0037] pass

[0038]

[0039] Calculate the amplitude A of the h-th harmonic current. h and phase

[0040] Where h=1 represents the fundamental wave, angle[Δs(k h +1)] represents the complex number Δs(k h A complex angle of +1); h The current amplitudes are the fundamental frequency and each harmonic. For current harmonic phasors;

[0041] pass

[0042]

[0043] The total harmonic distortion rate was calculated.

[0044] according to An 8-dimensional eigenvalue vector is formed.

[0045] In one possible implementation, when the original load signal is instantaneous power, the average power, maximum power, and total power factor are obtained from the single sparse vector as the load characteristic values, forming a 3-dimensional characteristic value vector, including:

[0046] Search for the position k of the maximum element in a single sparse vector Δs. max and the position of the second largest element Where k max ∈[2,N];

[0047] pass

[0048]

[0049] Calculate the correction α and the intermediate β; Δs(k max ), The k-th element in the N-dimensional sparse vector s is respectively max The element, the first The value of each element;

[0050] pass

[0051] p avg =Δs(1) / N

[0052] Calculate the average power;

[0053] pass

[0054]

[0055] Calculate the maximum power;

[0056] pass

[0057]

[0058] Calculate the total power factor

[0059] according to A 3-dimensional eigenvalue vector is formed.

[0060] In one possible implementation, identifying the type of electrical equipment corresponding to a single sparse vector based on a machine learning algorithm, the feature vector, and the feature vector sample values ​​includes:

[0061] Based on machine learning algorithms and the feature vector sample values ​​of each electrical device {I 1-r1,I 2-r2 ...I E-rE} Judgment I c The corresponding equipment type; or, based on machine learning algorithms and the feature vector sample values ​​{P} of each electrical device. 1-r1 ,P 2- r2 ...P E-rE Determine P c Corresponding device type;

[0062] Where E represents the number of electrical devices, r1 = 1, 2...W1, r2 = 1, 2...W2, ..., rE = 1, 2...W E W1, W2...W E These represent the sample size of the 1st electrical device, the 2nd electrical device, ..., the Eth electrical device, respectively.

[0063] In one possible implementation, the target reconstruction algorithm is a gradient tracking algorithm or a convex optimization algorithm; the machine learning algorithm is a backpropagation artificial neural network algorithm; and the sparse basis is a Discrete Fourier Transform (DFT) basis.

[0064] 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 non-intrusive load monitoring method based on compressed sensing as described above.

[0065] 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 non-intrusive load monitoring method based on compressed sensing as described above.

[0066] This invention provides a non-intrusive load monitoring method based on compressed sensing. It achieves compressed acquisition of raw load signals through a measurement matrix, obtains sparse vectors through a reconstruction algorithm and sparse basis, establishes event detection based on sparse vector sliding observation to achieve load decomposition, extracts load features from the sparse vectors through feature extraction, and achieves load identification through machine learning on the features. First, it proposes an implementation framework for non-intrusive load monitoring based on compressed sensing, utilizing reconstructed intermediate signals to achieve load decomposition and load identification. Second, it proposes an event detection method based on sliding windows and threshold judgment for sparse vectors to determine whether changes in equipment on / off states have occurred. Third, it proposes a load decomposition method based on event detection results. Fourth, it proposes a method for feature extraction from sparse vectors and achieves load identification through eigenvalue vectors. This invention solves the problems of high-frequency sampling, high compression costs, redundant storage at the sampling end, and unsuitability for monitoring electrical equipment. Attached Figure Description

[0067] 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.

[0068] Figure 1 This is a block diagram illustrating the technical principle of a non-intrusive load monitoring method based on compressed sensing, provided in an embodiment of the present invention.

[0069] Figure 2 This is a flowchart illustrating a non-intrusive load monitoring method based on compressed sensing, provided in an embodiment of the present invention.

[0070] Figure 3 This is a flowchart illustrating step S201 according to an embodiment of the present invention;

[0071] Figure 4 This is a schematic diagram of the load decomposition based on event detection in one embodiment of the present invention;

[0072] Figure 5 This is a schematic diagram of event detection in a non-intrusive load monitoring method based on compressed sensing, provided in an embodiment of the present invention.

[0073] Figure 6 This invention provides a schematic diagram of a feature extraction process for an original load signal that is a current waveform, as an embodiment of the present invention.

[0074] Figure 7 This invention provides a schematic diagram of a feature extraction process for an original load signal that is a current waveform, as shown in another embodiment of the invention.

[0075] Figure 8 This is a flowchart illustrating a non-intrusive load monitoring method based on compressed sensing, provided in an embodiment of the present invention.

[0076] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0077] 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.

[0078] NILM comprises key components such as data acquisition, data transmission, and load analysis, with load analysis being the core component. Load analysis serves two main purposes: load identification and load decomposition. Load decomposition involves extracting the electrical signals of individual devices from the integrated electrical signals at the user's inlet. Load identification determines which individual devices' electrical signals are included in the currently acquired integrated electrical signals at the user's inlet. NILM first acquires integrated load data using traditional sampling methods, and then transmits this data to the data analysis equipment for load analysis.

[0079] 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.

[0080] 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 1As shown, the data acquisition of NILM is fused with the compressive measurement of CS to perform the "compressive acquisition process" at the sampling end. The load analysis of NILM is fused with the signal reconstruction of CS to perform the "load reconstruction and analysis process" at the data analysis end. A new event detection method based on sliding window and threshold judgment is designed with sparse vectors as objects, and load disaggregation is realized through event detection; a feature extraction method is designed with sparse vectors as objects, and load identification is realized through feature extraction and machine learning; load disaggregation and load identification respectively obtain the original load signal of a single electrical equipment and its equipment type.

[0081] As Figure 1 shown, the basic process of the NILM method based on CS and scene recognition is: first, through the measurement matrix Φ∈R of CS M×N compressively acquire the original load signal x∈R N×1 to obtain the compressed signal y∈R M×1 (M<<N); where y=Φx=ΦΨs; then, reconstruct and analyze the compressed data y. In the reconstruction and analysis process, the N×1-dimensional sparse vector s is first obtained from y by using the CS reconstruction algorithm, load analysis is realized in the reconstruction process, and the reconstruction value of the original load signal is obtained Since the sparse vector s under a certain sparse basis can characterize the characteristic value of the original load signal, load disaggregation and load identification can be realized without obtaining the reconstruction value , load disaggregation is realized through event detection for sparse vectors to obtain a single load signal, and load identification is realized through feature extraction and machine learning. The original load signal x∈R N×1 satisfies that the sparse vector s under a certain sparse basis Ψ∈R N×N with good sparsity is a precondition. In the reconstruction process, the reconstruction algorithm needs to call the sparse basis, and the number K of non-zero elements of the sparse vector s is called the sparsity of the original load signal x under the sparse basis Ψ.

[0082] In order to illustrate the technical solution of the present invention, the following description is given through specific embodiments. The embodiments of the present invention aim to provide a non-intrusive load monitoring method based on compressed sensing. In terms of implementation flow, the solution provided by the embodiments of the present invention mainly includes two processes: compressive acquisition, and reconstruction and analysis; in terms of technical composition, it mainly includes three elements of CS, a load disaggregation method and a load analysis method. The innovative ideas of the embodiments of the present invention are: first, an implementation framework for non-intrusive load monitoring based on compressed sensing is proposed, and load disaggregation and load identification are realized by using the reconstructed intermediate signal; second, an event detection method based on sliding window and threshold judgment is proposed for sparse vectors to judge whether the on-off state of equipment changes; third, a load disaggregation method based on event detection results is proposed; fourth, a feature extraction method for sparse vectors is proposed, and load identification is realized through eigenvector.

[0083] Example 1

[0084] Figure 2 This is a flowchart illustrating a non-intrusive load monitoring method based on compressed sensing, provided as an embodiment of the present invention. Figure 2 As shown, this embodiment includes the following steps:

[0085] S201: Set the original load signal type and acquisition parameters and generate a binary sparse measurement matrix. Compress the integrated original load signal to obtain a compressed signal.

[0086] Raw load signals include integrated raw load signals and single raw load signals. Integrated raw load signals refer to the raw electrical signals of multiple electrical devices that NILM needs to acquire. Single raw load signals refer to the raw electrical signals of a single electrical device, obtained by decomposing the integrated raw load signals. Compressed signals specifically refer to compressed signals of integrated raw load signals.

[0087] Specifically, the compression acquisition parameters and the type of the original load signal are set to generate an M×N dimensional binary sparse measurement matrix. The measurement matrix is ​​then used to compress and acquire the N×1 dimensional integrated original load signal to obtain an M×1 dimensional compressed signal. The length of the integrated original load signal is N, the length of the compressed signal is M, and the compression ratio is M / N.

[0088] Step S201 includes steps S2011 to S2014. For example... Figure 3 The implementation process is illustrated in the diagram below, with each step as follows.

[0089] S2011, set the type of the original load signal to current waveform or instantaneous power.

[0090] In this embodiment of the invention, the type of the original load signal (including integrated original load signal and single original load signal) is set to current waveform or instantaneous power. The type of the original load signal is set to facilitate load analysis. Besides being easy to obtain and compress, the selection of the original load signal should also follow two principles: first, it should have superposition, meaning the integrated electrical signal is the sum of all single electrical signals; second, the sparse vector under a certain sparse basis can be used for feature extraction, meaning there exists a sparse basis capable of feature extraction.

[0091] Based on the above principles, the original load signal is set as either a current waveform or instantaneous power. The current waveform is composed of the instantaneous current values ​​at the acquisition point within the acquisition time T, and includes 50 power frequency sine waves when T=1; the instantaneous power is composed of the instantaneous active power (the product of the instantaneous values ​​of current and voltage) at the acquisition point within the acquisition time T.

[0092] S2012 sets the acquisition time to 1 second, the length of the original load signal to N = 2048, and the compression ratio to 0.4–0.7. The compression ratio is set based on the reconstruction accuracy and load identification accuracy of the environment. T = 1 second; N satisfies N = 2fHT, where f is the frequency of the power system and H is the total number of harmonics to be identified. Therefore, optionally, the length of the original load signal N = 2048, in which case at least the 15th order and below of harmonics can be identified from the original load signal. The selection of the compression ratio M / N should consider the reconstruction accuracy and the effect of load analysis, and needs to be determined in specific implementation.

[0093] S2013 generates an M×N dimensional binary sparse measurement matrix Φ.

[0094] The measurement matrix is ​​one of the three essential elements of CS (Static Coding). To accurately reconstruct the original load signal, the measurement matrix must satisfy the constrained equidistant property, and a random measurement matrix can satisfy this condition. Currently, typical random measurement matrices include Gaussian random matrices, Bernoulli random matrices, partial Hadamard matrices, and binary sparse measurement matrices. Therefore, in this embodiment of the invention, typical random measurement matrices are all applicable to the technical solution of this embodiment.

[0095] Preferably, the embodiments of the present invention employ a binary sparse measurement matrix, which is both easy to implement and has good reconstruction performance from the random measurement matrix. The generation process of the binary sparse measurement matrix is ​​as follows:

[0096] The measurement matrix size M×N is determined based on the compression ratio and the length of the original load signal.

[0097] Generate an M×N dimensional zero matrix, i.e., all elements are zero;

[0098] Randomly select a set number of elements from each column of the zero matrix and assign them a value of 1 (i.e., αM elements are assigned a value of 1). Update the zero matrix. The updated zero matrix is ​​the generated binary sparse measurement matrix. The sparsity α can be flexibly set according to the specific environment, where α << 1, meaning the sparsity is much less than 1. Optionally, α can be less than 10%.

[0099] In one specific embodiment, when N = 1024 and the compression ratio is 0.5, then M = 512, and 5 elements are randomly selected from each column of the zero matrix, with the corresponding a ≈ 0.009; when N = 512 and the compression ratio is 0.5, then M = 256, and 2 elements are randomly selected from each column of the zero matrix, with the corresponding a ≈ 0.007.

[0100] S2014, Obtain the compressed signal y according to y = Φx; where Φ is the binary sparse measurement matrix generated in step S2013, and x is the integrated raw load signal that traditional NILM needs to collect.

[0101] S202, based on the binary sparse measurement matrix, as well as the sparse basis and target reconstruction algorithm, the compressed signal is reconstructed to obtain the integrated sparse vector.

[0102] Corresponding to the original load signal, sparse vectors include integrated sparse vectors and single sparse vectors. Integrated sparse vectors refer to the sparse vectors corresponding to the integrated original load signal, while single sparse vectors refer to the sparse vectors corresponding to a single original load signal.

[0103] In order to ensure the sparse representation effect of the original load signal and improve the reconstruction accuracy, before step S202, it is necessary to call the measurement matrix and sparse basis, and determine the target reconstruction algorithm. Then, the compressed signal is reconstructed based on the target reconstruction algorithm to obtain the sparse vector s from the compressed signal y. The sparse vector s is an integrated sparse vector containing multiple electrical devices.

[0104] The sparse basis of CS directly affects the sparse representation 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. CS sparse bases in power systems are represented by fixed orthogonal transform bases, including DFT bases, Discrete Cosine Transform (DCT) bases, and Discrete Wavelet Transform (DWT) bases. Fixed orthogonal transforms are simple to construct, easy to implement, and highly applicable to sinusoidal signals.

[0105] 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 characterize the eigenvalues ​​of the original load.

[0106] 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. These algorithms are all applicable to the technical solution of this embodiment.

[0107]

[0108] In this embodiment of the invention, the reconstruction algorithm aims to obtain sparse vectors with high accuracy or fast speed. Convex optimization algorithms have high reconstruction accuracy but slow computation speed, while greedy algorithms sacrifice reconstruction accuracy to improve computation speed, and the reconstruction accuracy meets the requirements in most cases.

[0109] Preferably, in this embodiment of the invention, a convex optimization algorithm or a gradient pursuit algorithm is used as the target reconstruction algorithm. When the reconstruction accuracy requirement is high or the original load signal is sparse, the convex optimization algorithm is selected; in most other cases, the gradient pursuit algorithm is selected.

[0110] S203, perform event detection on the integrated sparse vector based on sliding window observation and threshold judgment, and obtain the sparse vector of a single electrical device by load decomposition based on the event detection results.

[0111] In step S202, the compressed signal is reconstructed, and the resulting integrated sparse vector s no longer has time domain characteristics. However, the integrated sparse vectors s of the same type of equipment in the on-off state have similarity. Therefore, a "threshold judgment" can be performed on the integrated sparse vector s to determine whether the equipment has changed its on-off state.

[0112] Step S203 includes steps S2031 to S2035. For example... Figure 4 The implementation process is illustrated in the diagram below, with each step as follows.

[0113] S2031, for each integrated sparse vector, set the sliding window required for event detection.

[0114] Figure 5 The diagram illustrates a sliding window observation of sparse vectors. Figure 5 As shown, each integrated sparse vector s t Treated as an element within a sliding window, and utilizing event detection to meet requirements, the window length is set to 8. Where s t Let s represent the ensemble sparse vector at time t, where each s t The window length of the acquired raw load signal is 1 second, while the sliding window length represents the sparse vector s contained within the sliding window. t The quantity.

[0115] In a specific implementation, starting from midnight each day, sliding windows are set sequentially according to t = 1, 2, 3... and the integrated sparse vectors are observed according to steps S2032 to S2034 until midnight of the next day when the sliding window observation for that day ends.

[0116] like Figure 5 As shown, if the change in the on / off state of the equipment occurs in s ta During the time period, then s ta ~s ta+1 Let s be the sparse vector of its transition state. At this point, s ta-1 ~s ta+2 between s t The similarity is poor, while s ta The previous s t or s ta+1 The s after tThey are all similar. The corresponding sliding window ta has a sequence element s within it. ta ~s ta+8 Correspondingly, for sliding window t-3, the sequence elements within the sliding window are s. ta-3 ~s ta+4 .

[0117] S2032, Calculate each sequence element s in each sliding window. t The number of non-zero numerical elements cd t .

[0118] Taking a sliding window ta-3 as an example, when counting non-zero numerical elements, s is calculated sequentially from t = ta-3 to ta+4. t The number of non-zero numerical elements is cd t .

[0119] In one possible implementation, the values ​​in the sequence are greater than 0.1s. t-max Elements are considered non-zero values ​​to avoid sampling non-zero elements with near-zero values ​​during the sampling process. t-max For sequence s t The maximum element value in the array.

[0120] S2033, calculate the adjacent sequence elements s in each sliding window sequentially. t The difference ch t .

[0121] Taking the sliding window ta-3 as an example, the adjacent sequence elements s are calculated sequentially from t = ta-3 to ta+3. t and s t+1 The difference ch t =||s t+1 -s t ||。 Where, ||s t+1 -s t || represents the difference between two vectors s t and s t+1 European distance.

[0122] S2034, according to cd t and ch t Threshold judgment is performed on each sliding window, and in cd t and ch t When the event occurrence condition is met, that is, when the number of non-zero numerical elements in the sliding window ta-3 and the difference between adjacent sequence elements meet the event occurrence condition, the sliding window is determined to be the event window where the event occurred.

[0123] The conditions for the occurrence of the event are as follows (2):

[0124]

[0125] In equation (2), the first term is to achieve “threshold judgment” by comparing the Euclidean distance between two adjacent sequence elements. The first threshold μ is determined based on a single sparse vector of different electrical devices in the sample library.

[0126] Optional, set to in represents the average value of a single sparse vector of the e-th electrical device in the sample database, corresponding to a total of E electrical devices in the NILM system.

[0127] The second term in equation (2) is to achieve “threshold judgment” by comparing the number of non-zero elements.

[0128] Where, when the number of non-zero numerical elements in two sequences i and j is cd i with cd j When the difference is less than the second threshold ε, it is considered that cd i ≈cd j .

[0129] The second threshold ε is determined based on the sparsity of the integrated sparse vectors of different load scenarios in the sample library. Different load scenarios consist of different on / off states of electrical equipment.

[0130] The sliding window that satisfies the above equation (2) is the event window, that is, the state of a certain electrical device is turned on or off in the fourth sequence of the sliding window.

[0131] S2035, calculate the single sparse vector of the electrical equipment based on the integrated sparse vector before and after the event, and achieve load decomposition by continuously calculating the single sparse vector to obtain the sparse vector of all corresponding electrical equipment.

[0132] In this embodiment, in the fourth sequence s of the sliding window ta-3 ta An event occurs, and the single sparse vector of the electrical equipment whose on / off state changes during the event is calculated according to equation (3). Here, Δs represents the single sparse vector of the equipment, and s... ta+2 s ta+3 s ta+4 s ta-1 s ta-2 s ta-3 These represent the sequences (integrated sparse vectors) at corresponding times in the sliding window ta-3.

[0133] Δs=[(s ta+2 +s ta+3 +s ta+4 )-(s ta-1 +s ta-2 +s ta-3 )] / 3 (3)

[0134] In one specific embodiment, starting from midnight each day, sliding windows are set sequentially according to step S2031 and based on t = 1, 2, 3... Then, each sliding window is observed according to steps S2032 to S2034 until midnight of the next day, ending the day's sliding window observation. When step S2034 is completed, if it is determined that there is a window where an event has occurred, step S2035 is immediately executed. Therefore, by continuously executing S2031 to S2034 every day, the calculation of a single sparse vector can be continuously completed. By continuously calculating the single sparse vector, the single sparse vector of all electrical equipment is obtained, thus achieving load decomposition.

[0135] S204 extracts load feature values ​​from a single sparse vector to form an feature value vector.

[0136] Before obtaining load characteristic values, the load characteristic value type needs to be set. Then, according to the feature value extraction method, the load characteristic values ​​are obtained from a single sparse vector and a multi-dimensional feature value vector is formed. The feature extraction method is the process of obtaining load characteristic values ​​from a single sparse vector and forming a multi-dimensional feature value vector. The feature value extraction method and the type of the resulting load characteristic values ​​are affected by the type of the original load signal.

[0137] The eigenvalue type is related to the type of the original load signal. It is the feature value of the information contained in the sparse vector of the original load signal under the sparse basis, and it should be easy to identify the load. Specifically, the load eigenvalues ​​in this embodiment are shown in Table 1 below.

[0138] Table 1

[0139]

[0140] In one possible implementation, load feature values ​​are obtained from a single sparse vector to form an feature value vector, including:

[0141] When the original load signal is a current waveform, the fundamental current phasor value, the h-th harmonic current phasor value (h=2,3,5,7,9,11) and the total harmonic distortion rate are obtained from a single sparse vector, and an 8-dimensional eigenvalue vector is formed. When the original load signal is instantaneous power, the average power, maximum power and total power factor are obtained from a single sparse vector, and a 3-dimensional eigenvalue vector is formed.

[0142] In one specific implementation, when the original load signal type is a current waveform, and it is necessary to extract the fundamental current phasor value, the h-th harmonic current phasor value (h=2,3,5,7,9,11), and the total harmonic distortion rate, step S204 specifically includes steps S2041 to S2047. For example... Figure 6 The implementation process is illustrated in the diagram below, with each step as follows.

[0143] S2041, Search for the extrema of a single sparse vector Δs and its position label k. i That is, the search satisfies |Δs(k) i )|≥|Δs(k i +1)|and|Δs(k) i )|≥|Δs(k i -1)| all k i (i = 1, 2, 3...). Where, Δs(k) i ), Δs(k i +1), Δs(k) i -1) represents the k-th sparse vector Δs. i The kth i +1 element, k-th element i -1 values ​​of elements, k i ∈[2,N].

[0144] S2042, 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.

[0145] S2043, according to h = 1, 2, 3, 5, 7, 9, 11, find Δs(k) sequentially. h The label of the larger element value between the preceding and following elements. That is, when Δs(k) h +1)<Δs(k h When -1), on the contrary

[0146] S2044, calculate the correction amount α and the intermediate amount β using equation (4).

[0147]

[0148] Wherein, Δs(k h ), The k-th sparse vector Δs is a single sparse vector. h The value of the nth element; is the nth element in a single sparse vector Δs. The value of each element.

[0149] S2045, calculate the amplitude A of the h-th harmonic current using equation (5). 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).

[0150]

[0151] S2046, A h The current amplitudes of the fundamental frequency and each harmonic are... For the current harmonic phasor, the total harmonic distortion (THD) can be calculated using its definition (6).

[0152]

[0153] S2047, according to

[0154] Form an 8-dimensional eigenvalue vector I c .in, For a complex number, it can also be represented as

[0155] In another specific embodiment, when the original load signal is instantaneous power, the feature values ​​to be extracted include average power, maximum power, and total power factor. Specifically, step S204 includes steps S2041' to S2045'. Figure 7 The implementation process is illustrated in the diagram below, with each step as follows.

[0156] S2041', Searching for the position k of the maximum element in a single sparse vector Δs. max and the position of the second largest element Where k max ∈[2,N].

[0157] S2042', the average power is calculated using equation (7).

[0158] p avg =Δs(1) / N (7)

[0159] S2043', the maximum power is calculated using equation (8).

[0160]

[0161] S2044', the total power factor is calculated using equation (9).

[0162]

[0163] S2045', according to Form a 3-dimensional eigenvector P c .

[0164] The calculation of α and β is the same as the calculation method when the original load is a current waveform. The correction amount α and the intermediate amount β are calculated by equation (10).

[0165]

[0166] Wherein, Δs(k max ), The k-th element in the N-dimensional sparse vector s is respectively max The element, the first The value of each element.

[0167] S205 identifies the type of electrical equipment corresponding to a single sparse vector based on machine learning algorithms, feature vectors, and feature vector sample values.

[0168] The type of electrical equipment corresponding to a single sparse vector is determined by the feature value vector of the single sparse vector. That is, according to the machine learning algorithm, the feature value vector of the single sparse vector is identified as belonging to which type of equipment among all the feature vector sample values ​​of electrical equipment in the sample library.

[0169] Currently, representative machine learning algorithms used in traditional NILM include K-Nearest Neighbor (KNN), Artificial Neural Networks (ANN), Support Vector Machines (SVM), and AdaBoost. Among these, neural networks encompass various specific algorithms, with Backpropagation Artificial Neural Network (BP-ANN) being a representative example. ANN algorithms offer significant advantages when dealing with a limited number of load types, exhibiting strong approximation capabilities and being suitable for complex situations such as similar loads and nonlinear loads. This embodiment employs the BP-ANN algorithm as the machine learning algorithm for this invention.

[0170] In one embodiment, when the original load signal is a current waveform, the feature value vector I of each electrical device is obtained according to step S204. c Obtain the feature vector sample values ​​{I} of each electrical device. 1-r1 ,I 2-r2 ...I E-rE}, and determine I according to step S205 using the BP-ANN algorithm. c Which sample value it belongs to, that is, what type of equipment it belongs to. 1-r1 ,I 2-r2 ...I E-rE} represents the feature vector sample values ​​of different electrical devices in the sample library, with current waveforms as the single original load signal. E represents the number of electrical devices, and r1 = 1, 2...W1, r2 = 1, 2...W2, ..., rE = 1, 2...W E W1, W2...W E These represent the sample size of the 1st electrical device, the 2nd electrical device, ..., the Eth electrical device, respectively.

[0171] In a specific embodiment of the present invention, the number of electrical devices E = 4, and after judgment I... c I belongs to the sample library 2-12 At that time, it belongs to the type corresponding to electrical equipment 2, that is, the electrical equipment is a refrigerator.

[0172] In this other embodiment, when the original load signal is instantaneous power, the feature value vector P of each electrical device is obtained according to step S204. c Obtain the feature vector sample values ​​{P} of each electrical device. 1-r1 ,P 2-r2 ...P E-rE}, and determine P using the BP-ANN algorithm according to step S205. c This indicates which sample value it belongs to, i.e., what type of equipment it belongs to. {P 1-r1 ,P 2-r2 ...P E-rE Let r1 = 1, 2...W1, r2 = 1, 2...W2, ..., rE = 1, 2...W1. E W1, W2...W E These represent the sample size of the 1st electrical device, the 2nd electrical device, ..., the Eth electrical device, respectively.

[0173] In another specific embodiment of the present invention, the number of electrical devices E = 4, and P is determined to be... c P belongs to the sample library 3-11 At that time, the type of electrical equipment belongs to the type corresponding to electrical equipment 3, that is, the electrical equipment is a television set.

[0174] S206 outputs the load decomposition results of electrical equipment, namely the reconstructed value of a single original load signal, the identification result of the electrical equipment type, and the reconstructed value of the integrated original load signal.

[0175] The reconstructed value of the single sparse vector The load decomposition result is output; the type of electrical equipment corresponding to the single sparse vector is output as the electrical equipment type identification result, and

[0176] Among them, the electrical equipment type identification result is the type of electrical equipment to which a single sparse vector Δs belongs, which is also the single original load reconstruction value. The type of electrical equipment. In two specific embodiments of the present invention, the load identification result of a single electrical equipment is a refrigerator or a television.

[0177] The load decomposition result of a single electrical device is the original load signal reconstruction value of that device, i.e., the single original load signal reconstruction value, obtained through... The calculation yields a value where Δs is a single sparse vector. In two specific embodiments of the present invention, the original load reconstruction value of a single electrical device... The reconstructed value of the original load signal for the refrigerator or television.

[0178] The reconstructed value of the integrated original load signal is calculated based on the integrated sparse vector s, and the reconstructed value of the integrated original load signal is output.

[0179] In steps S201-206, corresponding sample values ​​from the load sample library are required. For example, in this embodiment, steps S203 and S205 both require calling sparse vector sample values ​​and feature vector sample values ​​of different electrical devices in the sample library. Therefore, in this embodiment, it is also necessary to construct the load sample library in advance to obtain single sparse vector sample values ​​of different electrical devices or feature vector sample values ​​of a single load in the load sample library when performing the corresponding steps.

[0180] The construction of the load sample library includes the following steps:

[0181] S1: Obtain historical data of a single electrical signal from all electrical devices, use it as a single original load sample value, and put it into the load sample library.

[0182] The single raw load sample value includes the current waveform and instantaneous power of each electrical device. The length and attributes of the raw load sample value are the same as those of the raw load signal collected in S201.

[0183] S2, obtain the sparse vector of all single original load sample values ​​in the sample library, that is, the historical data of the single sparse vector of all electrical equipment, and put it into the load sample library as a single sparse vector sample value.

[0184] In one possible implementation, the sample data of a single sparse vector in the sample library includes {s} 1-r1 ,s 2- r2 ...s E-rE}, s 1-r1 ,s 2-r2 ...s E-rE These are sparse vectors representing different electrical devices in a single scenario, all of which are N-dimensional column vectors. E represents the number of electrical devices, and r1 = 1, 2...W1, r2 = 1, 2...W2, ..., rE = 1, 2...W E W1, W2...W EThese represent the sample size of the 1st electrical device, the 2nd electrical device, ..., the Eth electrical device, respectively.

[0185] S3. Obtain the feature value vectors of all individual electrical devices, form the feature vector sample values ​​of individual electrical devices, and put them into the load sample library.

[0186] In one possible implementation, the feature value vector sample values ​​in the sample library include {I} 1-r1 ,I 2-r2 ...I E-rE} and {P 1-r1 ,P 2-r2 ...P E-rE}. I 1-r1 ,I 2-r2 ...I E-rE P represents the characteristic vectors of devices 1 to E when the current waveform is the single original load signal; each vector is an 8-dimensional column vector. The elements in each vector are the phasor value of the h-th harmonic current (including the fundamental wave, h = 1, 2, 3, 5, 7, 9, 11) and the total harmonic distortion rate. 1-r1 ,P 2-r2 ...P E-rE Let W1 be the feature vector of devices 1 through E when instantaneous power is the single original load signal. Each feature vector is a 3-dimensional column vector, where each element represents the average power, maximum power, and total power factor, respectively. E represents the number of electrical devices, r1 = 1, 2...W1, r2 = 1, 2...W2, ..., rE = 1, 2...W1. E W1, W2...W E These represent the sample size of the 1st electrical device, the 2nd electrical device, ..., the Eth electrical device, respectively.

[0187] This invention provides a non-intrusive load monitoring method based on compressed sensing. It achieves compressed acquisition of raw load signals through a measurement matrix, obtains sparse vectors through a reconstruction algorithm and sparse basis, establishes event detection based on sparse vector sliding observation to achieve load decomposition, extracts load features from the sparse vectors through feature extraction, and achieves load identification through machine learning on the features. First, it proposes an implementation framework for non-intrusive load monitoring based on compressed sensing, utilizing reconstructed intermediate signals to achieve load decomposition and load identification. Second, it proposes an event detection method based on sliding windows and threshold judgment for sparse vectors to determine whether changes in equipment on / off states have occurred. Third, it proposes a load decomposition method based on event detection results. Fourth, it proposes a method for feature extraction from sparse vectors and achieves load identification through eigenvalue vectors. This invention solves the problems of high-frequency sampling, high compression costs, redundant storage at the sampling end, and unsuitability for monitoring electrical equipment.

[0188] Example 2

[0189] Figure 8 This diagram illustrates a theoretical framework for load analysis without reconstructed values. The goal is to construct all load interruption scenarios from data on various electrical devices in a sample database, and then use machine learning algorithms to find the load interruption scenarios corresponding to the feature values ​​of the original load data. Figure 8 As shown, the process includes the following steps S801 to S806.

[0190] S801 uses an M×N dimensional binary sparse measurement matrix to compress and acquire the N×1 dimensional original load signal to obtain an M×1 dimensional compressed signal y.

[0191] S802 reconstructs the compressed signal y based on the binary sparse measurement matrix, sparse basis, and target reconstruction algorithm to obtain the integrated sparse vector s.

[0192] S803 performs event detection on the integrated sparse vector based on sliding window observation and threshold judgment, and obtains the sparse vector Δs of a single electrical device by load decomposition based on the event detection results.

[0193] S804, determine the load characteristic value I of a single electrical device by extracting feature values ​​based on the sparse vector Δs of the single electrical device. c and P c .

[0194] S805 uses machine learning algorithms, load feature values, and feature vector sample values ​​to identify the type of electrical equipment corresponding to the sparse vector Δs of a single electrical equipment.

[0195] S806, reconstructed from a single original load signal value The output includes load decomposition results, load identification results based on equipment type, and reconstructed values ​​of the integrated original load signals based on the integrated sparse vector s.

[0196] Example 3

[0197] This invention also provides a schematic diagram of the structure of an electronic device. For example... Figure 9 As shown, the electronic device 9 of this embodiment includes: a processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the processor 90. When the processor 90 executes the computer program 92, it implements the steps in the various embodiments of the non-intrusive load monitoring method based on compressed sensing described above. Alternatively, when the processor 90 executes the computer program 92, it implements the functions of each module / unit in the various device embodiments described above.

[0198] For example, the computer program 92 can be divided into one or more modules / units, which are stored in the memory 91 and executed by the processor 90 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 92 in the electronic device 9.

[0199] The electronic device 9 can be a desktop computer, laptop, handheld computer, or cloud server, etc. The electronic device 9 may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will understand that... Figure 9 This is merely an example of electronic device 9 and does not constitute a limitation on electronic device 9. 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.

[0200] The processor 90 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.

[0201] The memory 91 can be an internal storage unit of the electronic device 9, such as a hard disk or memory. The memory 91 can also be an external storage device of the electronic device 9, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 91 can include both internal and external storage units of the electronic device 9. The memory 91 is used to store the computer program and other programs and data required by the electronic device. The memory 91 can also be used to temporarily store data that has been output or will be output.

[0202] Example 4

[0203] 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 various embodiments of the non-intrusive load monitoring method based on compressed sensing, for example... Figure 2 Steps S201 to S206 are shown.

[0204] 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.

[0205] 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 non-intrusive load monitoring method based on compressed sensing, characterized in that, include: Set the original load signal type and acquisition parameters and generate a binary sparse measurement matrix. Compress the integrated original load signal to obtain a compressed signal. The compressed signal is reconstructed based on the binary sparse measurement matrix and the sparse basis and target reconstruction algorithm to obtain an integrated sparse vector; the integrated sparse vector is then subjected to event detection based on sliding window observation and threshold judgment, and load decomposition is performed based on the event detection results to obtain a single sparse vector of a single electrical device. The load feature values ​​are obtained from the single sparse vector to form a feature value vector; Based on the machine learning algorithm, the feature vector, and the feature vector sample values, the type of electrical equipment corresponding to a single sparse vector is identified; the load decomposition result of the electrical equipment, the identification result of the electrical equipment type, and the reconstructed value of the integrated original load signal are output.

2. The non-intrusive load monitoring method based on compressed sensing according to claim 1, characterized in that, The step of performing event detection on the integrated sparse vector based on sliding window observation and threshold judgment, and obtaining a single sparse vector for a single electrical device by load decomposition based on the event detection results includes: For the integrated sparse vector, the required sliding windows for event detection are set sequentially; Calculate each sequence element in each sliding window s t The number of non-zero numerical elements cd t ; Calculate adjacent sequence elements in each sliding window sequentially. s t The difference ch t ; according to cd t and ch t Threshold judgment is performed on each sliding window, and in cd t and ch t When the event conditions are met, the corresponding sliding window is identified as the event window. Calculate a single sparse vector for a single electrical device based on the integrated sparse vectors before and after the event, and achieve load decomposition by continuously calculating the single sparse vector to obtain the sparse vectors of all corresponding electrical devices.

3. The non-intrusive load monitoring method based on compressed sensing according to claim 2, characterized in that, The conditions for the event to occur are as follows: in, , During calculation, t = ta -3~ ta +3; s ta-3 ~ s ta+4 For sliding windows ta Sequence elements within -3; cd t For sliding windows ta The number of non-zero numerical elements corresponding to each sequence element within -3. cd t middle t = ta -3~ ta +4; μ= min{|| ||、|| ||...|| ||}, , e =1,2... E , indicating the first in the sample library e The average value of a single sparse vector of each electrical device; cd i and cd j The difference is less than the deviation value ε hour, cd i ≈ cd j , ε The sparsity is determined based on the integrated sparse vectors of different load scenarios in the sample library.

4. The non-intrusive load monitoring method based on compressed sensing according to claim 3, characterized in that, The step of calculating a single sparse vector for the electrical equipment based on the integrated sparse vectors before and after the event includes: Calculate the single sparse vector of electrical equipment using the following formula: D s =[( s ta+2 + s ta+3 + s ta+4 )-( s ta-1 + s ta-2 + s ta-3 )] / 3 Where, Δ s Represents a single sparse vector of electrical equipment; s ta+2 , s ta+3 , s ta+4 , s ta-1 , s ta-2 , s ta-3 These represent sliding windows. ta -3 Corresponding time ta +2, ta +3, ta +4, ta -1, ta -2, ta -3 sequence; s ta The moment the event occurred.

5. The non-intrusive load monitoring method based on compressed sensing according to claim 4, characterized in that, The process of setting the original load signal acquisition parameters and generating a binary sparse measurement matrix, and then compressing the original load signal to obtain a compressed signal 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 predetermined 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 predetermined number is less than 10% of the total number of elements in each column. according to Acquire compressed signal y ,in The binary sparse measurement matrix is... x This refers to the original load signal.

6. The non-intrusive load monitoring method based on compressed sensing according to any one of claims 1 to 5, characterized in that, The output load decomposition results of electrical equipment, the electrical equipment type identification results, and the reconstructed values ​​of the integrated original load signal include: The reconstructed value of the single sparse vector The output is the load decomposition result; the output is the electrical equipment type corresponding to the single sparse vector as the electrical equipment type identification result, and based on the integrated sparse vector... s Output the reconstructed value of the integrated original load signal .

7. The non-intrusive load monitoring method based on compressed sensing according to claim 1, characterized in that, The step of obtaining load feature values ​​from the single sparse vector to form a feature value vector includes: When the original load signal is a current waveform, the fundamental current phasor value and the second phasor value are obtained from the single sparse vector. h The phasor values ​​of the second harmonic current and the total harmonic distortion rate are the load characteristic values, forming an 8-dimensional eigenvalue vector; where, h =2,3,5,7,9,11; When the original load signal is instantaneous power, the average power, maximum power and total power factor are obtained from the single sparse vector as the load characteristic values, and a 3-dimensional characteristic value vector is formed.

8. The non-intrusive load monitoring method based on compressed sensing according to claim 7, characterized in that, When the original load signal is a current waveform, the fundamental current phasor value and the second phasor value are obtained from the single sparse vector. h The phasor values ​​of the second harmonic current and the total harmonic distortion rate are the load characteristic values, forming an 8-dimensional characteristic vector, including: Search for a single sparse vector Δ s Extreme values ​​and their position labels k i Among them, the position number k i Satisfy |Δ s ( k i )|≥|Δ s ( k i +1)|and|Δ s ( k i )|≥|Δ s ( k i -1)|;Δ s ( k i ) , Δ s ( k i +1), Δ s ( k i -1) represents a single sparse vector Δ s The Middle k i , No. k i +1 element, the first k i -1 element values, k i ∈[2, N ]; i =1,2,3...; Search for the satisfied one by one hf -2≤( k i -1) / T≤ hf +2 position label k i And the filtered k i Put into collection { k h };in, k h Indicates the fundamental wave or the first h Spectral line labels of subharmonics; set { k h There are 7 elements in total. h =1,2,3,5,7,9,11 h =1 indicates the spectral line number of the fundamental wave; according to h =1,2,3,5,7,9,11, find Δ in sequence. s ( k h The label of the larger element value between the preceding and following elements. ; where, when Δ s ( k h +1)<Δ s ( k h When -1), ;on the contrary ; pass Calculate the correction amount α and intermediate quantity β ;Δ s ( k h ), Δ s ( ) are single sparse vectors Δ s The Middle k h The values ​​of each element; a single sparse vector Δ s The Middle The value of each element; pass Calculate the first h Amplitude of subharmonic current A h and phase φ h ; in, h =1 indicates the fundamental frequency. angle [Δ s ( k h +1)] represents the complex number Δ s ( k h Complex angles of +1); A h The current amplitudes are the fundamental frequency and each harmonic. For current harmonic phasors; pass The total harmonic distortion rate was calculated. according to An 8-dimensional eigenvalue vector is formed.

9. The non-intrusive load monitoring method based on compressed sensing according to claim 7, characterized in that, When the original load signal is instantaneous power, the average power, maximum power, and total power factor are obtained from the single sparse vector as the load characteristic values, forming a 3-dimensional characteristic value vector, including: Search for a single sparse vector Δ s The position of the maximum element k max and the position of the second largest element ;in k max ∈[2, N ]; pass Calculate the correction amount α and intermediate quantity β ;Δ s ( k max ), Δ s ( ) are respectively N 2D sparse vector s The Middle k max The element, the first The value of each element; pass p avg =D s (1) / N Calculate the average power; pass p max =[D s (1)+ β D s ( k max )+ β D s ( )] / N Calculate the maximum power; pass φ=angle [D s ( k max +1)]-( α+ 0.5)π Calculate the total power factor cos φ ; according to A 3-dimensional eigenvalue vector is formed.

10. The non-intrusive load monitoring method based on compressed sensing according to claim 8 or 9, characterized in that, The step of identifying the type of electrical equipment corresponding to a single sparse vector based on a machine learning algorithm, the feature vector, and the feature vector sample values ​​includes: Based on machine learning algorithms and feature vector sample values ​​of each electrical device { I 1-r1 , I 2-r2 ... I E-rE }judge I c The corresponding equipment type; or, based on machine learning algorithms and the feature vector sample values ​​of each electrical device { P 1-r1 , P 2-r2 ... P E-rE }judge P c Corresponding device type; in, E Indicates the number of electrical devices. r 1=1,2 ...W 1. r 2=1,2 ...W 2、...、 rE =1,2 ...W E , W 1, W 2... W E These represent the first electrical device, the second electrical device, and so on. E Number of samples per electrical device.

11. The non-intrusive load monitoring method based on compressed sensing according to any one of claims 1 to 7, characterized in that, The target reconstruction algorithm is a gradient tracking algorithm or a convex optimization algorithm; the machine learning algorithm is a backpropagation artificial neural network algorithm; and the sparse basis is a discrete Fourier transform basis.

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 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 a processor, it implements the steps of the non-intrusive load monitoring method based on compressed sensing as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Power system harmonious wave compressed signal reconstruction and detection method based on compressed sensing

    CN103983850A

  • Compressed sensing reconstruction method suitable for microgrid harmonic wave monitoring

    CN103986478A