Capacitance voltage transformer harmonic measurement correction method, equipment and medium

By preprocessing and calculating the temperature and harmonic voltage data of capacitive voltage transformers, and constructing a harmonic voltage prediction model using the LightGBM algorithm, the problem of large errors in harmonic measurement of capacitive voltage transformers is solved, and high-precision harmonic measurement correction is achieved.

CN120874014APending Publication Date: 2025-10-31QUJING BUREAU OF SUPERVOLTAGE POWER TRANSMISSION CHINA SOUTHERN POWER GRID
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510999897.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Capacitive voltage transformers have significant errors in the measurement of harmonic and transient voltage signals, which cannot meet the requirements of power grid harmonic monitoring.

Method used

The temperature and harmonic voltage data of the capacitive voltage transformer are preprocessed using the IQR rule and STL decomposition method. A harmonic voltage prediction model is constructed by combining the LightGBM algorithm. Harmonic voltage error is predicted and corrected by calculating eigenvalues.

Benefits of technology

It significantly reduces the error in harmonic measurement of capacitive voltage transformers, improves measurement accuracy and data analysis efficiency, and enhances the robustness and interpretability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120874014A_ABST
    Figure CN120874014A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electrical measurement error correction, and discloses a capacitor voltage transformer harmonic measurement correction method and device and a medium. Historical data of a capacitor voltage transformer are collected, and the historical data are preprocessed based on an IQR rule; decomposing the preprocessed historical data into historical trend component data, historical periodic component data and historical residual component data; performing corresponding calculation on the historical trend component data, the historical periodic component data and the historical residual component data based on an STL decomposition method to obtain a historical feature set; based on a Light GBM algorithm, constructing a harmonic voltage prediction model; and optimizing the harmonic voltage prediction model to obtain an optimized harmonic voltage prediction model, and verifying the effectiveness of the optimized harmonic voltage prediction model. According to the invention, the problem that the primary side harmonic cannot be accurately measured due to the change of the transfer coefficient caused by different operation conditions and installation environments of the capacitor voltage transformer is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of electrical measurement error correction, and in particular to a method, device and medium for correcting harmonic measurements of capacitive voltage transformers. Background Technology

[0002] In power systems, accurate voltage parameter measurement is fundamental to ensuring the safe and stable operation of the power grid. Based on different measurement principles, voltage transformers are mainly divided into two types: electromagnetic (TV) and capacitive (CVT). Traditional electromagnetic voltage transformers were widely used in power plants and substations with voltage levels from 110kV to 220kV, but they had significant technical limitations: firstly, the equipment was prone to ferroresonance with the distributed capacitance of the lines; secondly, their functions were limited to basic applications such as voltage measurement, power metering, and generation protection. Despite numerous technological improvements, the inherent defects of electromagnetic voltage transformers have not been fundamentally resolved. Furthermore, with the continuous increase in power system voltage levels, the size and manufacturing cost of such equipment have shown a significant upward trend. To overcome these technical bottlenecks, in the 1950s, researchers successfully developed capacitive voltage transformers (CVTs) based on the technical principle of capacitive bushing voltage extraction devices. This equipment is mainly used in neutral-point directly grounded systems with voltage levels of 110kV and above, enabling not only high-precision voltage measurement but also extended functions such as high-frequency communication and relay protection. Currently, capacitive voltage transformers have become the preferred equipment for measuring bus voltage in power plant step-up substations and step-down substations, playing an irreplaceable and important role in the power system.

[0003] Currently, capacitive voltage transformers (CVTs) fully meet the system requirements in terms of the accuracy of fundamental voltage measurement and the fundamental signal transformation of system protection and automatic devices. However, due to their measurement principle, they have significant errors in measuring harmonics and transient voltage signals. Standards such as GB / T 14549-1993, IEC61869-5:2011, IEEE Std1159-2009, and CIGRE C4.112 report all clearly state that it is not recommended to directly use CVTs to measure harmonics. However, the current high-voltage power grid harmonic monitoring work cannot avoid CVTs. Therefore, how to use CVTs to measure and understand the harmonic level of the power grid has become a problem that power quality supervision technicians must solve.

[0004] Therefore, based on the above-mentioned technical problems, this invention proposes a method, device, and medium for harmonic measurement correction of capacitive voltage transformers with small measurement error and high accuracy. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device and medium for harmonic measurement correction of capacitive voltage transformers with small measurement error and high accuracy.

