Non-intrusive load monitoring method and system based on feature optimization and waveform matching
By combining feature optimization and waveform matching methods with the WDTW algorithm and a supervised classification model, the problem of difficulty in identifying long and short start-up loads in existing technologies is solved, achieving high-accuracy load monitoring that is suitable for embedded systems.
Patent Information
- Application Number
- CN202211163599.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2026-03-20
- Estimated Expiration
- 2042-09-23
AI Technical Summary
Existing non-intrusive load monitoring methods struggle to accurately identify mixed load conditions during long and short start-up processes, resulting in insufficient accuracy.
A feature-based optimization and waveform matching method is adopted. By collecting voltage and current waveform data at the main inlet of the microgrid, the WDTW algorithm is used to identify loads during long-start processes, and a supervised classification model is combined to identify loads during short-start processes. A waveform matching database is established, and electrical features are optimized for feature extraction and classification.
It achieves effective identification of long and short startup process loads, improves identification accuracy, is suitable for embedded systems under low hardware conditions, and is suitable for application in environments with weak data processing capabilities.
Smart Images

Figure CN115840078B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of non-intrusive load monitoring, and particularly relates to a non-intrusive load monitoring method and system based on feature optimization and waveform matching. BACKGROUND
[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.
[0003] With increasing attention to power issues, how to use power more efficiently has become a problem of concern to all sectors of society. Non-intrusive load monitoring aims to estimate the power consumption information of each load inside the power grid according to the load information at the total input of the microgrid, and to provide data support for advanced application scenarios such as power load demand response, customized power optimization, and power policy adjustment. In power consumption, residential power consumption has a huge adjustment space, and if real-time and accurate power consumption information can be provided, it can promote the conservation of electrical energy. Therefore, non-intrusive load monitoring has broad application prospects.
[0004] The common load at present can be divided into long starting process load and short starting process load according to the different starting times, the former is such as induction cooker, air conditioner, and the latter is such as water heater, electric lamp. In order to effectively identify, it is necessary to distinguish the long starting process load and the short starting process load. Most of the non-intrusive load monitoring methods disclosed in the literature only identify one of them, and cannot accurately identify the mixed situation of the two types of loads. SUMMARY
[0005] In order to overcome the shortcomings of the prior art, the present application provides a non-intrusive load monitoring method based on feature optimization and waveform matching, which has higher accuracy; and effectively identifies long and short starting process loads.
[0006] To achieve the above object, one or more embodiments of the present application provide the following technical solutions:
[0007] In a first aspect, a non-intrusive load monitoring method based on feature optimization and waveform matching is disclosed, comprising:
[0008] Collecting voltage and current waveform data at the total inlet of the microgrid and processing, obtaining the occurrence time of the load switching event based on the information entropy of the processed data;
[0009] Recording the current root mean square change curve of the load switching event, and extracting the electrical characteristics of the current waveform change caused by the load switching event;
[0010] Establishing a waveform matching database, matching the current root mean square change curve of the load switching event with the matching database, and identifying the long starting process load;
[0011] When the identification matching fails for the long start-up process load, a short start-up process load is identified using a supervised classification model.
[0012] As a further technical solution, the voltage and current waveform data at the total inlet of the micro-grid are processed, including:
[0013] The voltage and current data of a cycle are extracted with the voltage zero-crossing point as the starting point and the second voltage zero-crossing point as the ending point;
[0014] The mean filtering algorithm is used to remove noise interference and measurement errors existing during load operation and data collection;
[0015] The nearest neighbor interpolation algorithm is introduced to scale the data to obtain current information of the same length;
[0016] Normalization processing is adopted so that the current data of different loads are scaled to [-1, 1];
[0017] The data of each cycle used for training the model is uniformly down-sampled to minimize data loss while maintaining the main features of the data.
[0018] As a further technical solution, the step of extracting the electrical characteristics of the current waveform change caused by the load switching event is:
[0019] The current waveform curves of a single load are obtained by subtracting the current waveforms of several cycles before and after the load switching event occurs;
[0020] The time-frequency domain features of the obtained current waveform curve are calculated and processed.
[0021] As a further technical solution, the step of establishing a waveform matching database is:
[0022] The root mean square of the current waveform with a length of n is calculated, and then the current root mean square change curve is obtained;
[0023] The current root mean square change curve within a certain time before and after the switching time is the waveform matching data template.
[0024] As a further technical solution, the long start-up process load is identified, and the specific steps are:
[0025] The template waveform with a length of m corresponding to the load event in the waveform matching database is represented;
[0026] The collected real-time difference waveform with a length of n is represented;
[0027] Calculate the difference between the two, if the difference is less than the threshold for at least n-m consecutive sampling points, it is judged that the load event occurs.
[0028] As a further technical solution, based on the electrical characteristics of common loads, the features are optimized, and the supervised classification model is trained using the optimized features, specifically:
[0029] Calculate the correlation of each feature with the load type, and remove the features with low correlation;
[0030] Use recursive elimination to find the optimal feature subset;
[0031] Use cross-validation to select the optimal features.
[0032] As a further technical solution, recursive elimination is used to find the optimal feature subset, specifically:
[0033] Randomly select a feature set, train a classifier based on the selected feature set, and test the importance measure of the features;
[0034] Sort the features according to the measure size, remove the features corresponding to the smallest measure, and obtain a new feature set;
[0035] Repeat the above steps until all feature subsets are selected, and output the optimal feature set.
[0036] The above one or more technical solutions have the following beneficial effects:
[0037] The present application proposes a non-intrusive load monitoring method based on feature optimization and waveform matching, which uses high-frequency waveform above 1KHz for load monitoring, with higher accuracy; effectively identifies long and short start-up process loads; has small computational complexity, and can realize non-intrusive load monitoring under low hardware conditions, suitable for implementation in embedded systems with relatively weak data operation capability.
[0038] The present application uses high-frequency voltage and current data, and divides the load into long and short start-up process loads according to the different start-up times, specifically, the long start-up process load is the load with a start-up process greater than or equal to 0.3s, and the short start-up process load is the load with a start-up process less than 0.3s, which is identified from the steady state and transient state, avoiding the influence of different start-up time lengths. The specific process is divided into two stages: first, use the WDTW algorithm for waveform matching, which is simple to calculate and can effectively identify long start-up process loads; then use a supervised algorithm to identify based on optimized features, which can accurately classify short start-up process loads. It is suitable for non-intrusive load monitoring devices developed based on embedded systems.
[0039] Advantages of the present application will be readily appreciated as the same becomes better understood by reference to the following detailed description. BRIEF DESCRIPTION OF DRAWINGS
[0040] The accompanying drawings, which are incorporated in and form a part of the specification, illustrate preferred embodiments of the present application and together with the description, serve to explain the principles of the application. It is to be understood that other specific arrangements can be utilized and that the generic description set forth in this specification is explained only the preferred embodiment.
[0041] Figure 1 Flow chart of load identification method based on feature preferably matching with waveform for embodiments of the present application;
[0042] Figure 2 Schematic diagram of data processing for embodiments of the present application;
[0043] Figure 3 Schematic diagram of obtaining current waveform of single load for embodiments of the present application;
[0044] Figures 4(a)-4(b) Schematic diagram of correlation of time domain feature and odd harmonic amplitude for embodiments of the present application;
[0045] Figure 5 Flow chart of selecting feature by recursive elimination method for embodiments of the present application;
[0046] Figure 6 Example diagram of accuracy rate of different feature combinations in descending order for embodiments of the present application. DETAILED DESCRIPTION
[0047] It should be noted that the following detailed description is merely exemplary and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0048] It should be noted that the terms used herein are merely for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application.
[0049] The embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0050] Embodiment one
[0051] For any type of load, a short interval is used to obtain its steady-state current waveform, and a supervised classification model is used to classify it to improve the temporal resolution of the load. But this requires the load to have a short starting process to ensure that the intercepted current waveform is a steady-state current waveform. Therefore, it is necessary to distinguish between long starting process and short starting process loads. The technical solution of the present application uses the WDTW algorithm to identify long starting process loads, and uses a supervised classification model to identify the remaining short starting process loads, forming a chain model, and letting them form a straight-line workflow. Thus, given a complete input, after the coordinated processing of each algorithm in turn, a unique final output is obtained, as shown in Figure 1
[0052] The embodiment discloses a non-intrusive load monitoring method based on feature optimization and waveform matching, comprising:
[0053] Step 1: Collect the voltage and current waveforms at the total inlet of the microgrid at a sampling frequency of not less than 1KHz and perform data processing, and obtain the occurrence time of the load switching event based on the information entropy of the processed data;
[0054] Step 2: Record the current root mean square variation curve of the load switching event, and extract the electrical characteristics of the current waveform variation caused by the load switching event;
[0055] Step 3: Establish a waveform matching database based on the current root mean square variation curve of the common load type switching event, and use the WDTW algorithm to process the current root mean square variation curve of the load switching event based on the database, to identify the long starting process load;
[0056] Step 4: Feature optimization based on the electrical characteristics of common loads, and supervised training of a supervised classification model using the optimized features, and when the WDTW matching in step 3 fails, the trained supervised classification model is used to identify the short starting process.
[0057] In step 1 above, the collected voltage and current data are first processed. Starting from the voltage zero-crossing point and ending at the second voltage zero-crossing point, one cycle of voltage and current data is extracted. This ensures that the current data obtained at different times and under different loads maintains a consistent format. Then, to remove noise interference and measurement errors during load operation and data acquisition, a mean filtering algorithm is used to mitigate this problem. Furthermore, due to fluctuations in the power grid frequency, the number of sampling points in some cycles may be inconsistent. Therefore, a nearest neighbor interpolation algorithm is introduced to scale the data, obtaining current information of the same length. Next, to prevent the loss of weight shifts between features due to large amplitude differences between different loads during model training, normalization is used, scaling the current data for different loads to the range [-1, 1]. Finally, because the sampling frequency of the collected data is high, the data for each cycle used in training the model undergoes uniform downsampling processing. This minimizes data loss while preserving the main features of the data. A schematic diagram of the data processing is shown below. Figure 2 As shown.
[0058] In this implementation example, the timing of the load switching event is determined based on the information entropy of the processed data:
[0059] The current waveform is segmented based on the positive zero-crossing point of the voltage waveform, and the root mean square value of the current waveform for each segment is calculated.
[0060] The current waveform is divided into segments at fixed time intervals, and the information entropy of each segment is calculated. A threshold method is then used to solve the problem. Specifically:
[0061] Switching event detection is performed based on information entropy. The current root mean square value segment with number N and length n obtained after data processing is defined as x. ′ (n), then:
[0062] x ′ (n)={x ′ 1,x ′ 2,…,x ′ n}(1)
[0063] x ′ The information entropy of (n) is:
[0064]
[0065] when When a switching event occurs in segment numbered N, S is the entropy change measure, N and N-1 are the segment numbers of the root mean square value of the current, and N-1 is the segment preceding N.
[0066] The meanings of the variables in the WDTW algorithm and the data representation are as follows:
[0067] The collected original waveform is represented as:
[0068] P ′ (n)={p ′ 1,p ′ 2,…,p ′ n}(3)
[0069] In the formula, P'(n) is the power or current effective value of the waveform at the nth sampling point; n is the number of sampling points;
[0070] The differential waveform is represented as:
[0071] P(n)={p1,p2,…,p n}(4)
[0072] The calculation method of the differential waveform P(n) is:
[0073]
[0074] P(n) within a certain time before and after the switching moment is the waveform matching database template.
[0075] The template waveform of length m corresponding to the load event e in the database is represented as:
[0076] Q e (m)={q1,q2,…,q m}(6)
[0077] In the formula, q m is the change value of the mth sampling point when the load event e occurs; e is the load event type;
[0078] The distance weight corresponding to the load event e in the database is w e ; the occurrence threshold is T e .
[0079] In the formula, p n is the change value of the nth sampling point of the differential waveform; n>m;
[0080] The difference degree S e between the two is calculated using the WDTW algorithm, and if the results of S e <T e are obtained for at least n-m consecutive sampling points, it is determined that the load event e occurs.
[0081] Therefore, the working state sequence of the load is represented as:
[0082] N(l)={(e1,t1),(e2,t2),…,(e l ,t l )}(7)
[0083] First, a waveform matching database should be established. The process for creating a waveform matching template is as follows:
[0084] Extract a typical waveform Q during a load event. e (m), and calculate the corresponding distance weight w. e and occurrence threshold T e Establish a waveform matching database, w e and T e The calculation method is as follows:
[0085] w e =r1*b(9)
[0086] T e =r2*b(10)
[0087] The calculation method for b is as follows:
[0088] b = max(q1, q2, ..., q m )-min(q1,q2,…,q m (11)
[0089] In the formula, r1 and r2 represent the monitoring sensitivity, which can be set according to the actual engineering situation. A typical set of values for r1 and r2 is as follows:
[0090] r1 = 0.01, r2 = 0.05(12)
[0091] Once a waveform matching database is available, waveform templates from the database can be used to match loads. The signal waveforms of the power supply system bus are collected to obtain a real-time differential waveform P(n). For each new data point acquired, the WDTW algorithm is used to calculate the difference between the real-time waveform of length n and the template waveform in the load database. The calculation method is as follows:
[0092] Construct a matrix D of shape m*n e Its element d i,j =|q i -p j |+w e |ij|;
[0093] Starting from (1,1), calculate D. e The warp distance g of each element i,j The matrix consisting of all its elements is denoted as G. e The calculation method is as follows:
[0094]
[0095] wherein g i,0 = 0, g 0, j = 0. The difference S e is calculated as follows:
[0096]
[0097] wherein L k is the number of elements in the trajectory.
[0098] If the result of S e < T e is obtained for at least n-m consecutive sampling points, it is determined that the load switching event e occurs, and in this case the supervised classification model recognition is skipped and the result is directly output.
[0099] If the WDTW algorithm does not match the load switching event in the database, the supervised classification model is used for recognition. Usually there are multiple loads running in the power grid loop. In this case, the process of obtaining the current waveform of a single load is shown in Figure 3-1 The aggregated current waveform is the result of superposition of multiple load currents. In this case, the current data of each load is extracted as a period of running current waveform identified by the timestamp of the load switching event. As shown in Figure 3-2 The aggregated current data of a period is extracted with the voltage zero-crossing point as the starting point and the second zero-crossing point as the terminal point in the stable state before and after the event. The running current waveform of the load causing the event can be obtained by taking the difference of the current data of two periods. Finally, the data of a period is obtained through the processing procedure shown in Figure 3 -4.
[0100] When the supervised model is not trained, the following steps should be experienced first:
[0101] The steps of extracting the electrical characteristics of the current waveform change caused by the load switching event are:
[0102] The current waveform curve of a single load is obtained by subtracting the current waveform of a certain number of periods before and after the load switching event;
[0103] The time-frequency domain features of the obtained current waveform curve are calculated and processed.
[0104] The steady-state current waveform based on the switched load is calculated to obtain its characteristics, including standard deviation, root mean square, skewness, kurtosis, waveform factor, peak factor, pulse factor, margin factor, peak-to-peak value, initial phase, barycentric frequency, mean square frequency, root mean square frequency, frequency variance, and frequency standard deviation. By extracting the time-frequency domain characteristics, the input of the classification model can be reduced to 20 dimensions or less, improving the efficiency of the classification model.
[0105] The characteristics of the steady-state current waveform are optimized.
[0106] The correlation of each characteristic with the load type is calculated, and the characteristics with low correlation are removed.
[0107] The recursive elimination method is used to find the optimal feature subset.
[0108] The cross-validation method is used to select the optimal features.
[0109] The recursive elimination method step is:
[0110] Randomly select a feature set, train a classifier based on the selected feature set, and test the importance measure of the features.
[0111] According to the measure size, the features are sorted, and the smallest measure corresponding feature is removed to obtain a new feature set.
[0112] Repeat the above steps until all feature subsets are selected, and output the optimal feature set.
[0113] Specifically, the correlation of each characteristic with the load type is calculated, and the characteristics with high correlation with the load type are the initial phase, peak-to-peak value, waveform factor, kurtosis, root mean square, standard deviation, 1st harmonic, and 3rd harmonic, with correlation degrees of 0.73, 0.875, 0.715, 0.585, 0.62, 0.62, and 0.64, respectively, as shown in Figures 4(a)-4(b) The recursive elimination method is used to reduce feature redundancy, and the flowchart is shown in Figure 5 The recursive feature elimination method uses a supervised classification model as an iterative classifier to prune the least important features from the initial 7 features. This process is repeated recursively on the set until the desired number of features is reached. The cross-validation feature combination accuracy is shown in Figure 6 The best feature combination obtained from the cross-validation experiment results is kurtosis, peak-to-peak value, initial phase, 1st harmonic, and 3rd harmonic.
[0114] The feature combination data extracted from the original data is used to train the supervised classification model.
[0115] After the model has been trained, the preferred features are first extracted, then the extracted features are identified using a supervised classification model, and finally the results are output.
[0116] Embodiment Two
[0117] The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.
[0118] Embodiment Three
[0119] The purpose of this embodiment is to provide a computer-readable storage medium.
[0120] A computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, performs the steps of the above method.
[0121] Embodiment Four
[0122] The purpose of this embodiment is to provide a non-intrusive load monitoring system based on feature optimization and waveform matching, which includes:
[0123] A data acquisition module configured to acquire and process voltage and current waveform data at the total inlet of the microgrid, and to obtain the occurrence time of the load switching event based on the information entropy of the processed data;
[0124] A feature extraction module configured to record the current root mean square variation curve of the load switching event, and to extract the electrical characteristics of the current waveform variation caused by the load switching event;
[0125] A long startup process load identification module configured to establish a waveform matching database, match the current root mean square variation curve of the load switching event with the matching database, and identify the long startup process load;
[0126] A short startup process load identification module configured to identify the short startup process load using a supervised classification model when the identification and matching of the long startup process load fails.
[0127] The steps and methods involved in the above embodiments two, three and four correspond to embodiment one, and the specific implementation can refer to the relevant description part of embodiment one. The term "computer-readable storage medium" should be understood to include a single medium or multiple media of one or more instruction sets; it should also be understood to include any medium that can store, encode or carry instruction sets for execution by a processor and cause the processor to perform any method in the present application.
[0128] Those skilled in the art should understand that the modules or steps of the present application described above can be realized by general computer devices, or alternatively, they can be realized by program codes executable by the computer devices, so that they can be stored in the storage devices and executed by the computer devices, or they can be respectively manufactured into individual integrated circuit modules, or a plurality of modules or steps among them can be manufactured into a single integrated circuit module. The present application is not limited to any specific combination of hardware and software.
[0129] The specific embodiments of the present application described above in conjunction with the accompanying drawings are not intended to limit the protection scope of the present application. Those skilled in the art should understand that various modifications or changes made on the basis of the technical solutions of the present application without creative labor are still within the protection scope of the present application.
Claims
1. A non-intrusive load monitoring method based on feature optimization and waveform matching, characterized in that, include: Voltage and current waveform data at the main inlet of the microgrid are collected at a sampling frequency of not less than 1 kHz and processed. The timing of load switching events is obtained based on the information entropy of the processed data. Record the root mean square current variation curve of the load switching event and extract the electrical characteristics of the current waveform change caused by the load switching event; A waveform matching database is established. Based on the database, the WDTW algorithm is used to match the root mean square current variation curves of recorded load switching events with the matching database to identify loads during long start-up processes. When identification and matching of long-start process loads fails, a supervised classification model is used to identify short-start process loads. Feature optimization is performed based on the electrical characteristics of common loads, and the optimized features are used to train a supervised classification model. Specifically, the correlation between each feature and the load type is calculated, and features with low correlation are removed. The recursive elimination method is used to find the optimal feature subset. A feature set is randomly selected, and a classifier is trained based on the selected feature set. The importance measure of the features is then tested. The features are sorted according to the measure, and the feature with the smallest measure is removed to obtain a new feature set. Repeat the above steps until all feature subsets have been selected, and output the optimal feature set; use cross-validation to select the optimal features.
2. The non-intrusive load monitoring method based on feature optimization and waveform matching as described in claim 1, characterized in that, The voltage and current waveform data at the main inlet of the microgrid are processed, including: Starting from the voltage zero-crossing point and ending at the second voltage zero-crossing point, one cycle of voltage and current data is extracted. The mean filtering algorithm is used to remove noise interference and measurement errors that exist during load operation and data acquisition; Nearest neighbor interpolation algorithm is introduced to scale the data and obtain current information of the same length; Normalization was used to scale the current data for different loads to the range of [-1, 1]. The data used in each training cycle is uniformly downsampled to preserve the main features of the data while minimizing data loss.
3. The non-intrusive load monitoring method based on feature optimization and waveform matching as described in claim 1, characterized in that, The steps for extracting the electrical characteristics of the current waveform changes caused by load switching events are as follows: Subtract the current waveforms of several cycles before and after the load switching event to obtain the current waveform curve of a single load. The time-frequency domain characteristics of the current waveform curve obtained by calculation.
4. The non-intrusive load monitoring method based on feature optimization and waveform matching as described in claim 1, characterized in that, The steps for establishing the waveform matching database are as follows: The root mean square (RMS) of the current waveform of length n is calculated, and then the RMS variation curve of the current is obtained. The root mean square curve of the current change over a certain period of time before and after the switching moment is used as the waveform matching data template.
5. The non-intrusive load monitoring method based on feature optimization and waveform matching as described in claim 1, characterized in that, The specific steps for identifying the load during long-start processes are as follows: Represent the template waveform of length m corresponding to the load event in the waveform matching database; The acquired real-time differential waveform of length n is represented; Calculate the difference between the two. If the difference is less than the occurrence threshold for at least nm consecutive sampling points, then the load event is determined to have occurred.
6. A computer 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 program, it implements the steps of the non-intrusive load monitoring method based on feature optimization and waveform matching as described in any one of claims 1-5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it performs the steps of the non-intrusive load monitoring method based on feature optimization and waveform matching as described in any one of claims 1-5.
8. A non-intrusive load monitoring system based on feature optimization and waveform matching, characterized in that, The non-intrusive load monitoring method based on feature optimization and waveform matching as described in any one of claims 1-5 includes: The data acquisition module is configured to: acquire and process voltage and current waveform data at the main inlet of the microgrid, and obtain the time of occurrence of load switching events based on the information entropy of the processed data; The feature extraction module is configured to: record the root mean square current variation curve of the load switching event and extract the electrical characteristics of the current waveform change caused by the load switching event; The long-start process load identification module is configured to: establish a waveform matching database, match the current root mean square change curve of the recorded load switching events with the matching database, and identify the long-start process load; The short-start process load identification module is configured to use a supervised classification model to identify the short-start process load when the identification and matching of the long-start process load fails.
Citation Information
Patent Citations
Distribution network fault early warning method and system based on transient waveforms
CN105067963A