Reactive power filter design method combined with phase angle calibration

By combining voltage and current phase shift adjustment units and variable fractional delay filters, the system dynamically tracks changes in the grid fundamental frequency and directly calculates the angle difference between voltage and current. This solves the problems of cumbersome phase angle calibration operations and insufficient accuracy of energy meters, and achieves high-precision reactive power metering and active power correction.

CN121664148APending Publication Date: 2026-03-13SPL ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511673752.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing technologies, the phase angle calibration of electricity meters is cumbersome and lacks precision, resulting in large reactive power measurement errors, especially affecting the fairness and accuracy of measurement in the high current range.

Method used

By constructing a voltage and current phase shift adjustment unit, combined with a current signal delay module and a variable fractional delay filter, and solving the filter coefficients through symmetrical structure design and weighted least squares method, phase matching and phase shift adjustment of voltage and current are achieved, dynamic tracking of the grid fundamental frequency change, and reactive power calibration is performed by directly calculating the angle difference between voltage and current.

Benefits of technology

It significantly improves the accuracy of reactive power measurement, reduces reactive power residue, reduces calibration steps, avoids miscompensation problems, and achieves dynamic adaptation to power frequency changes and high-precision measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121664148A_ABST
    Figure CN121664148A_ABST
Patent Text Reader

Abstract

The invention relates to the field of digital signal processing, and particularly discloses a reactive power filter design method combined with phase angle calibration, which comprises the following steps: building a voltage and current phase shift adjusting unit, setting a current signal delay module and a voltage signal variable fractional delay filter, and cooperatively realizing phase shift adjustment of voltage and current. The variable fractional delay filter is used for processing a non-integer delay scene so as to match the phase relation of voltage and current; a variable fractional delay filter is designed by adopting a symmetric structure, and a filter coefficient is solved based on a weighted least square method, so that the filter approaches target frequency response in a specified passband; obtaining a reactive power residual value in a 1L scene, and determining an angular difference between the voltage and the current through an angular difference calculation unit; phase angle parameters of the phase shift adjusting unit are updated according to the angular difference between the voltage and the current, phase shift adjustment is executed again, and reactive power calibration is completed; and correcting the active power based on the calibrated reactive power to obtain an active power value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital signal processing, specifically a reactive power filter design method that incorporates phase angle calibration. Background Technology

[0002] Phase angle calibration of electricity meters is a core component in ensuring the accuracy of electricity metering. It is crucial to people's livelihoods and has far-reaching significance, directly impacting metering fairness. A 1-degree phase angle error can lead to a 0.15% power factor error, which for industrial users with heavy loads could translate to thousands of dollars in electricity bill discrepancies. Due to the nonlinearity of current transformers and external circuits over high current ranges, phase angle calibration typically requires segmented adjustments, a time-consuming and relatively cumbersome process.

[0003] Reactive power metering is typically achieved using a pair of Hilbert filters with a sampling rate of 6400 Hz. When the phase shift error is set to 0.000055, a pair of second-order IIR filters with a series order of 4 is calculated. After fixed-point implementation, the actual phase shift error is 0.02°. Although the reactive power error meets the 0.1-level accuracy requirement, there is still a significant reactive power residue at 1L. With a rated power of 220V and 10A and a power conversion factor of 0.000440496, the calculated reactive power residue at 1L is approximately 1.88W. The calculation accuracy needs further improvement. However, increasing the order of the Hilbert filter bank may affect the filtering stability, and performance improvement at this point would require a significant increase in the order. Summary of the Invention

[0004] The purpose of this application is to overcome the shortcomings of the prior art and provide a reactive power filter design method that combines phase angle calibration to solve the problems mentioned in the background art.

[0005] This application provides a reactive power filter design method incorporating phase angle calibration, comprising the following steps:

[0006] A voltage and current phase shift adjustment unit was built, and a current signal delay module and a voltage signal variable fractional delay filter were set up to work together to achieve phase shift adjustment of voltage and current;

[0007] The buffer length of the current signal delay module is determined based on the sampling rate and the fundamental frequency. The variable fractional delay filter is used to handle non-integer delay scenarios to match the phase relationship between voltage and current.

[0008] A variable fractional delay filter is designed using a symmetrical structure, and the filter coefficients are solved based on the weighted least squares method, so that the filter can approximate the target frequency response within a specified passband.

[0009] The symmetry of the filter reduces the number of coefficients involved in the calculation;

[0010] Obtain the residual reactive power value in the 1L scenario, and determine the angle difference between voltage and current through the angle difference calculation unit;

[0011] The phase angle parameters of the phase shift adjustment unit are updated based on the angle difference between the voltage and the current, and the phase shift adjustment is re-executed to complete the reactive power calibration.

[0012] Based on the calibrated reactive power, the active power is corrected to obtain the active power value.

[0013] Furthermore, it also includes:

[0014] Real-time monitoring of power grid base frequency changes; if the base frequency change does not exceed the set threshold, all current parameters remain unchanged.

[0015] If the fundamental frequency change exceeds the set threshold, the delay parameters of the phase shift adjustment unit and the parameters of the variable fractional delay filter are recalculated to complete the phase shift adjustment and calibration under the new fundamental frequency, thereby realizing dynamic tracking of power frequency changes.

[0016] Furthermore, the voltage and current phase shift adjustment unit is constructed by setting a current signal delay module and a voltage signal variable fractional delay filter to collaboratively achieve phase shift adjustment of voltage and current, specifically as follows:

[0017] A voltage and current phase shift adjustment unit is constructed, with a current signal delay module for the corresponding current path and a variable fractional delay filter for the corresponding voltage path. The two work together to achieve phase shift adjustment of voltage and current. The current signal delay module records the buffer length and configures the initial phase angle parameter, which is used to calculate the phase shift module coefficient. The filter is used to handle non-integer delay scenarios to match the phase relationship between voltage and current. The voltage and current signals use a unified sampling rate, and the grid base frequency is set to a specific value. The delay length of the current signal delay module can be calculated based on the sampling rate and the grid base frequency. If the sampling rate and the grid base frequency are not integer multiples, or if there is a deviation between the initial phase angle parameter and the angle corresponding to the theoretical delay, the delay length will be non-integer. The current signal delay module achieves integer delay of the current signal through the set buffer length, and the filter handles non-integer delay of the voltage signal. The two work together to complete the phase shift adjustment between voltage and current.

[0018] Furthermore, the variable fractional delay filter is designed with a symmetrical structure, and the filter coefficients are solved using the weighted least squares method to make the filter approximate the target frequency response within a specified passband. Specifically, the variable fractional delay filter adopts a symmetrical structure, which is realized based on its transfer function characteristics. The symmetry is used to reduce the number of coefficients in the transfer function, and the number of coefficients is further reduced when the polynomial order is odd. The variable fractional delay filter is an FIR structure, designed to approximate the target frequency response within a specified passband. The target frequency response satisfies the expression for approximating the corresponding frequency response containing the variable fractional delay at the normalized angular frequency. The filter coefficients are solved using the weighted least squares method, with the goal of minimizing the weighted squared error between the designed filter and the target filter. The error calculation range is within the normalized value of the passband cutoff frequency. The polynomial order can be set according to the filtering specifications. The transfer function is written in matrix form, and the filter coefficients are calculated using the weighted least squares method. The coefficients are then processed by fixed-point processing to form a coefficient matrix.

[0019] Furthermore, the acquisition of the residual reactive power value in the 1L scenario and the determination of the angle difference between voltage and current through the angle difference calculation unit are specifically as follows: First, the voltage and current phase shift adjustment unit is built and the variable fractional delay filter is configured; the 1L scenario is determined to be a pure resistive load scenario, in which the reactive power is 0 under ideal conditions; the signal source of the 1L scenario is input into the configured phase shift adjustment unit, and the signal is processed by the variable fractional delay filter to calculate the current instantaneous active power and the residual instantaneous reactive power value; the amplitude gain is corrected in the 1L scenario according to the pulse calibration method, and the ratio difference is obtained according to the correction result, and then the ratio difference correction value is calculated; the instantaneous active power, the residual instantaneous reactive power value, the rated power, and the ratio difference correction value are input into the angle difference calculation unit, and the angle difference calculation unit is substituted into the set angle difference calculation formula to perform calculation, and finally the angle difference between voltage and current is determined.

[0020] Furthermore, the step of updating the phase angle parameters of the phase shift adjustment unit based on the angle difference between the voltage and current, re-executing phase shift adjustment, and completing reactive power calibration specifically involves: obtaining the angle difference between the voltage and current previously determined by the angle difference calculation unit; updating the core phase angle parameters of the phase shift adjustment unit by summing the angle difference with the original phase angle parameters; recalculating the buffer length of the current signal delay module in conjunction with the sampling rate and the grid base frequency, and simultaneously recalculating the filter parameters; reconfiguring the current signal delay module, using the newly calculated buffer length as its buffer length to achieve integer delay of the current signal; reconfiguring the filter and importing the newly calculated parameters to handle non-integer delay of the voltage signal; inputting the signal source of the 1L scenario back into the updated phase shift adjustment unit, enabling the current signal delay module and the filter to work together to re-execute phase shift adjustment; calculating the instantaneous reactive power residual value after adjustment to achieve the set standard accuracy; and completing reactive power calibration when the instantaneous reactive power residual value meets the accuracy requirements.

[0021] Furthermore, the active power is corrected based on the calibrated reactive power to obtain the active power value. Specifically, the active power is corrected based on the calibrated reactive power. First, it is confirmed that the reactive power has been calibrated. Then, the instantaneous active power and instantaneous reactive power corresponding to any power factor angle in the current scenario are obtained. Then, the corrected active power is calculated using the correction formula. During the calculation process, the sampling rate of the voltage and current signals is kept constant, and the grid base frequency remains unchanged as long as it does not exceed the set threshold. The calibrated reactive power value is substituted into the formula, and the obtained instantaneous active power and instantaneous reactive power are calculated. The obtained corrected active power can eliminate the active power metering error caused by the angle difference between voltage and current.

[0022] Furthermore, the real-time monitoring of the power grid base frequency change, if the base frequency change does not exceed a set threshold, keeps all current parameters unchanged. Specifically, the real-time monitoring of the power grid base frequency change first extracts base frequency information based on the voltage signal in real time; calculates the absolute value of the difference between the current monitored base frequency and the previous stable base frequency; if the difference does not exceed the set threshold; then keeps the current signal delay module buffer length, variable fractional delay filter coefficient, phase angle parameter of the phase shift adjustment unit, corrected amplitude gain, and active power correction related parameters unchanged; the phase shift adjustment unit continues to use the original parameters to coordinate voltage and current phase shift adjustment; the power calculation stage continues to use the original parameters to calculate active and reactive power; to ensure the continuity of power metering and maintain metering accuracy.