[0006] To achieve the above objectives, the present invention provides a method for harmonic measurement correction of a capacitive voltage transformer, comprising the following steps: Step 1: Collect historical data of capacitive voltage transformers within a preset time period; Step 2: After obtaining historical data, preprocess the historical data based on the IQR rule, and decompose the preprocessed historical data into historical trend component data, historical periodic component data, and historical residual component data. Step 3: After obtaining the historical trend component data, historical periodic component data, and historical residual component data, based on the STL decomposition method, perform corresponding calculations on the historical trend component data, historical periodic component data, and historical residual component data respectively to obtain the first historical feature value, the second historical feature value, and the third historical feature value at each time point, and then collect the first historical feature value, the second historical feature value, and the third historical feature value at each time point to form a historical feature set. Step 4: After obtaining the historical feature set, construct a harmonic voltage prediction model based on the LightGBM algorithm, and optimize the harmonic voltage prediction model to obtain the optimized harmonic voltage prediction model. Step 5: After obtaining the optimized harmonic voltage prediction model, collect the real-time data of the capacitive voltage transformer during the previous collection period, and repeat step 2 to obtain the real-time trend component data, real-time periodic component data, and real-time residual component data; combine the STL decomposition method to perform corresponding calculations on the real-time trend component data, real-time periodic component data, and real-time residual component data to obtain the first real-time characteristic value, second real-time characteristic value, and third real-time characteristic value at each time. Step 6: After obtaining the first, second, and third real-time feature values ​​at each time point, import these values ​​into the optimized harmonic voltage prediction model for real-time prediction to obtain the predicted harmonic voltage error value of the capacitive voltage transformer. Then, compare the predicted harmonic voltage error value of the capacitive voltage transformer with the actual measured harmonic voltage error of the capacitive voltage transformer to verify the effectiveness of the optimized harmonic voltage prediction model.

[0007] Furthermore, the historical data in step 1 includes: historical temperature data of the capacitive voltage transformer at each moment within a preset historical period, and historical harmonic voltage data of the secondary side of the capacitive voltage transformer at each moment within the preset historical period.

[0008] Furthermore, the specific steps of step 2 are as follows: Step 2.1: After obtaining the historical temperature data of the capacitive voltage transformer at each moment within a preset historical period, sort the historical temperature data in ascending order based on the IQR rule; Step 2.2: Based on the number of moments in the preset historical period of the capacitive voltage transformer, the sorted historical temperature data is divided into i equal parts with the same number of moments to obtain the first quartile Q1 and the third quartile Q3, where the first quartile Q1 is the 25th percentile value and the third quartile Q3 is the 75th percentile value. Step 2.3: Obtain the preprocessed historical temperature data by comparing the interquartile range (IQR) between the third quartile (Q3) and the first quartile (Q1). Step 2.4: After obtaining the historical harmonic voltage data of the capacitive voltage transformer at each moment within the preset historical period, sort the historical harmonic voltage data in ascending order based on the IQR rule, and repeat steps 2.2-2.3 to obtain the preprocessed historical harmonic voltage data.

[0009] Furthermore, step 2 also includes the following steps: Step 2.5: Based on the STL decomposition method and the preprocessed historical temperature data, perform preliminary decomposition on the historical temperature data at each time point to obtain the updated temperature trend component, temperature periodic component, and temperature residual component at each time point. Step 2.6: Calculate the temperature trend component, temperature periodic component, and temperature residual component at each time point in Step 2.5 in sequence to obtain the updated temperature trend component, temperature periodic component, and temperature residual component at each time point. Step 2.7: Based on the STL decomposition method and the preprocessed historical harmonic voltage data, perform preliminary decomposition on the historical harmonic voltage data at each time point to obtain the harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time point. Step 2.8: After obtaining the harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time point, repeat step 2.6 to obtain the updated harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time point.

[0010] Furthermore, the specific steps in step 2.6 are as follows: Step 2.6.1: Set the temperature trend component and temperature periodic component to 0 at the beginning, and subtract the temperature trend component of the previous round from the original data during the detrending process to obtain the detrended sequence. Step 2.6.2: Divide the periodic subsequence: Assuming the period is T, divide the data into n subsequences, smooth the periodic subsequences, and use LOESS to perform regression operation on each subsequence to obtain a temporary periodic sequence. Then, perform three moving averages on the temporary periodic sequence to remove high-frequency noise and obtain a smoothed sequence, thereby obtaining the updated temperature periodic component. Step 2.6.3: Subtract the current temperature periodic component from the detrended data to obtain the de-periodic sequence; Step 2.6.4: Output temperature trend components: Apply LOESS regression to the deperiodic sequence to obtain the updated temperature trend components; Step 2.6.5: Output residual components: Subtract the temperature periodic component from Step 2.6.2 and the temperature trend component from Step 2.6.4 from the original subsequence to obtain the updated temperature residual components.

[0011] Furthermore, the specific steps in step 3 are as follows: Step 3.1: Based on the updated temperature trend components and harmonic voltage trend components at each time point, calculate the temperature trend components and harmonic voltage trend components at each time point using the formula for the first eigenvalue to obtain the first historical eigenvalue at each time point. Step 3.2: Based on the updated temperature periodic components and the updated harmonic voltage periodic components at each time, calculate the second historical characteristic value at each time using the formula for the second characteristic value. Step 3.3: Based on the temperature residual components at each time after the update and the harmonic voltage residual components at each time after the update in C4, let the temperature residual components and harmonic voltage residual components at each time be calculated using the formula for the third eigenvalue to obtain the third historical eigenvalue at each time. Step 3.4: Based on the first historical feature value, the second historical feature value, and the third historical feature value at each time point, a historical feature set is formed.

