Method and device for calculating phase of electricity meter

By marking and sampling the voltage signal of the meter and judging the forward zero crossing point, and calculating the frequency and phase, the problems of slow phase measurement speed and low accuracy of the meter are solved, and fast and high-precision phase measurement is achieved.

CN119224422APending Publication Date: 2024-12-31NINGBO HENGLIDA TECH +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411423997.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The phase measurement speed of existing electricity meters is slow and has low accuracy, and the phase angle information is lacking to utilize the amplitude of the AC signal, resulting in a long stability time of the phase lock loop and low measurement accuracy.

Method used

By marking and sampling the voltage signal of the meter, making forward zero crossing judgments, selecting target points, calculating frequency measurement values ​​and phases, and using the index values ​​and average frequency values ​​in the target register to calculate phases, achieving fast and high-precision phase measurements.

Benefits of technology

The speed and accuracy of the phase calculation of the electric meter are improved, and faster and higher precision phase measurements are achieved through the judgment of the forward zero crossing point of adjacent sampling points and the statistical number of target points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119224422A_ABST
    Figure CN119224422A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electricity meter metering, and discloses an electricity meter phase calculation method and device, and the method comprises the steps: carrying out the marking sampling of a voltage signal of an electricity meter based on a preset first frequency, and obtaining at least two sampling points; performing forward zero crossing point judgment on all the sampling points, and taking the sampling points meeting the judgment condition as target points; obtaining a frequency measurement value based on a preset first frequency and the number of sampling points between two adjacent target points, and calculating an average frequency value; and reading all the index values in the target register, and calculating the phase of the ammeter according to all the index values and the average frequency value. According to the invention, the adjacent sampling points are subjected to forward zero crossing point judgment, and the target points are selected according to the judgment result, so that the average frequency value is calculated according to the number of the target points and the sampling points, and the ammeter phase is calculated according to the read index value in the target register and the average frequency value. And high-efficiency and high-precision ammeter phase calculation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric meter measurement, and in particular to a method and device for calculating the phase of an electric meter. Background Art

[0002] At present, the main calculation scheme for the phase of the electric meter is the orthogonal demodulation method, that is, the input analog signal is first converted into a digital signal through an analog-to-digital converter (ADC), and then the digital signal is divided into two parts, one part remains unchanged (I channel), and the other part is 90 degrees phase shifted (Q channel), so that the in-phase and orthogonal reference signals of the local oscillator (LO) are multiplied with the I and Q signals respectively, and the high-frequency components are filtered out by a low-pass filter to obtain the DC component reflecting the phase of the input signal, and the ratio of the I and Q signals is further used to calculate the phase of the input signal (usually using the inverse tangent function arctan (Q / I)). In this process, the frequency of the local oscillator is adjusted to synchronize the input signal with the local oscillator to achieve frequency and phase locking, and extract frequency and phase information from it.

[0003] However, the above scheme is based on the frequency and phase measurement of the phase-locked structure, and does not use the phase angle information contained in the amplitude change of the AC signal itself. Therefore, the phase-locked loop (PLL) often takes a long time to reach stability, which leads to slow frequency and phase measurement speed. In addition, due to the lack of reliable phase measurement calibration instruments and unified configuration conditions, there is a lot of ambiguity in the accuracy calibration of the phase measurement device, which leads to low phase measurement accuracy. Summary of the invention

[0004] In order to solve the above-mentioned problems of slow phase measurement speed and low accuracy, the embodiment of the present application provides a method and device for calculating the phase of an electric meter, and its technical solution is as follows: In a first aspect, an embodiment of the present application provides a method for calculating an electric meter phase, including: Marking and sampling the voltage signal of the electric meter based on a preset first frequency to obtain at least two sampling points; Perform positive zero-crossing point judgment on all sampling points, and take the sampling points that meet the positive zero-crossing point judgment conditions as target points; Calculating a frequency measurement value based on a preset first frequency and the number of sampling points between two adjacent target points, and calculating an average frequency value based on the frequency measurement value; All index values ​​in the target register are read, and the phase of the electric meter is calculated according to all index values ​​and the average frequency value; wherein the target memory includes at least two index values ​​corresponding to the sampling points.

