A non-intrusive near-simultaneous continuous event detection and appliance classification method
Patent Information
- Application Number
- CN202311459222.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-11-03
AI Technical Summary
然而,由于在功率和时间维度上存在大波动、长过渡、接近同时发生等复杂的负荷变化事件,使得固定参数事件检测方法的精度不够高,也难以检测到不同负荷事件完整的暂态过程
[0077]1、针对现有事件检测算法只能判断事件是否发生,无法对事件具体的投入时刻和切出时刻进行检测的问题,本方法利用符号条件和阈值设置判断准确的检测事件的开启时间和关闭时间,从而可以提取整个完整的事件。
Smart Images

Figure CN117491730B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart grid technology and relates to a non-intrusive load monitoring method, specifically a non-intrusive near-simultaneous continuous event detection and appliance classification method. Background Technology
[0002] Non-Intrusive Load Monitoring (NILM) technology can accurately understand users' power consumption, thereby better optimizing power scheduling and promoting energy conservation and emission reduction on the user side.
[0003] Event detection is the first step in the event-based National Load Management (NILM) method, providing necessary information on power load changes and event timestamps for subsequent stages. However, due to the complexity of load change events—such as large fluctuations, long transitions, and near-simultaneous occurrences—in both power and time dimensions, fixed-parameter event detection methods suffer from insufficient accuracy and struggle to detect the complete transient processes of different load events. Fixed-parameter event detection methods often only detect single points of change in the overall load signal time series and can only determine the approximate time of the load event; they also cannot detect events involving low-power appliances, typically ignoring their occurrence; for near-simultaneous continuous events caused by different appliances switching on or off within very short intervals, they often only detect a single switching event. Furthermore, existing NILM methods often classify appliances only during the load identification stage, which leads to decreased accuracy due to the large number of appliance types. Preliminary classification of characteristic appliances through event detection facilitates subsequent load identification.
[0004] To address the aforementioned issues, a robust, highly adaptive, non-intrusive load event detection method is needed that can detect nearly simultaneous events, fully detect transient processes of different types of load events, and perform preliminary classification of electrical appliances. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes a non-intrusive method for detecting near-simultaneous continuous events and classifying electrical appliances. First, the occurrence of events is detected based on the Cumulative Sum (CUSUM) algorithm. Then, the specific time of event occurrence is determined by using sign conditions and threshold settings to eliminate false positive events, check for near-simultaneous continuous on or continuous off events, and finally classify electrical appliances, providing a technical foundation for subsequent load identification.
[0006] A non-invasive method for detecting near-simultaneous continuous events and classifying electrical appliances, with the following specific steps:
[0007] Step 1: Detect possible events
[0008] The CUSUM algorithm is used to perform bilateral event detection on the power time series to determine the occurrence of events. The specific steps are as follows:
[0009] Step 1.1: Obtain the effective value sequence of the active power to be detected. Where p(j) represents the effective value of the j-th active power in the sequence, and len(p) is the length of the effective value sequence of the active power to be detected. A sliding window is used to sample the time series of the power to be detected, and the sliding window includes a mean calculation window W. m Transient state detection window W d and long transient detection window W c Three consecutive sliding windows; where W m and W d The length of W is m. c Given a window length of n, calculate the mean M of the power RMS value sequence within each of the three sliding windows. m M d and M c :
[0010]
[0011]
[0012]
[0013] Where p(k) represents the mean calculation window W m The first effective power value in the process. When k+n>len(p), the process terminates; otherwise, proceed to step 1.2.
[0014] Preferably, the value of m ranges from 20 to 100, and the value of n ranges from 1.5m to 2.5m.
[0015] Step 1.2: Calculate the transient detection window W one by one. d The cumulative sum of input events at each time step, g + (k) and the cumulative sum of cut-out events g - (k):
[0016]
[0017]
[0018] Where h is the cumulative sum and threshold, which can be set according to actual detection needs. β represents externally introduced noise that follows a normal distribution. If... or If the time condition is met, it indicates that the event may occur, and proceed to step 1.3. Otherwise, the sliding window is postponed by m, that is, k becomes k+m, and the process returns to step 1.1.
[0019] Step 1.3: Calculate the long transient detection window W one by one. c The cumulative sum of input events at each moment and G + (k) and the cumulative sum of cut-out events and G - (k):
[0020]
[0021]
[0022] When G exists + (k)>h or G - If (k)>h, it is determined that a high-power electrical appliance event has occurred; otherwise, it is determined that a low-power electrical appliance event has occurred.
[0023] Step 2: Determine when the event is likely to occur.
[0024] When it is determined that an event has occurred, from W c The entire W is traversed starting from the initial moment of the window. c The window obtains the effective value of active power at each moment, and accurately captures the input time o(s) and output time o(t) of the event through the following steps:
[0025] Step 2.1: Obtain the input time o(s):
[0026] s2.1.1 Calculate △p s- = p(s) - p(s-2), where p(s) is the effective power value at time s, and p(s-2) is the effective power value at time s-2.
[0027] Calculate sg(d) s ) and sg(d s+1 ). Where d s = p(s) - p(s-1), the sg() function is expressed as follows:
[0028]
[0029] Calculate △p si = p(s+v)-p(s), where p(s+v) satisfies p(s+v)>p(s+v-1) and p(s+v)≥p(s+v+1).
[0030] s2.1.2, Set the following conditions for determining the input time:
[0031] Condition 1: △p s- - <p there , where P there The set stability threshold;
[0032] Condition 2: sg(d s )<1 and sg(d s+1 ) = 1;
[0033] Condition 3: △p si >h;
[0034] Condition 4: △p si >0.5h.
[0035] s2.1.3 If conditions one through three are satisfied simultaneously, then o(s) is recorded as the time when the high-power electrical appliance is switched on. If conditions one, two, and four are satisfied simultaneously, then o(s) is recorded as the time when the low-power electrical appliance is switched on.
[0036] Step 2.2: Obtain the cut-out time o(t):
[0037] s2.2.1 Calculate △p t+ =p(t+2)-p(t), sg(d) t ) and sg(d t+1 ), and △p ti = p(t) - p(tv), where p(tv) satisfies p(tv) > p(t-v+1) and p(tv) ≥ p(tv-1).
[0038] s2.2.2, Set the following cut-out time determination conditions:
[0039] Condition 5: Δp t+< p there ;
[0040] Condition 6: sg(d t ) = -1 and sg(d t+1 ) = 0;
[0041] Condition 7: △p ti >h;
[0042] Condition 8: △p ti >0.5h.
[0043] s2.2.3 If conditions five through seven are satisfied simultaneously, then o(t) is recorded as the time when the high-power electrical appliance is switched on. If conditions five, six, and eight are satisfied simultaneously, then o(t) is recorded as the time when the low-power electrical appliance is switched on.
[0044] Step 2.3: For the input and output times of high-power appliances, proceed to step three for false positive event handling. For the input time of low-power appliances, proceed to step four for event confirmation. If there is no input or output time of appliances, postpone the sliding window by m, that is, make k become k+m, and return to step 1.1.
[0045] As a preferred option, a stability threshold P is set. there =0.5~2.
[0046] Step 3: Handling False Positive Events Related to High-Power Electrical Appliances
[0047] High-power electrical appliances generate high power fluctuations during operation, which can lead to some moments being mistakenly identified as event occurrences, i.e., false positive events. To avoid this situation, it is necessary to further distinguish between the event input time o(s) and event output time o(t) of the high-power electrical appliances captured in step two:
[0048] Step 3.1: When it is determined that an event has occurred, for the event occurrence time o(s), calculate the variance of the active power sequence within the time interval from o(sm) to o(s). and power average m s Set constant hyperparameter r thre ,when If the power-consuming electrical appliance is connected at a certain time, the time o(s) is considered true; otherwise, the time o(s) is considered false.
[0049] Step 3.2: When it is determined that an event cutoff occurs, for the cutoff time o(t), calculate the variance of the active power sequence in the time interval from o(t) to o(t+m). and power average m t .when When the high-power electrical appliance cuts off at time o(t), it is considered true; otherwise, it is considered false.
[0050] Step 3.3: When a true input time o(s) or cut-out time o(t) exists, proceed to step five to detect near-simultaneous continuous events. Otherwise, discard false event times, postpone the sliding window by m (i.e., change k to k+m), and return to step 1.1.
[0051] Preferably, the hyperparameter r thre Due to the characteristics of the target device, the value ranges from 15 to 30.
[0052] Step 4: Event Confirmation for Low-Power Appliances
[0053] When the power difference before and after switching on a low-power appliance is less than the set threshold, traditional methods cannot detect it. Furthermore, most low-power appliances only operate in a stable mode and rarely have multi-state operating modes. The following steps are used to confirm the event detected in step two regarding the low-power appliance:
[0054] Step 4.1: Based on the detected activation time o(s) of the low-power appliances, calculate the variance of the active power sequence in the time interval from o(sm) to o(s). and the nominal variance If a comparison is made, Then calculate o(s) to o(s) + The coefficient of variation C in the time interval of 3m) w , When C w <C h At that time, the input time o(s) is considered true. Where C h σ is the threshold value for the rated coefficient of variation of constant power electrical appliances. w m represents the standard deviation of the active power sequence within the corresponding time interval. w This represents the average active power.
[0055] Step 4.2: Based on the detected cut-off time o(t) of the low-power appliance, calculate the variance of the active power sequence in the time interval from o(t) to o(t+m). like Calculate the coefficient of variation C in the time interval from o(s-3m) to o(s). w When C w <C h If the cut-out time o(t) is true, then the cut-out time is considered true.
[0056] Step 4.3: Delay all sliding windows by m, that is, make k become k+m, and return to step 1.1.
[0057] As a preferred option, a nominal variance is set. The value range is 0.07 to 0.1, and the threshold value C for the rated coefficient of variation of constant power electrical appliances is... h The value range is from 0.015 to 0.025.
[0058] Step 5: Detection of near-simultaneous continuous on or off events
[0059] When consecutive on or off events occur, their cumulative power will, in most cases, exceed h. Microwindows can be used to distinguish between almost simultaneous consecutive on or off events with finer resolution.
[0060] Step 5.1: For the input time o(s) and output time o(t) obtained in Step 3, respectively, for the W where each event occurs... d The power time series within the window is differentially analyzed. The first-order difference of the active power at time j is diff(j) = p(j) - p(j-1), resulting in the active power differential series.
[0061] Step 5.2: Perform event detection using two micro-sliding windows with a length of two consecutive sampling points, including a mean calculation micro-window W. n and event detection micro-window W sCalculate the mean M of the difference sequences diff(j) within the two micro-sliding windows respectively. n and M s .
[0062] Step 5.3: For each input time o(s), calculate the mean value of the micro-window W. s The cumulative sum of input events corresponding to each moment within the time frame
[0063]
[0064] If g + (l)>d h And p(l+1)>d s The input event occurs at time l, where d h For the set slope threshold, d s The differential reference values are all constant parameters. The micro-sliding window is pushed back two sampling points until the entire W is traversed. d Window. When two or more input events are detected, it can be considered that there are near-simultaneous consecutive input events, and the time o(s) of each input event is recorded.
[0065] Step 5.4: For each cut-out time o(t), calculate the mean value of the micro-window W. s The cumulative sum of cut-out events at each time step
[0066]
[0067] If g - (l)>d h And p(l+1)<-d s The cut-out event occurs at time l. The micro-sliding window is postponed by two sampling points until the entire W has been traversed. d Window. When two or more cut-out events are detected, it can be considered that there are near-simultaneous consecutive cut-out events, and the time o(t) of each cut-out event is recorded.
[0068] Step 5.5: Delay the sliding window by m, i.e., let k become k+m, and return to step 1.1 until the active power RMS value sequence is completed. The detection.
[0069] As a preferred option, the slope threshold d h The value range is generally 30 to 100, and the input differential benchmark value d s The value range is set to 0.8d. h .
[0070] As a preferred option, a preliminary classification of electrical appliance types is also included. To improve the accuracy of subsequent load identification, electrical appliances are initially classified into constant power appliances, starting surge appliances, and other appliances. Constant power appliances refer to appliances with small fluctuations in active power during operation, including most appliances containing only resistance and most low-power appliances. Starting surge appliances refer to appliances that generate extremely large power surges during startup, including most appliances with motors. These appliances have unique characteristics in their active power curves during startup and operation. The active power curve of constant power appliances is relatively smooth during stable operation; when starting surge appliances are activated, their instantaneous active power rises rapidly and is much higher than the power during stable operation. First, starter surge appliances are tested. If they are not starter surge appliances, constant power appliances are tested. If they do not belong to either of these two categories, they are other types of appliances. The specific steps are as follows:
[0071] Step 6.1: Calculate the active power value p(s) of the appliance at the time of connection o(s), and find the point p of maximum effective active power from time o(s) to time o(s+n). max And the corresponding time o(a), if o(a) - o(s) are satisfied simultaneously. < If there is a cut-out time o(t) between time m and time o(a) and time o(a+2m), proceed to step 6.2; otherwise, proceed to step 6.3.
[0072] Step 6.2: Calculate the average power m from time o(a) to time o(t-5). c And the value of λ:
[0073]
[0074] If λ>h p If the input event at input time o(s) is determined to be caused by the activation of the surge appliance, then proceed to step 6.3; otherwise, proceed to step 6.3. Where h... p The threshold value for determining whether to activate surge protectors is between 1.25 and 1.35.
[0075] Step 6.3: If there is a cut-out time o(t) within the interval from time o(s+m) to time o(s+3m), calculate the coefficient of variation C within the interval from time o(s+m) to time o(t-5). w Otherwise, calculate the coefficient of variation C in the interval from time o(s+m) to time o(s+3m). w When C w <C h If the power supply time o(s) is considered to be caused by a constant power appliance, then the power supply event is considered to be caused by another type of appliance.
[0076] The present invention has the following beneficial effects:
[0077] 1. To address the issue that existing event detection algorithms can only determine whether an event has occurred, but cannot detect the specific entry and exit times of the event, this method uses symbolic conditions and threshold settings to accurately determine the start and end times of the event, thereby extracting the entire complete event.
[0078] 2. To address the issue that existing event detection algorithms may lead to false detections when the active power of high-power appliances fluctuates significantly during normal operation, this method implements an adaptive robust fluctuation threshold setting based on the power fluctuation, thereby reducing the false detection rate in such cases.
[0079] 3. When detecting events involving low-power electrical appliances, this method uses a mean calculation window W. m Transient state detection window W d and long transient detection window W c Three windows are used to filter possible low-power events, and the occurrence of low-power electrical appliance events is confirmed based on fluctuation tests and variation parameters.
[0080] 4. To address the issue that existing event detection algorithms cannot detect events that occur at near-simultaneously, this method uses a micro-window mean calculation window W. n and micro-window detection window W s The changes in the first-order difference value of the active power time series are detected, thereby detecting near-simultaneous continuous events.
[0081] 5. This method can classify electrical appliances into constant power appliances, surge appliances, and other types of electrical appliances, laying a good foundation for improving the accuracy of subsequent load identification. Attached Figure Description
[0082] Figure 1 This is a flowchart of continuous event detection and appliance classification in the embodiment;
[0083] Figure 2 This is a schematic diagram of the sliding window position in an embodiment;
[0084] Figure 3 The diagram shows the detection results of power-on and power-off events of high-power electrical appliances under high fluctuation conditions, as an example.
[0085] Figure 4 The diagram shows the detection results of the power-on and power-off events of a low-power electrical appliance as an example.
[0086] Figure 5 The image shows the detection results of near-simultaneous continuous input events and continuous cut-out events in the example.
[0087] Figure 6A schematic diagram of an image for detecting active power differential sequence input events, as shown in the embodiment.
[0088] Figure 7 This is a diagram showing the detection results of all power input and output events for the complete active power sequence in the example embodiment;
[0089] Figure 8 The following is a diagram showing the results of surge protection device detection during an example.
[0090] Figure 9 The image shows the test results of a constant power electrical appliance as an example. Detailed Implementation
[0091] The present invention will be further explained and described below with reference to the accompanying drawings, but this should not be construed as limiting the scope of the claims.
[0092] like Figure 1 As shown, a non-invasive method for detecting near-simultaneous continuous events and classifying electrical appliances specifically includes the following steps:
[0093] Step 1: Detect possible events
[0094] The total power data from the LIFTED dataset was selected as the power time series and resampled to 1 Hz. The CUSUM algorithm was used to perform bilateral event detection on the power time series to determine the occurrence of events. The specific steps are as follows:
[0095] Step 1.1: Obtain the effective value sequence of the active power to be detected. Where p(j) represents the effective value of the j-th active power in the sequence, and len(p) is the length of the sequence of effective active power values to be detected. Figure 2 As shown, a sliding window is used to sample the power time series to be detected. The sliding window includes a mean calculation window W. m Transient state detection window W d and long transient detection window W c Three consecutive sliding windows; where W m and W d The length of each is m, where m = 20. W c The window length is n, where n = 40. Calculate the mean M of the power RMS value sequence within each of the three sliding windows. m M d and M c :
[0096]
[0097]
[0098]
[0099] Where p(k) represents the mean calculation window W m The first effective power value in the process. Check if k+n is greater than len(p). If it is, the process terminates. Otherwise, proceed to step 1.2.
[0100] Step 1.2: Calculate the transient detection window W one by one. d The cumulative sum of input events at each time step, g + (k) and the cumulative sum of cut-out events g - (k):
[0101]
[0102]
[0103] Where h is the cumulative sum threshold, β is the noise introduced from the outside, and W is the noise level for each transient detection window. d The corresponding g + (k) and g - (k) Its initial value g + (0) and g - (0) are all 0. If there exists or If the time condition is met, it indicates that the event may occur, and proceed to step 1.3. Otherwise, the sliding window is postponed by m, that is, k becomes k+m, and the process returns to step 1.1.
[0104] Step 1.3: Calculate the long transient detection window W one by one. c The cumulative sum of input events at each moment and G + (k) and the cumulative sum of cut-out events and G - (k):
[0105]
[0106]
[0107] Each long transient detection window W c Corresponding G + (k) and G - (k) Its initial value G + (0) and G - (0) are all 0. When G exists... + (k)>h or G - If (k)>h, it is determined that an event has occurred in a high-power appliance; otherwise, an event has occurred in a low-power appliance.
[0108] Step 2: Determine when the event is likely to occur.
[0109] When it is determined that an event has occurred, from W c The entire W is traversed starting from the initial moment of the window.c The window obtains the effective value of active power at each moment, and accurately captures the input time o(s) and output time o(t) of the event through the following steps:
[0110] Step 2.1: Obtain the input time o(s):
[0111] s2.1.1 Calculate △p s- = p(s) - p(s-2), where p(s) is the effective power value at time s, and p(s-2) is the effective power value at time s-2.
[0112] Calculate sg(d) s ) and sg(d s+1 ). Where d s = p(s) - p(s-1), the sg() function is expressed as follows:
[0113]
[0114] Calculate △p si = p(s+v)-p(s), where p(s+v) satisfies p(s+v)>p(s+v-1) and p(s+v)≥p(s+v+1).
[0115] s2.1.2, Set the following conditions for determining the input time:
[0116] Condition 1: △p s -- <p there , where P there For the set stability threshold, P there =0.5~2.
[0117] Condition 2: sg(d s )<1 and sg(d s+1 ) = 1;
[0118] Condition 3: △p si >h;
[0119] Condition 4: △p si >0.5h.
[0120] s2.1.3 If conditions one through three are satisfied simultaneously, then o(s) is recorded as the time when the high-power electrical appliance is switched on. If conditions one, two, and four are satisfied simultaneously, then o(s) is recorded as the time when the low-power electrical appliance is switched on.
[0121] Step 2.2: Obtain the cut-out time o(t):
[0122] s2.2.1 Calculate △p t+ =p(t+2)-p(t), sg(d) t) and sg(d t+1 ), and △p ti = p(t) - p(tv), where p(tv) satisfies p(tv) > p(t-v+1) and p(tv) ≥ p(tv-1).
[0123] s2.2.2, Set the following cut-out time determination conditions:
[0124] Condition 5: Δp t+< p there ;
[0125] Condition 6: sg(d t ) = -1 and sg(d t+1 ) = 0;
[0126] Condition 7: △p ti >h;
[0127] Condition 8: △p ti >0.5h.
[0128] s2.2.3 If conditions five through seven are satisfied simultaneously, then o(t) is recorded as the time when the high-power electrical appliance is switched on. If conditions five, six, and eight are satisfied simultaneously, then o(t) is recorded as the time when the low-power electrical appliance is switched on.
[0129] Step 2.3: For the input and output times of high-power appliances, proceed to step three for false positive event handling. For the input time of low-power appliances, proceed to step four for event confirmation. If there is no input or output time of appliances, postpone the sliding window by m, that is, make k become k+m, and return to step 1.1.
[0130] Step 3: Handling False Positive Events Related to High-Power Electrical Appliances
[0131] High-power electrical appliances generate high power fluctuations during operation, which can lead to some moments being mistakenly identified as event occurrences, i.e., false positive events. To avoid this situation, it is necessary to further distinguish between the event input time o(s) and event output time o(t) of the high-power electrical appliances captured in step two:
[0132] Step 3.1: When it is determined that an event has occurred, for the event occurrence time o(s), calculate the variance of the active power sequence within the time interval from o(sm) to o(s). Calculate the power mean m over this time interval. s And set the constant hyperparameter r. thre r thre Due to the characteristics of the target device, the value is set to 20. When If the activation time o(s) is true, proceed to step five to detect near-simultaneous continuous events. Otherwise, if the activation time o(s) is false, discard the event. The activation time detection results for high-power electrical appliances are as follows: Figure 3 As shown in (a) in the figure.
[0133] Step 3.2: When it is determined that an event cutoff occurs, calculate the variance of the time interval from o(t) to o(t+m) for the cutoff time o(t). Calculate the power mean m over this time interval. t .when If the cut-out time o(t) is true, proceed to step five. Otherwise, if the cut-out time o(t) is false, discard the event. The cut-out time detection result for high-power electrical appliances is as follows: Figure 3 As shown in (b) of the diagram.
[0134] Step 3.3: When a true input time o(s) or cut-out time o(t) exists, proceed to step five to detect near-simultaneous continuous events. Otherwise, discard false event times, postpone the sliding window by m (i.e., change k to k+m), and return to step 1.1.
[0135] Step 4: Event Confirmation for Low-Power Appliances
[0136] When the power difference before and after switching on a low-power appliance is less than the set threshold, traditional methods cannot detect it. Furthermore, most low-power appliances only operate in a stable mode and rarely have multi-state operating modes.
[0137] Step 4.1: Based on the detected activation time o(s) of the low-power appliances, calculate the variance of the active power sequence in the time interval from o(sm) to o(s). and the nominal variance If a comparison is made, Then calculate o(s) to o(s) + The coefficient of variation in the time interval of 3m) When C w <C h At that time, the input time o(s) is considered true. C h =0.02, representing the threshold value of the rated coefficient of variation for constant power electrical appliances, σ w m represents the standard deviation of the active power sequence within the corresponding time interval. w The average active power is the result of the test at the moment the low-power appliance is turned on. Figure 4 As shown in (a) in the figure.
[0138] Step 4.2: Based on the detected cut-off time o(t) of the low-power appliance, calculate the variance of the active power sequence in the time interval from o(t) to o(t+m). like Calculate the coefficient of variation C in the time interval from o(t-3m) to o(t). w When C w <C h If the cut-out time o(t) is true, then the cut-out time detection result for low-power electrical appliances is as follows: Figure 4 As shown in (b) of the diagram.
[0139] Step 5: Detection of near-simultaneous continuous on or off events
[0140] Step 5.1, the detection results of near-simultaneous continuous input events and continuous cut-out events are shown in the following figures. Figure 5 As shown in (a) and (b) in the figure. For the input time o(s) and cut-out time o(t) obtained in step three, respectively, for the W where each event occurs... d The power time series within the window is differentially analyzed, and the first-order difference at time j is calculated as diff(j), where diff(j) = p(j) - p(j-1). The first-order difference value of the power time series within the window at each time step is then obtained, thus yielding the active power differential series.
[0141] Step 5.2: Use two sliding windows with a length of two consecutive sampling points for event detection, including a mean calculation micro-window W. n and event detection micro-window W s Calculate the mean M of the two micro-sliding windows on diff(j). n and M s .
[0142] Step 5.3: For each input time o(s), calculate the mean value of the micro-window W. s The cumulative sum of input events corresponding to each moment within the time frame
[0143]
[0144] If g + (l)>d h And p(l+1)>d s The input event occurs at time l, where d h =50, indicating the set slope threshold, d s =40, representing the differential baseline value. The micro-sliding window is pushed back two sampling points until the entire W is traversed. d Window. When two or more input events are detected, it can be considered that near-simultaneous consecutive input events have occurred, and the time o(s) of each input event is recorded. The active power differential sequence input event detection image is shown below. Figure 6As shown in (a) in the figure.
[0145] Step 5.4: For each cut-out time o(t), calculate the mean value of the micro-window W. s The cumulative sum of cut-out events at each time step
[0146]
[0147] If g - (l)>d h And p(l+1)<-d s The cut-out event occurs at time l. The micro-sliding window is postponed by two sampling points until the entire W has been traversed. d Window. When two or more cut-out events are detected, it can be considered that near-simultaneous consecutive cut-out events have occurred, and the time o(t) of each cut-out event is recorded. The active power differential sequence cut-out event detection image is shown below. Figure 6 As shown in (b) of the diagram.
[0148] Step 5.5: Delay the sliding window by m, i.e., let k become k+m, and return to step 1.1 until the active power RMS value sequence is completed. The detection results for all power input and output events in the complete active power sequence are shown in the following figures. Figure 7 As shown in (a) and 7(b).
[0149] Step Six: Preliminary Classification of Appliance Types
[0150] Step 6.1: Calculate the active power value p(s) of the appliance at the time of connection o(s), and find the point p of maximum effective active power from time o(s) to time o(s+n). max And the corresponding time o(a). If o(a) - o(s) are simultaneously satisfied. < If there is a cut-out time o(t) between time m and time o(a) and time o(a+2m), proceed to step 6.2; otherwise, proceed to step 6.3.
[0151] Step 6.2: Calculate the average power m from time o(a) to time o(t-5). c With λ value:
[0152]
[0153] The value of λ is calculated using the above formula. If λ > h p If the input event at input time o(s) is determined to be caused by the activation of the surge appliance, then proceed to step 6.3; otherwise, proceed to step 6.3. Where h... p =1.3, indicating the threshold for activating surge protectors. The surge protector activation detection result is shown in the figure below. Figure 8 As shown.
[0154] Step 6.3: If there is a cut-out time o(t) within the interval from time o(s+m) to time o(s+3m), calculate the coefficient of variation C within the interval from time o(s+m) to time o(t-5). w Otherwise, calculate the coefficient of variation C in the interval from time o(s+m) to time o(s+3m). w When C w <C h If the input event at time o(s) is considered to be caused by a constant power appliance, then the input event is considered to be caused by another type of appliance. The constant power appliance detection result diagram is shown below. Figure 9 As shown.
[0155] This embodiment evaluates event detection results using the true positive percentage (TPP) = TP / EG, the false positive percentage (FPP) = FP / ED, and the false negative percentage (FNP) = FN / EG, where EG is the number of actual events, ED is the number of detected events, and TP, FP, and FN are the number of true positive, false positive, and false negative events, respectively. The F1 score is also used to determine the optimal parameters.
[0156]
[0157] The event detection results are shown in Table 1. The traditional CUSUM event detection algorithm and the Generalized Likelihood Ratio Test (GLRT) event detection algorithm were compared and validated.
[0158] This method 100% 0 0 100% Traditional CUSUM 86.8% 12.3% 13.2% 87.1% GLRT 92.8% 10.3% 7.2% 91.4%
[0159] Table 1
[0160] The results of the surge protection device start-up test are shown in Table 2:
[0161] This method 100% 0 0 100%
[0162] Table 2
[0163] The test results of constant power electrical appliances are shown in Table 3:
[0164] This method 100% 0 0 100%
[0165] Table 3
[0166] It can be seen that this method has a significant improvement in the accuracy of events compared to traditional algorithms, and it can also make an accurate preliminary classification of electrical appliance types.
Claims
1. A non-invasive method for detecting near-simultaneous continuous events and classifying electrical appliances, characterized in that: The specific steps of this method are as follows: Step 1: Detect possible events The CUSUM algorithm is used for bilateral event detection of active power time series data. When the long transient detection window W... c Memory in G + (k)>h or G - When (k)>h, it is determined that a high-power electrical appliance event has occurred; otherwise, it is determined that a low-power electrical appliance event has occurred; where G + (k), G - (k) represent the long transient detection window W, respectively. c The cumulative sum of input events and the cumulative sum of cut-out events corresponding to time k, where h represents the cumulative sum threshold; Step 2: Determine when the event is likely to occur. Step 2.1: Obtain the input time o(s): s2.1.1 Calculate △p s- = p(s) - p(s-2), where p(s) is the effective power value at time s; Calculate sg(d) s ) and sg(d s+1 ); where d s = p(s) - p(s-1), the sg() function is expressed as follows: Calculate △p si = p(s+v)-p(s), where p(s+v) satisfies p(s+v)>p(s+v-1) and p(s+v)≥p(s+v+1); s2.1.2, Set the following conditions for determining the input time: Condition 1: △p s- - <p there Condition 2: sg(d s )<1 and sg(d s+1 )=1; Condition 3: △p si >h; Condition 4: △p si >0.5h; where P there The set stability threshold; s2.1.3 If conditions one through three are satisfied simultaneously, then o(s) is recorded as the time when the high-power electrical appliance is switched on. If conditions one, two, and four are satisfied simultaneously, then o(s) is recorded as the time when the low-power electrical appliance is switched on. Step 2.2: Obtain the cut-out time o(t): s2.2.1 Calculate △p t+ =p(t+2)-p(t), sg(d) t ) and sg(d t+1 ), and △p ti = p(t) - p(tv), where p(tv) satisfies p(tv) > p(t-v+1) and p(tv) ≥ p(tv-1); s2.2.2, Set the following cut-out time determination conditions: Condition 5: Δp t+ <p there Condition 6: sg(d t ) = -1 and sg(d t+1 )=0; Condition 7: △p ti >h; Condition 8: △p ti >0.5h; s2.2.3 If conditions five through seven are satisfied simultaneously, then o(t) is recorded as the time when the high-power electrical appliance is switched on. If conditions five, six, and eight are satisfied simultaneously, then o(t) is recorded as the time when the low-power electrical appliance is switched on. Step 2.3: For the connection and disconnection times of high-power appliances, proceed to Step 3 for false positive event handling. For the connection time of low-power appliances, proceed to Step 4 for event confirmation. If no connection or disconnection time exists, postpone the sliding window by m and return to Step 1; where m is the mean calculation window W in the CUSUM algorithm. m With transient detection window W d Length; Step 3: Handling False Positive Events Related to High-Power Electrical Appliances For the switching on and off times of high-power appliances determined in step two, calculate the variance of the active power sequence over time periods of length m before and after the event. and power average m s m t Set constant hyperparameter r thre ,like Then the input time o(s) is true, if Then the cut-out time is true; Step 4: Event Confirmation for Low-Power Appliances For the low-power appliance's on-time or off-time determined in step two, calculate the variance of the active power sequence within a time period of m before or after the event. If it is less than the set rated value, further calculate the coefficient of variation within a time period of 3m before or after the event. If the coefficient of variation is less than the rated coefficient of variation threshold of the constant power appliance, then the on-time or off-time is true. Step 5: Detection of near-simultaneous continuous on or off events Step 5.1: For the high-power appliance's input time o(s) and output time o(t) obtained in Step 3, respectively, for the W where each event occurs... d Differentiating the power time series within the window yields the active power differential series. Step 5.2: Perform event detection using two micro-sliding windows with a length of two consecutive sampling points, including a mean calculation micro-window W. n and event detection micro-window W s Calculate the mean M of the difference sequences diff(j) within the two micro-sliding windows respectively. n and M s ; Step 5.3: For each input time o(s), calculate the mean value of the micro-window W. s The cumulative sum of input events corresponding to each moment within the time frame If g + (l)>d h And p(l+1)>d s The input event occurs at time l, where d h For the set slope threshold, d s The differential reference values are all constant parameters; the micro-sliding window is postponed by two sampling points until the entire W is traversed. d Window; when two or more input events are detected, it can be considered that nearly simultaneous consecutive input events have occurred; Step 5.4: For each cut-out time o(t), calculate the mean value of the micro-window W. s The cumulative sum of cut-out events at each time step If g - (l)>d h And p(l+1)<-d s The cut-out event occurs at time l; the micro-sliding window is postponed by two sampling points until the entire W is traversed. d When two or more cut-out events are detected, it can be considered that nearly simultaneous consecutive cut-out events have occurred. Step 5.5: Delay the sliding window by m, i.e., make k become k+m, and return to step 1 until the event detection of the active power effective value sequence is completed.
2. The non-invasive near-simultaneous continuous event detection and electrical appliance classification method as described in claim 1, characterized in that: The specific steps for bilateral event detection of power time series using the CUSUM algorithm are as follows: Step 1.1: Obtain the effective value sequence of the active power to be detected. Where p(j) represents the effective value of the j-th active power in the sequence, and len(p) is the length of the effective value sequence of the active power to be detected; a sliding window is used to sample the time series of the power to be detected, the sliding window including a mean calculation window W. m Transient state detection window W d and long transient detection window W c Three consecutive sliding windows; where W m and W d The length of W is m. c Given a window length of n, calculate the mean M of the power RMS value sequence within each of the three sliding windows. m M d and M c : Where p(k) represents the mean calculation window W m The first effective power value in the process; when k+n>len(p), the process terminates, otherwise proceed to step 1.2; Step 1.2: Calculate the transient detection window W one by one. d The cumulative sum of input events at each time step, g + (k) and the cumulative sum of cut-out events g - (k): Where β is the noise introduced from the outside that follows a normal distribution; if there exists or If the value is true, it indicates that the event may occur, and proceed to step 1.3; otherwise, the sliding window is postponed by m, that is, k becomes k+m, and the process returns to step 1.
1. Step 1.3: Calculate the long transient detection window W one by one. c The cumulative sum of input events at each moment and G + (k) and the cumulative sum of cut-out events G - (k): When G exists + (k)>h or G - If (k)>h, it is determined that a high-power electrical appliance event has occurred; otherwise, it is determined that a low-power electrical appliance event has occurred.
3. The non-invasive near-simultaneous continuous event detection and electrical appliance classification method as described in claim 2, characterized in that: Mean calculation window W m Transient state detection window W d The length m ranges from 20 to 100, and the long transient detection window W... c The length n ranges from 1.5m to 2.5m.
4. The non-invasive near-simultaneous continuous event detection and electrical appliance classification method as described in claim 1, characterized in that: In step two, a stability threshold P is set. there =0.5~2.
5. The non-invasive near-simultaneous continuous event detection and electrical appliance classification method as described in claim 1, characterized in that: The specific methods for handling false positive events of high-power electrical appliances are as follows: Step 3.1: When it is determined that an event has occurred, for the event occurrence time o(s), calculate the variance of the active power sequence within the time interval from o(sm) to o(s). and power average m s ;when If the power-consuming electrical appliance is connected at a certain time, the time o(s) is considered true; otherwise, the time o(s) is considered false. Step 3.2: When it is determined that an event cutoff occurs, for the cutoff time o(t), calculate the variance of the active power sequence in the time interval from o(t) to o(t+m). and power average m t ;when When the high-power electrical appliance cuts off at time o(t), it is considered true; otherwise, it is considered false.
6. The non-invasive near-simultaneous continuous event detection and electrical appliance classification method as described in claim 5, characterized in that: The hyperparameter r thre Due to the characteristics of the target device, the value ranges from 15 to 30.
7. The non-invasive near-simultaneous continuous event detection and electrical appliance classification method as described in claim 1, characterized in that: The method for confirming events involving low-power electrical appliances is as follows: Step 4.1: Based on the detected activation time o(s) of low-power appliances, calculate the variance of the active power sequence in the time interval from o(sm) to o(s). and the nominal variance If a comparison is made, Then calculate o(s) to o(s) + The coefficient of variation C in the time interval of 3m) w , When C w <C h At that time, the input time o(s) is considered true; where C h σ is the threshold value for the rated coefficient of variation of constant power electrical appliances. w m represents the standard deviation of the active power sequence within the corresponding time interval. w This represents the average active power. Step 4.2: Based on the detected cut-off time o(t) of the low-power appliance, calculate the variance of the active power sequence in the time interval from o(t) to o(t+m). like Calculate the coefficient of variation C in the time interval from o(s-3m) to o(s). w When C w <C h If the cut-out time o(t) is true, then the cut-out time is considered true.
8. The non-invasive near-simultaneous continuous event detection and electrical appliance classification method as described in claim 7, characterized in that: Set the nominal variance The value range is 0.07 to 0.1, and the threshold value C for the rated coefficient of variation of constant power electrical appliances is... h The value range is from 0.015 to 0.
025.
9. The non-invasive near-simultaneous continuous event detection and electrical appliance classification method as described in claim 1, characterized in that: After completing the event detection of the active power RMS value sequence, a preliminary classification of the appliance types is performed. The specific steps are as follows: Step 6.1: Calculate the active power value p(s) of the electrical appliance at the input moment o(s), and find the maximum effective value point p of the active power from the moment o(s) to the moment o(s + n). max , and the corresponding moment o(a). If both o(a) - o(s) < m and there is a cut-off moment o(t) from the moment o(a) to the moment o(a + 2m) are satisfied, go to Step 6.2; otherwise, go to Step 6.3; Step 6.2: Calculate the average power m from time o(a) to time o(t-5). c And the value of λ: If λ>h p If the input event corresponding to input time o(s) is considered to be caused by the activation of the surge appliance, then proceed to step 6.3; where h p The threshold value for determining whether to activate surge protectors is between 1.25 and 1.
35. Step 6.3: If there is a cut-out time o(t) within the interval from time o(s+m) to time o(s+3m), calculate the coefficient of variation C within the interval from time o(s+m) to time o(t-5). w Otherwise, calculate the coefficient of variation C in the interval from time o(s+m) to time o(s+3m). w When C w <C h If the power supply event at time o(s) is considered to be caused by a constant power appliance, then the power supply event at time o(s) is considered to be caused by another type of appliance.
Citation Information
Patent Citations
Non-invasive load monitoring method based on event detection
CN110954744A
Non-invasive resident load sudden change event three-threshold detection method and system
CN112396007A