[0023] Furthermore, if the fundamental frequency change exceeds a set threshold, the delay parameters of the phase shift adjustment unit and the parameters of the variable fractional delay filter are recalculated to complete the phase shift adjustment and calibration under the new fundamental frequency, thereby achieving dynamic tracking of power frequency changes. Specifically, if the fundamental frequency change exceeds the set threshold, firstly, it is confirmed that the absolute value of the difference between the new fundamental frequency and the original stable fundamental frequency exceeds the threshold; the voltage and current signal sampling rate remains unchanged; the delay length of the phase shift adjustment unit is recalculated, and if the sampling rate is not an integer multiple of the new fundamental frequency, the delay length is split into integer and fractional parts; the buffer length of the current signal delay module is re-determined; the parameters of the variable fractional delay filter are recalculated, and based on the fractional part of the delay length, an addition is performed according to specified conditions. The filter coefficients are solved and processed using the weighted least squares method; the angle difference calculation unit is started, and the reactive power residual value is calculated by inputting the 1L scene signal source. The new voltage-current angle difference is calculated by combining the corrected ratio difference value under the 1L scene; the phase angle parameters of the phase shift adjustment unit are updated; the phase shift adjustment unit is reconfigured and the phase shift adjustment is re-executed; the reactive power residual value is continuously monitored until the standard accuracy is reached, and the reactive power calibration under the new base frequency is completed; the active power is corrected using the calibrated reactive power, and the instantaneous active and reactive power of the current scene are obtained. The values ​​are substituted into the correction formula to obtain the accurate active power value; after confirming that all new parameters are stable, they remain unchanged until the next monitoring shows that the base frequency change exceeds the set threshold.

[0024] The beneficial effects of this application are as follows: it adaptively adjusts the voltage and current phase angle difference based on the residual reactive power of 1L, and can track changes in power frequency, reducing the meter calibration process and achieving high-precision metering. The specific effects are as follows:

[0025] To address the issue of significant reactive power residue (approximately 1.88 W) in traditional Hilbert filter banks under 1L (pure resistive load) scenarios, this method reduces the reactive power residue to approximately 0.05 W through the design of a symmetrical variable fractional delay (VFD) filter and a phase angle calibration mechanism. Ultimately, it can be stabilized at a standard accuracy of 1e-3 W, which is closer to the theoretical value of reactive power (0) under ideal conditions, significantly improving the accuracy of reactive power metering.

[0026] The VFD filter adopts a symmetrical structure design and utilizes the characteristics of the transfer function to reduce the number of coefficients (for example, when the polynomial order is odd, the number of coefficients can be reduced to 1 / 2 of the original), thereby reducing hardware storage and computing costs. At the same time, it adopts an FIR structure to avoid the stability problem of the feedback loop of the IIR filter, resulting in a faster response speed and a shorter settling time, thus achieving both high precision and high efficiency.

[0027] Traditional meter calibration requires segmented phase angle calibration, which is cumbersome and prone to miscompensation when the phase angle difference is large. This method directly calculates the phase angle difference between voltage and current using the reactive power residue in the 1L scenario, and achieves accurate calibration by combining it with the ratio difference correction value. It eliminates the need to store segmented coefficients, reduces the number of calibration steps, avoids miscompensation problems, and improves calibration reliability.

[0028] The system monitors the power grid's base frequency in real time. When the base frequency change exceeds a set threshold (e.g., 1 Hz), it automatically recalculates the delay parameters of the phase shift adjustment unit and the VFD filter coefficients to complete phase shift adjustment and calibration under the new base frequency. When the base frequency is stable, the parameters remain unchanged to ensure metering continuity. Within a wide base frequency range of 45-55 Hz, reactive power consistently approaches zero. Compared to traditional methods (where reactive power deviation is significant when the base frequency changes), this system achieves dynamic adaptation to power frequency variations, ensuring metering accuracy under all operating conditions.

[0029] Active power is corrected based on calibrated reactive power, eliminating active power metering errors caused by voltage and current angle differences. Regardless of changes in the load power factor, accurate active power values ​​can be obtained through the correction formula, further improving the overall accuracy of electricity metering. Attached Figure Description

[0030] Figure 1 This is a flowchart of the adaptive meter calibration power metering process of this application;

[0031] Figure 2 This is a diagram of the VFD filter structure of this application;

[0032] Figure 3 This is a flowchart of the adaptive frequency tracking calibration process in this application;

[0033] Figure 4 The diagram shows the phase and amplitude frequency response of the VFD filter in this application. Detailed Implementation

[0034] This application discloses a reactive power filter design method incorporating phase angle calibration, comprising the following steps:

[0035] A voltage and current phase shift adjustment unit was built, and a current signal delay module and a voltage signal variable fractional delay filter were set up to work together to achieve phase shift adjustment of voltage and current;

[0036] The buffer length of the current signal delay module is determined based on the sampling rate and the fundamental frequency. The variable fractional delay filter is used to handle non-integer delay scenarios to match the phase relationship between voltage and current.

[0037] A variable fractional delay filter is designed using a symmetrical structure, and the filter coefficients are solved based on the weighted least squares method, so that the filter can approximate the target frequency response within a specified passband.

[0038] The symmetry of the filter reduces the number of coefficients involved in the calculation;

[0039] Obtain the residual reactive power value in the 1L scenario, and determine the angle difference between voltage and current through the angle difference calculation unit;

[0040] The phase angle parameters of the phase shift adjustment unit are updated based on the angle difference between the voltage and the current, and the phase shift adjustment is re-executed to complete the reactive power calibration.

[0041] Based on the calibrated reactive power, the active power is corrected to obtain the active power value.

[0042] Also includes:

[0043] Real-time monitoring of power grid base frequency changes; if the base frequency change does not exceed the set threshold, all current parameters remain unchanged.

[0044] If the fundamental frequency change exceeds the set threshold, the delay parameters of the phase shift adjustment unit and the parameters of the variable fractional delay filter are recalculated to complete the phase shift adjustment and calibration under the new fundamental frequency, thereby realizing dynamic tracking of power frequency changes.