[0012] Furthermore, the specific steps in step 4 are as follows: Step 4.1: Based on the historical feature set in Step 3, the first historical feature value, the second historical feature value, and the third historical feature value at each time point in the historical feature set are merged according to time alignment to form an N×3 input feature matrix X; Step 4.2: Based on the input feature matrix X, configure the LightGBM parameters and construct a harmonic voltage prediction model; Step 4.3: Optimize and train the harmonic voltage prediction model based on the model in Step 4.2 until the optimized harmonic voltage prediction model is obtained; Step 4.3.1: Construct a histogram based on the historical feature set from Step 3; Step 4.3.2: Based on the histogram in Step 4.3.1, find the optimal split point; Step 4.3.3: Adopt a leaf-wise tree growth strategy; Step 4.3.4: Calculate the gradient G and the Hessian matrix h; Step 4.3.5: Based on the gradient G and Hessian matrix h from Step 4.3.4, update the weights of the leaf points; Step 4.3.6: Determine whether the training of the harmonic voltage prediction model has reached the stopping condition: Set the stopping condition for training the harmonic voltage prediction model: the number of iterations reaches the prediction number or the value of its loss function is less than the preset value; if it is determined to be yes, then output the optimized harmonic voltage prediction model; otherwise, if it is determined to be no, then jump back to step 4.3.1 to retrain until the determination result is yes.

[0013] Furthermore, the specific steps in step 5 are as follows: Step 5.1: After obtaining the optimized harmonic voltage prediction model, collect the real-time data of the capacitive voltage transformer during the previous acquisition time period. The real-time data includes the real-time temperature data of the capacitive voltage transformer at each moment during the previous acquisition time period and the real-time harmonic voltage data of the secondary side of the capacitive voltage transformer at each moment during the previous acquisition time period. Step 5.2: Repeat steps 2.1-2.8 to obtain the real-time trend component data, real-time periodic component data and real-time residual component data at each time point after the update; Step 5.3: After obtaining the real-time trend component data, real-time periodic component data and real-time residual component data at each updated time, the real-time temperature data and real-time harmonic voltage data at each updated time are converted into the first real-time characteristic value, the second real-time characteristic value and the third real-time characteristic value at each time based on the STL decomposition method.

[0014] Furthermore, the specific steps in step 6 are as follows: Step 6.1: After obtaining the first real-time characteristic value, the second real-time characteristic value, and the third real-time characteristic value at each time, import the first real-time characteristic value, the second real-time characteristic value, and the third real-time characteristic value at each time into the optimized harmonic voltage prediction model for real-time prediction, and obtain the predicted value of the harmonic voltage error of the capacitive voltage transformer. Step 6.2: After obtaining the predicted harmonic voltage error value of the capacitive voltage transformer, compare the predicted harmonic voltage error value with the actual measured harmonic voltage error of the capacitive voltage transformer to verify the effectiveness of the optimized harmonic voltage prediction model.

[0015] Based on the same inventive concept, the present invention also provides a data processing device for a harmonic measurement correction method for a capacitive voltage transformer, characterized in that it includes: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the steps of the aforementioned harmonic measurement correction method for a capacitive voltage transformer.

[0016] Based on the same inventive concept, the present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the aforementioned method for harmonic measurement correction of a capacitive voltage transformer.

[0017] The present invention adopts the above-described solution, and its beneficial effects are as follows: Based on the influence of periodic components, trend components, and residual components, three eigenvalues ​​are calculated from the temperature data and harmonic voltage data of the secondary side of the capacitive voltage transformer. These three eigenvalues ​​are then used as the input matrix, and LightGBM parameters are configured to construct a harmonic voltage prediction model. Next, the harmonic voltage prediction model outputs a predicted harmonic voltage error value, which is then compared with the actual measured harmonic voltage error to correct the harmonic measurement of the capacitive voltage transformer. Furthermore, by constructing the input matrix X using the eigenvalues, collinearity is eliminated, model robustness is enhanced, and data analysis efficiency and model performance are significantly improved. The core advantage of the LightGBM algorithm lies in its structured iterative optimization framework and adaptive regularization strategy, which allows it to capture complex patterns while avoiding overfitting through integration and constraints. Compared to the black-box nature of deep learning, the LightGBM algorithm maintains high accuracy while also offering interpretability and computational efficiency. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the harmonic measurement correction method in this embodiment.

[0019] Figure 2 This is a schematic diagram of the training process for the harmonic voltage prediction model in this embodiment. Detailed Implementation

[0020] To facilitate understanding of the present invention, a more complete description is given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention. Example 1

[0021] See appendix Figure 1 As shown in this embodiment, a method for harmonic measurement correction of a capacitive voltage transformer includes the following steps: Step 1: Collect historical data of the capacitive voltage transformer within a preset time period; wherein, the historical data in Step 1 above includes: historical temperature data of the capacitive voltage transformer at each moment within the preset historical time period and historical harmonic voltage data of the secondary side of the capacitive voltage transformer at each moment within the preset historical time period.

[0022] Step 2: After obtaining historical data, preprocess the historical data based on the IQR rule, and decompose the preprocessed historical data into historical trend component data, historical periodic component data, and historical residual component data.

