Method for calculating voltage included angle and zero line current and three-phase electric energy meter

文档序号:1503535 发布日期:2020-02-07 浏览:15次 中文

阅读说明:本技术 电压夹角、零线电流的计算方法及三相电能表 (Method for calculating voltage included angle and zero line current and three-phase electric energy meter ) 是由 何闯 黄成� 王慧 王凯翔 孟令琪 于 2019-11-16 设计创作,主要内容包括:本发明公开了一种电压夹角、零线电流的计算方法及三相电能表。其中,电压夹角的计算方法包括:采集A相、B相以及C相的正向过零信号;在产品生产阶段通过标准信号源获取校正系数;在预设定时器内,分别记录在检测到A相正向过零信号后到B相和C相正向过零发生时,定时器中断次数;通过定时器中断次数计算B相和C相正向过零信号与A相正向过零信号之间的时间间隔;根据所述预设时间周期长度以及所述B相和C相正向过零信号与A相正向过零信号之间的时间间隔,分别计算B相和C相与A相之间的电压夹角。(The invention discloses a method for calculating a voltage included angle and zero line current and a three-phase electric energy meter. The calculation method of the voltage included angle comprises the following steps: collecting forward zero-crossing signals of an A phase, a B phase and a C phase; acquiring a correction coefficient through a standard signal source in a product production stage; in a preset timer, respectively recording the interruption times of the timer after detecting the A-phase positive zero-crossing signal until the B-phase positive zero-crossing and the C-phase positive zero-crossing occur; calculating the time interval between the B-phase and C-phase positive zero-crossing signals and the A-phase positive zero-crossing signal through the interruption times of the timer; and respectively calculating voltage included angles between the phase B and the phase C and the phase A according to the preset time period length and the time intervals between the phase B and the phase C positive zero-crossing signals and the phase A positive zero-crossing signals.)

1. A method for calculating a voltage included angle is characterized by comprising the following steps:

collecting forward zero-crossing signals of an A phase, a B phase and a C phase;

in a preset timer, respectively recording the interruption times of the timer after the A-phase positive zero-crossing signal is detected and when the B-phase positive zero-crossing signal and the C-phase positive zero-crossing signal occur;

calculating time intervals between the B-phase and C-phase positive zero-crossing signals and the A-phase positive zero-crossing signal;

and respectively calculating voltage included angles between the phase B and the phase C and the phase A according to the time intervals between the phase B and the phase C positive zero-crossing signals and the phase A positive zero-crossing signals.

2. The computing method of claim 1, wherein the method further comprises:

the collected forward zero-crossing signals of the A phase, the B phase and the C phase are calibrated by acquiring a correction coefficient of a voltage included angle through a standard signal source in a product production stage.

3. The calculation method according to claim 2, wherein the obtaining of the correction coefficient of the voltage included angle by the standard signal source in the production stage of the product specifically includes:

taking the phase A signal as a correction reference, and respectively recording the interruption times of the timer after detecting the phase A positive zero-crossing signal and when the phase B and phase C positive zero-crossing occurs in a preset timer;

recording the current interruption times as first interruption times after receiving a forward zero-crossing interruption signal of a phase B;

recording the current interruption frequency as a second interruption frequency after receiving the forward zero-crossing interruption signal of the C phase;

calculating a signal correction coefficient of the B phase according to the first interruption times, and

and calculating the signal correction coefficient of the C phase according to the second interruption times.

4. The method according to claim 3, wherein calculating the signal correction coefficient of the B phase according to the first interruption number specifically includes:

calculating a signal correction coefficient of the B phase by the following equation:

Figure FDA0002275974360000011

wherein Freq is a power grid frequency, T1 is the preset time period, Cnt1 is the first interruption frequency, and Eb is the signal correction coefficient of the B phase.

5. The method according to claim 3, wherein calculating the signal correction coefficient of the C phase according to the second interruption number specifically includes:

calculating a signal correction coefficient of the C phase by the following equation:

Figure FDA0002275974360000021

wherein Freq is a power grid frequency, T1 is the preset time period, Cnt2 is the second interruption frequency, and Ec is the signal correction coefficient of the C phase.

