Power system sampling data burr detection and repair method
By using the difference product method and extrapolation interpolation method to detect and repair glitch in power system sampling data, the problem of insufficient accuracy in existing technologies is solved, high signal fidelity and rapid repair are achieved, and the calculation accuracy and equipment reliability of power systems are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-04-10
AI Technical Summary
Existing methods for detecting and repairing glitch data in power system sampling data lack precision and fail to fully utilize signal change trend information, resulting in signal repair distortion and calculation result deviation.
The difference product method is used to detect burrs, and the average of extrapolated predicted values and interpolated estimated values is used for repair. The replacement value is calculated to cover the burrs by utilizing the historical trend of signal change and local location information.
It achieves high-precision glitch detection and repair, ensuring signal fidelity and the accuracy of subsequent calculations. It has low computational overhead, does not introduce phase delay, and is suitable for high-speed real-time processing.
Smart Images

Figure CN121834150A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for burr detection and repair, and more particularly to a method for burr detection and repair of power system sampling data. Background Technology
[0002] In fields such as power system automation, industrial control, and medical monitoring, analog-to-digital converters (ADCs) are typically used to sample physical quantities such as voltage and current at high speed and continuously to obtain digitized signal sequences for subsequent calculations, analysis, and decision-making. However, due to factors such as electromagnetic interference (EMI), non-ideal characteristics of components, or transmission channel noise, the sampled data often contains extremely short-duration pulse noise that does not conform to the true signal characteristics; these are commonly known as "spices" or "outliers." These spike signals severely contaminate the original waveform. If they are directly used in subsequent calculations (such as RMS calculations and DFTs), they can lead to significant deviations in the calculation results, potentially causing serious consequences such as malfunctions or failures to operate protection devices and inaccurate readings of measuring instruments. To address this problem, existing technologies typically employ digital filtering algorithms to remove these spikes. The most commonly used methods include: median filtering, which has a high computational cost and may smooth out some useful edge features in the signal; mean or low-pass filtering, which blurs the details of signal abrupt changes and introduces phase delay; and simple thresholding, which easily misidentifies normal signal abrupt changes as glitches or misses small-amplitude glitches. Existing glitch filtering methods also suffer from: insufficient signal restoration accuracy, leading to waveform distortion after restoration; and insufficient utilization of signal trend information, ignoring the signal's changing trend before entering the region.
[0003] Therefore, it is of great significance to provide a method for detecting and repairing glitch in power system sampling data. Summary of the Invention
[0004] Purpose of the invention: The purpose of this invention is to provide a method for detecting and repairing glitch in power system sampling data, which solves the technical problems of insufficient repair accuracy and failure to fully utilize signal change trend information in existing glitch filtering algorithms, thereby achieving accurate repair of data glitch points and ensuring signal fidelity and the accuracy of subsequent calculations.
[0005] Technical solution: The present invention provides a method for detecting and repairing glitch in power system sampling data, comprising:
[0006] Step S1: Obtain the real-time digital sampling signal sequence, define the current sampling point Data, the first previous sampling point bData, the second previous sampling point bbData, the first subsequent sampling point aData, and the second subsequent sampling point aaData;
[0007] Step S2: Calculate the product of the differences between the current sampling point Data and the second-to-last sampling point bbData and the second-to-last sampling point aaData. If the product of the differences is less than zero, then the current sampling point Data is a glitch point.
[0008] Step S3: Calculate the replacement value xData, where xData is the average of the extrapolated predicted value and the interpolated estimated value;
[0009] Step S4: Replace the value xData with the value of the puncture point Data.
[0010] Furthermore, in step S1, the digital sampling signal sequence is stored in a circular buffer.
[0011] Furthermore, the calculation formula for step S2 is as follows:
[0012] product1 = (bbData - Data) * (Data - aaData);
[0013] If product1 is less than 0, then the value of the current sampling point Data is either greater than or less than the values of bbData and aaData, and is judged as a glitch point.
[0014] Furthermore, the calculation formula for step S3 is as follows:
[0015] xData =(((2 * bData - bbData) + ((bbData + aaData) / 2)) / 2);
[0016] Where (2 * bData - bbData) is the extrapolated predicted value, and (bbData + aaData) / 2) is the interpolated estimated value.
[0017] Furthermore, in step S2, if the product of the differences is not less than zero, then the current sampling point is a normal sampling point.
[0018] Furthermore, the real-time digital sampling signal sequence is defined as sBuffer, the value of the current sampling point Data is sBuffer[ptr], and in step S4, the replacement value xData is overwritten with the value of the glitch point Data, that is, sBuffer[ptr] = xData is defined.
[0019] Furthermore, the method is applicable to current and voltage data sampling in power systems.
[0020] Furthermore, the extrapolated prediction value predicts the position of the current sampling point based on the changing trend of the previous two sampling points of the puncture point; the interpolated estimate value estimates the position of the current sampling point based on the average value of the sampling points on both sides of the puncture point.
[0021] The computer device of the present invention includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs, when executed by the processors, implement the steps of the power system sampling data glitch detection and repair method.
[0022] The present invention discloses a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of a method for detecting and repairing glitch in power system sampling data.
[0023] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0024] (1) This invention integrates linear extrapolation and linear interpolation. By using the historical trend of signal changes and local location information, the calculated replacement value can more realistically fit the expected trajectory of the original signal.
[0025] (2) The method described in this invention is a single-point processing algorithm that is "instant detection and instant repair". It does not involve window sorting or convolution operations. All its calculations are integer addition, subtraction, multiplication, division and shift operations. The computational overhead is low. It can be easily embedded into high-speed real-time processing flow and will not introduce phase delay.
[0026] (3) The present invention can effectively prevent protection malfunctions, failures to operate or measurement value jumps caused by abnormal sampling data, and significantly improves the overall performance and operational reliability of power system automation equipment and other application devices. Attached Figure Description
[0027] Figure 1 This is a flowchart of the method described in this invention. Detailed Implementation
[0028] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0029] like Figure 1 As shown, this embodiment provides a method for detecting and repairing glitch in power system sampling data, including:
[0030] Step S1: Obtain a real-time digital sampled signal sequence sBuffer stored in a circular buffer. Define the current sampling point Data (its value is sBuffer[ptr]), its first point before the current sampling point bData (sBuffer[ptr-1]), the second point before the current sampling point bbData (sBuffer[ptr-2]), the first point after the current sampling point aData (sBuffer[ptr+1]), and the second point after the current sampling point aaData (sBuffer[ptr+2]).
[0031] Step S2: Calculate the product of the differences between the current sampling point Data and its two neighboring sampling points bbData and aaData, which are one point apart, to determine whether Data is an abnormal local extremum. The specific judgment condition is: calculate the discriminant product1 = (bbData - Data) * (Data - aaData). If product1 is less than 0, it indicates that the value of the Data point is simultaneously greater than (or less than) its two neighboring points bbData and aaData, which meets the characteristics of a spike, and the Data point is determined to be a spike point that needs repair; otherwise, the point is considered a normal sampling point.
[0032] Step S3: If the current sampling point Data is determined to be a glitch point, then the replacement value xData is calculated. The calculation formula is: xData = (((2 * bData - bbData) + ((bbData + aaData) / 2)) / 2);
[0033] Wherein, (2 * bData - bbData) is the extrapolated prediction value, which predicts the position that the current point Data should have been in based on the changing trends of the two normal points (bbData and bData) before the puncture point occurred.
[0034] ((bbData + aaData) / 2) is the interpolation estimate, which uses the average of two reference points bbData and aaData on both sides of the spur point to estimate the reasonable position of the current point Data.
[0035] Step S4: Use the calculated replacement value xData to overwrite the original value of the glitch point Data in the circular buffer, i.e., sBuffer[ptr] = xData, to complete the repair.
Claims
1. A method for detecting and repairing glitch in power system sampling data, characterized in that, The method comprises the following steps: S1, obtaining a real-time digital sampling signal sequence, defining a current sampling point Data, a first previous sampling point bData, a second previous sampling point bbData, a first subsequent sampling point aData, and a second subsequent sampling point aaData; S2, calculating a difference product of the current sampling point Data and the second previous sampling point bbData and the second subsequent sampling point aaData, and determining that the current sampling point Data is a glitch point if the difference product is less than zero; S3, calculating a replacement value xData, wherein the xData is an average value of an extrapolation prediction value and an interpolation estimation value; S4, covering the value of the glitch point Data with the replacement value xData.
2. The method of detecting and repairing glitches in power system sampled data according to claim 1, wherein, The digital sampling signal sequence in the step S1 is stored in a circular buffer.
3. The method of claim 1, wherein, The calculation formula of the step S2 is: product1 = (bbData - Data) * (Data - aaData); If the product1 is less than 0, the value of the current sampling point Data is greater than or less than the values of the bbData and the aaData, and the current sampling point Data is determined to be a glitch point.
4. The method of detecting and repairing glitches in power system sampled data according to claim 1, wherein, The calculation formula of the step S3 is: xData = (((2 * bData - bbData) + ((bbData + aaData) / 2)) / 2); Wherein, (2 * bData - bbData) is an extrapolation prediction value, and (bbData + aaData) / 2) is an interpolation estimation value.
5. The method of detecting and repairing glitches in power system sampled data according to claim 1, wherein, In the step S2, if the difference product is not less than zero, the current sampling point is a normal sampling point.
6. The method of power system sampled data glitch detection and correction of claim 1, wherein, In the step S4, the value of the glitch point Data is covered with the replacement value xData, i.e., sBuffer[ptr] = xData.
7. The method of power system sampled data glitch detection and correction of claim 1, wherein, The method is suitable for sampling data of current and voltage in a power system.
8. The method of sampling data glitch detection and correction of a power system of claim 4, wherein, The extrapolation prediction value predicts the position of the current sampling point according to the variation trend of the two previous sampling points of the glitch point, and the interpolation estimation value estimates the position of the current sampling point according to the average value of the sampling points on both sides of the glitch point.
9. A computer device, comprising: One or more processors, memories, and one or more programs are included, wherein the one or more programs are stored in the memories and configured to be executed by the one or more processors, and the programs are executed by the processors to implement the steps of the power system sampling data glitch detection and repair method according to any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the power system sampling data glitch detection and repair method according to any one of claims 1-7.