[0005] In an optional solution of the first aspect, a frequency measurement value is calculated based on a preset first frequency and the number of sampling points between two adjacent target points, and an average frequency value is calculated according to the frequency measurement value, including: Grouping all sampling points based on a preset second frequency to obtain at least two target groups; Calculate a frequency measurement value according to the counted number of sampling points between two adjacent target points in each target group and a preset first frequency; The average frequency value is calculated according to the frequency measurement value and the preset accumulation times; wherein the preset accumulation times is determined by the calculation amount and accuracy of at least two experiments.

[0006] In yet another optional solution of the first aspect, reading all index values ​​in the target register and calculating the phase of the electric meter according to all index values ​​and the average frequency value includes: Read all index values ​​in the target register, and calculate the clock offset rate according to all index values, a preset baud rate and a preset first formula; The actual frequency value is obtained according to the average frequency value and the clock offset rate, and the phase of the electric meter is calculated according to the actual frequency value.

[0007] In yet another optional solution of the first aspect, obtaining the actual frequency value according to the average frequency value and the clock offset rate includes: Calculate the original frequency value according to the average frequency value, the preset first frequency, the preset number of accumulations and the preset second formula; The original frequency value is corrected based on the clock offset rate and a preset third formula to obtain an actual frequency value.

[0008] In yet another optional solution of the first aspect, calculating the phase of the electric meter according to the actual frequency value includes: Acquire a first voltage value corresponding to a first sampling point and a second voltage value corresponding to a second sampling point; wherein the first sampling point is any target point, and the second sampling point is a sampling point before the first sampling point; Calculate the phase interpolation initial value according to the first voltage value, the second voltage value, the number of target points and a preset fourth formula; Calculate the phase interpolation theoretical value according to the clock offset rate, the phase interpolation initial value and the preset fifth formula; The phase of the electric meter is obtained according to the actual frequency value and the phase interpolation theoretical value.

[0009] In another optional solution of the first aspect, obtaining the phase of the electric meter according to the actual frequency value and the phase interpolation theoretical value includes: Calculate the frequency points according to the actual frequency value, the preset first frequency and the preset sixth formula; The phase of the electric meter is calculated based on the frequency points and the phase interpolation theoretical value.

[0010] In another optional solution of the first aspect, the phase interpolation theoretical value includes a first phase interpolation theoretical value, a second phase interpolation theoretical value, and a third phase interpolation theoretical value; wherein the first phase corresponding to the first phase interpolation theoretical value is the phase that first reaches the forward peak value; The phase of the meter is calculated based on the frequency points and the phase interpolation theoretical value, including: Comparing the first phase interpolation theoretical value, the second phase interpolation theoretical value and the third phase interpolation theoretical value, and determining a phase calculation formula according to the comparison result; The phase of the electric meter is calculated according to the frequency points, the first phase interpolation theoretical value, the second phase interpolation theoretical value, the third phase interpolation theoretical value and the phase calculation formula.

[0011] In a second aspect, an embodiment of the present application provides a device for calculating an electric meter phase, including: A first processing module, configured to perform mark sampling on a voltage signal of the electric meter based on a preset first frequency to obtain at least two sampling points; The second processing module is used to perform positive zero-crossing point judgment on all sampling points, and take the sampling points that meet the positive zero-crossing point judgment conditions as target points; A third processing module, used to calculate a frequency measurement value based on a preset first frequency and the number of sampling points between two adjacent target points, and calculate an average frequency value according to the frequency measurement value; The fourth processing module is used to read all index values ​​in the target register and calculate the phase of the electric meter according to all index values ​​and the average frequency value; wherein the target memory includes at least two index values ​​corresponding to the sampling points.

[0012] In a third aspect, an embodiment of the present application further provides a device for calculating an electric meter phase, including a processor and a memory; The processor is connected to the memory; A memory for storing executable program codes; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the method for calculating the phase of the electric meter provided by the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect.

[0013] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the method for calculating the phase of an electric meter provided by the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect can be implemented.

[0014] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: In the process of calculating the meter phase, the positive zero crossing point of adjacent sampling points is judged, and the target point is selected according to the judgment result, so as to calculate the average frequency value according to the statistical number of target points, and then the meter phase is calculated according to the read value of the target register and the average frequency value, thereby achieving faster and more accurate meter phase calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 An overall flow chart of a method for calculating the phase of an electric meter provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a device for calculating the phase of an electric meter provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of another device for calculating the phase of an electric meter provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0018] In the following introduction, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments recorded. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, although the embodiment may not be clearly recorded in the following text.

[0019] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.