6. The calculation method according to claim 2, wherein calculating the time interval between the B-phase and C-phase positive zero-crossing signals and the a-phase positive zero-crossing signal specifically comprises:

when detecting the forward zero-crossing interruption of the phase A, starting a preset timer;

and recording the interrupt occurrence frequency of a preset timer as a first interrupt frequency when the positive zero-crossing signal of the B phase occurs. And recording the interrupt occurrence frequency of a preset timer as a second interrupt frequency when the forward zero-crossing signal of the C phase occurs.

7. The calculation method according to claim 6, wherein the voltage included angle between the A phase and the B phase is calculated by the following equation:

φab=Freq×T1×Cnt1×Eb×360

wherein Freq is a power grid frequency, T1 is the preset timer period, Cnt1 is the first interruption frequency, and Eb is a zero-crossing signal correction coefficient of a B phase.

8. The calculation method according to claim 6, wherein the voltage included angle between the A phase and the C phase is calculated by the following equation:

Φac=Freq×T1×Cnt2×Ec×360

wherein Freq is a power grid frequency, T1 is the preset timer period, Cnt2 is the second interruption frequency, and Ec is a zero-crossing signal correction coefficient of the C phase.

9. A method of calculating a neutral current, the method comprising:

plotting phasor diagrams of the a-, B-and C-phase voltages and currents based on the included voltage angle, the phase angle between each phase voltage and current and each phase current calculated according to any of claims 1-8;

and calculating to obtain the current of the zero line according to the phasor diagram.

10. A three-phase electric energy meter, characterized in that the three-phase electric energy meter calculates and obtains the voltage included angle between the a phase, the B phase and the C phase and the zero line current by applying the calculation method according to any one of claims 1 to 9.

Technical Field

The invention relates to the technical field of electric energy meters, in particular to a method for calculating a voltage included angle and zero line current and a three-phase electric energy meter.

Background

Aiming at the increasing functions of the current electric meter, but the cost pressure is higher and higher, the current sampling device is gradually replaced by a manganese-copper shunt in the design of the three-phase electric energy meter. However, the use of the manganin shunt makes the expensive three-phase metering chip useless and starts to be replaced by the cheap three single-phase metering chips.

Although the cost of the whole electric energy meter can be greatly reduced by the mode, the direct reading function cannot be realized after the design of the three single-phase metering chips is changed. In summary, in the current method for measuring the voltage included angle and the zero line current, if a three-phase metering chip is directly adopted, an electric meter MCU (microprogrammed control Unit) directly reads from the chip; corresponding data can be accurately obtained, but the defects of high scheme cost and no market competitiveness exist.

And the MCU reads the value in the cache of each single-phase metering chip through a serial port, and then calculates the voltage included angle through a corresponding formula.

However, when the technical scheme is adopted, the communication between the MCU and the plurality of single-phase metering chips is based on the UART communication mode, and the communication rate is low, which is between 1200 and 4800bps, if the above-mentioned broadcast command and the acquisition of the original data of the voltage included angle are added to the channel, the power metering performance is affected to a certain extent. Moreover, the technical scheme highly depends on that the single-phase metering chip has the function of broadcasting the command freezing zero-crossing timing, but many single-phase metering chips do not have the function.

Disclosure of Invention

The invention aims to provide a method for calculating a voltage included angle and zero line current and a three-phase electric energy meter, which can solve one or more problems of the voltage included angle and the zero line current in the prior art.

In a first aspect, an embodiment of the present invention provides a method for calculating a voltage included angle. The calculation method comprises the following steps:

collecting forward zero-crossing signals of an A phase, a B phase and a C phase; in a preset timer, respectively recording the interruption times of the timer after detecting the A-phase positive zero-crossing signal until the B-phase positive zero-crossing and the C-phase positive zero-crossing occur; calculating time intervals between the B-phase and C-phase positive zero-crossing signals and the A-phase positive zero-crossing signal; and respectively calculating voltage included angles between the phase B and the phase C and the phase A according to the time intervals between the phase B and the phase C positive zero-crossing signals and the phase A positive zero-crossing signals.

Further, the method further comprises: the collected forward zero-crossing signals of the A phase, the B phase and the C phase are calibrated by acquiring a correction coefficient of a voltage included angle through a standard signal source in a product production stage.