[0023] Furthermore, the specific steps of step 2 above are as follows: Step 2.1: After obtaining the historical temperature data of the capacitive voltage transformer at each moment within the preset historical period, sort the historical temperature data in ascending order based on the IQR rule; Step 2.2: Based on the number of moments in the preset historical period of the capacitive voltage transformer, the sorted temperature data is divided into i equal parts with the same number of moments to obtain the first quartile Q1 and the third quartile Q3, where the first quartile Q1 is the 25th percentile value and the third quartile Q3 is the 75th percentile value. Step 2.3: By comparing the interquartile range (IQR) between the third quartile Q3 and the first quartile Q1, that is: , Its upper and lower limits are: , Among them, outliers that exceed the upper and lower limits are replaced by the mean of adjacent normal data. To obtain preprocessed historical temperature data; Step 2.4: Similarly, after obtaining the historical harmonic voltage data of the capacitive voltage transformer at each moment within the preset historical period, the historical harmonic voltage data is sorted from smallest to largest based on the IQR rule, and steps 2.2-2.3 are repeated to obtain the preprocessed historical harmonic voltage data. Specifically, the above-mentioned IQR rule is a method in descriptive statistics to determine the difference between the third quartile and the first quartile; like variance and standard deviation, it represents the dispersion of variables in statistical data, but the quartile is more of a robust statistic and is more conducive to improving the accuracy of harmonic voltage data and temperature data after processing.

[0024] Furthermore, step 2 above also includes the following steps: Step 2.5: Based on the STL decomposition method and the preprocessed historical temperature data, the temperature data at each time point of the historical temperature data is initially decomposed to obtain the temperature trend component, temperature periodic component and temperature residual component at each time point after the update. The trend component is used to reflect the long-term change direction of the data, the periodic component is used to reflect the influence of periodic fluctuations, and the residual component is used to reflect the other influencing factors after removing the trend component and periodic component. Step 2.6: Calculate the temperature trend component, temperature periodic component, and temperature residual component at each time point in Step 2.5 sequentially to obtain the updated temperature trend component, temperature periodic component, and temperature residual component at each time point. The specific formula is as follows: , Where Yv is the temperature data (after processing) of the capacitive voltage transformer at time v or the harmonic voltage data (after processing) of the secondary side of the capacitive voltage transformer at time v, Sv is the trend component at time v, Pv is the periodic component at time v, and Rv is the residual component at time v. Step 2.6.1: Definition and The inner loop represents the trend component and periodic component at the start of the Kth iteration. It uses the trend-period-residual decomposition method, namely the STL decomposition algorithm (Seasonal-Trend decomposition procedure based on Loess). The inner loop is one of the core steps of the STL decomposition algorithm. The inner loop focuses on the accurate estimation of the trend component and the periodic component, ultimately achieving effective decomposition of the time series. Initially: ; During the detrending process: the temperature trend component from the previous round is subtracted from the original data to obtain the detrended sequence. , Wherein, Y represents the original data. This is the temperature trend component from the previous round (its value is 0); Step 2.6.2: Divide the data into periodic subsequences: Assuming the period is T, divide the data into n subsequences. Smooth the periodic subsequences using LOESS (window width q = ...). (Polynomial order d=1) Perform regression operation on each subsequence to obtain a temporary periodic sequence. Secondly, regarding temporary periodic sequences After performing three moving averages to remove high-frequency noise, a smoothed sequence is obtained. Thus, the updated temperature periodic components are obtained: , Step 2.6.3: Subtract the current temperature periodic component from the detrended data to obtain the de-periodic sequence: , Step 2.6.4: Output Temperature Trend Components: Apply LOESS regression to the deperiodic series to obtain the updated temperature trend components: , Step 2.6.5: Output the temperature residual component: Subtract the temperature periodic component from Step 2.6.2 and the temperature trend component from Step 2.6.4 from the original subsequence. Thus, the updated temperature residual components are obtained: , The iteration stops when the relative rate of change of the temperature residual component is less than 1% in adjacent iterations. Step 2.7: Based on the STL decomposition method and the historical harmonic voltage data after the preprocessing steps, the harmonic voltage data at each moment of the historical temperature data are initially decomposed to obtain the harmonic voltage trend component, harmonic voltage periodic component and harmonic voltage residual component at each moment. Step 2.8: After obtaining the harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time moment, repeat step 2.6 to obtain the updated harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time moment (that is, replace the temperature trend component, temperature periodic component, and temperature residual component at each time moment in step 2.6 with the corresponding harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time moment for corresponding calculations, thereby obtaining the updated harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time moment).

[0025] Step 3: After obtaining the historical trend component data, historical periodic component data, and historical residual component data, based on the STL decomposition method, perform corresponding calculations on the historical trend component data, historical periodic component data, and historical residual component data respectively to obtain the first historical feature value, the second historical feature value, and the third historical feature value at each time point, and then collect the first historical feature value, the second historical feature value, and the third historical feature value at each time point to form a historical feature set. Furthermore, the specific steps in step 3 above are as follows: Step 3.1: Based on the updated temperature trend components and the updated harmonic voltage trend components in C4, calculate the first historical characteristic value for each time step using the formula for the first characteristic value. Specifically, based on the temperature periodic component... and harmonic voltage periodic components The first eigenvalue is calculated using the following formula. : , in, The fundamental periodic component under rated operating conditions. The temperature periodic component under rated operating conditions is taken as a fixed value of 1. u and m are the temperature weighting coefficient and voltage weighting coefficient, respectively, and their values ​​range from ( Appropriately increase the power supply under sensitive operating conditions; Step 3.2: Based on the updated temperature periodic components and the updated harmonic voltage periodic components in C4, calculate the second historical characteristic value for each time step using the formula for the second characteristic value. Specifically, based on the influence of the trend component, calculate the second characteristic value using the following formula. : , in, For temperature trend components, The trend component of the harmonic voltage is represented by α and β, which are weighting coefficients taken as 0.5 here (α+β=1). This represents the temperature trend component under rated operating conditions, taken as 20 degrees Celsius here. The voltage trend component under rated operating conditions is taken as 1; Step 3.3: Based on the updated temperature residual components and the updated harmonic voltage residual components in C4, calculate the third historical eigenvalue for each time step using the formula for the third eigenvalue. Specifically, based on the influence of the residual components, calculate the third eigenvalue using the following formula. : , Among them, among them, The absolute value of the residual components of the temperature data; These are the values ​​of the harmonic voltage residual components; the weighting coefficients t and r both range from 0.5 to 1.5, with a default value of 1. Step 3.4: Based on the first historical feature value, the second historical feature value, and the third historical feature value at each time point, a historical feature set is formed.

[0026] Step 4: After obtaining the historical feature set, construct a harmonic voltage prediction model based on the LightGBM algorithm, and optimize the harmonic voltage prediction model to obtain the optimized harmonic voltage prediction model. See appendix Figure 2 As shown, the specific steps in step 4 are as follows: Step 4.1: Based on the historical feature set in Step 3, the first historical feature value, the second historical feature value, and the third historical feature value at each time point in the historical feature set are merged according to time alignment to form an N×3 input feature matrix X; Step 4.2: Based on the input feature matrix X, configure the LightGBM parameters and construct a harmonic voltage prediction model. The LightGBM parameters include the number of leaf nodes, the maximum depth, and the regularization coefficient. Secondly, to prevent overfitting, the number of leaf nodes is set to 31, the maximum depth of the tree is set to 5, and the regularization coefficient is set to 0.1. The training objective is to minimize the relative error between the predicted value and the true value. Step 4.3: Optimize and train the harmonic voltage prediction model based on the model in Step 4.2 until the optimized harmonic voltage prediction model is obtained; Step 4.3.1: Based on the historical feature set in Step 3, construct a histogram to make it easier to identify outliers or isolated values ​​in the training set; Step 4.3.2: Based on the histogram in Step 4.3.1, find the optimal split point; Step 4.3.3: Employ a leaf-wise tree growth strategy. Specifically, unlike the traditional level-wise growth strategy, the LightGBM algorithm uses a leaf-wise growth strategy with depth constraints, which can reduce more prediction errors and improve the model's prediction accuracy with the same number of splits. Step 4.3.4: Calculate the gradient G and the Hessian matrix h; The gradient G is expressed by the formula: , L above is the loss function, expressed as mean absolute error: , in, Indicates the predicted value. Indicates the actual value; gradient G reflects the direction of error between the predicted and actual values. Secondly, the formula for representing the Hessian matrix h is: , Step 4.3.5: Based on the gradient G and Hessian matrix h from Step 4.3.4, update the leaf point weights. , The formula for leaf point weights is: , in, This is the regularization coefficient, set to 0.1 to prevent overfitting; Step 4.3.6: Determine if the training of the harmonic voltage prediction model has reached the stopping condition: Set the stopping condition for training the harmonic voltage prediction model: the number of iterations reaches 300 or the value of its loss function is less than 1e-4; if it is determined to be yes, then output the optimized harmonic voltage prediction model; otherwise, if it is determined to be no, then jump back to step 4.3.1 to retrain until the determination result is yes. Through the above training steps, it is ensured that the harmonic voltage prediction model can be repeatedly trained through the historical feature set, which improves the stability of the model and the accuracy of the model output prediction value.

[0027] Specifically, the harmonic voltage prediction model here is implemented using the gradient boosting tree (LightGBM) algorithm. Its core advantage lies in its structured iterative optimization framework and adaptive regularization strategy, which enables it to capture complex patterns and avoid overfitting through integration and constraints, thereby eliminating collinearity, enhancing model robustness, and significantly improving data analysis efficiency and model performance.

[0028] Step 5: After obtaining the optimized harmonic voltage prediction model, collect the real-time data of the capacitive voltage transformer during the previous collection period, and repeat step 2 to obtain the real-time trend component data, real-time periodic component data, and real-time residual component data; combine the STL decomposition method to perform corresponding calculations on the real-time trend component data, real-time periodic component data, and real-time residual component data to obtain the first real-time characteristic value, second real-time characteristic value, and third real-time characteristic value at each time. Step 5.1: After obtaining the optimized harmonic voltage prediction model, collect the real-time data of the capacitive voltage transformer during the previous acquisition time period. The real-time data includes the real-time temperature data of the capacitive voltage transformer at each moment during the previous acquisition time period and the real-time harmonic voltage data of the secondary side of the capacitive voltage transformer at each moment during the previous acquisition time period. Step 5.2: Repeat steps 2.1-2.8 to obtain the real-time trend component data, real-time periodic component data and real-time residual component data at each time point after the update; Step 5.3: After obtaining the real-time trend component data, real-time periodic component data and real-time residual component data at each updated time, the real-time temperature data and real-time harmonic voltage data at each updated time are converted into the first real-time characteristic value, the second real-time characteristic value and the third real-time characteristic value at each time based on the STL decomposition method.

[0029] Step 6: After obtaining the first, second, and third real-time characteristic values ​​at each time point, import these values ​​into the optimized harmonic voltage prediction model for real-time prediction to obtain the predicted harmonic voltage error value of the capacitive voltage transformer. Then, compare the predicted harmonic voltage error value of the capacitive voltage transformer with the actual measured harmonic voltage error of the capacitive voltage transformer to verify the effectiveness of the optimized harmonic voltage prediction model. The specific steps in step 6 are as follows: Step 6.1: After obtaining the first real-time characteristic value, the second real-time characteristic value, and the third real-time characteristic value at each time, import the first real-time characteristic value, the second real-time characteristic value, and the third real-time characteristic value at each time into the optimized harmonic voltage prediction model for real-time prediction, and obtain the predicted value of the harmonic voltage error of the capacitive voltage transformer. Step 6.2: After obtaining the predicted harmonic voltage error value of the capacitive voltage transformer, compare the predicted harmonic voltage error value with the actual measured harmonic voltage error of the capacitive voltage transformer to verify the effectiveness of the optimized harmonic voltage prediction model, thereby achieving the purpose of correcting the harmonic voltage measured by the target capacitive voltage transformer.

[0030] To facilitate explanation, the following detailed explanation is provided in conjunction with a specific embodiment of the harmonic measurement correction method for capacitive voltage transformers.

[0031] For ease of feature value calculation, assume that the historical data collected in step 1 is as shown in Table 1: Table 1 shows the temperature data of the capacitive voltage transformer at various times within a certain time period, and the harmonic voltage data of the secondary side of the capacitive voltage transformer at various times within the same time period.

[0032]

[0033] Based on Table 1, Tables 2 and 3 are obtained using the STL decomposition algorithm:

[0034] Table 2 shows the harmonic voltage trend components, harmonic voltage periodic components, and harmonic voltage residual components at various times within a certain time period.

[0035]

[0036] Table 3 shows the temperature trend component, temperature periodic component, and temperature residual component at various times within a certain time period.

[0037]

[0038] Calculate the first eigenvalue, the second eigenvalue, and the third eigenvalue: (1) Substitute the above periodic components into the formula for calculating the first eigenvalue, and take u and m as 0.5: , , , , , , , , ; (2) Substituting the above trend components into the formula for calculating the second eigenvalue yields: , , , , , , , , ; (3) Substitute the above residual components into the formula for calculating the third eigenvalue: , , , , , , , , , , The input matrix X is obtained: ; Configure the LightGBM parameters, where, to prevent overfitting, the leaf point weight is set to 31, the maximum tree depth is set to 5, and the regularization coefficient is set to 0.1.

[0039] Based on the input matrix X and LightGBM parameters, the optimized harmonic voltage prediction model outputs the predicted harmonic voltage error value of the capacitive voltage transformer. The predicted harmonic voltage error value is then compared with the actual measured harmonic voltage error of the capacitive voltage transformer to verify the prediction error. The specific verification results are shown in Table 4. Table 4 shows a comparison between the predicted harmonic voltage error and the actual measured harmonic voltage error.

[0040] , Table 4 shows the verification results of the harmonic voltage prediction model. The harmonic order mentioned above specifically refers to harmonics whose frequency is an integer multiple of the power frequency, namely, harmonics with frequencies of 2, 3, 4, 5, 6, 7, and 8 times the power frequency. Table 4 above shows that the prediction error of the correction method in this embodiment is significantly smaller than the actual measurement error of CVT, and it can be used in practical applications.

[0041] It should be noted that, compared to traditional electromagnetic voltage transformers (CVTs), which suffer from significant measurement errors in measuring harmonics and transient voltage signals due to their measurement principle, CVTs offer high-precision voltage measurements and incorporate high-frequency communication and relay protection functions. Therefore, reducing the actual prediction error of traditional electromagnetic voltage transformers is a key area of ​​current research. The correction method described in this embodiment can be used as a calibration tool to work with traditional electromagnetic voltage transformers, reducing their actual prediction error and improving measurement accuracy. This method can be applied to high-voltage power grid harmonic monitoring and transient voltage signal measurement.

[0042] In summary, the advantages of the aforementioned harmonic voltage prediction model include: based on the influence of periodic components, trend components, and residual components, three eigenvalues ​​are calculated using temperature data and harmonic voltage data from the secondary side of the capacitive voltage transformer. These three eigenvalues ​​are then used as the input matrix, and LightGBM parameters are configured to construct the harmonic voltage prediction model. Secondly, the model outputs a predicted harmonic voltage error, which is then compared with the actual measured harmonic voltage error, thus correcting the harmonic measurement of the capacitive voltage transformer. Furthermore, the use of eigenvalues ​​to construct the input matrix X eliminates collinearity, enhances model robustness, and significantly improves data analysis efficiency and model performance. The core advantage of the LightGBM algorithm lies in its structured iterative optimization framework and adaptive regularization strategy, enabling it to capture complex patterns while avoiding overfitting through integration and constraints. Compared to the black-box nature of deep learning, the LightGBM algorithm maintains high accuracy while also offering interpretability and computational efficiency. Example 2

[0043] Based on the same inventive concept, the present invention also provides a data processing device for a harmonic measurement correction method for a capacitive voltage transformer, characterized in that it includes: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the steps of the aforementioned harmonic measurement correction method for a capacitive voltage transformer. Example 3

[0044] Based on the same inventive concept, the present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the aforementioned method for harmonic measurement correction of a capacitive voltage transformer.

[0045] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Any modifications or variations made by those skilled in the art, without departing from the scope of the present invention, using the disclosed technical content, are equivalent embodiments of the present invention. Therefore, all equivalent changes made based on the concept of the present invention without departing from the scope of the present invention should be covered within the protection scope of the present invention.

[0046] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0047] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0048] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0049] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and not to limit its protection scope. Although this application has been described in detail with reference to the above embodiments, those skilled in the art should understand that after reading this application, they can still make various changes, modifications or equivalent substitutions to the specific implementation of the application, but these changes, modifications or equivalent substitutions are all within the protection scope of the claims pending approval.

Claims

1. A method for harmonic measurement and correction of a capacitive voltage transformer, characterized in that: Includes the following steps: Step 1: Collect historical data of capacitive voltage transformers within a preset time period; Step 2: After obtaining historical data, preprocess the historical data based on the IQR rule, and decompose the preprocessed historical data into historical trend component data, historical periodic component data, and historical residual component data. Step 3: After obtaining the historical trend component data, historical periodic component data, and historical residual component data, based on the STL decomposition method, perform corresponding calculations on the historical trend component data, historical periodic component data, and historical residual component data respectively to obtain the first historical feature value, the second historical feature value, and the third historical feature value at each time point, and then collect the first historical feature value, the second historical feature value, and the third historical feature value at each time point to form a historical feature set. Step 4: After obtaining the historical feature set, construct a harmonic voltage prediction model based on the LightGBM algorithm, and optimize the harmonic voltage prediction model to obtain the optimized harmonic voltage prediction model. Step 5: After obtaining the optimized harmonic voltage prediction model, collect the real-time data of the capacitive voltage transformer in the previous collection period, and repeat step 2 to obtain the real-time trend component data, real-time periodic component data and real-time residual component data. By combining the STL decomposition method, the real-time trend component data, real-time periodic component data and real-time residual component data are calculated respectively to obtain the first real-time feature value, the second real-time feature value and the third real-time feature value at each time. Step 6: After obtaining the first, second, and third real-time feature values ​​at each time point, import these values ​​into the optimized harmonic voltage prediction model for real-time prediction to obtain the predicted harmonic voltage error value of the capacitive voltage transformer. Then, compare the predicted harmonic voltage error value of the capacitive voltage transformer with the actual measured harmonic voltage error of the capacitive voltage transformer to verify the effectiveness of the optimized harmonic voltage prediction model.