[0020] See also Figure 1 , Figure 1 An overall flow chart of a method for calculating an electric meter phase provided in an embodiment of the present application is shown.

[0021] like Figure 1 As shown, the method for calculating the phase of the electric meter may at least include the following steps: Step 101: Mark and sample a voltage signal of an electric meter based on a preset first frequency to obtain at least two sampling points.

[0022] In the embodiment of the present application, the method for calculating the phase of the electric meter can be, but is not limited to, applied to a digital signal processor (DSP), a microcontroller (MCU), a field programmable gate array (FPGA), and software running on a personal computer (PC) or other computing platforms, such as MATLAB, Python, etc. In the process of calculating the phase of the electric meter, by performing a positive zero-crossing judgment on adjacent sampling points and selecting a target point according to the judgment result, the average frequency value is calculated according to the number of target points and sampling points, and then the phase of the electric meter is calculated according to the index value in the read target register and the average frequency value, thereby achieving a faster and more accurate calculation of the phase of the electric meter.

[0023] Specifically, in the process of calculating the phase of the electric meter, the sampling period (i.e., the inverse of the preset first frequency) can be determined first according to the preset first frequency, and then the voltage signal of the electric meter is marked and sampled according to the sampling period to obtain at least two sampling points, wherein each sampling point has a unique index mark and corresponding sampling information (such as voltage value, current value, etc.), such as digital number (1, 2, 3, 4...), English code (first, scend...), time mark (09:10, 10:12, 11:23), etc. In addition, the preset first frequency can be but is not limited to 6400 Hertz (Hz).

[0024] Step 102: Perform positive zero-crossing point judgment on all sampling points, and use the sampling points that meet the positive zero-crossing point judgment conditions as target points.

[0025] Specifically, after obtaining at least two sampling points, positive zero-crossing point determination may be performed on all sampling points.

[0026] It can be understood that the positive zero crossing refers to the process of the signal changing from a negative value to a positive value across the zero point. Specifically, if the signal changes from a negative value at the previous sampling point V_previous to a non-negative value (usually a positive value) at the current sampling point V_current, then we say that a positive zero crossing occurs at this sampling point.

[0027] Furthermore, when the result of the positive zero-crossing point judgment is that there is a positive zero-crossing, the latter sampling point of the two sampling points where the positive zero-crossing point occurs (i.e., the sampling point that satisfies the condition for the positive zero-crossing point judgment) can be used as the target point, and all sampling points are judged in turn, so that all target points that meet the conditions can be obtained.

[0028] Step 103: Calculate a frequency measurement value based on a preset first frequency and the number of sampling points between two adjacent target points, and calculate an average frequency value based on the frequency measurement value.

[0029] Specifically, after all target points are obtained, the frequency of each cycle can also be set, which can be but is not limited to 50 Hz. It can be understood that a cycle refers to a complete cycle, that is, the time required for the signal to complete a complete change. This means that within a standard cycle, the alternating current completes a complete change from a positive half-cycle to a negative half-cycle and then to a positive half-cycle. The collected signal is divided into multiple cycles according to the set frequency of each cycle, and the number N of sampling points between two adjacent target points in each cycle is counted, and then the number N is multiplied by the preset first frequency to obtain the frequency value of each cycle, that is, the frequency measurement value.

[0030] Furthermore, after the frequency measurement value is obtained, the average frequency value can be obtained according to the number of cycles and the frequency measurement value, that is, the average frequency value=the sum of all frequency measurement values / the number of cycles.

[0031] As an option of the embodiment of the present application, based on the preset second frequency, the number of sampling points between two adjacent target points is calculated, and the average frequency value is obtained according to the calculation result, including: Grouping all sampling points based on a preset second frequency to obtain at least two target groups; Calculate a frequency measurement value according to the counted number of sampling points between two adjacent target points in each target group and a preset first frequency; The average frequency value is calculated according to the frequency measurement value and the preset accumulation times; wherein the preset accumulation times is determined by the calculation amount and accuracy of at least two experiments.

[0032] Specifically, after all target points are obtained, all sampling points can be grouped according to a preset second frequency (such as 50 Hz, 60 Hz, 100 Hz, etc.) to obtain at least two target groups, wherein each target group includes at least two target points, and the total number of sampling points in each target group is the same in theory. In the actual process, errors may be caused by noise, clock drift, etc., and therefore subsequent calculations need to be performed based on the conditions of multiple target groups.