[0045] The voltage and current phase shift adjustment unit is constructed by setting up a current signal delay module and a voltage signal variable fractional delay filter to collaboratively achieve phase shift adjustment of voltage and current. Specifically, when constructing the voltage and current phase shift adjustment unit, a current signal delay module for the corresponding current path and a voltage signal variable fractional delay filter for the corresponding voltage path are set up respectively. These two modules work together to achieve phase shift adjustment of voltage and current. The buffer length of the current signal delay module is denoted as Im, and an initial value shiftangle needs to be configured. This shiftangle is used to calculate the phase shift module coefficients. The voltage signal variable fractional delay filter, also known as a VFD filter, is mainly used to handle non-integer delay scenarios to match the phase relationship between voltage and current. The sampling rate of both voltage and current signals is uniformly set to fs, with an initial value of 6400 Hz. The grid fundamental frequency is set to f0, with an initial value of 50 Hz. The delay length D of the current signal delay module can be calculated based on the sampling rate fs and the fundamental frequency f0. When fs and f0 are not integer multiples, or when shiftangle deviates from the angle corresponding to the theoretical delay, D is a non-integer. The VFD filter is set to order N, initially set to 10, and N must satisfy the condition that N is greater than or equal to the decimal part of 2 multiplied by 1 divided by D minus 1. The current signal delay module achieves integer delay of the current signal through a set buffer length Im. The VFD filter handles non-integer delay of the voltage signal. Together, they complete the phase shift adjustment between voltage and current.

[0046] The buffer length of the current signal delay module is determined based on the sampling rate and fundamental frequency. The variable fractional delay filter (VFD) is used to handle non-integer delay scenarios to match the phase relationship between voltage and current. Specifically, the buffer length Im of the current signal delay module is determined by the sampling rate fs and the fundamental frequency f0. The initial sampling rate fs is set to 6400 Hz. The initial fundamental frequency f0 is set to 50 Hz. The delay length D is calculated based on fs and f0. When fs and f0 are not integer multiples, or when the shift angle deviates from the angle corresponding to the theoretical delay, D is non-integer. In this case, D can be represented as an integer part plus a fractional part, with the integer part obtained by rounding. The VFD filter handles this non-integer delay scenario. The order of the VFD filter is set to N. N must satisfy the condition that N is greater than or equal to the fractional part of D multiplied by 1 and then minus 1. Initially, N is set to 10. The current signal delay module implements the integer delay portion of the current signal through the buffer length Im. The VFD filter handles the non-integer delay portion of the voltage signal. The two work together to adjust the phase shift between voltage and current to match their phase relationship.

[0047] The variable fractional delay filter employs a symmetrical structure design and solves for the filter coefficients using the weighted least squares method, enabling the filter to approximate the target frequency response within a specified passband. Specifically, the variable fractional delay filter utilizes a symmetrical structure design. This symmetrical structure is achieved based on the characteristics of its transfer function. The coefficients in the transfer function H(z,p) can be reduced to (N+1)*(M+1) using symmetry. When the polynomial order m is odd, it is further deduced that a(0,m)=0, further reducing the number of coefficients to (N+1)*(M+1) / 2.

[0048] The VFD filter is a Fir structure. Its design aims to approximate the target frequency response within a specified passband. The target frequency response satisfies that H(z,p) approximates e^(-jwp) at the normalized angular frequency ω, where p is a variable fractional delay.

[0049] The filter coefficients are solved using the weighted least squares method. The objective is to minimize the weighted squared error between the designed filter and the target filter. The error is calculated within the normalized value of the passband cutoff frequency. The initial passband cutoff frequency is set to 0.4π.

[0050] The polynomial order M can be set according to the filtering specifications, with an initial value of 4. The transfer function is written in matrix form, and the filter coefficients are calculated using weighted least squares and MATLAB library functions. The coefficients are processed using 18-bit fixed-point conversion to form a coefficient matrix A.

[0051] Through the above design, the filter reduces hardware overhead while ensuring a large bandwidth, and has a fast response speed and short settling time.

[0052] The filter's symmetry reduces the number of coefficients involved in the calculation. Specifically, the symmetry of the variable fractional delay filter is achieved based on the characteristics of its transfer function. According to the transfer function derivation, symmetry reduces the number of coefficients involved in the calculation to (N+1)*(M+1). When the polynomial order m is odd, it is further deduced that a(0,m)=0, and the number of coefficients can be reduced to (N+1)*(M+1) / 2. This reduction in the number of coefficients directly reduces the storage and computational overhead in hardware implementation. Simultaneously, the filter employs a Fir structure, which, compared to an Iir structure, avoids the stability issues caused by feedback loops, resulting in faster response speeds and shorter settling times. Through this design, while reducing the number of coefficients and lowering hardware overhead, the filter's response speed and stability are guaranteed.

[0053] The process involves obtaining the residual reactive power value in the 1L scenario and determining the angle difference between voltage and current using an angle difference calculation unit. Specifically, this is achieved by first constructing a voltage and current phase shift adjustment unit and configuring a variable fractional delay filter. The variable fractional delay filter uses an 18-bit fixed-point coefficient matrix A, with an order N of 10 and a polynomial order M of 4. The sampling rate fs for the voltage and current signals is set to 6400 Hz, and the grid fundamental frequency f0 is set to 50 Hz.

[0054] Next, the parameters for scenario 1L are determined. Scenario 1L is a purely resistive load scenario with a rated voltage of 220V and a rated current of 10A. In this scenario, the power factor angle is 0, and the reactive power is 0 under ideal conditions. The rated power Pstd corresponding to this scenario is the product of 220V and 10A, i.e., 2200W, and the power conversion factor is 0.000440496.

[0055] The signal source of the 1L scenario is input into the configured phase shift adjustment unit. After the signal is processed by a variable fractional delay filter, the current instantaneous active power P and the instantaneous reactive power residual value Q are calculated. Under this scheme, the reactive power residual value is approximately 0.05W, which is more accurate than the 1.88W residual value of a traditional 4-stage Hilbert phase shift filter bank.

[0056] The amplitude gain Gain is then corrected in the 1L scenario using the pulse calibration method. The ratio difference k is obtained based on the correction result, and then the ratio difference correction value k' is calculated, where k' is 1 divided by k.

