Method and device for calculating effective value of Alternating Current (AC) quantity, computer equipment and storage medium

文档序号:1446260 发布日期:2020-02-18 浏览:26次 中文

阅读说明:本技术 交流量有效值计算方法、装置、计算机设备及存储介质 (Method and device for calculating effective value of Alternating Current (AC) quantity, computer equipment and storage medium ) 是由 袁俊波 刘真 秦鹏 荣洪凯 郭耀 于 2019-11-19 设计创作,主要内容包括:本发明实施例公开了一种交流量有效值计算方法、装置、计算机设备及存储介质。所述方法包括:在一个交流电的周期内,通过采样电路以设定采样频率对目标电路中的交流量进行采样,得到交流量采样值,其中,所述采样频率与所述交流电的频率的比值为整数;计算全部交流量采样值之和,作为交流量有效值。本发明实施例可以提高交流量有效值的计算效率,同时减少计算交流量有效值所需的占用空间。(The embodiment of the invention discloses a method and a device for calculating an effective value of an Alternating Current (AC) quantity, computer equipment and a storage medium. The method comprises the following steps: sampling an alternating current quantity in a target circuit by a sampling circuit at a set sampling frequency in a period of alternating current to obtain an alternating current quantity sampling value, wherein the ratio of the sampling frequency to the frequency of the alternating current is an integer; and calculating the sum of all the sampling values of the alternating current quantity as an effective value of the alternating current quantity. The embodiment of the invention can improve the calculation efficiency of the effective value of the alternating current quantity and reduce the occupied space required by calculating the effective value of the alternating current quantity.)

1. An effective value calculation method for an alternating current quantity, comprising:

sampling an alternating current quantity in a target circuit by a sampling circuit at a set sampling frequency in a period of alternating current to obtain an alternating current quantity sampling value, wherein the ratio of the sampling frequency to the frequency of the alternating current is an integer;

and calculating the sum of all the sampling values of the alternating current quantity as an effective value of the alternating current quantity.

2. The method of claim 1, wherein calculating the sum of all ac traffic samples comprises:

carrying out error correction on each alternating current sampling value;

and calculating the sum of all the corrected sampling values of the alternating current quantity.

3. The method of claim 2, wherein the error correcting the ac traffic sample value comprises:

sampling the target circuit under a passive condition by the sampling circuit at the sampling frequency to obtain an alternating current offset value;

and taking the difference value of the alternating current quantity sampling value and the alternating current quantity offset value as the corrected alternating current quantity sampling value.

4. The method of claim 1, wherein calculating the sum of all ac traffic samples comprises:

and calculating the sum of the absolute values of the sampled values of the alternating current.

5. The method according to claim 1, wherein the calculating the sum of all the sampled values of the alternating current quantity as the effective value of the alternating current quantity comprises:

and calculating the product of the amplification factor of the amplification circuit connected with the target circuit and the sum of all the alternating current value sampling values to obtain an alternating current value effective value.

6. The method according to claim 1, wherein the calculating the sum of all the sampled values of the alternating current quantity as the effective value of the alternating current quantity comprises:

when the power supply is a single-phase alternating current power supply, the calculated effective value of the alternating current quantity is used as a target effective value of the alternating current quantity of the single-phase power supply;

when the power supply is a three-phase alternating current power supply, if the three-phase alternating current power supply is determined to meet the balance condition, the calculated effective value of the alternating current quantity is used as the effective value of the target alternating current quantity of the three-phase power supply, wherein the alternating current quantity comprises line voltage and/or phase current.

7. The method of claim 6, wherein the determining that the three-phase AC power source satisfies a balance condition comprises:

respectively calculating effective values of voltage and phase current of at least two lines of wires;

and if the difference between the ratio of the line voltage effective values among all the lines and the ratio of the matched phase current effective values is smaller than a set ratio threshold value according to the at least two line voltage effective values and the phase current effective values, determining that the three-phase alternating-current power supply meets the balance condition.

8. An effective value calculation device for an alternating current amount, comprising:

the alternating current sampling module is used for sampling the alternating current in a target circuit by a sampling circuit at a set sampling frequency in an alternating current period to obtain an alternating current sampling value, wherein the ratio of the sampling frequency to the alternating current frequency is an integer;

and the alternating current quantity effective value calculating module is used for calculating the sum of all the alternating current quantity sampling values as the alternating current quantity effective value.

9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for calculating a root mean square value of an alternating current according to any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the effective value calculation method for an alternating current quantity according to any one of claims 1 to 7.