2. The method for harmonic measurement correction of a capacitive voltage transformer according to claim 1, characterized in that: The historical data in step 1 includes: historical temperature data of the capacitive voltage transformer at each moment within a preset historical period, and historical harmonic voltage data of the secondary side of the capacitive voltage transformer at each moment within the preset historical period.

3. A method for harmonic measurement correction of a capacitive voltage transformer according to claim 1 or 2, characterized in that: The specific steps of step 2 are as follows: Step 2.1: After obtaining the historical temperature data of the capacitive voltage transformer at each moment within a preset historical period, sort the historical temperature data in ascending order based on the IQR rule; Step 2.2: Based on the number of moments in the preset historical period of the capacitive voltage transformer, the sorted historical temperature data is divided into i equal parts with the same number of moments to obtain the first quartile Q1 and the third quartile Q3, where the first quartile Q1 is the 25th percentile value and the third quartile Q3 is the 75th percentile value. Step 2.3: Obtain the preprocessed historical temperature data by comparing the interquartile range (IQR) between the third quartile (Q3) and the first quartile (Q1). Step 2.4: After obtaining the historical harmonic voltage data of the capacitive voltage transformer at each moment within the preset historical period, sort the historical harmonic voltage data in ascending order based on the IQR rule, and repeat steps 2.2-2.3 to obtain the preprocessed historical harmonic voltage data.

4. The method for harmonic measurement correction of a capacitive voltage transformer according to claim 3, characterized in that: Step 2 also includes the following steps: Step 2.5: Based on the STL decomposition method and the preprocessed historical temperature data, perform preliminary decomposition on the historical temperature data at each time point to obtain the updated temperature trend component, temperature periodic component, and temperature residual component at each time point. Step 2.6: Calculate the temperature trend component, temperature periodic component, and temperature residual component at each time point in Step 2.5 in sequence to obtain the updated temperature trend component, temperature periodic component, and temperature residual component at each time point. Step 2.7: Based on the STL decomposition method and the preprocessed historical harmonic voltage data, perform preliminary decomposition on the historical harmonic voltage data at each time point to obtain the harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time point. Step 2.8: After obtaining the harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time point, repeat step 2.6 to obtain the updated harmonic voltage trend component, harmonic voltage periodic component, and harmonic voltage residual component at each time point.