Further, the method for obtaining the correction coefficient of the voltage included angle through the standard signal source in the production stage of the product specifically comprises the following steps:

taking the phase A signal as a correction reference, after receiving the phase A forward zero-crossing interrupt signal, respectively recording the interrupt times of the timer after detecting the phase A forward zero-crossing signal and when the phase B and phase C forward zero-crossing occurs in the preset timer;

recording the current interruption frequency of a timer as a first interruption frequency after receiving a forward zero-crossing interruption signal of a phase B;

recording the current interruption frequency of the timer as a second interruption frequency after receiving a forward zero-crossing interruption signal of the phase C;

calculating a signal correction coefficient of the B phase according to the first interruption times, and

and calculating the signal correction coefficient of the C phase according to the second interruption times.

Further, calculating the signal correction coefficient of the B phase according to the first interruption number, specifically including:

calculating a signal correction coefficient of the B phase by the following equation:

Figure BDA0002275974370000021

wherein Freq is a power grid frequency, T1 is the preset timer period, Cnt1 is the first interruption frequency, and Eb is the zero-crossing signal correction coefficient of the B phase.

Further, calculating the signal correction coefficient of the C phase according to the second interruption frequency specifically includes:

calculating a signal correction coefficient of the C phase by the following equation:

Figure BDA0002275974370000031

wherein Freq is a power grid frequency, T1 is the preset timer period, Cnt2 is the second interruption frequency, and Ec is the zero-crossing signal correction coefficient of the C phase.

Further, calculating the time interval between the phase B and phase C positive zero-crossing signals and the phase a positive zero-crossing signal specifically includes:

when detecting the forward zero-crossing interruption of the phase A, starting a preset timer;

and recording the interrupt occurrence frequency of a preset timer as a first interrupt frequency when the positive zero-crossing signal of the B phase occurs. And recording the interrupt occurrence frequency of a preset timer as a second interrupt frequency when the forward zero-crossing signal of the C phase occurs.

Further, the voltage included angle between the phase A and the phase B is calculated by the following equation:

φab=Freq×T1×Cnt1×Eb×360

wherein Freq is a power grid frequency, T1 is the preset timer period, Cnt1 is the first interruption frequency, and Eb is a zero-crossing signal correction coefficient of a B phase.

Further, the voltage included angle between the phase A and the phase C is calculated by the following equation:

φac=Freq×T1×Cnt2×Ec×360

wherein Freq is a power grid frequency, T1 is the preset timer period, Cnt2 is the second interruption frequency, and Ec is a zero-crossing signal correction coefficient of the C phase.

In a second aspect, the embodiment of the invention further provides a method for calculating the zero line current. The calculation method comprises the following steps:

drawing phasor graphs of the phase voltage and the current of the phase A, the phase B and the phase C based on the voltage included angle, the phase angle between the phase voltage and the current of each phase and the phase current of each phase which are obtained by calculation by the calculation method;

and calculating to obtain the current of the zero line according to the phasor diagram.

In a third aspect, an embodiment of the present invention further provides a three-phase electric energy meter. The three-phase electric energy meter calculates and obtains the voltage included angle and the zero line current among the phase A, the phase B and the phase C by applying the calculation method.

The calculation method provided by the embodiment of the invention can obtain higher calculation precision of the voltage included angle and the zero line current, and can further provide a voltage included angle calibration function. The accuracy of the calculation result is far higher than that of a low-cost scheme, and is close to that of a high-cost three-phase chip direct reading scheme.

In addition, the method can also be completed by using a single-phase metering chip, has low overall cost and high universality, can be used in any MCU and metering chip platform, and has good application prospect.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a schematic diagram of a voltage angle calculation method according to an embodiment of the present invention.

Fig. 2 is a schematic diagram of a typical zero crossing detection circuit.

Fig. 3 is a schematic diagram of a sampling signal calibration method according to an embodiment of the present invention.

Fig. 4 is a schematic diagram of a method for calculating a neutral current according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

Referring to fig. 1, fig. 1 is a method for calculating a voltage angle according to an embodiment of the invention. The calculation method comprises the following steps:

s100, collecting forward zero-crossing signals of the A phase, the B phase and the C phase.