Technical Field

The embodiment of the invention relates to the field of power electronic control, in particular to a method and a device for calculating an effective value of an Alternating Current (AC) quantity, computer equipment and a storage medium.

Background

In an alternating current system, it is necessary to obtain an input voltage and/or an input current, and an output voltage and/or an output current, in order to analyze the performance of the devices in the system.

In general, in an alternating current system, the values of the input voltage and/or the input current, and of the output voltage and/or the output current are in fact significant values. For example, in a three-phase alternating current system, which is a power system composed of three alternating current circuits having the same frequency, the same potential amplitude, and the phase difference of 120 ° from each other. The effective value calculation method specifically comprises the following steps: firstly, 3s/2s coordinate transformation is carried out on the sampling value of the three-phase intersection flow to obtain two alternating current components under a two-phase coordinate system, and then the square sum and root formation are carried out on the two alternating current components to obtain the effective value of the three-phase alternating current component. For another example, the calculation method for the single-intersection effective value is as follows: a sine and cosine table of sampling times in an alternating current quantity period is prestored, and then a single-phase intersection flow effective value is calculated by utilizing a DFT formula (performing square sum and root opening on the sum of the real part and the imaginary part).

The calculation of the effective value of the alternating current quantity relates to multiple times of multiplication and division and root sign operation, and particularly when the effective value of the single-phase alternating current quantity is calculated, a sine and cosine table needs to be prestored, and the calculation precision of the effective value depends on the numerical value precision in the sine and cosine table, and generally, the higher the precision of the stored numerical value is, the more the stored numerical values are, and the larger the occupied storage space is. The existing method for calculating the effective value of the alternating current has the disadvantages of large calculation amount, large occupied storage space and reduced calculation efficiency of the effective value, and in order to ensure the calculation efficiency of the effective value, the performance of a CPU (Central processing Unit) needs to be improved, so that the cost of the frequency converter is increased.

Disclosure of Invention

Embodiments of the present invention provide a method and an apparatus for calculating an effective value of an alternating current amount, a computer device, and a storage medium, which can improve the calculation efficiency of the effective value of the alternating current amount and reduce the occupied space required for calculating the effective value of the alternating current amount.

In a first aspect, an embodiment of the present invention provides a method for calculating an effective value of an alternating current quantity, including:

sampling an alternating current quantity in a target circuit by a sampling circuit at a set sampling frequency in a period of alternating current to obtain an alternating current quantity sampling value, wherein the ratio of the sampling frequency to the frequency of the alternating current is an integer;

and calculating the sum of all the sampling values of the alternating current quantity as an effective value of the alternating current quantity.

In a second aspect, an embodiment of the present invention further provides an apparatus for calculating an effective value of an alternating current quantity, including:

the alternating current sampling module is used for sampling the alternating current in a target circuit by a sampling circuit at a set sampling frequency in an alternating current period to obtain an alternating current sampling value, wherein the ratio of the sampling frequency to the alternating current frequency is an integer;

and the alternating current quantity effective value calculating module is used for calculating the sum of all the alternating current quantity sampling values as the alternating current quantity effective value.

In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for calculating an effective value of an alternating current amount according to any one of the embodiments of the present invention when executing the computer program.

In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the effective value calculation method for the alternating current quantity according to any one of the embodiments of the present invention.

The embodiment of the invention samples the alternating current quantity of the target circuit in an alternating current period to obtain a plurality of alternating current quantity sampling values and accumulates the alternating current quantity sampling values to obtain the alternating current quantity effective value, converts the calculation of the effective value into a large number of addition calculations, effectively reduces the number of root and multiplication-division calculations, solves the problems that in the prior art, the calculation method needs to carry out multiplication-division and root calculation for many times, and the calculation method of the effective value of a sine-cosine table occupying a large amount of storage space has low efficiency, improves the calculation efficiency of the effective value, and reduces the calculation cost of the effective value.

Drawings

Fig. 1 is a flowchart of a method for calculating an effective value of an alternating current quantity according to a first embodiment of the present invention;

fig. 2a is a flowchart of a method for calculating an effective value of an alternating current quantity according to a second embodiment of the present invention;

fig. 2b is a flowchart of a method for calculating an effective value of an alternating current quantity according to a second embodiment of the present invention;

fig. 3 is a schematic structural diagram of an ac effective value calculation apparatus according to a third embodiment of the present invention;

fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种新型的峰值检测电路

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!