5. The method for harmonic measurement correction of a capacitive voltage transformer according to claim 4, characterized in that: The specific steps in step 2.6 are as follows: Step 2.6.1: Set the temperature trend component and temperature periodic component to 0 at the beginning, and subtract the temperature trend component of the previous round from the original data during the detrending process to obtain the detrended sequence. Step 2.6.2: Divide the periodic subsequence: Assuming the period is T, divide the data into n subsequences, smooth the periodic subsequences, and use LOESS to perform regression operation on each subsequence to obtain a temporary periodic sequence. Then, perform three moving averages on the temporary periodic sequence to remove high-frequency noise and obtain a smoothed sequence, thereby obtaining the updated temperature periodic component. Step 2.6.3: Subtract the current temperature periodic component from the detrended data to obtain the de-periodic sequence; Step 2.6.4: Output temperature trend components: Apply LOESS regression to the deperiodic sequence to obtain the updated temperature trend components; Step 2.6.5: Output residual components: Subtract the temperature periodic component from Step 2.6.2 and the temperature trend component from Step 2.6.4 from the original subsequence to obtain the updated temperature residual components.

6. A method for harmonic measurement correction of a capacitive voltage transformer according to claim 1 or 4, characterized in that: The specific steps in step 3 are as follows: Step 3.1: Based on the updated temperature trend components and harmonic voltage trend components at each time point, calculate the temperature trend components and harmonic voltage trend components at each time point using the formula for the first eigenvalue to obtain the first historical eigenvalue at each time point. Step 3.2: Based on the updated temperature periodic components and the updated harmonic voltage periodic components at each time, calculate the second historical characteristic value at each time using the formula for the second characteristic value. Step 3.3: Based on the temperature residual components at each time after the update and the harmonic voltage residual components at each time after the update in C4, let the temperature residual components and harmonic voltage residual components at each time be calculated using the formula for the third eigenvalue to obtain the third historical eigenvalue at each time. Step 3.4: Based on the first historical feature value, the second historical feature value, and the third historical feature value at each time point, a historical feature set is formed.

7. A method for harmonic measurement correction of a capacitive voltage transformer according to claim 1 or 6, characterized in that: The specific steps in step 4 are as follows: Step 4.1: Based on the historical feature set in Step 3, the first historical feature value, the second historical feature value, and the third historical feature value at each time point in the historical feature set are merged according to time alignment to form an N×3 input feature matrix X; Step 4.2: Based on the input feature matrix X, configure the LightGBM parameters and construct a harmonic voltage prediction model; Step 4.3: Optimize and train the harmonic voltage prediction model based on the model in Step 4.2 until the optimized harmonic voltage prediction model is obtained; Step 4.3.1: Construct a histogram based on the historical feature set from Step 3; Step 4.3.2: Based on the histogram in Step 4.3.1, find the optimal split point; Step 4.3.3: Adopt a leaf-wise tree growth strategy; Step 4.3.4: Calculate the gradient G and the Hessian matrix h; Step 4.3.5: Based on the gradient G and Hessian matrix h from Step 4.3.4, update the weights of the leaf points; Step 4.3.6: Determine whether the training of the harmonic voltage prediction model has reached the stopping condition: Set the stopping condition for training the harmonic voltage prediction model: the number of iterations reaches the prediction number or the value of its loss function is less than the preset value; If the determination is yes, the optimized harmonic voltage prediction model is output; otherwise, if the determination is no, the process jumps back to step 4.3.1 for retraining until the determination result is yes.

8. A method for harmonic measurement correction of a capacitive voltage transformer according to claim 1 or 7, characterized in that: The specific steps in step 5 are as follows: Step 5.1: After obtaining the optimized harmonic voltage prediction model, collect the real-time data of the capacitive voltage transformer during the previous acquisition time period. The real-time data includes the real-time temperature data of the capacitive voltage transformer at each moment during the previous acquisition time period and the real-time harmonic voltage data of the secondary side of the capacitive voltage transformer at each moment during the previous acquisition time period. Step 5.2: Repeat steps 2.1-2.8 to obtain the real-time trend component data, real-time periodic component data and real-time residual component data at each time point after the update; Step 5.3: After obtaining the real-time trend component data, real-time periodic component data and real-time residual component data at each updated time, the real-time temperature data and real-time harmonic voltage data at each updated time are converted into the first real-time characteristic value, the second real-time characteristic value and the third real-time characteristic value at each time based on the STL decomposition method.

9. A method for harmonic measurement correction of a capacitive voltage transformer according to claim 1 or 8, characterized in that: The specific steps in step 6 are as follows: Step 6.1: After obtaining the first real-time characteristic value, the second real-time characteristic value, and the third real-time characteristic value at each time, import the first real-time characteristic value, the second real-time characteristic value, and the third real-time characteristic value at each time into the optimized harmonic voltage prediction model for real-time prediction, and obtain the predicted value of the harmonic voltage error of the capacitive voltage transformer. Step 6.2: After obtaining the predicted harmonic voltage error value of the capacitive voltage transformer, compare the predicted harmonic voltage error value with the actual measured harmonic voltage error of the capacitive voltage transformer to verify the effectiveness of the optimized harmonic voltage prediction model.

10. A data processing device for a harmonic measurement correction method for a capacitive voltage transformer, characterized in that, include: A memory and a processor, wherein the memory is used to store computer programs; When the processor executes the computer program, it implements the steps of the harmonic measurement correction method for a capacitive voltage transformer as described in any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the harmonic measurement correction method for a capacitive voltage transformer as described in any one of claims 1 to 9.