A transient event detection method based on composite sliding window and bilateral correction
Through the method based on composite sliding window and bilateral correction, the current effective value sequence and density clustering are used to accurately detect the start and end points of transient events in the non-invasive load monitoring system, solving the problems of false detection and missed detection in the prior art, and achieving efficient load monitoring.
Patent Information
- Application Number
- CN202111641909.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-12-29
AI Technical Summary
In existing load monitoring systems, intrusive systems have high cost and small coverage. Instead, non-intrusive systems have problems of mis-detection and missed detection when detecting the start and end points of the transient event process. Especially in the case of various power equipment, false detection and missed detection are prone to false detection and missed detection when the threshold is not present.
The transient event detection method based on composite sliding window and bilateral correction is adopted. By calculating the current effective value sequence, the statistical sliding window and the detection sliding window are set, and the transient event is judged using the change statistic Z score. Combining density clustering and bilateral correction, the start and end points of the transient event are accurately detected.
It improves the accuracy and speed of transient event detection, reduces false detection caused by noise and load fluctuations, can accurately distinguish between transient and steady-state segments, and obtains the imprint characteristics of the power consumption equipment.
Smart Images

Figure CN114298223B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a transient event detection method based on composite sliding window and bilateral correction. Technical Background
[0002] The load monitoring system is an important part of residents' demand response and safe electricity use. The current load monitoring systems are roughly divided into two categories: invasive and non-invasive. The traditional invasive load monitoring system installs sensors at each load to monitor the operation of each load. Due to its high hardware economic cost, low system reliability, and small user coverage, it is difficult to be widely used. The non-intrusive load monitoring (NILM) system is characterized by installing monitoring equipment at the power entrance, which can analyze the various power loads within the user and provide information such as the switching and energy consumption of each power device.
[0003] The process of transformation of the working state of electrical equipment is called transient event. Transient characteristics refer to the unique transient characteristic information during transient events, especially the current and voltage information generated when the electrical equipment is turned on, which can be used as important characteristics of electrical equipment. Transient event detection is an important research part of non-invasive load monitoring. This process extracts and records some mutation processes of the sampling sequence caused by the switching of power loads, preparing for the next step of feature extraction and load identification.
[0004] Existing load event detection methods for NILM include the difference method and the transient event detection algorithm based on the sliding window bilateral CUSUM. The difference method has the function of detecting the start and end points of the total load transient event process, but it has poor anti-fluctuation performance and is prone to false detection. The transient event detection algorithm based on the sliding window bilateral CUSUM solves the problem of poor anti-fluctuation performance, but cannot accurately detect the start and end points of the transient event process, and is prone to false detection in situations where transient events occur frequently. Existing transient event detection algorithms require the known jump amplitude of the switched load as the detection threshold. In the face of a variety of electrical equipment, if the same detection threshold is inappropriate, it is easy to miss detection and false detection. Summary of the invention
[0005] The present invention provides a transient event detection method based on a composite sliding window and bilateral correction, aiming to solve at least one technical problem existing in the above-mentioned prior art.
[0006] In order to solve the above technical problems, the present invention provides a transient event detection method based on composite sliding window and bilateral correction, using load data collected at the power inlet, including the following steps:
[0007] Step 1: Calculate the effective value of current: The effective value of current I in one cycle is defined as follows:
[0008]
[0009] where i m (n) is the sampling value of the nth current sampling point in the mth cycle; N m is the number of current sequence sampling points in the mth cycle. The effective current value sequence I is obtained.
[0010] Step 2: Set the statistical sliding window W s and the detection sliding window W d , where W s has a length of L s , W d has a length of L d , I i and I i+Ld are the start and end points of the current detection sliding window respectively, I i-Ls-1 and I i-1 are the start and end points of the current statistical sliding window respectively. The statistical sliding window W s and the detection sliding window W d slide L d points at a time. Calculate the mean and standard deviation on the statistical sliding window W s :
[0011]
[0012]
[0013] Calculate the Z-score of each point in the detection sliding window W d :
[0014]
[0015] Step 3: Set the sequence S to indicate whether the points in the detection window are in the transient event process, set the threshold Z threshold of the change statistic Z-score and the noise value β, and set the variable Sig to indicate whether the points in the detection window W d are in the transient event process. Its judgment condition is:
[0016]
[0017]
[0018] For the points in the detection window, if S d > Z threshold , it means the point is in the transient event process, and compared with the previous window, the effective current value is on the rising trend. If S d < -Z threshold, indicating that the point is in the process of a temporary event, and the effective value of the current is in a downward trend compared to the previous window.
[0019] Step 4: After traversing the sequence with a sliding window, perform density clustering on the obtained S sequence. The distance between two points in the S sequence is defined as the number of 0 values between the two points. The DBSCAN clustering model is used to describe the tightness of the sample set, and the parameters (ω, minpts) are used to describe the tightness of the sample distribution in the neighborhood. Among them, ω is used to describe the neighborhood distance threshold of a certain sample, and minpts is used to describe the threshold of the number of samples in the neighborhood with a distance of ω from a certain sample. The S sequence is divided into different categories through density clustering, and the corresponding point sequence in each category is a transient event process T.
[0020] Step 5: Perform bilateral correction processing on each transient event process T obtained in Step 4. For the starting point I of T start , take the previous L d points, take L m values before and after each point, calculate the mean shift distance, and update the starting point I of T with the point with the maximum mean shift distance start :
[0021]
[0022] I start = argmax(meanshift i )
[0023] For the ending point I of T end , take the previous L e points, and update the ending point by calculating the slope. When the point I m ∈ [I end-Le , K, I end and the slope value k m reaches the threshold K threshold , it is determined that the transient process ends:
[0024] L e = min(L e , ||T|| - argmax(T))
[0025]
[0026] Update the ending point I end = I m .
[0027] Implementing the present invention has the following beneficial effects:
[0028] The present invention is a practical and effective transient event detection method. By adding a composite sliding window mechanism, it determines whether a transient event occurs by counting the distribution of change points within the detection window, avoiding false detection caused by noise points and load fluctuations. The detection basis relies more on change statistics rather than completely depending on detection thresholds, and can detect transient event processes of various electrical equipment. It adds bilateral correction to the transient event process to accurately detect the start and end points of the transient event process. Through the sliding window detection method, point-by-point detection is avoided, thereby improving the detection speed and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 FIG. is an overall schematic diagram of a transient event detection method based on a composite sliding window and bilateral correction according to the present invention.
[0030] Figure 2 FIG. is a schematic diagram of the transient event detection result of an embodiment of the present invention.
[0031] Figures 3 - 6 FIG. is a curve graph of the effective current value during the transient event process detected in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0032] The technical solution of the present invention will be further described in detail below in conjunction with the drawings and specific embodiments.
[0033] Figure 1 FIG. shows the execution flow of the transient event detection method of the present invention, including the following steps:
[0034] Step 1, collect data for processing and calculate the sequence of effective current values;
[0035] Step 2, set a statistical sliding window and a detection sliding window, calculate the mean and standard deviation of the effective current values in the statistical sliding window, and calculate the change statistic Z-score on the detection sliding window;
[0036] Step 3, set a sequence S to indicate whether the points in the detection window are in the transient event process, and calculate the value of the sequence S through the change statistic and the determination condition on the detection sliding window;
[0037] Step 4, after obtaining the S sequence by traversing the sequence of effective current values with a sliding window, divide the sequence into N categories through density clustering, where the corresponding point sequence in each category is a transient event process;
[0038] Step 5, perform bilateral correction processing on each obtained transient event process to obtain the accurate start and end points of the transient event.
[0039] The specific elaboration of the above steps is as follows:
[0040] Step 1. Calculate the effective current value: Install monitoring equipment at the power inlet, process the data collected by the monitoring equipment. Before and after transitioning from transient to steady state and from steady state to transient state, the parameter that changes significantly is the effective current value. Therefore, the effective current value is used for event detection. The effective current value I of one cycle is defined as shown in the formula:
[0041]
[0042] where i m (n) is the sampling value of the nth current sampling point in the mth cycle; N m is the number of current sequence sampling points in the mth cycle. In the embodiment, process the high-frequency current data of 16HZ for one hour. The current period is 0.02s, and the number of cycle sampling points is 320. Obtain the effective current value sequence I through the calculation formula.
[0043] Step 2. Set the statistical sliding window W s and the detection sliding window W d , where the length of W s is L s , and the length of W d is L d , I i and I i+Ld are the start and end points of the current detection sliding window respectively, and I i-Ls-1 and I i-1 are the start and end points of the current statistical sliding window respectively. The statistical sliding window W s and the detection sliding window W d slide L d points at a time. Calculate the mean and standard deviation on the statistical sliding window W s :
[0044]
[0045]
[0046] Calculate the Z-score of each point in the detection sliding window W d :
[0047]
[0048] In the embodiment, set L s = 20, L d = 10. Set the statistical sliding window W s and the detection sliding window W d can detect the change amount of the points in the current window relative to the overall trend in the previous window. Slide L d points at a time, which greatly improves the detection speed compared to sliding point by point. Obtain the sliding window W through formula calculationd Z-score of each point.
[0049] Step 3: Set the sequence S to indicate whether the points in the detection window are in the transient event process, set the threshold Z of the change statistic Z-score threshold and the noise value β, and set the variable Sig to indicate whether the points in the detection window W d are in the transient event process, and its determination condition is:
[0050]
[0051]
[0052] For the points in the detection window, if S d > Z threshold , it indicates that the point is in the transient event process, and compared with the previous window, the effective value of the current is in an upward trend. If S d < -Z threshold , it indicates that the point is in the temporary event process, and compared with the previous window, the effective value of the current is in a downward trend.
[0053] In the embodiment, set Z threshold = 3, β = σ. When the shift of the effective current value of the detection sliding window W d relative to the statistical sliding window W s is greater than the noise value β, and the number of points in the detection sliding window W d where the change statistic Z is greater than Z threshold is greater than L d / 2, it is considered that the detection window enters the transient event process; otherwise, it is considered to be caused by noise points or short-term anomalies. Traverse the effective current value sequence I through the sliding window, and obtain the sequence S according to the above implementation process.
[0054] Step 4: After traversing the sequence through the sliding window, perform density clustering on the obtained S sequence. The distance between two points in the S sequence is defined as the number of 0 values between the two points. The DBSCAN clustering model describes the tightness of the sample set based on a set of neighborhoods. The parameters (ω, minpts) are used to describe the tightness of the sample distribution in the neighborhood. Among them, ω describes the neighborhood distance threshold of a certain sample, and minpts describes the threshold of the number of samples in the neighborhood with a distance of ω from a certain sample. Divide the S sequence into different categories through density clustering, and the corresponding point sequence in each category is a transient event process T.
[0055] In the embodiment, set ω = 20, minpts = 3. Through density clustering, the sequence S is divided into 9 categories, with at least 3 points in each category, and the distance between each category is at least 20 points, where one point is the time length of one current cycle.
[0056] Step 5. Perform bilateral correction processing on each transient event process T obtained in Step 4. For the starting point I of T start , consider the possibility that there was just an entry into the transient event process in the previous detection window, but since the number of points with a change statistic Z greater than Z threshold within the detection window is less than L d / 2 and thus it was regarded as an outlier. Therefore, take the previous L d points, take L m values before and after each point, calculate the mean shift distance, and update the point with the maximum mean shift distance as the starting point I of T start :
[0057]
[0058] I start = argmax(meanshift i )
[0059] For the ending point I of T end , consider the lag effect brought by the statistical window, that is, the detection window has tended to be stable, but the statistical window just happens to be in the transient event process, and at this time the Z score of the detection window is still at a relatively high level. Therefore, it is necessary to update and correct the ending point. The ending point is updated by calculating the slope. When the point I m ∈ [I end-Le , K, I end and the slope value k m reaches the threshold K threshold , it is determined that the transient process ends:
[0060] L e = min(L e , ||T|| - argmax(T))
[0061]
[0062] In the embodiment, set L m = 5, L e = L s , K threshold = -0.1, and correct the ending point based on the above formula respectively.
[0063] Based on the above process, the obtained transient process is as Figure 2 shown. The abscissa is the sequence of effective current values, and the ordinate represents the value of the S sequence corresponding to the sequence of effective current values at the time of the transient event. It can be seen that the S sequence is clustered into 9 transient events. An S value of positive indicates a transient event of the electrical equipment being turned on or the power state level decreasing, and an S value of negative indicates a transient event of the electrical equipment being turned off or the power state level decreasing.
[0064] Figures 3 - 6 It is a transient process segment of the effective current value when the states of some electrical appliances change. The abscissa is the position of the effective current value sequence, the ordinate represents the effective current value corresponding to the position of the effective current value sequence, the black part represents the steady state region, and the gray represents the transient region. It can be seen that the present invention can accurately detect the transient event process.
Claims
1. A transient event detection method based on a composite sliding window and bilateral correction, characterized in that It includes the following steps: Step 1, collect data for processing and calculate the effective current value sequence; Step 2, set a statistical sliding window and a detection sliding window, calculate the mean and standard deviation of the effective current value of the statistical sliding window, and then calculate the change statistic Z-score on the detection sliding window; Step 3, set a sequence S to represent whether the points in the detection window are in the transient event process, and calculate the value of sequence S through the change statistic and the determination condition on the detection sliding window; Step 4, after traversing the effective current value sequence with a sliding window to obtain the S sequence, divide the sequence into N categories by density clustering, where the corresponding point sequence in each category is a transient event process; Step 5, perform bilateral correction processing on each obtained transient event process to obtain the accurate start and end points of the transient event; The said Step 2 includes: Set the statistical sliding window W s and the detection sliding window W d , where W s has a length of L s , W d has a length of L d , I i and I i+Ld are the start and end points of the current detection sliding window respectively, I i-Ls-1 and I i-1 are the start and end points of the current statistical sliding window respectively. The statistical sliding window W s and the detection sliding window W d slide L d points at a time; Based on the detection sliding window W d The effective current value of each point and the statistical sliding window W s Calculate the detection sliding window W based on the mean and standard deviation on it d The Z-score of each point is used as the change statistic Z, and the specific formula is as follows: Calculate the mean and standard deviation on the statistical sliding window W s as follows: Calculate the detection sliding window W d Z-score of each point: In step 3, a sequence S is set to indicate whether the points in the detection window are in the process of a transient event, and a threshold Z of the change statistic Z threshold and a noise value β are set to detect the sliding window W d If the points on it satisfy that the offset from the statistical sliding window is greater than the noise value β, and the number of points with the change statistic Z greater than Z threshold in the window is greater than L d / 2, then the value of the sequence S is set to Z, otherwise it is set to 0; The specific method of the said Step 5 includes: For the starting point I of T start , take L points forward d . For each point, take L values before and after it m , calculate the mean shift distance meanshift, and update the point with the maximum mean shift distance meanshift as the starting point I of T start ; I start = argmax(meanshift i ) For the termination point I of T end , take L points forward e , and update the termination point by calculating the slope k m . When the point I m ∈ [I end-Le ,..., I end , if the slope value k m reaches the threshold K threshold , it is determined that the transient process ends, and update the termination point I end to I m ; L e = min(L e , ||T|| - arg max(T)) The start and end points of the transient process are obtained through a bilateral correction process (I start , I end ).
2. The transient event detection method based on a composite sliding window and bilateral correction according to claim 1, wherein: In the said Step 1, install monitoring equipment at the power inlet, process the data collected by the monitoring equipment, use the effective current value for event detection, calculate an effective current value for each current cycle, and the effective current value of one cycle is defined by the following formula: where i m (n) is the sampling value of the nth current sampling point in the mth cycle; N m is the number of current sequence sampling points in the mth cycle; Form an effective current value sequence I.
3. A transient event detection method based on a composite sliding window and bilateral correction according to claim 1, characterized in that: In the said Step 4, after traversing the sequence with a sliding window, perform density clustering on the obtained S sequence. The distance between two points in the S sequence is defined as the number of 0 values between the two points. Use the DBSCAN clustering model to describe the tightness of the sample set, and use the parameters (ω, minpts) to describe the tightness of the sample distribution in the neighborhood; where ω is used to describe the neighborhood distance threshold of a certain sample, and minpts is used to describe the threshold of the number of samples in the neighborhood with a distance of ω from a certain sample; divide the S sequence into different categories by density clustering, where the corresponding point sequence in each category is a transient event process T.
Citation Information
Patent Citations
Non-invasive load identification method and non-invasive load identification device
CN111244954A
Transient load start-stop event rapid capturing method based on sliding window technology
CN112782465A