[0033] Next, the number of sampling points between two adjacent target points in each target group, that is, the number of sampling points between two positive zero crossings, can be counted first, and then multiplied by the preset first frequency, and the obtained product is used as the frequency measurement value of each group, and then multiple frequency measurement values ​​with smaller errors can be selected according to the preset number of accumulations, and they are accumulated, and then divided by the number of accumulations to obtain the pending frequency value.

[0034] Thereafter, the number of signal cycles contained in each target group can be determined based on the number of target points in each target group. The determination method can be, but is not limited to, taking half of the number of target points in each target group as the number of signal cycles contained in each target group, and then the to-be-determined frequency value can be divided by the number of cycles to obtain the average frequency value.

[0035] It should be noted that the preset number of accumulations is determined by at least two experiments, and can be determined, but not limited to, according to the amount of calculation and the accuracy of each experiment. The preset number of accumulations in this solution is 16 times, and its main purpose is to improve the accuracy and stability of frequency measurement. Selecting 16 accumulations can find a balance between accuracy and real-time performance. If the number of accumulations is too small, although the calculation results can be obtained quickly, the accuracy of the measurement may be affected by noise and short-term fluctuations, which may lead to errors in the calculation results. On the contrary, if the number of accumulations is too large, although the stability of the measurement can be improved, the real-time performance of the frequency measurement will be reduced.

[0036] Step 104: read all index values ​​in the target register, and calculate the phase of the electric meter according to all index values ​​and the average frequency value.

[0037] Specifically, after calculating the average frequency value, all index values ​​in the target register may be read first, and the phase (in radians) may be calculated based on all the read index values, the calculated average frequency value, the sampling frequency value (i.e., the preset first frequency) and the following formula: Where θ is the phase value of a complete cycle, in radians; i is the index value in the target register, without unit; f avg is the average frequency value, in Hertz (Hz); fs is the sampling frequency value in Hertz (Hz).

[0038] It is worth noting that at least two index values ​​corresponding to the sampling points are stored in the target register here, and the index value is usually used to indicate the position of the current sampling point in the signal cycle.

[0039] As another option of the embodiment of the present application, all index values ​​in the target register are read, and the phase of the electric meter is calculated according to all index values ​​and the average frequency value, including: Read all index values ​​in the target register, and calculate the clock offset rate according to all index values, a preset baud rate and a preset first formula; The actual frequency value is obtained according to the average frequency value and the clock offset rate, and the phase of the electric meter is calculated according to the actual frequency value.

[0040] Specifically, after the average frequency value is calculated, the clock offset rate may be calculated by using the index value in the target register, the preset baud rate, and the following preset first formula: Wherein, E is the clock offset rate, unitless; K is the preset baud rate, unit is baud (Bd); R is the index value in the target register, unitless. Here, the target register can be but is not limited to T8BAUD.

[0041] Next, the average frequency value f s Multiplying by the clock offset rate E, we get the frequency offset Δf, and then we can calculate the actual frequency value using the following formula: Among them, f act is the actual frequency value, in Hertz (Hz); f avg is the average frequency value, in Hertz (Hz); Δf is the frequency offset, in Hertz (Hz). It is worth noting that the frequency offset here is in decimal form.

[0042] After that, the actual frequency value f act And the following formula to calculate the phase of the meter: Where A is the phase of the meter, in degrees (°); D is the number of sampling points in one cycle, without units, which can be obtained by directly using corresponding functions through signal processing software (such as MATLAB, Python, etc.) to calculate or view; C is interpolation, without units; C BCIt is the absolute value of the interpolated difference between the B-phase voltage signal and the C-phase voltage signal, without unit; C A is the interpolation of the A-phase voltage signal, without unit; P is the number of target points, without unit; Z1 is the voltage value of the current target point, in volts (V); Z0 is the voltage value of the previous sampling point of the current target point, in volts (V).

[0043] It should be noted that phase interpolation refers to estimating a new phase value between known discrete phase points, that is, estimating a new phase value between sampling points in this scheme, and C in the above formula is the estimated new phase value. In addition, the voltage signal sampled in this scheme is a three-phase AC signal, in which phase A represents the phase that first reaches the positive peak.

[0044] As another option of the embodiment of the present application, obtaining the actual frequency value according to the average frequency value and the clock offset rate includes: Calculate the original frequency value according to the average frequency value, the preset first frequency, the preset number of accumulations and the preset second formula; The original frequency value is corrected based on the clock offset rate and a preset third formula to obtain an actual frequency value.