[0057] The instantaneous active power P, the residual instantaneous reactive power Q, the rated power Pstd, and the ratio correction value k' are input into the angle difference calculation unit. The angle difference calculation unit substitutes the values ​​into the set angle difference calculation formula to perform calculations and finally determines the angle difference δ between voltage and current.

[0058] This solution directly calculates the angle difference using the residual reactive power value, avoiding the miscompensation problem that easily occurs in the traditional pulse calibration method when the angle difference is slightly large, resulting in more accurate calculation results.

[0059] The phase angle parameters of the phase shift adjustment unit are updated based on the angle difference between the voltage and current, and the phase shift adjustment is re-executed to complete the reactive power calibration. Specifically, the angle difference δ between the voltage and current, previously determined by the angle difference calculation unit, is first obtained. Then, the core phase angle parameter shiftangle of the phase shift adjustment unit is updated, with shiftangle equal to the sum of δ and the original shiftangle. Next, based on the updated shiftangle, combined with the sampling rate fs and the grid base frequency f0, the buffer length Im of the current signal delay module is recalculated, where fs is initially set to 6400 Hz and f0 is initially set to 50 Hz. Simultaneously, based on the updated shiftangle, the parameters of the VFD filter, including its coefficient matrix, are recalculated using 18-bit fixed-point processing. Then, the current signal delay module is reconfigured, using the newly calculated Im as the buffer length to achieve integer delay of the current signal. Finally, the VFD filter is reconfigured, importing the newly calculated parameters to handle non-integer delay of the voltage signal. The signal source from scenario 1L is then input again into the updated phase shift adjustment unit, allowing the current signal delay module and VFD filter to work together to re-execute phase shift adjustment. After adjustment, the instantaneous reactive power residual value is calculated, aiming to achieve a standard accuracy of 1e-3W. When the instantaneous reactive power residual value meets this accuracy requirement, reactive power calibration is completed.

[0060] The active power is corrected based on the calibrated reactive power to obtain the active power value. Specifically, in implementation, it is first confirmed that the reactive power has been calibrated; the calibrated reactive power obtained at this point can be used as a substitute for the ideal reactive power. Next, the instantaneous active power P and instantaneous reactive power Q under the current scenario are obtained; these two parameters correspond to the measured values ​​at any power factor angle. Then, a specific correction formula is used to calculate the active power; the corrected active power P' is approximately equal to P minus the ratio of Q to the calibrated reactive power multiplied by Q.

[0061] After calibration, the reactive power must meet the previously set standard accuracy, i.e., the residual instantaneous reactive power value reaches 1e-3W. During the calculation process, the sampling rate of the voltage and current signals remains unchanged at 6400Hz. The grid baseband frequency also remains at the initial setting of 50Hz; if the baseband frequency does not exceed the set threshold, no adjustment is needed. The specific value of the calibrated reactive power is substituted into the formula. For example, when the calibrated reactive power is approximately 0.05W, the corresponding instantaneous active power P and instantaneous reactive power Q are substituted into the calculation. Through this calculation process, the corrected active power P' can be obtained. This P' eliminates the active power measurement error caused by the angle difference between voltage and current, achieving accurate measurement of active power.

[0062] The real-time monitoring of the power grid's base frequency change ensures that all parameters remain unchanged if the base frequency change does not exceed a set threshold. Specifically, this involves first extracting the power grid's base frequency information in real-time based on a voltage signal with a sampling rate of 6400 Hz. The absolute value of the difference between the currently monitored base frequency f0' and the base frequency f0 in the previous steady-state state is calculated. A base frequency change threshold of 1 Hz is set. If this absolute value does not exceed 1 Hz, meaning the base frequency change does not exceed the set threshold, the buffer length Im of the current signal delay module remains unchanged. The 18-bit fixed-point coefficient matrix A of the voltage signal variable fractional delay filter remains unchanged. The phase angle parameter shiftangle of the phase shift adjustment unit remains unchanged. The amplitude gain Gain obtained from previous correction remains unchanged. The relevant parameters used for active power correction remain unchanged. The phase shift adjustment unit continues to work collaboratively using the original parameters to achieve phase shift adjustment of voltage and current. The power calculation stage continues to use the original parameters to calculate active and reactive power. This ensures the continuity of the energy metering process while maintaining metering accuracy.

[0063] If the fundamental frequency change exceeds a set threshold, the delay parameters of the phase shift adjustment unit and the parameters of the variable fractional delay filter are recalculated to complete the phase shift adjustment and calibration under the new fundamental frequency, thereby achieving dynamic tracking of power frequency changes. Specifically, in implementation, it is first confirmed that the absolute value of the difference between the monitored new power grid fundamental frequency and the original stable fundamental frequency exceeds a set threshold of 1 Hz. At this time, the voltage and current signal sampling rate remains unchanged at 6400 Hz. Then, the delay length D of the phase shift adjustment unit is recalculated.

[0064] The delay length D is calculated based on the sampling rate and the new fundamental frequency. If the sampling rate and the new fundamental frequency are not integer multiples, D is still split into an integer part and a fractional part. Then, the buffer length Im of the current signal delay module is redefined, with Im taking the integer part of the recalculated delay length D. Next, the parameters of the variable fractional delay filter are recalculated. The order N of the variable fractional delay filter is still set to 10, and the polynomial order M is still set to 4. Based on the fractional part of the new delay length D, and with the passband cutoff frequency normalized to 0.4π, the filter coefficients are solved using the weighted least squares method. The new 18-bit fixed-point coefficient matrix A is calculated using MATLAB library functions. Then, the angle difference calculation unit is started, and a 1L scene signal source is input.

[0065] Scenario 1L is a purely resistive load scenario with a rated voltage of 220V and a rated current of 10A. The residual reactive power value under this scenario is calculated. Combining the corrected ratio difference correction value k under scenario 1L, the new voltage-current angle difference δ is calculated using the angle difference calculation formula. The phase angle parameter shiftangle of the phase shift adjustment unit is updated; the updated shiftangle is the sum of the original shiftangle and the new angle difference δ. Next, the phase shift adjustment unit is reconfigured, setting the new buffer length Im to the buffer length of the current signal delay module, and the new 18-bit fixed-point coefficient matrix A is imported into the variable fractional delay filter.

[0066] Phase shift adjustment is re-executed, allowing the current signal delay module and the variable fractional delay filter to work together. Residual reactive power is continuously monitored until it reaches a standard accuracy of 1e-3W, completing reactive power calibration under the new base frequency. Active power is then corrected, obtaining the instantaneous active power P and instantaneous reactive power Q for the current scenario. The calibrated reactive power is used as the ideal reactive power substitute value and substituted into the active power correction formula to calculate the accurate active power value. After confirming that all new parameters are stable, these parameters are kept unchanged until the next monitoring shows a base frequency change exceeding the set threshold. Through the above steps, phase shift adjustment and calibration under the new base frequency are completed, achieving dynamic tracking of power frequency changes.

[0067] The following explanation is based on specific numerical values ​​and accompanying figures:

[0068] This invention proposes a scheme combining phase angle calibration and reactive power filter design, the flowchart of which is shown below. Figure 1 It can adaptively adjust the voltage and current phase angle difference based on the residual reactive power of 1L, and can track power frequency changes, reducing the calibration process and achieving high-precision metering.

[0069] A scheme combining phase angle calibration and reactive power filter design specifically includes:

[0070] S1, the I-channel delay module and the U-channel VFD (Variable Fractional Delay) filter together implement the phase shift between voltage and current. The I-channel buffer length is Im, and the initial value shiftangle is configured as follows: Calculate the phase-shift module coefficients. Assume the sampling rate of U and I signals is fs = 6400 Hz, and the fundamental frequency is f0 = 50 Hz. Then the delay length... When fs and f0 are not integer multiples or shiftangle is not equal to f0, When there is a deviation, D is a non-integer, then D can be expressed as ,in The integer symbol, The fractional part. The sampling rate for U and I signals is fs = 6400 Hz, the fundamental frequency is f0 = 50 Hz, and the delay length is... ,but If we take the order of the VFD filter to be N, then .

[0071] S2, the above VFD filter is designed based on a symmetric structure using the weighted least squares method. While ensuring a large bandwidth, only half of the coefficients of the asymmetric filter are needed for calculation, reducing hardware overhead. As it is a Fir structure, the calculation results respond faster and the settling time is shorter compared to the Iir structure.

[0072] The design principle of VFD filters is to make the transfer function H(z,p) approximate the target frequency response within the specified passband. ,Right now:

[0073] (1);

[0074] Where w , is the normalized angular frequency. , where is the variable fractional delay. A Fir-type VFD filter can be expressed as:

[0075] (2);

[0076] A polynomial of size p

[0077] (3):

[0078] m is the order of the polynomial. Substituting equation (3) into equation (2), we get:

[0079] (4);

[0080] again (5);

[0081] Substituting into equation (4), we get:

[0082] (6);

[0083] Utilizing the symmetry of equation (6), the coefficients in H(z,p) can be reduced to (N+1)*(M+1). Substituting n=0 into equation (6), we obtain...

[0084] (7);

[0085] Therefore, when m is odd, a(0,m)=0, and the VFD filter coefficients can be further reduced to (N+). )*(M+1), to obtain the VFD filter structure as follows Figure 2 .

[0086] Substituting equation (6) into equation (4), we obtain the simplified transfer function:

[0087] (8);

[0088] The coefficients are solved using WLS (Weighted Least Squares) to minimize the weighted squared error between the designed filter and the target filter. Minimum,

[0089] (9);

[0090] This is the normalized value of the passband cutoff frequency. The error between the target filter and the above equation is solved using MATLAB library functions, which will not be elaborated further.

[0091] N and M can be set according to the filtering parameters. Here, we take the order of the VFD filter coefficient polynomial M=4, substitute the parameter values ​​into formula (8), and write it in matrix form to get:

[0092] ;

[0093] in:

[0094]

[0095]

[0096]

[0097]

[0098]

[0099] ;

[0100] Take the passband cutoff frequency , The 18-bit fixed-point coefficient matrix A of VFD, obtained by encoding and calculation using the MATLAB platform, is as follows:

[0101] [14 258179 257051 -152416 -149101

[0102] -9 -123627 -60880 156996 76028

[0103] 5 76948 24901 -105118 -33322

[0104] -3 -52436 -12489 73313 17082

[0105] 2 36957 6870 -52211 -9488

[0106] -1 -26199 -3926 37218 5450

[0107] 1 18331 2255 -26129 -3140

[0108] 0 -12443 -1260 17775 1759

[0109] 0 8020 663 -11475 -927

[0110] 0 -4737 -305 6786 427].

[0111] By importing the above coefficients and inputting a 1L signal source, the residual reactive power is approximately 0.05W. Using a 4-stage Hilbert phase-shifting filter bank, the reactive power is calculated to be 1.9W. The reactive power calculated by this scheme is closer to the theoretical value of 0, and has higher accuracy.

[0112] After completing the phase-shifting module design in steps S1 and S2, the reactive residual power is obtained by inputting the 1L signal source. Compared with the Hilbert phase-shifting filter bank, this scheme has higher phase-shifting accuracy, smaller residual reactive power, and shorter stabilization time of reactive power calculation results, making it suitable for tracking signal changes.

