An Adaptive Threshold Event Detection Method for Non-Intrusive Load Identification
Through adaptive threshold detection and machine learning algorithms, the problem of difficulty in detecting small amplitude load switching events in the prior art is solved, and a more accurate and real-time load recognition effect is achieved.
Patent Information
- Application Number
- CN202210929445.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-08-03
AI Technical Summary
The existing non-invasive load identification method is difficult to accurately and in real time to detect small-amplitude load switching events when there are large differences in the amplitude of power change.
Adaptive threshold detection method is adopted to form a sliding window through the ring memory, separate transient and long transient events, and use the mean offset CUSUM algorithm to detect events, and classify events through machine learning algorithms.
Accurate detection of load switching events with excessive transient time is achieved, and small-amplitude load switching events can be more accurately and in real time when the power change amplitude varies greatly.
Smart Images

Figure CN115409089B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of non-intrusive load identification, and particularly designs an adaptive threshold event detection method for non-intrusive load identification. Background Art
[0002] The adaptive threshold event detection method for non-intrusive load identification belongs to the category of event-based non-intrusive load identification. Through an event detection algorithm, it detects the power change at the acquisition point, calculates and determines whether a load switching event occurs, records the corresponding event characteristics, and performs identification through a machine learning algorithm.
[0003] Currently, common non-intrusive load identification event detection methods need to specify a fixed threshold according to the load composition in the identification scenario. When a certain parameter value of the detection algorithm exceeds this threshold, it indicates that an event has occurred. However, when there are loads with large differences in power change amplitudes simultaneously, such detection algorithms are difficult to accurately and real-time detect small loads. Therefore, an adaptive threshold event detection method for non-intrusive load identification is provided. This method can adaptively calculate the threshold according to the current power change situation, and can accurately and real-time detect load switching events with different change amplitudes. Summary of the Invention
[0004] In order to solve the problem that in the existing non-intrusive load identification event detection method, it is difficult to accurately and real-time detect small-amplitude loads when there are loads with large differences in power change amplitudes simultaneously, the present invention proposes an adaptive threshold event detection method for non-intrusive load identification.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] An adaptive threshold event detection method for non-intrusive load identification, comprising the following steps:
[0007] Step 1: Data input. The power data is sorted by a circular storage method to form a sliding window; the calculation module receives the data input and sorts the apparent power, active power, and reactive power data by a circular storage method to form a window W = {s i , p i , q i |i = n, n + 1, …, n + N}(n ∈ R), where s i represents the apparent power, p i represents the active power, q i represents the reactive power, and the data in the window W is continuously updated as n increases;
[0008] Step 2: According to different load power change characteristics, events are divided into short-term events and long-term events by the standard deviation algorithm, and different methods are used to adaptively adjust the threshold for different types of events;
[0009] Step 3: Based on the calculated threshold, event detection based on mean shift CUSUM is carried out to judge whether the event is real;
[0010] Step 4: Extract feature vectors for the detected real events and classify the events through machine learning methods;
[0011] Further, in the above-mentioned step 1, a circular memory is used to implement the circular storage method, and the length N of the circular memory can be adjusted according to the data acquisition frequency.
[0012] Still further, in the above-mentioned step 2, the apparent power window W is separated from the circular memory, and the apparent power window W is further divided into a mean evaluation window S m ={s i |i=n,n + 1,n + 2,n + 3} and an event detection window S ch ={s i |i=n + 4,n + 5,…,n + N}, where the mean evaluation window S m is used to evaluate the power level at the previous moment, and the event detection window S ch is used to detect whether a load switching event occurs at the current moment. Calculate the average value of S m Calculate the standard deviation σ of S Calculate the standard deviation σ of S ch When σ is greater than y th for the first time, it represents that an event has occurred. When σ reaches the maximum, it represents the end of the event.
[0013] Even further, in the above-mentioned step 2, after σ is greater than y th for the first time, record the number of times that the value of σ is greater than y th as c ch . If c ch is less than c min when σ reaches the maximum value, then discard this event. If c ch is greater than c max when σ has not reached the maximum value yet, then classify this event as a long-term event, otherwise it is a short-term event. If a long-term event occurs, keep S m unchanged, increase the length of S ch , add the newly input data to S ch ={s i |i=n + 4,n + 5,…n + N,…,n + k}(k∈R,k>N), take the last x elements in S ch to form S′ ch ={x i|i=n+k-x+1,n+k-x+2,…,n+k}, as the long transient event detection window, calculate S′ ch The pseudo standard deviation is σ′, which is calculated as follows:
[0014]
[0015] In the formula For S m When σ′ reaches the maximum, it means that the long transient event ends, and the next σ′ is recorded as σ′ ca , S′ ch The average value of Calculate the threshold of the long transient event as h′ th , the calculation formula is as follows:
[0016]
[0017] If a transient event occurs, when σ reaches its maximum, the next event detection window S is taken. ch , calculate S ch The peak-to-average ratio ch , the formula is as follows:
[0018]
[0019] Where s max is the event detection window S ch The maximum value, is the event detection window S ch Since the power data is superimposed, the above formula needs to subtract the minimum value of the window, and the formula is changed as follows:
[0020]
[0021] Where s min is the event detection window S ch The minimum value in the event detection window S ch The standard deviation of ch , calculate the threshold of the transient event as h th , the calculation formula is as follows:
[0022]
[0023] Preferably, step 3 includes: calculating the current window S ch / S′ ch The mean of is:
[0024]
[0025] Calculate the mean shift cumulative sum g± , the formula is as follows:
[0026]
[0027] The threshold h obtained according to Step 2 th / h' th , compared with g ± , when g ± > h th / h' th , it indicates that the event actually occurs. When t is equal to the length of the event detection window, that is, when the cumulative sum g ± reaches the maximum, g ± is still less than h th / h' th , it indicates that the event is a false alarm event.
[0028] In Step 4, according to the true event obtained in Step 3, record the duration c of the event ch , the threshold h th / h' th , the mean shift cumulative sum g ± , the window S ch The active power range, the mean active power change, the reactive power range, and the mean reactive power change form an event feature vector. Using this feature vector, the event classification is performed through the machine learning LGB algorithm to obtain the event type of the event.
[0029] Compared with the prior art, the beneficial effects of the present invention are:
[0030] 1) It can detect load switching events with too long transient times;
[0031] 2) When there are loads with large differences in power change amplitudes at the same time, it can detect small-amplitude loads more accurately and in real time. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is the flow chart of the present invention;
[0033] Figure 2 is the flow chart of Step 3 in the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0034] The present invention will be further described below with reference to the drawings.
[0035] Embodiment
[0036] Referring to Figure 1 and Figure 2 , a non-intrusive load identification adaptive threshold event detection method includes the following steps:
[0037] Step 1: The calculation module receives the electrical energy data input at the acquisition point at a frequency of 5HZ, and organizes the received apparent power, active power, and reactive power data using a circular storage method to form a three-power sliding window W = {s i , p i , q i |i = n, n + 1, …, n + 14}(n ∈ R), where s i represents the apparent power, p i represents the active power, q i represents the reactive power. The data in the three-power window W is continuously updated as n increases, and the length of the circular memory is determined according to the data acquisition frequency.
[0038] Step 2: Separate the apparent power from the circular memory, and divide the apparent power into a mean evaluation window S m = {s i |i = n, n + 1, n + 2, n + 3} and an event detection window S ch = {s i |i = n + 4, n + 5, …, n + 14}. Calculate the average value of S m Calculate the standard deviation σ of S Calculate the standard deviation σ of S ch When σ is greater than 5 for the first time, it represents that an event has occurred. When σ reaches the maximum value, it represents the end of the event. After σ is greater than 5 for the first time, record the number of times that σ is greater than 5 as c ch , if c ch is less than 3 and σ reaches the maximum value, then discard the event. If c ch is greater than 8 and σ still has not reached the maximum value, then classify the event as a long transient event, otherwise it is a short transient event.
[0039] If a long transient event occurs, keep S m unchanged, add the newly input data to S ch = {s i |i = n + 4, n + 5, … n + 14, …, n + k}(k ∈ R, k > 14), take the last 5 elements in S ch to form S′ ch = {x i |i = n + k - x + 1, n + k - x + 2, …, n + k} as the long transient event detection window, and calculate the standard deviation of S′ ch as σ′, and its calculation formula is as follows:
[0040]
[0041] When σ′ reaches the maximum value, it represents the end of the long transient event, record the next σ′ as σ′ ca , and the average value of S′ ch is Calculate the threshold of this long transient event as h′ th , and the calculation formula is as follows:
[0042]
[0043] If a short transient event occurs, when σ reaches the maximum, take the next window S ch , calculate S ch 's peak-to-mean ratio r ch , and the formula is as follows:
[0044]
[0045] Record the next σ after σ reaches the maximum as σ ch , and calculate the threshold of this short transient event as h th , and the calculation formula is as follows:
[0046]
[0047] Step 3: Calculate the mean of the current window S ch / S′ ch , and its formula is:
[0048]
[0049] Calculate the cumulative sum of mean shift g ± , and the formula is as follows:
[0050]
[0051] According to the threshold h th / h′ th obtained in Step 2, compare it with g ± . When g ± > h th / h′ th , it indicates that the event actually occurs. When t is equal to the window length, that is, when the cumulative sum g ± reaches the maximum, if g ± is still less than h th / h′ th , it indicates that the event is a false alarm event.
[0052] Step 4: According to the real event obtained in Step 3, record the duration c ch of this event, the threshold h th / h′ th , the cumulative sum of mean shift g ± , the window S chThe active power extreme difference, the active power change mean, the reactive power extreme difference, and the reactive power change mean form an event feature vector, which is used to classify the event through the machine learning LGB algorithm to obtain the event type of the event.
[0053] Finally, it should be noted that in this patent, y th 、c min 、c max , x is determined according to the length N of the ring memory, in this patent N = 14, y th =5, c min =3, c max =8, x=5, the above is only a specific embodiment of the present invention, and it is obvious that the present invention is not limited to the above examples, and there are many variations. All variations that can be directly derived or associated with the content disclosed by ordinary technicians in this field should be considered as the protection scope of the present invention.
Claims
1. An adaptive threshold event detection method for non-intrusive load identification, characterized in that, The method includes the following steps: Step 1: Data input. The power data is sorted using the circular storage method to form a sliding window. The calculation module receives the data input and sorts the apparent power, active power, and reactive power data using the circular storage method to form a three-power window W = {s i , p i , q i |i = n, n + 1, …, n + N} (n ∈ R), where s i represents the apparent power, p i represents the active power, q i represents the reactive power, and the data in the three-power window W is continuously updated as n increases; Step 2: For different load power change characteristics, divide events into short-term transient events and long-term transient events according to the standard deviation algorithm, and adopt different methods to adaptively adjust the threshold for different types of events, including: According to the three power windows W obtained in step 1, the apparent power is divided into the mean evaluation window S m ={s i |i=n,n+1,n+2,n+3} and event detection window S ch ={s i |i=n+4,n+5,…,n+N}, mean evaluation window S m Used to evaluate the power level at the previous moment, the event detection window S ch Used to detect whether a load switching event occurs at the current moment and calculate S m The average Calculate S ch The standard deviation σ of th When , it means that an event occurs, and the recorded σ value is greater than y th The number of times is c ch , when σ reaches the maximum, it means the event is over. If c ch Less than the minimum value c min When σ reaches its maximum value, the event is discarded. ch Greater than the maximum value c max When σ still does not reach the maximum value, the event is classified as a long transient event, otherwise it is a short transient event; If a long transient event occurs, keep S m unchanged, increase the length of S ch , and add the newly input data to S ch ={s i |i = n + 4, n + 5, … n + N, …, n + k}(k ∈ R, k > N). Take the last x elements in S ch to form S′ ch ={x i |i = n + k - x + 1, n + k - x + 2, …, n + k}, and use it as the long transient event detection window. Calculate the pseudo standard deviation of S′ ch to be σ′, and its calculation formula is as follows: where is the average value of S m When σ′ reaches its maximum, it represents the end of the long transient event, and the next σ′ is recorded as σ′ ca , and the average value of S′ ch is The threshold for calculating this long transient event is h′ th , and the calculation formula is as follows: If a transient event occurs, after σ reaches its maximum, take the next event detection window S ch , and calculate S ch 's peak mean ratio r ch , and the formula is as follows: where s max is the maximum value in the event detection window S ch , and is the mean value of the event detection window S ch . Due to the superposition of power data, the minimum value of the window needs to be subtracted from the above formula, and the formula is changed as follows: where s min is the minimum value in the event detection window S ch At this time, denote the standard deviation of the event detection window S ch as σ ch , and calculate the threshold of this transient event as h th , and the calculation formula is as follows: Step 3: Perform event detection based on mean shift CUSUM according to the calculated threshold to judge whether the event is real; Step 4: Extract feature vectors for the detected real events and perform event classification through machine learning methods.
2. The adaptive threshold event detection method for non-intrusive load identification according to claim 1, wherein Step 3 includes: calculating the mean value of the current event detection window S ch / S′ ch The formula is as follows: Calculate the mean shift cumulative sum g ± , and the formula is as follows: The threshold h obtained according to step 2 th / h' th , is compared with g ± . When g ± >h th / h' th , it indicates that the event has actually occurred. When t is equal to the length of the event detection window, that is, when the cumulative sum g ± reaches the maximum, and g ± is still less than h th / h' th , it indicates that the event is a false alarm event.
3. The adaptive threshold event detection method for non-intrusive load identification according to claim 2, wherein, Step 4 includes: according to the true event obtained in Step 3, record the duration c of this event ch , threshold h th / h′ th , mean shift cumulative sum g ± , window S ch The extreme difference of active power, the mean change of active power, the extreme difference of reactive power, and the mean change of reactive power are used to form an event feature vector. Using this feature vector, the event classification is carried out through the machine learning LGB algorithm to obtain the event type of this event.