[0045] Specifically, in the process of obtaining the actual frequency value according to the average frequency value and the clock offset rate, the original frequency value can be calculated by first using the average frequency value, the preset first frequency, the preset number of accumulations, and the following preset second formula: Among them, f avg is the average frequency value, in Hertz (Hz); f s is the preset first frequency, in Hertz (Hz); f' is the original frequency value, in Hertz (Hz); N is the preset cumulative number of times, without unit.

[0046] Next, the original frequency value f' can be corrected according to the clock offset rate and the following preset third formula to obtain the actual frequency value, so as to improve the overall accuracy of the system, ensure the synchronization of the system and reduce the cumulative error: Among them, f act is the actual frequency value, in Hertz (Hz); f' is the original frequency value, in Hertz (Hz); E is the clock offset rate, without unit.

[0047] As another option of the embodiment of the present application, calculating the phase of the electric meter according to the actual frequency value includes: Acquire a first voltage value corresponding to a first sampling point and a second voltage value corresponding to a second sampling point; wherein the first sampling point is any target point, and the second sampling point is a sampling point before the first sampling point; Calculate the phase interpolation initial value according to the first voltage value, the second voltage value, the number of target points and a preset fourth formula; Calculate the phase interpolation theoretical value according to the clock offset rate, the phase interpolation initial value and the preset fifth formula; The phase of the electric meter is obtained according to the actual frequency value and the phase interpolation theoretical value.

[0048] Specifically, in the process of calculating the phase of the electric meter according to the actual frequency value, the first voltage value of the first sampling point and the second voltage value of the second sampling point can be obtained first, wherein the first sampling point is any target point, and the second sampling point is the previous sampling point of the first sampling point, and then the phase interpolation initial value can be calculated according to the first voltage value, the second voltage value, the number of target points and the following preset fourth formula: Among them, C is the initial value of phase interpolation, without unit; P is the number of target points, without unit; Z1 is the voltage value of the current target point, in volts (V); Z0 is the voltage value of the previous sampling point of the current target point, in volts (V).

[0049] Then, the clock offset rate E and the phase interpolation initial value C can be used to calculate A , initial value of phase interpolation C B , initial value of phase interpolation C C And the following preset fifth formula is used to calculate the phase interpolation theoretical value C' A , C' B and C' C : Where E is the clock offset rate, unitless; C' is the phase interpolation theoretical value, unitless; C is the phase interpolation initial value, unitless; C A , C B , C C They represent the initial phase interpolation values ​​of the A phase voltage signal (i.e., the phase that first reaches the positive peak), the B phase voltage signal, and the C phase voltage signal; C' A , C' B , C' C They respectively represent the phase interpolation theoretical values ​​of the A-phase voltage signal, the B-phase voltage signal, and the C-phase voltage signal.

[0050] After that, the phase of the meter can be calculated based on the actual frequency value, the phase interpolation theoretical value, and the following formula: Where A is the phase of the meter, in degrees (°); D is the number of sampling points in one cycle, unitless, and can be obtained by directly using the corresponding function to calculate or view through signal processing software (such as MATLAB, Python, etc.), but not limited to; C is interpolation, unitless; C' BC The absolute value of the difference between the phase interpolation theoretical values ​​of the B-phase voltage signal and the C-phase voltage signal, unitless; C' A It is the theoretical value of phase interpolation of phase A voltage signal and has no unit.

[0051] As another option of the embodiment of the present application, the phase of the electric meter is obtained according to the actual frequency value and the phase interpolation theoretical value, including: Calculate the frequency points according to the actual frequency value, the preset first frequency and the preset sixth formula; The phase of the electric meter is calculated based on the frequency points and the phase interpolation theoretical value.

[0052] Specifically, in the process of obtaining the phase of the electric meter according to the actual frequency value and the phase interpolation theoretical value, the frequency points can be first calculated by the actual frequency value, the preset first frequency and the following preset sixth formula: Where D is the number of sampling points in one cycle, unitless; f act is the actual frequency value, in Hertz (Hz); f s is the sampling frequency value in Hertz (Hz).

[0053] Next, the phase of the meter can be calculated based on the frequency points, the phase interpolation theoretical value, and the following formula: Among them, A is the phase of the meter, in degrees (°); D is the number of sampling points in one cycle, without unit; C is the interpolation, without unit; C' BC The absolute value of the difference between the phase interpolation theoretical values ​​of the B-phase voltage signal and the C-phase voltage signal, unitless; C' A It is the theoretical value of phase interpolation of phase A voltage signal and has no unit.