The zero-crossing signal is a signal at a time when the amplitude of the ac signal is zero (positive-negative conversion). Any type of zero-crossing detection circuit can be specifically used to realize the acquisition of the positive zero-crossing signal, and is not limited to the detection circuit shown in fig. 2. Fig. 2 is a typical single-phase zero-crossing signal detection circuit.

As shown in fig. 2, the voltage between the phase line and the zero line is a power frequency alternating current, and the waveform is a sine wave. Therefore, when the forward voltage applied between the 1 st pin and the 2 nd pin of the photocoupler P1 is higher than a certain voltage, a falling edge is generated at the BREAK port, and the MCU is lifted up and interrupted.

Such an interrupt indicates the presence of a positive zero crossing signal. In this embodiment, the use of a positive zero crossing signal or a positive zero crossing interrupt may be used to denote the same.

S200, recording the interruption times of the timer in a preset timer respectively after the A-phase positive zero-crossing signal is detected and when B-phase positive zero-crossing and C-phase positive zero-crossing occur.

The preset timer can be set according to actual conditions. A timer interrupt may be provided within the chip. And starting to count when the first positive zero-crossing interruption is detected, and starting to record the interruption times of the timer.

And S300, calculating the time interval between the B-phase and C-phase positive zero-crossing signals and the A-phase positive zero-crossing signal.

And S400, respectively calculating voltage included angles between the phase B and the phase C and the phase A according to the time intervals between the phase B and the phase C positive direction zero-crossing signals and the phase A positive direction zero-crossing signals.

In the practical application process, deviation and accuracy reduction caused by various influencing factors always exist. One factor is that the characteristics of electronic components are always discrete and there are errors between individuals. For example, in the detection circuit shown in fig. 2, R1, R2, and R3 are resistors with a conventional accuracy of 1%, the conduction voltages and amplification factors of each device of the P1 photocoupler are different, and the like, which all result in that different components are mounted on the same 1 circuit, the obtained zero-crossing interruption times are different, which may cause measurement errors, and the reference value of the timer for calculating the voltage included angle by the MCU of the electric meter comes from the crystal oscillator, and the crystal oscillator also has frequency deviation.

The effect of these two aspects can result in voltage angle errors of up to 5 ° and even higher, and in some cases the zero line current error thus calculated can exceed 6% or more.

Preferably, in order to overcome the influence of the two aspects and obtain a high-precision voltage included angle and zero line current, in the production stage of a product, a standard three-phase power frequency voltage current source can be connected to the three-phase electric energy meter, and after data is collected, the calculated voltage included angle is compared with the standard three-phase power frequency voltage included angle to calculate and obtain a corresponding correction coefficient.

Since the voltage included angle is a relative value and not an absolute value, the a-phase sampling signal can be used as a reference without performing corresponding calibration in any case.

In the actual calibration process, after the electric energy meter receives a metering error calibration instruction, the electric energy meter firstly calibrates the metering error, then suspends the forward zero-crossing interrupt detection of the ABC three phases, suspends the Tmr1 timing interrupt participating in the voltage included angle calculation, suspends the voltage included angle and zero line current calculation, and then starts to automatically run the voltage forward zero-crossing interrupt sampling signal calibration process.

As shown in fig. 3, the specific sampling signal calibration process is as follows:

and S210, taking the phase A signal as a correction reference, and starting a preset timer after receiving the positive zero-crossing interrupt signal of the phase A.

And S220, recording the current timer interrupt frequency as a first interrupt frequency after receiving the forward zero-crossing interrupt signal of the B phase.

And S230, recording the current timer interrupt frequency as a second interrupt frequency after receiving the forward zero-crossing interrupt signal of the C phase.

The first interruption count and the second interruption count may be buffered in Cnt1 and Cnt2, respectively, as basic operation data to perform a calibration process of the power meter.

And S240, calculating the signal correction coefficient of the B phase according to the first interruption times.

And S250, calculating the signal correction coefficient of the C phase according to the second interruption times.

In some embodiments, the signal correction coefficients for the B-phase and the C-phase may be obtained by calculation as follows:

Figure BDA0002275974370000061

