Electric energy meter based on self-adaptive observer and using and collecting terminal frequency estimation method
By using adaptive observers and intermediate variable calculation methods in the power meter, the frequency estimation value is dynamically adjusted, which solves the problem of slow speed and susceptibility to harmonic interference in the traditional frequency estimation method, and achieves fast and high-precision frequency estimation.
Patent Information
- Application Number
- CN202411754752.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional frequency estimation methods are slow and easily disturbed by harmonics, making it difficult to provide high-precision frequency estimation in real-time operating conditions.
The power meter based on an adaptive observer and the terminal frequency estimation method are used to continuously sample the voltage or current, remove the DC component and calculate the intermediate variable, and dynamically adjust the estimation value to improve the speed and robustness of the frequency estimation.
Fast and high-precision frequency estimation is achieved, and high estimation accuracy can be maintained in occasions where harmonic interference is large, which significantly improves the speed of frequency estimation.
Smart Images

Figure BDA0005165978320000041 
Figure BDA0005165978320000044 
Figure BDA0005165978320000046
Abstract
Description
Technical Field
[0001] The invention belongs to the field of measuring electrical variables, and in particular relates to a frequency estimation method. Background Art
[0002] In modern electric energy metering technology, grid frequency is a crucial parameter. It is widely used in power quality assessment, dynamic adjustment of sampling rate, calculation of electric energy integration interval, etc., and plays a key role in the accurate measurement of electric energy meters. Therefore, it is particularly important to estimate the grid frequency quickly and accurately.
[0003] The traditional frequency estimation method uses the zero-crossing estimation method: when the value of a sampling point is less than 0, and the value of the next sampling point is greater than or equal to 0, the sampling point is regarded as a zero-crossing point. Since the voltage signal is usually a sine wave, theoretically there will only be one zero-crossing point in one cycle. By counting the total time of several zero-crossing points and dividing the total time by the number of zero-crossing points, the estimated value of the grid frequency can be obtained.
[0004] However, traditional estimation methods have the following shortcomings:
[0005] 1. Slow speed: Due to the limitation of sampling resolution, the estimation error of zero-crossing point may reach 1 sampling point. In order to obtain a relatively accurate frequency estimation value, multiple zero-crossing point estimations need to be performed continuously. Taking 6.4K sampling rate as an example, it takes about 100 consecutive cycles to achieve a resolution of 0.001Hz. According to the grid frequency of 50Hz, an accurate estimation value can be obtained approximately every 2 seconds.
[0006] 2. Easily affected by harmonics: In the presence of voltage harmonics, the value at the zero crossing point may jitter, that is, multiple zero crossing points may appear in one cycle. Incorrect zero crossing points will cause serious interference to the estimated value.
[0007] In response to these defects of traditional methods, the Chinese invention patent "Method for Accurate Estimation of Power Grid Frequency" with publication number CN117723824A proposes a method of combining zero-crossing interpolation and curve fitting to perform frequency estimation. Compared with traditional methods, this method has significantly improved the estimation accuracy, but it still requires multiple cycles to obtain accurate estimation results. In addition, in actual working conditions, the amplitude and phase of the fundamental and harmonic waves are always in a fluctuating state, and are not completely steady-state signals. Therefore, in situations where harmonic interference is more serious, the robustness of this method still needs to be further improved. Summary of the invention
[0008] The present invention proposes an electric energy meter based on an adaptive observer and a method for estimating the frequency of a sampling terminal, the purpose of which is to further improve the speed of frequency estimation and reduce the influence of harmonic interference on the estimation result.
[0009] The technical solution of the present invention is as follows:
[0010] An electric energy meter based on an adaptive observer and a method for estimating the frequency of a sampling terminal are provided, wherein an initial value is set for an estimated value of a first intermediate variable, wherein the first intermediate variable has a computational relationship with the estimated frequency;
[0011] Continuously sampling the voltage or current, and when each new sample value is obtained, removing the DC component of the sample value and several previous continuous sample values to form a group of sample data and add them to the cache;
[0012] Whenever a new set of sampled data is added to the cache, a calculated value of the corresponding second intermediate variable is calculated based on the new sampled data, and then a gradient value is obtained based on the calculated value of the second intermediate variable. A new estimated value of the first intermediate variable is calculated based on the gradient value and the current estimated value of the first intermediate variable. If the continuously obtained estimated values of the first intermediate variable have converged, an estimated value of the frequency is calculated based on the current estimated value of the first intermediate variable.
[0013] As a further improvement of the electric energy meter based on the adaptive observer and the frequency estimation method using the sampling terminal: Assume that the sampling data comes from four consecutive sampling values, which are recorded as: [U′0, U′1, U′2, U′3];
[0014] The way to remove the DC component is:
[0015] First calculate the DC component D U : Among them, U′ i is the sampling value of i participating in the DC component calculation, and N is the number of sampling points required to be accumulated to calculate the DC component;
[0016] Then all the sample values in the sampled data are subtracted from the DC component D U , and get the sampling data:
[0017] [U0, U1, U2, U3]=[U′0-D U , U′1-D U , U′2-D U , U′3-D U ].
[0018] As a further improvement of the electric energy meter based on the adaptive observer and the method for estimating the frequency of the sampling terminal, the number of sampling points N required to be accumulated for the DC component is calculated as follows:
[0019]
[0020] Among them, n represents the frequency involved in the accumulation, which is an integer value. Indicates a round-down operation; C w The theoretical value of the number of sampling points per cycle: f is the estimated frequency. If the estimated value of the frequency is not currently calculated, the default value of 50Hz is used. s is the sampling frequency.
[0021] As a further improvement of the electric energy meter based on adaptive observer and the frequency estimation method using the sampling terminal: suppose the sampled data includes four data: [U0, U1, U2, U3]. Before adding the sampled data to the cache, the validity of the sampled data needs to be judged: if |U1-U2|<ε, it is invalid data and cannot be added to the cache; otherwise, it is valid data and is added to the cache; |·| represents the absolute value operation, and ε represents the threshold.
[0022] As a further improvement of the electric energy meter based on the adaptive observer and the frequency estimation method using the sampling terminal: Assume that the sampled data includes four data: [U0, U1, U2, U3], then:
[0023]
[0024] Where A represents the signal amplitude, ω is the signal angular frequency, is the initial phase of the signal at time U0, τ is the sampling time interval; and: ω=2πf; f is the estimated frequency; f s is the sampling frequency;
[0025] Then define the intermediate variable S1 as:
[0026]
[0027] Define the intermediate variable S2 as:
[0028] Define the intermediate variable S3 as:
[0029] So there is an intermediate variable
[0030] The above intermediate variable γ is the first intermediate variable, and the calculation relationship between the first intermediate variable γ and the estimated frequency f is:
[0031] The above intermediate variables S1 and S2 are both second intermediate variables.
[0032] As a further improvement of the electric energy meter based on the adaptive observer and the method for estimating the frequency of the sampling terminal, the gradient value calculated when adding the jth group of sampling data is for:
[0033]
[0034] Among them, k is the coefficient, E j is the estimated error corresponding to the jth group of sampled data: and are the second intermediate variables S1 and S2 obtained based on the j-th group of sampling data respectively; To obtain the estimated value of the current first intermediate variable γ when the jth group of sampling data is obtained.
[0035] As a further improvement of the electric energy meter based on the adaptive observer and the frequency estimation method of the user terminal: the value range of the coefficient k is 0.5 to 2.
[0036] As a further improvement of the electric energy meter based on the adaptive observer and the frequency estimation method using the sampling terminal, when the jth group of sampled data is added, a new first intermediate variable estimation value is calculated based on the gradient value and the current first intermediate variable estimation value. The method is:
[0037] As a further improvement of the electric energy meter based on the adaptive observer and the terminal frequency estimation method, a method for judging whether the estimated value of the first intermediate variable converges is as follows: if the standard deviation of several consecutive estimated values of the first intermediate variable is less than a preset threshold, it is judged as converged; otherwise, it is judged as not converged.
[0038] As a further improvement of the electric energy meter based on the adaptive observer and the frequency estimation method of the sampling terminal: after obtaining multiple frequency estimation values continuously, an average value is obtained as the final frequency estimation result.
[0039] Compared with the prior art, the present invention has the following positive effects:
[0040] 1. The present invention utilizes the derivative relationship between frequency and phase. By performing algebraic calculations on a group of adjacent sampling points, the frequency to be estimated can be quickly obtained, and each sampling point can perform a frequency estimation, which greatly improves the frequency estimation speed.
[0041] 2. The present invention calculates the gradient based on the intermediate variable value used to estimate the frequency and dynamically adjusts the estimated value, so that it can still have a high estimation accuracy in situations where harmonic interference is large. DETAILED DESCRIPTION
[0042] The technical solution of the present invention is described in detail below. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments.
[0043] An electric energy meter based on an adaptive observer and a method for estimating the frequency of a sampling terminal are provided. First, an initial value is set for an estimated value of a first intermediate variable. The first intermediate variable has a calculation relationship with the estimated frequency. The initial value of the estimated value of the first intermediate variable is calculated based on the default value of the frequency, 50 Hz. Then, the voltage or current is continuously sampled. When a new sample value is obtained, the DC component is removed from the sample value and several previous continuous sample values, and a group of sample data is formed and added to the cache.
[0044] Whenever a new set of sampled data is added to the cache, a calculated value of the corresponding second intermediate variable is calculated based on the new sampled data, and then a gradient value is obtained based on the calculated value of the second intermediate variable. A new estimated value of the first intermediate variable is calculated based on the gradient value and the current estimated value of the first intermediate variable. If the continuously obtained estimated values of the first intermediate variable have converged, an estimated value of the frequency is calculated based on the current estimated value of the first intermediate variable.
[0045] Specifically, each group of the sampled data is assumed to come from four consecutive sampled values, which are recorded as: [U′0, U′1, U′2, U′3];
[0046] The way to remove the DC component is:
[0047] First calculate the DC component D U : Among them, U′ i is the sampling value of i participating in the DC component calculation, and N is the number of sampling points required to be accumulated to calculate the DC component.
[0048] The calculation method of the number of sampling points N required to accumulate the DC component is:
[0049]
[0050] Among them, n represents the frequency involved in the accumulation, which is an integer value. Indicates a round-down operation; C w The theoretical value of sampling points per cycle: f is the estimated frequency. If the estimated value of the frequency is not currently calculated, the default value of 50Hz is used. s is the sampling frequency.
[0051] According to the Nyquist sampling theorem, the sampling frequency should be greater than twice the highest cutoff frequency of the signal. According to empirical values, the sampling frequency is preferably more than 10 times the signal frequency. For a 50 Hz power frequency signal, the sampling frequency can be considered to be 6.4 KHz or 12.8 KHz.
[0052] Then all the sample values in the sampled data are subtracted from the DC component DU , and get the sampling data:
[0053] [U0, U1, U2, U3]=[U′0-D U , U′1-D U , U′2-D U , U′3-D U ].
[0054] Furthermore, before adding to the cache, the validity of the sampled data needs to be judged: if |U1-U2|<ε, it is invalid data and cannot be added to the cache; otherwise, it is valid data and is added to the cache; |·| represents the absolute value operation, and ε represents the threshold. The reason for judging the validity is that in the subsequent calculation process, the difference between the two middle sampled values needs to be calculated and used as the denominator of the fraction. If it is 0, the calculation result cannot be obtained. Considering that most actual operations are floating-point operations, the subtraction of floating-point values is generally not strictly equal to 0, so the threshold ε is used for judgment.
[0055] Whenever a new set of sample data is added to the cache, steps 1 to 4 are executed once:
[0056] Step 1: Assume that the sampled data includes four data: [U0, U1, U2, U3], then:
[0057]
[0058] Where A represents the signal amplitude, ω is the signal angular frequency, is the initial phase of the signal at time U0, τ is the sampling time interval; and: ω=2πf; f is the estimated frequency; f s is the sampling frequency;
[0059] Then define the intermediate variable S1 as:
[0060]
[0061] Define the intermediate variable S2 as:
[0062] Define the intermediate variable S3 as:
[0063] So there is an intermediate variable
[0064] The intermediate variable γ is the first intermediate variable, and the intermediate variables S1 and S2 are both second intermediate variables. In actual operation, the values of the first intermediate variable and the second intermediate variable can be directly obtained according to [U0, U1, U2, U3].
[0065] Obviously, the calculation relationship between the first intermediate variable γ and the estimated frequency f is: Therefore, the initial value of the first intermediate variable γ can be calculated from f=50 Hz using this formula.
[0066] Although a preliminary estimate of the frequency can be obtained through the above process, due to the presence of harmonic content in actual working conditions, the estimated value of γ may jump, and in the case of serious harmonics, it may even deviate seriously from the true value. Therefore, the present invention further implements adaptive estimation through gradient, so that the observed γ constantly approaches the true value.
[0067] Step 2: Assume that the jth group of sample data is currently added, then the calculated gradient value is for:
[0068]
[0069] Where k is a coefficient, ranging from 0.5 to 2; E j is the estimated error corresponding to the jth group of sampled data: and are the second intermediate variables S1 and S2 obtained based on the j-th group of sampling data respectively; To obtain the estimated value of the current first intermediate variable γ when the jth group of sampling data is obtained.
[0070] Step 3: Based on the gradient value and the current first intermediate variable estimate Calculate the new first intermediate variable estimate The method is:
[0071] Step 4: Determine the current estimated value of the first intermediate variable Convergence: If the standard deviation of several consecutive first intermediate variable estimates is less than the preset threshold, it is determined to be converged, and based on the current first intermediate variable estimate Calculate an estimate of the current frequency Otherwise, it is determined as non-convergence, and the estimated value of the first intermediate variable obtained this time is saved for subsequent convergence judgment.
[0072] Furthermore, the obtained frequency value may have slight fluctuations, and the frequency may be further averaged several times to filter out the AC component as the final frequency estimation result. It should be noted that it is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. The scope of the present invention is defined by the claims rather than the above description.
Claims
1. An electric energy meter based on an adaptive observer and a method for estimating the frequency of a terminal, characterized in that: Setting an initial value for an estimated value of a first intermediate variable, wherein the first intermediate variable has a computational relationship with the estimated frequency; Continuously sampling the voltage or current, and when each new sample value is obtained, removing the DC component of the sample value and several previous continuous sample values to form a group of sample data and add them to the cache; Whenever a new set of sampled data is added to the cache, a calculated value of the corresponding second intermediate variable is calculated based on the new sampled data, and then a gradient value is obtained based on the calculated value of the second intermediate variable. A new estimated value of the first intermediate variable is calculated based on the gradient value and the current estimated value of the first intermediate variable. If the continuously obtained estimated values of the first intermediate variable have converged, an estimated value of the frequency is calculated based on the current estimated value of the first intermediate variable.
2. The electric energy meter based on the adaptive observer and the method for estimating the frequency of the user terminal according to claim 1, characterized in that: Assume that the sampled data comes from four consecutive sampled values, denoted as: [U′0, U′1, U′2, U′3]; The way to remove the DC component is: First calculate the DC component D U : Among them, U′ i is the sampling value of i participating in the DC component calculation, and N is the number of sampling points required to be accumulated to calculate the DC component; Then all the sample values in the sampled data are subtracted from the DC component D U , get the sampling data: [U0,U1,U2,U3] = [U0 ′ -D U ,U1 ′ -D U ,U2 ′ -D U ,U3 ′ -D U ].
3. The electric energy meter based on adaptive observer and the method for estimating the frequency of the user terminal according to claim 2, characterized in that: The calculation method of the number of sampling points N required to accumulate the DC component is: Among them, n represents the frequency involved in the accumulation, which is an integer value. Indicates a round-down operation; C w The theoretical value of the number of sampling points per cycle: f is the estimated frequency. If the estimated value of the frequency is not currently calculated, the default value of 50Hz is used. s is the sampling frequency.
4. The electric energy meter based on the adaptive observer and the method for estimating the frequency of the user terminal according to claim 1, characterized in that: The sampled data includes four data: [U0, U1, U2, U3]. Before being added to the cache, the validity of the sampled data needs to be judged: if |U1-U2|<ε, it is invalid data and cannot be added to the cache; otherwise, it is valid data and is added to the cache; |·| represents an absolute value operation, and ε represents a threshold.
5. The electric energy meter based on the adaptive observer and the method for estimating the frequency of the user terminal according to claim 1, characterized in that: The sampled data includes four data: [U0, U1, U2, U3], then: Where A represents the signal amplitude, ω is the signal angular frequency, is the initial phase of the signal at time U0, τ is the sampling time interval; and: ω=2πf; f is the estimated frequency; f s is the sampling frequency; Then define the intermediate variable S1 as: Define the intermediate variable S2 as: Define the intermediate variable S3 as: So there is an intermediate variable The above intermediate variable γ is the first intermediate variable, and the calculation relationship between the first intermediate variable γ and the estimated frequency f is: The above intermediate variables S1 and S2 are both second intermediate variables.
6. The electric energy meter based on adaptive observer and the method for estimating the frequency of the user terminal according to claim 5, characterized in that: The gradient value calculated when adding the jth group of sample data for: Among them, k is the coefficient, E j is the estimated error corresponding to the jth group of sampled data: and are the second intermediate variables S1 and S2 obtained based on the j-th group of sampling data respectively; To obtain the estimated value of the current first intermediate variable γ when the jth group of sampling data is obtained.
7. The electric energy meter based on the adaptive observer and the method for estimating the frequency of the user terminal according to claim 6, characterized in that: The coefficient k ranges from 0.5 to 2.
8. The electric energy meter based on adaptive observer and the method for estimating the frequency of the user terminal according to claim 6, characterized in that: When the jth group of sample data is added, a new first intermediate variable estimate is calculated based on the gradient value and the current first intermediate variable estimate The method is:
9. The electric energy meter based on adaptive observer and the method for estimating the frequency of the user terminal according to any one of claims 1 to 8, characterized in that: The method of judging whether the estimated value of the first intermediate variable converges is as follows: if the standard deviation of a number of consecutive estimated values of the first intermediate variable is less than a preset threshold, it is judged to be converged; otherwise, it is judged to be non-converged.
10. The electric energy meter based on adaptive observer and the method for estimating the frequency of the user terminal according to any one of claims 1 to 8, characterized in that: After obtaining multiple frequency estimation values in succession, the average value is calculated as the final frequency estimation result.
Citation Information
Patent Citations
Power grid frequency accurate estimation method
CN117723824A
Cited By
Method for accurately detecting power of wind power generation system based on direct current offset estimation compensation
CN120490589A