Load Switching Detection Method and System Based on Dynamic Window and Anti-Interference Verification
Through the collaborative design of dynamic windows and anti-interference verification, the problem of misjudgment of multi-stage power changes during equipment startup in household electric scenarios is solved, and high-precision load switching event detection is achieved, which is suitable for complex household electricity environments.
Patent Information
- Application Number
- CN202510578823.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-05-07
AI Technical Summary
The prior art lacks the ability to capture the multi-stage power changes during equipment startup in the home electric scenario, and it is easy to misjudge it as multiple independent turnover events, especially in slow climbing start-up and high noise environments to insufficient detection accuracy.
The coordinated design of dynamic window and anti-interference verification is adopted, and the power mutation event is detected through the sliding window bilateral CUSUM algorithm, and the window overlap ratio and judgment threshold are dynamically adjusted. Combined with steady-state judgment and trend consistency verification, the transient feature auxiliary event classification judgment logic is designed to distinguish between climbing and step start.
It significantly improves the accuracy and robustness of load switching event detection in household electric scenarios, is suitable for low-frequency sampling and high-noise environments, and provides reliable energy consumption decomposition and power safety warning support.
Smart Images

Figure CN120105165B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of non-intrusive load monitoring, and specifically relates to the technical field of load switching detection. Background Art
[0002] In recent years, due to the advantage of not requiring the installation of distributed sensors, non-intrusive load monitoring technology has become a research hotspot in the field of smart grids. In the direction of load switching event detection, scholars at home and abroad have proposed various improved methods. The Chinese patent application for invention "A Load Pattern Detection Method and System Based on Cumulative Sum Geometric Feature Analysis" with the publication number CN119104809A can effectively identify mutation points in load patterns by generating CUSUM sequences, thereby improving the sensitivity and accuracy of load pattern detection. The Chinese patent application for invention "A Sliding Window Double-sided CUSUM Event Detection Method and Application Considering Time Threshold" with the publication number CN116520042A has made new technical contributions in improving the speed and accuracy of event identification.
[0003] With the growth of the demand for smart grids and home energy management, load switching events in residential electricity consumption scenarios exhibit high dynamics and strong randomness. Traditional fixed-threshold or single-feature detection methods are difficult to adapt to complex home environments. Especially in the scenario of multiple electrical appliances operating in parallel, the similarity between instantaneous noise and real event waveforms is high, which easily leads to false detections and missed detections. Existing algorithms have insufficient detection rates for the slow ramp start of devices such as air conditioners, and lack the ability to capture complete events for the multi-stage power changes during device startup (such as the continuous transient process where the power first slowly ramps up, then briefly drops, and then stabilizes during partial load startup), and it is easy to misjudge them as multiple independent switching events. Summary of the Invention
[0004] In order to solve the technical problem that the existing technology lacks the ability to capture complete events for the multi-stage power changes during device startup and is easy to misjudge them as multiple independent switching events, the present invention provides a load switching detection method based on a dynamic window and anti-interference verification. The method includes the following steps:
[0005] S1. Dynamic window initialization and preliminary event detection: Obtain the real-time power data stream and perform dynamic window initialization, and use the sliding window double-sided CUSUM algorithm to preliminarily discriminate the type of the detected event. The discrimination results are ramp events and step events;
[0006] S2. Dynamic window adjustment and event merging: When it is determined to be a step event, maintain the default window parameters. When it is determined to be a ramp event, change the window parameters; perform adjacent window correlation analysis and merging;
[0007] S3. Double anti-interference verification: Steady-state determination and trend consistency determination are respectively performed on the detection events. If the detection events pass the steady-state determination and trend consistency determination, they are marked as valid events; otherwise, they are marked as noise and discarded.
[0008] S4. Transient feature assisted decision: Transient features of the valid events are extracted, and classification decisions are made on the extracted transient features. According to the decision results, the valid events are determined as valid switching events and output, or the valid events are vetoed and discarded as noise.
[0009] Further, the dynamic window initialization is specifically as follows: Divide the mean evaluation window and the event detection window , both of which have a length of , and the window overlap ratio is .
[0010] Further, the use of the sliding window bilateral CUSUM algorithm to preliminarily discriminate the types of detection events is specifically as follows:
[0011] S31. Calculate the power difference between windows , where is the power mean of , and is the power mean of ;
[0012] S32. Calculate the positive cumulative quantity , calculate the negative cumulative quantity ; where represents time, represents the positive cumulative quantity at time represents the negative cumulative quantity at time represents the minimum power change of the event that the sliding window bilateral CUSUM algorithm can respond to under the noise background, represents taking the maximum value, represents taking the minimum value;
[0013] S33. When or , trigger the dynamic event decision, where is taking the absolute value, is the dynamic event decision threshold, and the dynamic event decision is specifically as follows: Calculate the power change rate , if it is lower than the preset threshold , it is determined as a ramp event; otherwise, it is determined as a step event.
[0014] Further, the adjacent window correlation analysis and merging are specifically as follows: If consecutive power changes with consistent directions and correlated amplitudes are detected in adjacent windows, they are merged into a single event.
[0015] Further, the steady state determination is specifically as follows: Record the event start time , the initial power change direction and the transient characteristics, wait for the length of windows, collect subsequent power data, and calculate the power fluctuation of the subsequent window , where represents the power at time . If is satisfied, the steady state determination passes, where is the preset ratio,
[0016] Further, the trend consistency determination is specifically as follows:
[0017] By:
[0018] , ;
[0019] Determine the trend of the power change direction . If the determined trend of the power change direction is the same as the recorded initial power change direction , the trend consistency determination passes, where represents the power at the start time , represents the power after waiting for the length of windows based on the start time .
[0020] Further, the extracted transient characteristics include the harmonic distortion rate and the waveform entropy .
[0021] Further, the classification decision is specifically as follows:
[0022] If and , determine the valid event as a valid switching event and output it; if or , veto the valid event and discard it as noise, where
[0023] represents the preset harmonic distortion rate threshold, represents the preset waveform entropy threshold.
[0024] The present invention also provides a load switching detection system based on a dynamic window and anti-interference verification. The system includes the following modules:
[0025] A module for initializing the dynamic window and preliminarily detecting events: obtaining the real-time power data stream and initializing the dynamic window, and using the sliding window bilateral CUSUM algorithm to preliminarily discriminate the types of detected events. The discrimination results are ramp events and step events.
[0026] A module for adjusting the dynamic window and merging events: when it is determined as a step event, maintaining the default window parameters; when it is determined as a ramp event, changing the window parameters; performing adjacent window correlation analysis and merging.
[0027] A module for performing double anti-interference verification: respectively performing steady-state determination and trend consistency determination on the detected events. If the steady-state determination and trend consistency determination are passed, the detected events are marked as valid events; otherwise, these events are marked as noise and discarded.
[0028] A module for performing transient feature-assisted decision-making: extracting transient features from valid events, classifying and judging the extracted transient features, and according to the judgment results, determining the valid events as valid switching events and outputting them, or vetoing the valid events and discarding them as noise.
[0029] The beneficial effects of the method of the present invention are as follows:
[0030] Detecting power mutation events through the sliding window bilateral CUSUM algorithm, dynamically adjusting the window overlap ratio and decision threshold according to the power change rate to distinguish ramp start and step start; introducing a delayed double verification mechanism, combining steady-state determination and trend consistency verification to filter instantaneous noise interference; for the multi-stage power change of variable-frequency equipment (such as ramp up → short-term drop → stable), designing a transient feature-assisted event classification and decision-making logic to avoid event mis-segmentation. Through the collaborative design of the dynamic window strategy and anti-interference verification, the present invention significantly improves the detection accuracy and robustness of load switching events in the household electricity consumption scenario, especially suitable for low-frequency sampling and high-noise environments, and provides reliable technical support for residential-side energy consumption decomposition and electricity safety warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a schematic diagram of the overall flow of the method described in the embodiment of the present invention;
[0032] Figure 2 It is a schematic diagram of the detailed flow of the method described in the embodiment of the present invention;
[0033] Figure 3 It is a working flow diagram of the double verification mechanism described in the embodiment of the present invention;
[0034] Figure 4This is the flowchart of transient feature extraction and classification in the embodiments of the present invention. Detailed implementation manners
[0035] Next, the technical solutions of the present invention will be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0036] Embodiment 1
[0037] As Figure 1 shown in the overall flow schematic diagram of the method of the present invention, the overall process is divided into four steps:
[0038] S1. Dynamic window initialization and preliminary event detection;
[0039] S2. Dynamic window adjustment and event merging;
[0040] S3. Dual anti-interference verification;
[0041] S4. Transient feature assisted decision-making.
[0042] As Figure 2 shown in the detailed flow schematic diagram of the method of the present invention, S1. Dynamic window initialization and preliminary event detection: Obtain the real-time power data stream and perform dynamic window initialization, and use the sliding window bilateral CUSUM algorithm to preliminarily discriminate the types of detected events. The discrimination results are ramp events and step events;
[0043] S2. Dynamic window adjustment and event merging: When it is determined as a step event, maintain the default window parameters. When it is determined as a ramp event, change the window parameters; perform adjacent window correlation analysis and merging;
[0044] S3. Dual anti-interference verification: Respectively perform steady-state determination and trend consistency determination on the detected events. If the steady-state determination and trend consistency determination are passed, the detected events are marked as valid events. Otherwise, this event is marked as noise and discarded;
[0045] S4. Transient feature assisted decision-making: Extract transient features from valid events, and perform classification decision on the extracted transient features. According to the decision results, the valid events are determined as valid switching events and output, or the valid events are vetoed and discarded as noise.
[0046] Embodiment 2
[0047] This embodiment further limits Embodiment 1 and specifically describes the dynamic window initialization and preliminary event detection:
[0048] (1)Window division
[0049] Obtain the active power of household electricity in real time 。
[0050] Dynamic window initialization: divide the mean evaluation window and the event detection window , the initial window length is set to , the default overlap ratio is 。
[0051] and are adjacent and independent windows. Example (if = 50%, = 2s):
[0052] Initial window:
[0053] |----- (0 - 2s)-----|----- (2 - 4s)-----|
[0054] Sliding window:
[0055] |----- (1 - 3s)-----|----- (3 - 5s)-----|
[0056] Overlapping part: and overlap by 1 second (50%), and overlap by 1 second (50%).
[0057] represents the initial mean evaluation window, represents the mean evaluation window after sliding, represents the initial event detection window, represents the event detection window after sliding.
[0058] Calculate the mean power within the window and the standard deviation of the noise , dynamically set the decision threshold and the minimum change amount , where , is a preset coefficient.
[0059] (2)Event type discrimination
[0060] Sliding Window Double-Sided CUSUM Detection: Calculate the Power Difference between Windows and the noise standard deviation , , where is the power mean value of is the power mean value of
[0061] Positive cumulative quantity ; Negative cumulative quantity ; When or , an event is triggered, where is the dynamic decision threshold
[0062] Calculation of Power Change Rate: The power change rate , where , are the power values at the start and end times of the window respectively is the window duration
[0063] Event Classification: If the power change rate is lower than the preset threshold , it is determined as a ramp event; otherwise, it is determined as a step event
[0064] Example 3
[0065] This example further limits Example 1 and further explains the dynamic window adjustment and event merging
[0066] (1) Window Parameter Adjustment:
[0067] Ramp Event: The window overlap ratio is increased to , , where is the overlap ratio gain coefficient, and the window overlap ratio is dynamically increased according to the power change rate to ensure complete coverage of the slow change process; the sliding step is adjusted to to ensure continuous coverage of the slow change ramp process
[0068] Step Event: Maintain the default window parameters (overlap ratio , sliding step ) to quickly respond to power mutations
[0069] (2) Adjacent Window Correlation Analysis and Merging:
[0070] If adjacent windows detect continuous power changes with the same direction and amplitude correlation, they are merged into a single event. When the power change amplitude , time , where is the reverse fluctuation amplitude tolerance coefficient, is the reverse fluctuation time tolerance threshold, allowing short-term reverse fluctuations during the event, where represents the current total power, represents the duration of the reverse power fluctuation, refers to the power of the short-term reverse fluctuation.
[0071] Example 4,
[0072] This example further limits Example 1 and further explains the dual anti-interference check, as Figure 3 shown in the flowchart of the dual-check mechanism:
[0073] (1) First detection cache: Record the start time of the event and the initial power change direction (rising / falling) and transient characteristics.
[0074] (2) Delayed secondary check: Wait for window lengths, and then collect subsequent power data. Calculate the power fluctuation of the subsequent window , if it satisfies , where is the preset ratio, is the current baseline mean, then it is determined to be in a steady state;
[0075] Pass:
[0076] , ;
[0077] Judge the trend of the power change direction , if the judged trend of the power change direction is the same as the recorded initial power change direction , then the trend consistency judgment passes, where represents the power at the start time , represents the power after waiting for window lengths based on the start time .
[0078] (3)Decision output: If both the steady state determination and the trend consistency pass, it is marked as a valid event; if either condition is not met, it is marked as noise and discarded.
[0079] Example 5,
[0080] This example further limits Example 1 and further explains the transient characteristic assisted decision, as Figure 4The following shows the workflow of transient feature-assisted decision-making:
[0081] Wavelet decomposition: Perform discrete wavelet decomposition on the current waveform within the window to extract high-frequency detail components ;
[0082] Calculate the harmonic distortion rate , where represents the highest harmonic order to be considered, usually taking , represents the voltage amplitude of the th harmonic, obtained by FFT analysis of the current signal;
[0083] Calculate the waveform entropy , where . Among them, represents the energy proportion of the th sampling point, represents the high-frequency detail component at the th sample point coefficient value, represents the sampling point index, , is the total number of sampling points within the window.
[0084] Classification decision: If and , that is, enhance the event confidence, and the output is a valid switching event; if or , then a veto event is triggered, where
[0085] represents the preset harmonic distortion rate threshold, represents the preset waveform entropy threshold.
Claims
1. A load switching detection method based on a dynamic window and anti-interference verification, characterized in that The method includes the following steps: S1. Dynamic window initialization and preliminary event detection: Obtain the real-time power data stream and perform dynamic window initialization. Use the sliding window double-sided CUSUM algorithm to preliminarily discriminate the types of detected events, and the discrimination results are ramp events and step events; S2. Dynamic window adjustment and event merging: When it is determined as a step event, maintain the default window parameters. When it is determined as a ramp event, change the window parameters; perform adjacent window correlation analysis and merging; S3. Dual anti-interference verification: Respectively perform steady-state determination and trend consistency determination on the detected events. If the steady-state determination and trend consistency determination are passed, mark the detected events as valid events. Otherwise, mark this event as noise and discard it; S4. Transient feature assisted decision-making: Extract transient features from the valid events, and perform classification decision-making on the extracted transient features. According to the decision-making results, determine the valid events as valid switching events for output, or veto the valid events and discard them as noise.
2. The load switching detection method based on a dynamic window and anti-interference verification according to claim 1, wherein The specific initialization of the dynamic window is as follows: divide the mean evaluation window and the event detection window , both of which have a length of , and the window overlap ratio .
3. The load switching detection method based on dynamic window and anti-interference verification according to claim 2, wherein Specifically, using the sliding window double-sided CUSUM algorithm to preliminarily discriminate the types of detected events is as follows: S31. Calculate the power difference between windows , where is 's average power, is 's average power; S32. Calculate the positive cumulative quantity , calculate the negative cumulative quantity ; where represents time, represents the positive cumulative quantity at time represents the negative cumulative quantity at time represents the minimum power change amount of the events that the sliding window double-sided CUSUM algorithm can respond to under the noise background, represents finding the maximum value, represents finding the minimum value; S33. When or occurs, trigger the dynamic event decision, where is to take the absolute value, is the dynamic event decision threshold, and the dynamic event decision is specifically: calculate the power change rate . If it is lower than the preset threshold , it is determined as a ramp event; otherwise, it is determined as a step event.
4. The load switching detection method based on dynamic window and anti-interference verification according to claim 3, wherein Specifically, the adjacent window correlation analysis and merging are as follows: If consecutive power changes with consistent directions and amplitude correlations are detected in adjacent windows, merge them into a single event.
5. The load switching detection method based on a dynamic window and anti-interference verification according to claim 4, wherein The steady-state determination is specifically as follows: record the start time of the event , the initial power change direction and the transient characteristics, and wait for a window length, then collect subsequent power data and calculate the power fluctuation of the subsequent window , where represents the power at time . If it satisfies , the steady-state determination passes, where is the preset ratio and is the current baseline mean value.
6. The load switching detection method based on a dynamic window and anti-interference verification according to claim 5, characterized in that, Specifically, the trend consistency determination is as follows: By: , Determine the trend of the power change direction If the determined trend of the power change direction is the same as the initially recorded power change direction , the trend consistency determination passes, where represents the power at the starting time , and represents the power after waiting for the window length based on the starting time .
7. The load switching detection method based on dynamic window and anti-interference verification according to claim 6, wherein The extracted transient features include the harmonic distortion rate and the waveform entropy .
8. The load switching detection method based on a dynamic window and anti-interference verification according to claim 6, wherein Specifically, the classification decision-making is as follows: If and , determine the valid event as a valid switching event for output; if or , veto the valid event and discard it as noise, where represents a preset harmonic distortion rate threshold, represents a preset waveform entropy threshold.
9. A load switching detection system based on a dynamic window and anti-interference verification, characterized in that The system includes the following modules: Module for performing dynamic window initialization and preliminary event detection: Obtain the real-time power data stream and perform dynamic window initialization. Use the sliding window double-sided CUSUM algorithm to preliminarily discriminate the types of detected events, and the discrimination results are ramp events and step events; Module for performing dynamic window adjustment and event merging: When it is determined as a step event, maintain the default window parameters. When it is determined as a ramp event, change the window parameters; perform adjacent window correlation analysis and merging; Module for performing dual anti-interference verification: Respectively perform steady-state determination and trend consistency determination on the detected events. If the steady-state determination and trend consistency determination are passed, mark the detected events as valid events. Otherwise, mark this event as noise and discard it; Module for performing transient feature assisted decision-making: Extract transient features from the valid events, and perform classification decision-making on the extracted transient features. According to the decision-making results, determine the valid events as valid switching events for output, or veto the valid events and discard them as noise.
Citation Information
Patent Citations
Sliding window bilateral CUSUM event detection method considering time threshold and application
CN116520042A
Load mode detection method and system based on accumulation and geometric feature analysis
CN119104809A
Non-intrusive load event two-stage adaptive detection method
CN113687164A
Power load identification method, device, equipment, medium and program product
CN114444539A