[0054] As another option of the embodiment of the present application, the phase interpolation theoretical value includes a first phase interpolation theoretical value, a second phase interpolation theoretical value and a third phase interpolation theoretical value; wherein the first phase corresponding to the first phase interpolation theoretical value is the phase that first reaches the positive peak value; The phase of the meter is calculated based on the frequency points and the phase interpolation theoretical value, including: Comparing the first phase interpolation theoretical value, the second phase interpolation theoretical value and the third phase interpolation theoretical value, and determining a phase calculation formula according to the comparison result; The phase of the electric meter is calculated according to the frequency points, the first phase interpolation theoretical value, the second phase interpolation theoretical value, the third phase interpolation theoretical value and the phase calculation formula.

[0055] Specifically, in the process of calculating the phase of the electric meter according to the frequency points and the phase interpolation theoretical value, the phase interpolation theoretical value includes the first phase interpolation theoretical value (i.e., the phase interpolation theoretical value of the A-phase voltage signal), the second phase interpolation theoretical value (i.e., the phase interpolation theoretical value of the B-phase voltage signal) and the third phase interpolation theoretical value (i.e., the phase interpolation theoretical value of the C-phase voltage signal), wherein the first phase corresponding to the first phase interpolation theoretical value is the phase that first reaches the positive peak. Therefore, the first phase interpolation theoretical value, the second phase interpolation theoretical value and the third phase interpolation theoretical value can be compared first, and when the first phase difference theoretical value is not the minimum value among the three, the phase calculation formula is determined as follows: Among them, A is the phase of the meter, in degrees (°); D is the number of sampling points in one cycle, without unit; C is the interpolation, without unit; C' BC The absolute value of the difference between the phase interpolation theoretical values ​​of the B-phase voltage signal and the C-phase voltage signal, unitless; C' A It is the theoretical value of phase interpolation of phase A voltage signal and has no unit.

[0056] At the same time, when the first phase difference theoretical value is the minimum value among the three, the phase calculation formula is determined as follows: Among them, A is the phase of the meter, in degrees (°); D is the number of sampling points in one cycle, without unit; C is the interpolation, without unit; C' BC The absolute value of the difference between the phase interpolation theoretical values ​​of the B-phase voltage signal and the C-phase voltage signal, unitless; C' A It is the theoretical value of phase interpolation of phase A voltage signal and has no unit.

[0057] Next, the phase of the electric meter can be calculated according to the frequency points, the first phase interpolation theoretical value, the second phase interpolation theoretical value, the third phase interpolation theoretical value and the determined phase calculation formula.

[0058] See also Figure 2 , Figure 2 A schematic structural diagram of an electric meter phase calculation device provided in an embodiment of the present application is shown.

[0059] like Figure 2As shown, the calculation device of the electric meter phase may include at least a first processing module 201, a second processing module 202, a third processing module 203 and a fourth processing module 204, wherein: A first processing module 201 is used to mark and sample the voltage signal of the electric meter based on a preset first frequency to obtain at least two sampling points; The second processing module 202 is used to perform positive zero-crossing point judgment on all sampling points, and take the sampling points that meet the positive zero-crossing point judgment conditions as target points; The third processing module 203 is used to calculate a frequency measurement value based on a preset first frequency and the number of sampling points between two adjacent target points, and calculate an average frequency value according to the frequency measurement value; The fourth processing module 204 is used to read all index values ​​in the target register and calculate the phase of the electric meter according to all index values ​​and the average frequency value; wherein the target memory includes at least two index values ​​corresponding to the sampling points.

[0060] In some possible embodiments, calculating a frequency measurement value based on a preset first frequency and the number of sampling points between two adjacent target points, and calculating an average frequency value based on the frequency measurement value includes: The third processing module 203 is specifically used for: Grouping all sampling points based on a preset second frequency to obtain at least two target groups; Calculate a frequency measurement value according to the counted number of sampling points between two adjacent target points in each target group and a preset first frequency; The average frequency value is calculated according to the frequency measurement value and the preset accumulation times; wherein the preset accumulation times is determined by the calculation amount and accuracy of at least two experiments.

[0061] In some possible embodiments, reading all index values ​​in the target register and calculating the phase of the electric meter according to all index values ​​and the average frequency value includes: The fourth processing module 204 is specifically used for: Read all index values ​​in the target register, and calculate the clock offset rate according to all index values, a preset baud rate and a preset first formula; The actual frequency value is obtained according to the average frequency value and the clock offset rate, and the phase of the electric meter is calculated according to the actual frequency value.

[0062] In some possible embodiments, obtaining the actual frequency value according to the average frequency value and the clock offset rate includes: The fourth processing module 204 is specifically used for: Calculate the original frequency value according to the average frequency value, the preset first frequency, the preset number of accumulations and the preset second formula; The original frequency value is corrected based on the clock offset rate and a preset third formula to obtain an actual frequency value.

[0063] In some possible embodiments, calculating the phase of the electric meter according to the actual frequency value includes: The fourth processing module 204 is specifically used for: Acquire a first voltage value corresponding to a first sampling point and a second voltage value corresponding to a second sampling point; wherein the first sampling point is any target point, and the second sampling point is a sampling point before the first sampling point; Calculate the phase interpolation initial value according to the first voltage value, the second voltage value, the number of target points and a preset fourth formula; Calculate the phase interpolation theoretical value according to the clock offset rate, the phase interpolation initial value and the preset fifth formula; The phase of the electric meter is obtained according to the actual frequency value and the phase interpolation theoretical value.

[0064] In some possible embodiments, obtaining the phase of the electric meter according to the actual frequency value and the phase interpolation theoretical value includes: The fourth processing module 204 is specifically used for: Calculate the frequency points according to the actual frequency value, the preset first frequency and the preset sixth formula; The phase of the electric meter is calculated based on the frequency points and the phase interpolation theoretical value.

[0065] In some possible embodiments, the phase interpolation theoretical value includes a first phase interpolation theoretical value, a second phase interpolation theoretical value, and a third phase interpolation theoretical value; wherein the first phase corresponding to the first phase interpolation theoretical value is the phase that first reaches the positive peak value; The phase of the meter is calculated based on the frequency points and the phase interpolation theoretical value, including: The fourth processing module 204 is specifically used for: Comparing the first phase interpolation theoretical value, the second phase interpolation theoretical value and the third phase interpolation theoretical value, and determining a phase calculation formula according to the comparison result; The phase of the electric meter is calculated according to the frequency points, the first phase interpolation theoretical value, the second phase interpolation theoretical value, the third phase interpolation theoretical value and the phase calculation formula.

[0066] See also Figure 3 , Figure 3 A schematic structural diagram of another device for calculating the phase of an electric meter provided in an embodiment of the present application is shown.

[0067] like Figure 3 As shown, the meter phase calculation device 300 may include at least one processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 and at least one communication bus 302 .

[0068] The communication bus 302 may be used to realize the connection and communication among the above-mentioned components.

[0069] The user interface 303 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.

[0070] The network interface 304 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.

[0071] Among them, the processor 301 may include one or more processing cores. The processor 301 uses various interfaces and lines to connect the various parts of the entire meter phase calculation device 300, and executes various functions and processes data of the meter phase calculation device 300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the processor 301 can be implemented in at least one hardware form of DSP, FPGA, and PLA. The processor 301 can integrate one or a combination of CPU, GPU, modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 301, and it can be implemented separately through a chip.

[0072] The memory 305 may include a RAM or a ROM. Optionally, the memory 305 includes a non-transitory computer-readable medium. The memory 305 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may optionally be at least one storage device located away from the aforementioned processor 301. As Figure 3 As shown, the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program for calculating the phase of an electric meter.

[0073] Specifically, the processor 301 may be used to call the meter phase calculation application stored in the memory 305, and specifically perform the following operations: Marking and sampling the voltage signal of the electric meter based on a preset first frequency to obtain at least two sampling points; Perform positive zero-crossing point judgment on all sampling points, and take the sampling points that meet the positive zero-crossing point judgment conditions as target points; Calculating a frequency measurement value based on a preset first frequency and the number of sampling points between two adjacent target points, and calculating an average frequency value based on the frequency measurement value; All index values ​​in the target register are read, and the phase of the electric meter is calculated according to all index values ​​and the average frequency value; wherein the target memory includes at least two index values ​​corresponding to the sampling points.

[0074] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0075] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0076] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0077] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0078] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0079] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0080] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.