wherein Freq is a power grid frequency, T1 is the preset timer period, Cnt1 is the first interruption frequency, and Eb is the signal correction coefficient of the B phase.

Calculating a signal correction coefficient of the C phase by the following equation:

Figure BDA0002275974370000062

wherein Freq is a power grid frequency (50Hz), T1 is the preset timer period, Cnt2 is the second interruption frequency, and Ec is the signal correction coefficient of the C phase.

The two signal correction coefficients obtained by calculation can be recorded and stored in a corresponding nonvolatile memory (such as EERPOM) and provided for subsequent calculation process calls.

The calibration step provided by the embodiment of the invention does not need to additionally increase the production process of the product and does not increase the complexity of certain process. The method can complete initialization under high-precision signals output by a three-phase electric energy meter calibration stand. The whole calibration process is embedded in the error calibration process of the electric energy meter, and the method can be completed by calling a corresponding computer program in the electric energy meter by self without the intervention of production workers and executing the algorithm steps.

In some embodiments, calculating the time interval between the phase B and phase C positive zero crossing signals and the phase a positive zero crossing signal specifically includes:

first, a preset timer is started when detecting a positive zero crossing interruption of the a-phase. The time interval between two phase signals is represented by the number of interrupts of the timer:

and recording the current timer interruption times as first interruption times when the forward zero-crossing signal of the phase B occurs, and recording the current timer interruption times as second interruption times when the forward zero-crossing signal of the phase C occurs.

Specifically, the voltage included angle between the phase a and the phase B is calculated by the following equation (3):

φab=Freq×T1×Cnt1×Eb×360 (3)

wherein Freq is a power grid frequency, T1 is the preset timer period, Cnt1 is the first interruption frequency, and Eb is a zero-crossing signal correction coefficient of a B phase.

Further, the voltage included angle between the phase a and the phase C is calculated by the following equation (4):

φac=Freq×T1×Cnt2×Ec×360 (4)

wherein Freq is a power grid frequency, T1 is the preset timer period, Cnt2 is the second interruption frequency, and Ec is a zero-crossing signal correction coefficient of the C phase.

The calculation principle of equations (3) and (4) above is: in a standard power frequency period of (1/Freq), i.e. 20ms, the corresponding angle is 360 °. Therefore, the time intervals of the B-phase and C-phase positive zero-crossing interruption and the A-phase positive zero-crossing interruption are multiplied by respective sampling signal correction coefficients, and then the accurate voltage included angle between B, C phase and A phase is obtained.

The voltage included angle obtained by calculation can be further used for calculating the current of the zero line. Fig. 4 is a method for calculating a neutral current according to an embodiment of the present invention. Fig. 4 differs from fig. 1 in that the following steps are also included:

and S500, drawing phasor graphs of the A-phase, the B-phase and the C-phase voltages and currents based on the voltage included angle, the phase angle between each phase voltage and current and each phase current which are obtained through calculation by the calculation method.

And S600, calculating to obtain the current of the zero line according to the phasor diagram.

And each single-phase metering chip can acquire and obtain the phase angle between the voltage and the current of each phase and the current magnitude of each phase. The voltage included angle calculated in step S300 is combined with the voltage included angle to draw a phasor diagram of the three-phase voltage and the three-phase current.

After the phasor diagram is obtained, A, B on the X-axis and the C-phase current component are added to obtain Inx and A, B on the Y-axis and the C-phase current component is added to obtain Iny by decomposing each phase of current into two components on the X-axis and the Y-axis, respectively projected onto the X-axis and the Y-axis.

According to the law that the sum of the phasors of A, B, C phase current and zero line current in a three-phase system is always zero, the zero line current can be obtained by calculating the following equation (5):

In=sqrt(Inx 2+Iny 2) (5)

the embodiment of the invention also provides a three-phase electric energy meter. The three-phase electric energy meter can calculate and obtain the voltage included angle and zero line current among the A phase, the B phase and the C phase by applying the calculation method, has the requirements of low cost and high precision, and has good application prospect.

The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The use of the phrase "including a" does not exclude the presence of other, identical elements in a process, method, article, or apparatus that comprises the same element, unless the context clearly dictates otherwise.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种带电作业绝缘裤的绝缘检测装置及其检测方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!