CN116593769B - High-precision electric energy calculation method with wide dynamic range - Google Patents

High-precision electric energy calculation method with wide dynamic range Download PDF

Info

Publication number
CN116593769B
CN116593769B CN202310871934.1A CN202310871934A CN116593769B CN 116593769 B CN116593769 B CN 116593769B CN 202310871934 A CN202310871934 A CN 202310871934A CN 116593769 B CN116593769 B CN 116593769B
Authority
CN
China
Prior art keywords
value
current
digital filter
switching
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310871934.1A
Other languages
Chinese (zh)
Other versions
CN116593769A (en
Inventor
胡春华
刘笑菲
王俊生
李伟
胡光发
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yantai Dongfang Wisdom Electric Co Ltd
Original Assignee
Yantai Dongfang Wisdom Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yantai Dongfang Wisdom Electric Co Ltd filed Critical Yantai Dongfang Wisdom Electric Co Ltd
Priority to CN202310871934.1A priority Critical patent/CN116593769B/en
Publication of CN116593769A publication Critical patent/CN116593769A/en
Application granted granted Critical
Publication of CN116593769B publication Critical patent/CN116593769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R22/00Arrangements for measuring time integral of electric power or current, e.g. electricity meters
    • G01R22/06Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods
    • G01R22/10Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods using digital techniques

Abstract

The invention discloses a high-precision electric energy calculation method with a wide dynamic range, and belongs to the field of measuring electric variables. The method comprises the following steps: step one, sampling voltage and current by using more than 2 AD; according to the sampling data of the AD selected currently, performing electric energy calculation by using a digital filter; judging whether AD switching is needed or not in real time according to the sampling data, and selecting the switched AD; step two, if switching is needed, respectively estimating the amplitude and the phase of the current signal for two AD before and after switching; and thirdly, adjusting the buffer memory of the digital filter based on the amplitude and phase estimation of the two AD, inputting the selected sampling data of the AD after switching into the digital filter, completing the switching of the AD, and continuing to perform electric energy calculation. The invention reduces the operation amount and avoids the data delay problem caused by switching on the premise of not influencing the electric energy calculation.

Description

High-precision electric energy calculation method with wide dynamic range
Technical Field
The invention belongs to the field of measuring electric variables, and particularly relates to an electric energy calculation method.
Background
In modern electric energy meter metering technology, AD is used as a sampling device, and its numerical resolution is a very important parameter. The bit number of AD is generally 16 bits or 24 bits, and the corresponding resolution is 1/2 respectively 16 、1/2 24 The actual effective bit number of the AD is smaller than 16 bits and 24 bits due to quantization noise in the AD sampling process.
Because the resolution is limited, the metering range and the metering precision of the electric energy meter show a trend of eliminating each other, namely, the metering range is wide, the metering precision cannot be very high, and the metering range cannot be very wide.
One solution, which simultaneously combines metering range and metering accuracy, is to use multiple ADs, sample the voltage and current signals simultaneously, and use different gains for different current ranges AD. For example: using two ADs, the first AD using 8-fold gain, mainly handling currents less than 0.1 Ib; the second AD uses a 4-fold gain, mainly handling currents greater than 0.1 Ib. Note that: the two ADs are sampled simultaneously, the first AD may have a truncated peak under high current conditions and the second AD may have excessive noise under low current conditions. In the last metering step, the calculation result of which AD is used is determined according to the current magnitude.
However, the above solution has the following drawbacks: modern electric energy meters are mostly realized by programming digital devices, and digital filter technology is used. In the electric energy calculation process, intermediate data of the digital filter need to be cached, the digital filter needs to perform multiply-add operation for a plurality of times point by point, and larger operation resources can be consumed. If the data of two ADs are calculated simultaneously, the computational power of the digital device presents a significant challenge. Taking the current mainstream Cortex-M3 kernel 200MHz main frequency singlechip as an example, assuming that the number of sampling points per cycle is 256, the power frequency is 50Hz, and the basic fundamental wave and full wave electric energy calculation takes about 15ms per cycle (20 ms). If data of two ADs are calculated simultaneously, the theory takes 30ms, and the calculation cannot be completed.
If a sequential calculation mode is adopted, that is, only data of one AD is calculated, and calculation of current AD data is stopped when the AD needs to be switched, and data of another AD is used instead, the problem of metering delay exists. Because many digital filters are involved in the power calculation process, and the digital filter output needs a certain time to stabilize, the longest may reach the second order. The need to use the calculation data of the last AD before the digital filter output stabilizes necessarily causes delays in the metering data, which is not acceptable in some situations where high-speed calculation is required.
Disclosure of Invention
The invention provides a high-precision electric energy calculation method with a wide dynamic range, which aims to: the method solves the problems of large operand and delay of metering data in the multi-AD sampling.
The technical scheme of the invention is as follows:
a high-precision electric energy calculation method with wide dynamic range comprises the following steps:
step one, sampling voltage and current by using more than 2 AD; according to the sampling data of the AD selected currently, performing electric energy calculation by using a digital filter; judging whether AD switching is needed or not in real time according to the sampling data, and selecting the switched AD;
step two, if switching is needed, respectively estimating the amplitude and the phase of the current signal for two AD before and after switching;
and thirdly, adjusting the buffer memory of the digital filter based on the amplitude and phase estimation of the two AD, inputting the selected sampling data of the AD after switching into the digital filter, completing the switching of the AD, and continuing to perform electric energy calculation.
As a further improvement of the wide dynamic range high-precision electric power calculation method: in the first step, a buffer area is respectively set for each AD, and the buffer areas are used for storing sampling data of the AD.
As a further improvement of the wide dynamic range high-precision electric power calculation method: the method for judging whether AD switching is needed or not in real time according to the sampling data comprises the following steps: the weekly wave respectively calculates the RMS value of the primary current based on the sampling data in the buffer area; and judging whether AD channel switching is needed or not based on the current RMS value.
As a further improvement of the wide dynamic range high-precision electric power calculation method: the current RMS value calculating method comprises the following steps: for a certain AD, the sampling frequency is F S The frequency of the voltage signal is 50Hz, and the sampling point number N=F of each cycle is then S /50,C i And (3) representing the value of the ith sampling point of the current channel in the corresponding buffer area, wherein the current RMS value is as follows:
as a further improvement of the wide dynamic range high-precision electric power calculation method: the step of judging whether AD channel switching is needed based on the current RMS value is as follows: the gains of the current channels of the AD are different, all the AD are ordered from small to large according to the gains of the current channels, the serial number of the AD currently selected in the ordering is j, and the current RMS value is RMS j Gain of current channel G j The current RMS value of the previous AD in the sequence is RMS j-1 Gain of current channel G j-1 The current RMS value of the next AD in the sequence is RMS j+1 Gain of current channel G j+1
If G j ×RMS j >T j_j+1 Or G j+1 ×RMS j+1 >T j_j+1 ,T j_j+1 Switching from the current AD to the j+1th AD for a switching threshold value between the j-th AD and the j+1th AD;
if G j ×RMS j ≤ T j-1_j Or G j-1 ×RMS j-1 ≤ T j-1_j ,T j-1_j Switching from the current AD to the j-1 AD for a switching threshold value between the j-1 AD and the j-1 AD;
if there is no previous or next adjacent AD in the ranking, no judgment calculation of forward or backward switching is performed.
As a further improvement of the wide dynamic range high-precision electric power calculation method: in the second step, for a certain AD, the specific method for estimating the amplitude and the phase of the current signal is as follows:
step a-1, the latest N current sampling values in the AD buffer area are taken out; n is the sampling point number of a cycle; the index value of the current sampling value is marked as: 0,1,2 … N-1;
step a-2, an input vector X and an output vector Y are established:
X=[0,1/F S ,1/2F S ,…,1/(N-1)F S ];
Y=[C 0 , C 1 , C 2 ,…, C N-1 ];
wherein X is the time index vector of the current sampling value, F S Is the sampling frequency; c (C) i Is the i sampling value;
step a-3, establishing a current signal model:
wherein t is time, a is a current value when I (t) is t, a is an amplitude, ω is an electrical angular velocity, and Φ is a phase when t=0; the amplitude A and the phase phi are values to be solved;
step a-4, setting an initial value: let the initial estimated value of phi be 0, and the initial estimated value of A be the maximum value of the absolute value of the element in the output vector Y;
step a-5, defining a loss function as follows:
wherein A is es And phi es The estimated values of the amplitude A and the phase phi are respectively; y is Y i_es Is to make the current estimated value A es And phi is substituted into the current signal model, and the ith element value X in the input vector X is calculated i As the actual t, an output estimated value is obtained: y is Y i_es = A es sin(ωX ies );Y i The i element value in the output vector Y;
the loss function is derived to obtain the estimated value A of the amplitude A and the phase phi es And phi es The gradients at the points are respectively:
a-6, defining a learning rate as alpha, an iteration termination threshold as epsilon, and carrying out iteration solution on an amplitude A and a phase phi:
step a-6-1, setting the current iteration as the mth iteration, wherein the estimated values of the current amplitude A and the phase phi are respectively A es_m And phi es_m Will A es_m And phi es_m Substituting the current signal model, and then solving the current loss function value;
a step a-6-2, stopping iteration if the current loss function value is smaller than the iteration termination threshold epsilon, and leading the current A to be es_m And phi es_m As a solution to the amplitude A and phase phi; otherwise, executing the step a-6-3;
step a-6-3, according to the current A es_m And phi es_m Obtaining the corresponding gradient to obtain the next estimated value A es_m+1 And phi es_m+1
The iteration then continues back to step a-6-1.
As a further improvement of the wide dynamic range high-precision electric power calculation method: in the third step, the digital filter includes a digital filter F1 and a digital filter F2, the sampled data is input into the digital filter F1, the instantaneous power value is obtained according to the output of the digital filter F1, and then the instantaneous power value is input into the digital filter F2, so as to obtain the RMS value of the power.
As a further improvement of the wide dynamic range high-precision electric power calculation method: and step three, if fundamental wave electric energy calculation is currently carried out, the buffer memory of the digital filter F1 is adjusted, otherwise, the buffer memory of the digital filter F1 is not adjusted.
As a further improvement of the wide dynamic range high-precision electric power calculation method: the method for adjusting the buffer memory of the digital filter F1 comprises the following steps: let the digital filter F1 be a K-stage filter, before the AD switch, the digital filter F1 will calculate and output the nth output value according to the nth input value, and then the output buffer vector of the current channel of the digital filter F1 is: o (O) I =[y I (n-1),y I (n-2),…,y I (n-K)]Wherein y is I (n-k) represents a previous kth output value of the digital filter F1 with respect to the current output value; the input buffer vector of the current channel of the digital filter F1 is: i I =[x I (n-1),x I (n-2),…,x I (n-K)]Wherein x is I (n-k) represents the previous kth input value of the digital filter F1 relative to the current input value;
when the AD is switched, if the amplitude solution values obtained by the AD before and after the switching in the amplitude and phase estimation process of the current signal are respectively A1 and A2, the output buffer vector of the current channel of the adjusted digital filter F1 is O I ’= O I XA 2/A1, the input buffer vector of the current channel of the adjusted digital filter F1 is I I ’= I I ×A2/A1;
After switching, the digital filter F1 is based on the new output buffer vector O I ' sum input cache vector I I ' and an nth input value x I (n) calculating an nth output value y I (n) and continuing to complete the calculation of the subsequent output value based on the subsequent input value.
As a further improvement of the wide dynamic range high-precision electric power calculation method: the method for adjusting the buffer memory of the digital filter F2 comprises the following steps: let the digital filter F2 be a K-stage filter, before the AD switch, the digital filter F2 will calculate and output the nth output value according to the nth input value, and then the output buffer vector of the digital filter F2 is: o (O) P =[y P (n-1),y P (n-2),…,y P (n-K)]Wherein y is P (n-k) represents a previous kth output value of the digital filter F2 with respect to the current output value; the input buffer vector of the digital filter F2 is: i P =[x P (n-1),x P (n-2),…,x P (n-K)]Wherein x is P (n-k) represents the previous kth input value of the digital filter F2 relative to the current input value;
when the AD is switched, the amplitude solving values obtained by the AD before and after the switching in the amplitude and phase estimation process of the current signal are respectively A1 and A2, and the output buffer vector of the adjusted digital filter F2 is O P ’= O P X A2/A1, the input buffer vector of the adjusted digital filter F2 is I P ’= I P ×A2/A1;
After switching, the digital filter F2 is based on the new output buffer vector O P ' sum input cache vector I P ' and an nth input value x P (n) calculating an nth output value y P (n) and continuing to complete the calculation of the subsequent output value based on the subsequent input value.
Compared with the prior art, the invention has the following positive effects:
(1) The invention only needs to calculate the data of one AD at the same time, realizes the real-time conversion of the data by calculation when the AD is switched, and can realize seamless connection by conversion of the data before and after the switching, thereby reducing the operation amount and avoiding the data delay problem caused by the switching on the premise of not influencing the calculation of the electric energy.
(2) The invention accurately calculates the gain change during the AD channel switching by using an iterative mode, and lays a foundation for carrying out coefficient conversion on the filter during the AD switching.
(3) According to the invention, the buffer memory of the filter is converted, so that output mutation caused by switching of sampling data is avoided, lossless switching is realized, the problems of precision mutation and unstable output are avoided, and the filter is not required to be stabilized.
Detailed Description
The following describes the technical scheme of the invention in detail:
for simplicity of explanation, in the embodiment, the voltage and the current are single phases, and the single-phase calculation method is easily generalized to three-phase calculation. Meanwhile, all cases where the AD number is greater than or equal to 2 are also within the protection scope of the invention.
A high-precision electric energy calculation method with wide dynamic range comprises the following steps:
step one, voltage and current are sampled using more than 2 ADs. And according to the sampling data of the AD selected currently, performing electric energy calculation by using a digital filter. And judging whether AD switching is needed or not in real time according to the sampling data, and selecting the switched AD.
Specifically, a buffer area is respectively set for each AD, and the buffer areas are used for storing sampling data of the AD. The depth of the data stored in the buffer areas is at least one week of data points, each buffer area contains data of two channels of voltage and current, the gains of the voltage channels of all AD are the same, and the gains of the current channels are different. Note that the sampled data of all ADs must be strictly synchronized. The method for realizing the synchronization of the plurality of AD data has simpler hardware proposal, uses the AD chips with the same model, and can realize the synchronous sampling of the AD by connecting the control pins of the AD chips to the pins of the same singlechip, and the detailed description is omitted here.
The method for judging whether AD switching is needed or not in real time according to the sampling data comprises the following steps: the weekly wave respectively calculates the RMS value of the primary current based on the sampling data in the buffer area; and judging whether AD channel switching is needed or not based on the current RMS value.
The current RMS value calculating method comprises the following steps: for a certain AD, the sampling frequency is F S The frequency of the voltage signal is 50Hz, and the sampling point number N=F of each cycle is then S /50,C i Representing the correspondingThe value of the ith sampling point of the current channel in the buffer area is that:
the step of judging whether AD channel switching is needed based on the current RMS value is as follows: the gains of the current channels of the AD are different, all the AD are ordered from small to large according to the gains of the current channels, the serial number of the AD currently selected in the ordering is j, and the current RMS value is RMS j Gain of current channel G j The current RMS value of the previous AD in the sequence is RMS j-1 Gain of current channel G j-1 The current RMS value of the next AD in the sequence is RMS j+1 Gain of current channel G j+1
If G j ×RMS j >T j_j+1 Or G j+1 ×RMS j+1 >T j_j+1 ,T j_j+1 Switching from the current AD to the j+1th AD for a switching threshold value between the j-th AD and the j+1th AD;
if G j ×RMS j ≤ T j-1_j Or G j-1 ×RMS j-1 ≤ T j-1_j ,T j-1_j Switching from the current AD to the j-1 AD for a switching threshold value between the j-1 AD and the j-1 AD;
if there is no previous or next adjacent AD in the ranking, no judgment calculation of forward or backward switching is performed.
Taking 3 ADs as an example here, the switching threshold should be two, assuming T 1_2 、T 2_3 ,T 1_2 An AD sampling value corresponding to a current of 0.1Ib, T 2_3 An AD sample value corresponding to a current of 0.5Ib may be considered.
And step two, if switching is needed, respectively estimating the amplitude and the phase of the current signal for the two AD before and after switching.
Specifically, for an AD, the specific method for estimating the amplitude and phase of the current signal is:
step a-1, the latest N current sampling values in the AD buffer area are taken out; n is the sampling point number of a cycle; the index value of the current sampling value is marked as: 0,1,2 … N-1.
Step a-2, an input vector X and an output vector Y are established:
wherein X is the time index vector of the current sampling value, F S Is the sampling frequency; c (C) i Is the i-th sampled value taken.
Step a-3, establishing a current signal model:
wherein t is time, a is a current value when I (t) is t, a is an amplitude, ω is an electrical angular velocity, and Φ is a phase when t=0; the amplitude a and the phase phi are values to be solved.
Step a-4, setting an initial value: let the initial estimate of phi be 0 and the initial estimate of A be the maximum of the absolute value of the element in the output vector Y.
Step a-5, defining a loss function as follows:
wherein A is es And phi es The estimated values of the amplitude A and the phase phi are respectively; y is Y i_es Is to make the current estimated value A es And phi is substituted into the current signal model, and the ith element value X in the input vector X is calculated i As the actual t, an output estimated value is obtained: y is Y i_es = A es sin(ωX ies );Y i Is the i-th element value in the output vector Y.
The loss function is derived to obtain the estimated value A of the amplitude A and the phase phi es And phi es The gradients at the points are respectively:
and a step a-6, defining the learning rate as alpha, the iteration termination threshold as epsilon, and carrying out iteration solution on the amplitude A and the phase phi.
Step a-6-1, setting the current iteration as the mth iteration, wherein the estimated values of the current amplitude A and the phase phi are respectively A es_m And phi es_m Will A es_m And phi es_m Substituting the current signal model, and then obtaining the current loss function value.
A step a-6-2, stopping iteration if the current loss function value is smaller than the iteration termination threshold epsilon, and leading the current A to be es_m And phi es_m As a solution to the amplitude A and phase phi; otherwise, step a-6-3 is performed.
Step a-6-3, according to the current A es_m And phi es_m Obtaining the corresponding gradient to obtain the next estimated value A es_m+1 And phi es_m+1
The iteration then continues back to step a-6-1.
And thirdly, adjusting the buffer memory of the digital filter based on the amplitude and phase estimation of the two AD, inputting the selected sampling data of the AD after switching into the digital filter, completing the switching of the AD, and continuing to perform electric energy calculation.
For digital filters, practical engineering applications are typically implemented using differential equations, and the general representation of the K-order filter is:
y(n)=a 1 y(n-1)+a 2 y(n-2)+…+a k y(n-K)+b 0 x(n)+b 1 x(n-1)+b 2 x(n-2)+…+b k x(n-K);
where y (n) represents the nth output value of the filter, x (n) represents the nth input value of the filter, y (n-K) represents the upper K output values relative to the current output value, x (n-K) represents the upper K input values relative to the current input value, k=1, 2,3, …, K. a, a 1 ,a 2 ,a 3 ,…,a K ,b 1 ,b 2 ,b 3 ,…,b K Representing the filter coefficients.
The output buffer vector of the filter is expressed as:
O=[y(n-1),y(n-2),…,y(n-K)];
the input buffer vector of the filter is expressed as:
I=[x(n-1),x(n-2),…,x(n-K)];
the filter coefficient vectors M and N are:
M=[a 1 ,a 2 ,a 3 ,…,a K ], N=[b 1 ,b 2 ,b 3 ,…,b K ];
the nth output of the filter can be expressed as: y (n) =om+in.
In the power calculation, the digital filter includes a digital filter F1 and a digital filter F2. Typically, both are low pass filters. The cut-off frequency of the digital filter F1 is 1.5 times the power frequency, and the filter type can be considered as a butterworth low-pass filter of order 6. The digital filter F2 is used for filtering out the frequency content except the direct current component in the instantaneous power signal, and the direct current component of the instantaneous power is the RMS value of the power. In general, to consider both the filtering effect and the filter response time, the parameters of the digital filter F2 can be considered as: the second-order chebyshev type II low-pass digital filter has a filter cut-off frequency of 1.5 times of the power frequency. Since the instantaneous power frequency is 2 times the power frequency and the cut-off frequency is typically 0.75 times the instantaneous power frequency, the cut-off frequency of the filter is 0.75x2=1.5 times the power frequency.
The sampled data is input into the digital filter F1, an instantaneous power value is obtained according to the output of the digital filter F1, and then the instantaneous power value is input into the digital filter F2, so as to obtain the RMS value of the power.
Specifically, if fundamental wave power calculation is currently performed, the buffer memory of the digital filter F1 is adjusted, otherwise, the buffer memory of the digital filter F1 is not adjusted.
The method for adjusting the buffer memory of the digital filter F1 comprises the following steps: let the digital filter F1 be a K-order filter, before AD switching, the digital filter F1 will calculate the output according to the nth input valueThe output buffer vector of the current channel of the digital filter F1 is: o (O) I =[y I (n-1),y I (n-2),…,y I (n-K)]Wherein y is I (n-k) represents a previous kth output value of the digital filter F1 with respect to the current output value; the input buffer vector of the current channel of the digital filter F1 is: i I =[x I (n-1),x I (n-2),…,x I (n-K)]Wherein x is I (n-k) represents the previous kth input value of the digital filter F1 relative to the current input value.
When the AD is switched, if the amplitude solution values obtained by the AD before and after the switching in the amplitude and phase estimation process of the current signal are respectively A1 and A2, the output buffer vector of the current channel of the adjusted digital filter F1 is O I ’= O I XA 2/A1, the input buffer vector of the current channel of the adjusted digital filter F1 is I I ’= I I ×A2/A1。
After switching, the digital filter F1 is based on the new output buffer vector O I ' sum input cache vector I I ' and an nth input value x I (n) calculating an nth output value y I (n) and continuing to complete the calculation of the subsequent output value based on the subsequent input value.
Note that: for the voltage channels, since the sampling is synchronous and the gains of the voltage channels are the same, when the AD channel switching occurs, the buffer vectors of the voltage channels do not need to be switched.
The instantaneous power value can be calculated by the current output value u (n) of the digital filter F1 voltage channel and the current output value of the current channel i (n): p (n) =u (n) ×i (n).
The method for adjusting the buffer memory of the digital filter F2 comprises the following steps: let the digital filter F2 be a K-stage filter, before the AD switch, the digital filter F2 will calculate and output the nth output value according to the nth input value, and then the output buffer vector of the digital filter F2 is: o (O) P =[y P (n-1),y P (n-2),…,y P (n-K)]Wherein y is P (n-k) represents a previous kth output value of the digital filter F2 with respect to the current output value; digital filter F2The input cache vector is: i P =[x P (n-1),x P (n-2),…,x P (n-K)]Wherein x is P (n-k) represents the previous kth input value of the digital filter F2 relative to the current input value.
When the AD is switched, the amplitude solving values obtained by the AD before and after the switching in the amplitude and phase estimation process of the current signal are respectively A1 and A2, and the output buffer vector of the adjusted digital filter F2 is O P ’= O P X A2/A1, the input buffer vector of the adjusted digital filter F2 is I P ’= I P ×A2/A1。
After switching, the digital filter F2 is based on the new output buffer vector O P ' sum input cache vector I P ' and an nth input value x P (n) calculating an nth output value y P (n) and continuing to complete the calculation of the subsequent output value based on the subsequent input value. The output value of the digital filter F2 is the RMS value P of the power RMS . To further improve the stability of the power, it is also possible to consider an averaging operation of the output value of the digital filter F2.
Further, assuming that the power value between two adjacent sampling points is unchanged, according to P RMS And sampling frequency F S The power value for each sampling interval can be found: e=p RMS /F S

Claims (6)

1. A high-precision electric energy calculation method with wide dynamic range is characterized in that:
step one, sampling voltage and current by using more than 2 AD; according to the sampling data of the AD selected currently, performing electric energy calculation by using a digital filter; judging whether AD switching is needed or not in real time according to the sampling data, and selecting the switched AD;
in the first step, a buffer area is respectively arranged for each AD, and the buffer areas are used for storing sampling data of the AD; the gains of the AD current channels are different;
step two, if switching is needed, respectively estimating the amplitude and the phase of the current signal for two AD before and after switching;
step three, based on the amplitude and phase estimation of the two AD, the buffer memory of the digital filter is adjusted, then the sampling data of the AD after the selected switching is input into the digital filter, the switching of the AD is completed, and the electric energy calculation is continued;
in the third step, the digital filter comprises a digital filter F1 and a digital filter F2, sampling data is firstly input into the digital filter F1, an instantaneous power value is obtained according to the output of the digital filter F1, and then the instantaneous power value is input into the digital filter F2 to obtain the RMS value of the power;
step three, if fundamental wave electric energy calculation is currently carried out, the cache of the digital filter F1 is adjusted, otherwise, the cache of the digital filter F1 is not adjusted;
the method for adjusting the buffer memory of the digital filter F1 comprises the following steps: setting a digital filter F1 as a K-order filter;
the nth output of the filter can be expressed as: y (n) =om+in; wherein, O is the output buffer vector of the filter, O= [ y (n-1), y (n-2), …, y (n-K)]The method comprises the steps of carrying out a first treatment on the surface of the I is the input buffer vector of the filter I= [ x (n-1), x (n-2), …, x (n-K)]The method comprises the steps of carrying out a first treatment on the surface of the M and N are filter coefficient vectors, M= [ a ] 1 ,a 2 ,a 3 ,…,a K ], N=[b 1 ,b 2 ,b 3 ,…,b K ];
Before AD switching, the digital filter F1 calculates and outputs an nth output value according to the nth input value, and then the output buffer vector of the current channel of the digital filter F1 is: o (O) I =[y I (n-1),y I (n-2),…,y I (n-K)]Wherein y is I (n-k) represents a previous kth output value of the digital filter F1 with respect to the current output value; the input buffer vector of the current channel of the digital filter F1 is: i I =[x I (n-1),x I (n-2),…,x I (n-K)]Wherein x is I (n-k) represents the previous kth input value of the digital filter F1 relative to the current input value;
when the AD is switched, the amplitude solution values obtained by the AD before and after the switching in the amplitude and phase estimation process of the current signal are respectively A1 and A2, and the current of the adjusted digital filter F1 is adjustedThe output buffer vector of the channel is O I ’= O I XA 2/A1, the input buffer vector of the current channel of the adjusted digital filter F1 is I I ’= I I ×A2/A1;
After switching, the digital filter F1 is based on the new output buffer vector O I ' sum input cache vector I I ' and an nth input value x I (n) calculating an nth output value y I (n) and continuing to complete the calculation of the subsequent output value based on the subsequent input value.
2. The wide dynamic range high precision power calculation method as set forth in claim 1, wherein: the method for judging whether AD switching is needed or not in real time according to the sampling data comprises the following steps: the weekly wave respectively calculates the RMS value of the primary current based on the sampling data in the buffer area; and judging whether AD channel switching is needed or not based on the current RMS value.
3. The wide dynamic range high precision power calculation method as set forth in claim 2, wherein: the current RMS value calculating method comprises the following steps: for a certain AD, the sampling frequency is F S The frequency of the voltage signal is 50Hz, and the sampling point number N=F of each cycle is then S /50,C i And (3) representing the value of the ith sampling point of the current channel in the corresponding buffer area, wherein the current RMS value is as follows:
4. the wide dynamic range high precision power calculation method as set forth in claim 2, wherein: the step of judging whether AD channel switching is needed based on the current RMS value is as follows: all AD are sequenced according to the gain of the current channel from small to large, the sequence number of the currently selected AD in the sequencing is j, and the current RMS value is RMS j Gain of current channel G j The current RMS value of the previous AD in the sequence is RMS j-1 Gain of current channel G j-1 The current RMS value of the next AD in the sequence is RMS j+1 Of current pathGain of G j+1
If G j ×RMS j >T j_j+1 Or G j+1 ×RMS j+1 >T j_j+1 ,T j_j+1 Switching from the current AD to the j+1th AD for a switching threshold value between the j-th AD and the j+1th AD;
if G j ×RMS j ≤ T j-1_j Or G j-1 ×RMS j-1 ≤ T j-1_j ,T j-1_j Switching from the current AD to the j-1 AD for a switching threshold value between the j-1 AD and the j-1 AD;
if there is no previous or next adjacent AD in the ranking, no judgment calculation of forward or backward switching is performed.
5. The wide dynamic range high precision power calculation method as set forth in claim 1, wherein: in the second step, for a certain AD, the specific method for estimating the amplitude and the phase of the current signal is as follows:
step a-1, the latest N current sampling values in the AD buffer area are taken out; n is the sampling point number of a cycle; the index value of the current sampling value is marked as: 0,1,2 … N-1;
step a-2, an input vector X and an output vector Y are established:
X=[0,1/F S ,1/2F S ,…,1/(N-1)F S ];
Y=[C 0 , C 1 , C 2 ,…, C N-1 ];
wherein X is the time index vector of the current sampling value, F S Is the sampling frequency; c (C) i Is the i sampling value;
step a-3, establishing a current signal model:
I(t)=Asin(ωt+φ);
wherein t is time, a is a current value when I (t) is t, a is an amplitude, ω is an electrical angular velocity, and Φ is a phase when t=0; the amplitude A and the phase phi are values to be solved;
step a-4, setting an initial value: let the initial estimated value of phi be 0, and the initial estimated value of A be the maximum value of the absolute value of the element in the output vector Y;
step a-5, defining a loss function as follows:
wherein A is es And phi es The estimated values of the amplitude A and the phase phi are respectively; y is Y i_es Is to make the current estimated value A es And phi is substituted into the current signal model, and the ith element value X in the input vector X is calculated i As the actual t, an output estimated value is obtained: y is Y i_es = A es sin(ωX ies );Y i The i element value in the output vector Y;
the loss function is derived to obtain the estimated value A of the amplitude A and the phase phi es And phi es The gradients at the points are respectively:
a-6, defining a learning rate as alpha, an iteration termination threshold as epsilon, and carrying out iteration solution on an amplitude A and a phase phi:
step a-6-1, setting the current iteration as the mth iteration, wherein the estimated values of the current amplitude A and the phase phi are respectively A es_m And phi es_m Will A es_m And phi es_m Substituting the current signal model, and then solving the current loss function value;
a step a-6-2, stopping iteration if the current loss function value is smaller than the iteration termination threshold epsilon, and leading the current A to be es_m And phi es_m As a solution to the amplitude A and phase phi; otherwise, executing the step a-6-3;
step a-6-3, according to the current A es_m And phi es_m Obtaining the corresponding gradient to obtain the next estimated value A es_m+1 And phi es_m+1
The iteration then continues back to step a-6-1.
6. The wide dynamic range high precision power calculation method as set forth in claim 1, wherein: the method for adjusting the buffer memory of the digital filter F2 comprises the following steps: let the digital filter F2 be a K-stage filter, before the AD switch, the digital filter F2 will calculate and output the nth output value according to the nth input value, and then the output buffer vector of the digital filter F2 is: o (O) P =[y P (n-1),y P (n-2),…,y P (n-K)]Wherein y is P (n-k) represents a previous kth output value of the digital filter F2 with respect to the current output value; the input buffer vector of the digital filter F2 is: i P =[x P (n-1),x P (n-2),…,x P (n-K)]Wherein x is P (n-k) represents the previous kth input value of the digital filter F2 relative to the current input value;
when the AD is switched, the amplitude solving values obtained by the AD before and after the switching in the amplitude and phase estimation process of the current signal are respectively A1 and A2, and the output buffer vector of the adjusted digital filter F2 is O P ’= O P X A2/A1, the input buffer vector of the adjusted digital filter F2 is I P ’= I P ×A2/A1;
After switching, the digital filter F2 is based on the new output buffer vector O P ' sum input cache vector I P ' and an nth input value x P (n) calculating an nth output value y P (n) and continuing to complete the calculation of the subsequent output value based on the subsequent input value.
CN202310871934.1A 2023-07-17 2023-07-17 High-precision electric energy calculation method with wide dynamic range Active CN116593769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310871934.1A CN116593769B (en) 2023-07-17 2023-07-17 High-precision electric energy calculation method with wide dynamic range

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310871934.1A CN116593769B (en) 2023-07-17 2023-07-17 High-precision electric energy calculation method with wide dynamic range