[0113] S3. Current and voltage paths often have phase angle differences due to external circuits or transformers, requiring correction of active and reactive power. The pulse calibration method is first used to correct the amplitude gain in the 1L scenario, and then the phase angle difference is corrected in the 0.5L scenario. Tests revealed that when the phase angle difference is slightly large (e.g., 2°), the reactive power residue calculated by the pulse calibration method actually increases. This is because the phase angle difference calculated by the calibration method is not accurate enough, leading to incorrect compensation. This solution calculates the phase angle difference based on the reactive power residue using the phase angle difference calculation module and performs accurate correction.

[0114] Let the ratio difference be k, and the angle difference be... Given a rated power of Pstd, instantaneous active power and reactive power of P and Q respectively, the formula for calculating the angle difference is:

[0115] (10);

[0116] In the 1L scenario, Let the difference correction value ,but ,again ,but .

[0117] Obtain the angle difference Then, update shiftangle = +shiftangle, repeat s1 to obtain new phase shift module parameters, and calibrate reactive power Q by updating the parameters.

[0118] After reactive power calibration, active power P is calibrated, where P and Q are the instantaneous active and reactive power at arbitrary power factor angles, and the power factor angle is... Then the corrected active power P' is:

[0119] (11);

[0120] again Then P' is approximately:

[0121] , (12;

[0122] in For the ideal reactive power at this point, use the calibrated reactive power. replace.

[0123] S4, after calibration, if the base frequency f0 remains unchanged (not exceeding the set threshold), all the above parameters are fixed; when the input base frequency f0 exceeds the set threshold, the update flag UpdateFlag is set to 1, the angle difference calculation module is started, and step s1 is repeated. The Im and VFD filter parameters are adjusted according to the current value of shiftangle, and the residual reactive power is calculated after stabilization. When the required standard accuracy is achieved, such as 1e-3w, the result is... Repeat step S3 to perform active power calibration, as follows: Figure 3 It can be seen that only the control parameter update module is needed to realize the calibration and frequency tracking of different current ranges, without the need to store segmented calibration coefficients under a fixed power frequency, thus simplifying the calibration process.

[0124] Let the fundamental frequency fluctuation threshold Thld be 1 Hz. When a fundamental frequency change is detected, Im and The value is recalculated based on the updated f0' value. Table 1 shows the parameter values ​​and reactive power list when the fundamental frequency changes in the [45 55] interval. It can be seen that the reactive power Q obtained by the above scheme is closer to 0 than that of the Hilbert filter bank.

[0125] Table 1:

[0126] .

Claims

1. A reactive power filter design method incorporating phase angle calibration, characterized in that, Includes the following steps: A voltage and current phase shift adjustment unit was built, and a current signal delay module and a voltage signal variable fractional delay filter were set up to work together to achieve phase shift adjustment of voltage and current; The buffer length of the current signal delay module is determined based on the sampling rate and the fundamental frequency. The variable fractional delay filter is used to handle non-integer delay scenarios to match the phase relationship between voltage and current. A variable fractional delay filter is designed using a symmetrical structure, and the filter coefficients are solved based on the weighted least squares method, so that the filter can approximate the target frequency response within a specified passband. The symmetry of the filter reduces the number of coefficients involved in the calculation; Obtain the residual reactive power value in the 1L scenario, and determine the angle difference between voltage and current through the angle difference calculation unit; The phase angle parameters of the phase shift adjustment unit are updated based on the angle difference between the voltage and the current, and the phase shift adjustment is re-executed to complete the reactive power calibration. Based on the calibrated reactive power, the active power is corrected to obtain the active power value.

2. The reactive power filter design method combining phase angle calibration according to claim 1, characterized in that, Also includes: Real-time monitoring of power grid base frequency changes; if the base frequency change does not exceed the set threshold, all current parameters remain unchanged. If the fundamental frequency change exceeds the set threshold, the delay parameters of the phase shift adjustment unit and the parameters of the variable fractional delay filter are recalculated to complete the phase shift adjustment and calibration under the new fundamental frequency, thereby realizing dynamic tracking of power frequency changes.

3. The reactive power filter design method combining phase angle calibration according to claim 1, characterized in that, The voltage and current phase shift adjustment unit is constructed by setting up a current signal delay module and a voltage signal variable fractional delay filter to collaboratively achieve phase shift adjustment of voltage and current, specifically as follows: A voltage and current phase shift adjustment unit is constructed, with a current signal delay module for the corresponding current path and a variable fractional delay filter for the corresponding voltage path. The two work together to achieve phase shift adjustment of voltage and current. The current signal delay module records the buffer length and configures the initial phase angle parameter, which is used to calculate the phase shift module coefficient. The filter is used to handle non-integer delay scenarios to match the phase relationship between voltage and current. The voltage and current signals use a unified sampling rate, and the grid base frequency is set to a specific value. The delay length of the current signal delay module can be calculated based on the sampling rate and the grid base frequency. If the sampling rate and the grid base frequency are not integer multiples, or if there is a deviation between the initial phase angle parameter and the angle corresponding to the theoretical delay, the delay length will be non-integer. The current signal delay module achieves integer delay of the current signal through the set buffer length, and the filter handles non-integer delay of the voltage signal. The two work together to complete the phase shift adjustment between voltage and current.

4. The reactive power filter design method combining phase angle calibration according to claim 1, characterized in that, The variable fractional delay filter is designed with a symmetrical structure and the filter coefficients are solved based on the weighted least squares method, so that the filter can approximate the target frequency response in the specified passband. Specifically, the variable fractional delay filter adopts a symmetrical structure, which is realized based on its transfer function characteristics. The symmetry is used to reduce the number of coefficients in the transfer function, and the coefficients are further reduced when the polynomial order is odd. The variable fractional delay filter is an FIR structure designed to approximate the target frequency response within a specified passband. The target frequency response satisfies the expression for approximating the corresponding frequency response with variable fractional delay at the normalized angular frequency. The filter coefficients are solved using the weighted least squares method, with the goal of minimizing the weighted square error between the designed filter and the target filter. The error calculation range is within the normalized value of the passband cutoff frequency. The polynomial order can be set according to the filtering index. The transfer function is written in matrix form and the filter coefficients are calculated using the weighted least squares method. The coefficients are then processed by fixed-point conversion to form a coefficient matrix.

5. The reactive power filter design method combining phase angle calibration according to claim 1, characterized in that, The process of obtaining the residual reactive power value in scenario 1L and determining the angle difference between voltage and current through the angle difference calculation unit involves the following steps: First, the voltage and current phase shift adjustment unit is built and the variable fractional delay filter is configured. Scenario 1L is determined to be a purely resistive load scenario, where reactive power is ideally zero. The signal source of scenario 1L is input into the configured phase shift adjustment unit. After processing by the variable fractional delay filter, the current instantaneous active power and the residual instantaneous reactive power value are calculated. The amplitude gain is corrected in scenario 1L using the pulse calibration method. The ratio difference is obtained based on the correction result, and then the ratio difference correction value is calculated. The instantaneous active power, the residual instantaneous reactive power value, the rated power, and the ratio difference correction value are input into the angle difference calculation unit. The angle difference calculation unit substitutes the set angle difference calculation formula for calculation and finally determines the angle difference between voltage and current.

6. The reactive power filter design method combining phase angle calibration according to claim 1, characterized in that, The step of updating the phase angle parameters of the phase shift adjustment unit based on the angle difference between the voltage and the current, re-executing the phase shift adjustment, and completing the reactive power calibration specifically involves: obtaining the angle difference between the voltage and the current previously determined by the angle difference calculation unit; The core phase angle parameters of the phase shift adjustment unit are updated by summing the phase angle difference with the original phase angle parameters. The buffer length of the current signal delay module is recalculated based on the sampling rate and the grid base frequency, and the filter parameters are also recalculated. The current signal delay module is reconfigured, using the newly calculated buffer length as its buffer length to achieve integer delay of the current signal. The filter is reconfigured and the newly calculated parameters are imported to handle non-integer delay of the voltage signal. The signal source of the 1L scenario is input again into the updated phase shift adjustment unit, so that the current signal delay module and the filter work together to re-execute phase shift adjustment. After adjustment, the instantaneous reactive power residual value is calculated to achieve the set standard accuracy. When the instantaneous reactive power residual value meets the accuracy requirements, reactive power calibration is completed.

7. The reactive power filter design method combining phase angle calibration according to claim 1, characterized in that, The active power is corrected based on the calibrated reactive power to obtain the active power value. Specifically, the active power is corrected based on the calibrated reactive power. First, it is confirmed that the reactive power has been calibrated. Then, the instantaneous active power and instantaneous reactive power corresponding to any power factor angle in the current scenario are obtained. Then, the corrected active power is calculated using the correction formula. During the calculation, the sampling rate of the voltage and current signals is kept constant, and the grid base frequency is also kept constant as long as it does not exceed the set threshold. The calibrated reactive power value is substituted into the formula, and the obtained instantaneous active power and instantaneous reactive power are calculated. The obtained corrected active power can eliminate the active power metering error caused by the angle difference between voltage and current.

8. The reactive power filter design method combining phase angle calibration according to claim 1, characterized in that, The real-time monitoring of the power grid base frequency change, if the base frequency change does not exceed the set threshold, keeps all current parameters unchanged. Specifically, the real-time monitoring of the power grid base frequency change first extracts the base frequency information based on the voltage signal in real time; calculates the absolute value of the difference between the current monitored base frequency and the last stable base frequency; if the difference does not exceed the set threshold, then keeps the current signal delay module buffer length, variable fractional delay filter coefficient, phase angle parameter of the phase shift adjustment unit, corrected amplitude gain, and active power correction related parameters unchanged; the phase shift adjustment unit continues to use the original parameters to coordinate voltage and current phase shift adjustment; the power calculation stage continues to use the original parameters to calculate active and reactive power; to ensure the continuity of power metering and maintain metering accuracy.

9. The reactive power filter design method combining phase angle calibration according to claim 1, characterized in that, If the fundamental frequency change exceeds a set threshold, the delay parameters of the phase shift adjustment unit and the parameters of the variable fractional delay filter are recalculated to complete the phase shift adjustment and calibration under the new fundamental frequency, thereby achieving dynamic tracking of power frequency changes. Specifically, if the fundamental frequency change exceeds a set threshold, firstly, it is confirmed that the absolute value of the difference between the new fundamental frequency and the original stable fundamental frequency exceeds the threshold; the voltage and current signal sampling rate remains unchanged; the delay length of the phase shift adjustment unit is recalculated, and when the sampling rate is not an integer multiple of the new fundamental frequency, the delay length is split into integer and fractional parts; the buffer length of the current signal delay module is re-determined; the parameters of the variable fractional delay filter are recalculated, and the filter coefficients are solved and processed using the weighted least squares method based on the fractional part of the delay length and according to specified conditions. Start the angle difference calculation unit, input the 1L scenario signal source to calculate the residual reactive power value, and combine it with the corrected ratio difference correction value under the 1L scenario to calculate the new voltage and current angle difference; Update the phase angle parameters of the phase shift adjustment unit; reconfigure the phase shift adjustment unit and re-execute the phase shift adjustment; continuously monitor the residual reactive power value until it reaches the standard accuracy, and complete the reactive power calibration under the new base frequency; use the calibrated reactive power to correct the active power, obtain the instantaneous active and reactive power of the current scenario, and substitute them into the correction formula to obtain the accurate active power value; after confirming that all new parameters are stable, keep them unchanged until the next time the base frequency change is detected to exceed the set threshold.