[0081] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct related hardware. The program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0082] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A method for calculating the phase of an electric meter, characterized in that: include: Marking and sampling the voltage signal of the electric meter based on a preset first frequency to obtain at least two sampling points; Performing positive zero-crossing point judgment on all sampling points, and taking the sampling points that meet the conditions of the positive zero-crossing point judgment as target points; Calculating a frequency measurement value based on the preset first frequency and the number of the sampling points between two adjacent target points, and calculating an average frequency value based on the frequency measurement value; All index values ​​in the target register are read, and the phase of the electric meter is calculated according to all the index values ​​and the average frequency value; wherein the target memory includes at least two index values ​​corresponding to the sampling points.

2. The method according to claim 1, characterized in that The calculating the frequency measurement value based on the preset first frequency and the number of the sampling points between two adjacent target points, and calculating the average frequency value according to the frequency measurement value, includes: Grouping all the sampling points based on a preset second frequency to obtain at least two target groups; Calculating a frequency measurement value according to the counted number of sampling points between two adjacent target points in each target group and the preset first frequency; An average frequency value is calculated according to the frequency measurement value and a preset number of accumulations; wherein the preset number of accumulations is determined by the calculation amount and accuracy of at least two experiments.

3. The method according to claim 2, characterized in that The step of reading all index values ​​in the target register and calculating the phase of the electric meter according to all the index values ​​and the average frequency value includes: Reading all index values ​​in the target register, and calculating the clock offset rate according to all the index values, a preset baud rate and a preset first formula; An actual frequency value is obtained according to the average frequency value and the clock offset rate, and a phase of the electric meter is calculated according to the actual frequency value.

4. The method according to claim 3, characterized in that: The obtaining the actual frequency value according to the average frequency value and the clock offset rate includes: Calculating an original frequency value according to the average frequency value, the preset first frequency, the preset number of accumulations, and a preset second formula; The original frequency value is corrected based on the clock offset rate and a preset third formula to obtain an actual frequency value.

5. The method according to claim 3, characterized in that: The step of calculating the phase of the electric meter according to the actual frequency value comprises: Acquire a first voltage value corresponding to a first sampling point and a second voltage value corresponding to a second sampling point; wherein the first sampling point is any of the target points, and the second sampling point is a sampling point before the first sampling point; Calculating a phase interpolation initial value according to the first voltage value, the second voltage value, the number of target points and a preset fourth formula; Calculating a phase interpolation theoretical value according to the clock offset rate, the phase interpolation initial value and a preset fifth formula; The phase of the electric meter is obtained according to the actual frequency value and the phase interpolation theoretical value.

6. The method according to claim 5, characterized in that Obtaining the phase of the electric meter according to the actual frequency value and the phase interpolation theoretical value includes: Calculating the frequency points according to the actual frequency value, the preset first frequency and a preset sixth formula; The phase of the electric meter is calculated according to the frequency points and the phase interpolation theoretical value.

7. The method according to claim 6, characterized in that The phase interpolation theoretical value includes a first phase interpolation theoretical value, a second phase interpolation theoretical value and a third phase interpolation theoretical value; wherein the first phase corresponding to the first phase interpolation theoretical value is the phase that first reaches the forward peak value; The step of calculating the phase of the electric meter according to the frequency points and the phase interpolation theoretical value includes: Comparing the first phase interpolation theoretical value, the second phase interpolation theoretical value and the third phase interpolation theoretical value, and determining a phase calculation formula according to the comparison result; The phase of the electric meter is calculated according to the frequency point number, the first phase interpolation theoretical value, the second phase interpolation theoretical value, the third phase interpolation theoretical value and the phase calculation formula.

8. A device for calculating the phase of an electric meter, characterized in that: include: A first processing module, configured to perform mark sampling on a voltage signal of the electric meter based on a preset first frequency to obtain at least two sampling points; A second processing module is used to perform positive zero-crossing point judgment on all sampling points, and take the sampling points that meet the conditions of the positive zero-crossing point judgment as target points; A third processing module, configured to calculate a frequency measurement value based on the preset first frequency and the number of the sampling points between two adjacent target points, and calculate an average frequency value according to the frequency measurement value; The fourth processing module is used to read all index values ​​in the target register and calculate the phase of the electric meter according to all the index values ​​and the average frequency value; wherein the target memory includes at least two index values ​​corresponding to the sampling points.

9. A device for calculating the phase of an electric meter, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the steps of the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Demand determination method and device of electric energy meter, readable storage medium and electric energy meter

    CN120507709A