Publications (2)

Publication Number Publication Date
CN116593769A CN116593769A (en) 2023-08-15
CN116593769B true CN116593769B (en) 2023-10-27

Family

ID=87601277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310871934.1A Active CN116593769B (en) 2023-07-17 2023-07-17 High-precision electric energy calculation method with wide dynamic range

Country Status (1)

Country Link
CN (1) CN116593769B (en)

Citations (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3609135A1 (en) * 1986-03-19 1987-09-24 Bosch Gmbh Robert CIRCUIT ARRANGEMENT FOR THE TIME CORRECTION OF DIGITAL SWITCHING SIGNALS
JPH02189466A (en) * 1989-01-18 1990-07-25 Tokyo Electric Power Co Inc:The Detecting system for electrical quantity
JPH03264867A (en) * 1990-03-15 1991-11-26 Hitachi Ltd Method and device for processing digital signal
JPH04340475A (en) * 1991-05-17 1992-11-26 Hioki Ee Corp Power analyzer apparatus
JPH0593747A (en) * 1991-09-30 1993-04-16 Hioki Ee Corp Power analyzer
CN2876793Y (en) * 2006-04-03 2007-03-07 杭州华隆电子技术有限公司 High accuracy electric energy meter using section type sampling
CN102135563A (en) * 2011-02-23 2011-07-27 深圳科瑞格电子有限公司 Method and system for calculating electric energy and electric energy meter
CN102353836A (en) * 2011-07-15 2012-02-15 珠海中慧微电子有限公司 Method for dynamically adjusting current channel gain of wide-range electric energy meter
CN102421354A (en) * 2009-03-09 2012-04-18 科学与工业研究委员会 Ecg device with impulse and channel switching adc noise filter and error corrector for derived leads
CN102565521A (en) * 2011-12-14 2012-07-11 中国电子科技集团公司第四十一研究所 High-precision wide-dynamic-range microwave signal level test device
CN102830276A (en) * 2012-08-27 2012-12-19 江西省电力科学研究院 Current sampling method of shock load watt-hour meter
CN102901864A (en) * 2012-10-11 2013-01-30 阳光电源股份有限公司 Voltage detecting device
CN103091550A (en) * 2013-01-08 2013-05-08 北京优科利尔能源设备有限公司 Synchronous isolation sampling direct-current power meter of wide voltage and large current
CN103344826A (en) * 2013-06-26 2013-10-09 国家电网公司 Nonlinear load electric energy metering device
CN103424608A (en) * 2013-07-31 2013-12-04 江苏林洋电子股份有限公司 Low cost rapid high precision alternating voltage signal sampling system
CN104111372A (en) * 2014-05-08 2014-10-22 徐伟专 Analytical equipment of frequency conversion electricity based on digital transmission
CN104569675A (en) * 2014-12-30 2015-04-29 上海贝岭股份有限公司 Flickering detecting circuit and detecting method in electric energy measuring chip
CN104849542A (en) * 2015-06-12 2015-08-19 武汉精测电子技术股份有限公司 Current detection system and gear shift method therefor
CN106249045A (en) * 2016-07-14 2016-12-21 江阴长仪集团有限公司 A kind of wide-range electric power meter and metering method thereof
CN205959015U (en) * 2016-08-30 2017-02-15 长沙威胜信息技术有限公司 Multichannel analog quantity collector and water pump intelligent gateway who makes with this collector
CN107515380A (en) * 2017-07-20 2017-12-26 国网安徽省电力公司亳州供电公司 A kind of single-phase zone load electric energy table on-site calibrator
CN111162601A (en) * 2020-01-16 2020-05-15 天津捷强动力装备股份有限公司 Uninterrupted switching module and method for high-power direct-current power supply
CN111257637A (en) * 2020-02-21 2020-06-09 深圳市中电电力技术股份有限公司 Ultra-high harmonic measurement method and system
CN111413539A (en) * 2020-03-13 2020-07-14 创驱(上海)新能源科技有限公司 Circuit and method for realizing wide-range high-precision current detection by double current sensors
CN111665380A (en) * 2020-06-08 2020-09-15 珠海格力电器股份有限公司 Current sampling device, system and method
CN111679105A (en) * 2020-04-29 2020-09-18 深圳市科陆精密仪器有限公司 Range switching method for electric meter, electric meter and storage medium
CN112362960A (en) * 2021-01-14 2021-02-12 武汉海奥电气有限公司 High-speed high-precision large-dynamic-range electrical parameter measuring system and method
CN112415457A (en) * 2020-12-10 2021-02-26 科大智能电气技术有限公司 Method and system for realizing alternating current acquisition and calibration of electric power comprehensive tester
CN112526201A (en) * 2020-11-13 2021-03-19 上海金智晟东电力科技有限公司 Double-path synchronous sampling and measuring method
CN214097610U (en) * 2020-12-03 2021-08-31 陈川 System for automatically switching measuring range to measure current
CN113341218A (en) * 2021-07-08 2021-09-03 广东电网有限责任公司 Direct current electric energy meter with self-adaptive regulation of measuring range and control method thereof
CN113567737A (en) * 2021-06-28 2021-10-29 东北大学 Voltage data sampling method and pulmonary ventilation monitoring device
CN113884963A (en) * 2021-09-24 2022-01-04 广东电网有限责任公司 High-precision direct-current standard electric energy meter
CN114518488A (en) * 2022-01-19 2022-05-20 浙江正泰仪器仪表有限责任公司 Distributed light storage charging and discharging system for high-precision internet-of-things intelligent electric meter based on electric energy parameter search measurement
CN114720757A (en) * 2021-01-04 2022-07-08 莫仕Cvs波鸿有限公司 Method and module for power detection
CN114755485A (en) * 2021-07-27 2022-07-15 北京华峰测控技术股份有限公司 Voltage measurement device and method
CN114778918A (en) * 2021-07-27 2022-07-22 北京华峰测控技术股份有限公司 Current measuring device and method
CN115078798A (en) * 2022-07-26 2022-09-20 武汉格蓝若智能技术有限公司 Current range switching method and current collecting device
CN115078797A (en) * 2022-06-14 2022-09-20 江苏多维科技有限公司 Current measuring method and device
CN116008643A (en) * 2021-10-22 2023-04-25 南京南瑞继保电气有限公司 Sampling value switching method and sampling circuit for variable threshold
CN116125136A (en) * 2023-02-06 2023-05-16 威胜集团有限公司 Self-adaptive intelligent ammeter and sampling method

Patent Citations (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3609135A1 (en) * 1986-03-19 1987-09-24 Bosch Gmbh Robert CIRCUIT ARRANGEMENT FOR THE TIME CORRECTION OF DIGITAL SWITCHING SIGNALS
JPH02189466A (en) * 1989-01-18 1990-07-25 Tokyo Electric Power Co Inc:The Detecting system for electrical quantity
JPH03264867A (en) * 1990-03-15 1991-11-26 Hitachi Ltd Method and device for processing digital signal
JPH04340475A (en) * 1991-05-17 1992-11-26 Hioki Ee Corp Power analyzer apparatus
JPH0593747A (en) * 1991-09-30 1993-04-16 Hioki Ee Corp Power analyzer
CN2876793Y (en) * 2006-04-03 2007-03-07 杭州华隆电子技术有限公司 High accuracy electric energy meter using section type sampling
CN102421354A (en) * 2009-03-09 2012-04-18 科学与工业研究委员会 Ecg device with impulse and channel switching adc noise filter and error corrector for derived leads
CN102135563A (en) * 2011-02-23 2011-07-27 深圳科瑞格电子有限公司 Method and system for calculating electric energy and electric energy meter
CN102353836A (en) * 2011-07-15 2012-02-15 珠海中慧微电子有限公司 Method for dynamically adjusting current channel gain of wide-range electric energy meter
CN102565521A (en) * 2011-12-14 2012-07-11 中国电子科技集团公司第四十一研究所 High-precision wide-dynamic-range microwave signal level test device
CN102830276A (en) * 2012-08-27 2012-12-19 江西省电力科学研究院 Current sampling method of shock load watt-hour meter
CN102901864A (en) * 2012-10-11 2013-01-30 阳光电源股份有限公司 Voltage detecting device
CN103091550A (en) * 2013-01-08 2013-05-08 北京优科利尔能源设备有限公司 Synchronous isolation sampling direct-current power meter of wide voltage and large current
CN103344826A (en) * 2013-06-26 2013-10-09 国家电网公司 Nonlinear load electric energy metering device
CN103424608A (en) * 2013-07-31 2013-12-04 江苏林洋电子股份有限公司 Low cost rapid high precision alternating voltage signal sampling system
CN104111372A (en) * 2014-05-08 2014-10-22 徐伟专 Analytical equipment of frequency conversion electricity based on digital transmission
CN104569675A (en) * 2014-12-30 2015-04-29 上海贝岭股份有限公司 Flickering detecting circuit and detecting method in electric energy measuring chip
CN104849542A (en) * 2015-06-12 2015-08-19 武汉精测电子技术股份有限公司 Current detection system and gear shift method therefor
CN106249045A (en) * 2016-07-14 2016-12-21 江阴长仪集团有限公司 A kind of wide-range electric power meter and metering method thereof
CN205959015U (en) * 2016-08-30 2017-02-15 长沙威胜信息技术有限公司 Multichannel analog quantity collector and water pump intelligent gateway who makes with this collector
CN107515380A (en) * 2017-07-20 2017-12-26 国网安徽省电力公司亳州供电公司 A kind of single-phase zone load electric energy table on-site calibrator
CN111162601A (en) * 2020-01-16 2020-05-15 天津捷强动力装备股份有限公司 Uninterrupted switching module and method for high-power direct-current power supply
CN111257637A (en) * 2020-02-21 2020-06-09 深圳市中电电力技术股份有限公司 Ultra-high harmonic measurement method and system
CN111413539A (en) * 2020-03-13 2020-07-14 创驱(上海)新能源科技有限公司 Circuit and method for realizing wide-range high-precision current detection by double current sensors
CN111679105A (en) * 2020-04-29 2020-09-18 深圳市科陆精密仪器有限公司 Range switching method for electric meter, electric meter and storage medium
CN111665380A (en) * 2020-06-08 2020-09-15 珠海格力电器股份有限公司 Current sampling device, system and method
CN112526201A (en) * 2020-11-13 2021-03-19 上海金智晟东电力科技有限公司 Double-path synchronous sampling and measuring method
CN214097610U (en) * 2020-12-03 2021-08-31 陈川 System for automatically switching measuring range to measure current
CN112415457A (en) * 2020-12-10 2021-02-26 科大智能电气技术有限公司 Method and system for realizing alternating current acquisition and calibration of electric power comprehensive tester
CN114720757A (en) * 2021-01-04 2022-07-08 莫仕Cvs波鸿有限公司 Method and module for power detection
CN112362960A (en) * 2021-01-14 2021-02-12 武汉海奥电气有限公司 High-speed high-precision large-dynamic-range electrical parameter measuring system and method
CN113567737A (en) * 2021-06-28 2021-10-29 东北大学 Voltage data sampling method and pulmonary ventilation monitoring device
CN113341218A (en) * 2021-07-08 2021-09-03 广东电网有限责任公司 Direct current electric energy meter with self-adaptive regulation of measuring range and control method thereof
CN114755485A (en) * 2021-07-27 2022-07-15 北京华峰测控技术股份有限公司 Voltage measurement device and method
CN114778918A (en) * 2021-07-27 2022-07-22 北京华峰测控技术股份有限公司 Current measuring device and method
CN113884963A (en) * 2021-09-24 2022-01-04 广东电网有限责任公司 High-precision direct-current standard electric energy meter
CN116008643A (en) * 2021-10-22 2023-04-25 南京南瑞继保电气有限公司 Sampling value switching method and sampling circuit for variable threshold
CN114518488A (en) * 2022-01-19 2022-05-20 浙江正泰仪器仪表有限责任公司 Distributed light storage charging and discharging system for high-precision internet-of-things intelligent electric meter based on electric energy parameter search measurement
CN115078797A (en) * 2022-06-14 2022-09-20 江苏多维科技有限公司 Current measuring method and device
CN115078798A (en) * 2022-07-26 2022-09-20 武汉格蓝若智能技术有限公司 Current range switching method and current collecting device
CN116125136A (en) * 2023-02-06 2023-05-16 威胜集团有限公司 Self-adaptive intelligent ammeter and sampling method

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
0.5S级宽量程三相智能电能表的研究;杨超超;城市建设理论研究(电子版);全文 *
1(100)A宽量程电能表设计与应用;仝晨华;刘艳芳;冯震;;内蒙古电力技术(第06期);全文 *
Measurement Error Analysis of Wide-Frequency and Wide-Range Current Transformer;Gang Liu 等;2021 IEEE 2nd China International Youth Conference on Electrical Engineering (CIYCEE);全文 *
串联型电能质量调节器的阶段式补偿控制策略;刘颖英;肖湘宁;徐永海;朱永强;郭春林;;中国电机工程学报(第28期);全文 *
基于CS5460A设计三相电能表关键技术研究;许春香 等;电测与仪表;第47卷(第12期);全文 *
宽动态范围自适应变采样率数据采集系统设计;陆娜;栾晓明;刘晶;冯栋梁;;自动化技术与应用(第01期);全文 *
高精度电能表现场校验仪设计;毛晓波;黄云峰;黄俊杰;;电力自动化设备(第07期);全文 *

Also Published As

Publication number Publication date
CN116593769A (en) 2023-08-15

Similar Documents

Publication Publication Date Title
CN109831184B (en) Band-pass filtering method, system, storage medium and terminal equipment
CN103078640B (en) A kind of RLS adaptive-filtering calibration steps for ADC
CN112310991B (en) Energy storage converter improved finite set model prediction control method based on disturbance observation
CN110262236B (en) Order-reducing variable selection method for order reduction of power electronic interface grid-connected system model
CA1133584A (en) Static var generator compensating control circuit and method for using same
CN101339210B (en) Method and device for correcting phase error of electric network measuring and controlling equipment
Chen et al. A fast-convergent modulation integral observer for online detection of the fundamental and harmonics in grid-connected power electronics systems
CN101179184B (en) Sampling frequency control method and protective relay
JPH0522833A (en) Digital protective relay
CN103983847A (en) Self-adaptive frequency tracking measurement method based on RLS (Recursive Least Squares) in synchronized phasor measurement
CN116593769B (en) High-precision electric energy calculation method with wide dynamic range
CN114966316A (en) Primary and secondary depth fusion equipment signal detection device and detection method
CN111917130A (en) Method for improving low voltage ride through capability of photovoltaic power generation
Li Design and realization of FIR digital filters based on MATLAB
CN109358228B (en) Power grid voltage positive and negative sequence component real-time estimation method based on double enhanced phase-locked loops
Zhou et al. Hybrid prediction-based deadbeat control for a high-performance shunt active power filter
CN111130123A (en) Self-adaptive control method of parallel active power filter
CN105977979B (en) The monocyclic control algolithm of single-phase shunt active power filter
Lai et al. An iterative approach to near-uniform group-delay error design of FIR filters
CN114442485B (en) Design method of universal fractional order multi-period characteristic harmonic repetitive controller and controller
CN115912489A (en) LMS-SOGI three-phase-locked loop design method and system suitable for non-ideal power grid
CN112035786B (en) Current algorithm of battery management system
Tomić et al. Constrained-group-delay-optimized multiple-resonator-based harmonic analysis
CN110336287B (en) Three-phase load flow calculation method of power distribution system based on Jacobian element extraction
CN113553538A (en) Recursive correction hybrid linear state estimation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant