WO2021098377A1 - Alternating current quantity effective value calculation method and apparatus, computer device, and storage medium - Google Patents

Alternating current quantity effective value calculation method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2021098377A1
WO2021098377A1 PCT/CN2020/117610 CN2020117610W WO2021098377A1 WO 2021098377 A1 WO2021098377 A1 WO 2021098377A1 CN 2020117610 W CN2020117610 W CN 2020117610W WO 2021098377 A1 WO2021098377 A1 WO 2021098377A1
Authority
WO
WIPO (PCT)
Prior art keywords
effective value
sampling
alternating current
value
phase
Prior art date
Application number
PCT/CN2020/117610
Other languages
French (fr)
Chinese (zh)
Inventor
袁俊波
刘真
秦鹏
荣洪凯
郭耀
Original Assignee
日立楼宇技术(广州)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日立楼宇技术(广州)有限公司 filed Critical 日立楼宇技术(广州)有限公司
Publication of WO2021098377A1 publication Critical patent/WO2021098377A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/02Measuring effective values, i.e. root-mean-square values
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/25Arrangements for measuring currents or voltages or for indicating presence or sign thereof using digital measurement techniques

Definitions

  • the AC quantity sampling module is used to sample the AC quantity in the target circuit at a set sampling frequency by the sampling circuit within one alternating current cycle to obtain the AC quantity sampled value, wherein the sampling frequency is the same as the frequency of the alternating current
  • the ratio of is an integer
  • alternating current is a current whose current direction changes periodically with time.
  • the frequency of alternating current may refer to the number of times the direction of the current changes periodically within a unit time.
  • the sampling circuit is used to periodically sample the target circuit.
  • the sampling frequency is used to determine the sampling frequency of the sampling circuit.
  • the target circuit is a circuit to be sampled, and the power supply of the target circuit is an AC power supply.
  • the AC quantity is usually voltage or current.
  • the sampled value of the AC quantity may refer to the value of the AC quantity in the target circuit at the current moment.
  • the sampling frequency is greater than the frequency of alternating current. It is understandable that if the sampling frequency is less than the frequency of the alternating current, the sampling result cannot be obtained; if the sampling frequency is equal to the frequency of the alternating current, there is only one sampling result, and the accuracy of the sampling is difficult to evaluate.
  • the number of samplings is equal to the ratio of the sampling frequency domain to the frequency of the alternating current. In order to ensure the accuracy of sampling, the number of samplings is usually an integer, and the number of samplings is greater than or equal to 2.
  • the number of sampling values of alternating current obtained by sampling is greater than or equal to 2.
  • S120 Calculate the sum of all the sampled values of the AC as the effective value of the AC.
  • alternating current and direct current respectively pass through resistors with the same resistance. If the two currents generate the same amount of heat in the same time, the value of the direct current at this time is called the effective value of the alternating current.
  • the error of the AC sampled value By correcting the error of the AC sampled value, and using the corrected AC sampled value for sum calculation, the error of the AC sampled value can be reduced, the accuracy of the AC sampled value can be improved, and the accuracy of the effective value of the AC can be improved.
  • the performing error correction on the sampled value of the AC amount includes: sampling the target circuit under a passive condition at the sampling frequency by the sampling circuit to obtain an offset value of the AC amount; The difference between the AC amount sampling value and the AC amount offset value is used as the corrected AC amount sampling value.
  • the effective value of the AC is enlarged or reduced to further improve the accuracy of the effective value of the AC.
  • the calculated effective value of the AC is the effective value of the target AC.
  • a three-phase AC power supply there are three power supplies. Only when the three power supplies are balanced, there is no circulating current inside the power supply. At this time, the calculated effective value of the AC between any two-phase circuits is the target AC effective. value. It is understandable that, when the three-phase AC power supply is in an unbalanced state, the change of the current direction is not stable and does not change periodically. At this time, the accuracy of the effective value of the AC quantity that is used and calculated is poor.
  • the effective value of the alternating current of different types of alternating current can be accurately determined, and the accuracy of the effective value of the alternating current can be improved.
  • the effective value of the line voltage and the effective value of the phase current are both the effective value of the alternating current, which can be calculated through the foregoing steps.
  • the set ratio threshold is used to determine whether the line voltage ratio and the phase current ratio of at least two circuits are the same or similar.
  • the balance condition is used to judge whether the voltage and current in the three circuits of the three-phase AC power supply are balanced.
  • the ratio of the line voltages of the two circuits is the same or similar to the ratio of the phase currents of the two circuits, it indicates that there is no circulating current inside the three-phase AC power supply, and the three-phase AC power supply is balanced at this time.
  • Fig. 2a is a flowchart of a method for calculating the effective value of the communication amount in the second embodiment of the present invention. This embodiment is optimized on the basis of the foregoing embodiment. The method of this embodiment specifically includes:
  • S210 In an alternating current cycle, sample the alternating current in the target circuit at a set sampling frequency through the sampling circuit to obtain an alternating current sampling value, where the ratio of the sampling frequency to the frequency of the alternating current is an integer.
  • the method for calculating the effective value of the communication volume of this embodiment may specifically:
  • the cycle refers to a cycle of sampling operations within a cycle of alternating current.
  • the effective value calculation module 320 of the communication amount includes: an absolute value summation unit for calculating the sum of the absolute values of the sampled values of the communication amount.
  • the device for calculating the effective value of the AC value further includes: an amplifying operation module for calculating the product of the amplification factor of the amplifying circuit connected to the target circuit and the sum of all the sampled values of the AC value to obtain the effective value of the AC value .
  • FIG. 4 is a schematic structural diagram of a computer device according to Embodiment 4 of the present invention.
  • Figure 4 shows a block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention.
  • the computer device 12 shown in FIG. 4 is only an example, and should not bring any limitation to the function and application scope of the embodiment of the present invention.
  • the system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32.
  • the computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media.
  • the storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 4, and is commonly referred to as a "hard drive”).
  • a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and a removable non-volatile optical disk (such as a compact disk read-only memory (Compact Disk)) can be provided.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measurement Of Current Or Voltage (AREA)

Abstract

An alternating current quantity effective value calculation method and apparatus, a computer device (12), and a storage medium. The method comprises: sampling the alternating current quantity in a target circuit by means of a sampling circuit at a set sampling frequency within a period of an alternating current to obtain an alternating current quantity sampling value (S110), wherein the ratio of the sampling frequency to the frequency of the alternating current is an integer; and calculating the sum of all alternating current quantity sampling values to serve as an alternating current quantity effective value (S120). The method improves the calculation efficiency of the alternating current quantity effective value, and also reduces an occupied space required for calculating the alternating current quantity effective value.

Description

交流量有效值计算方法、装置、计算机设备及存储介质Method, device, computer equipment and storage medium for calculating effective value of communication volume 技术领域Technical field
本发明实施例涉及电力电子控制领域,尤其涉及一种交流量有效值计算方法、装置、计算机设备及存储介质。The embodiments of the present invention relate to the field of power electronic control, and in particular to a method, device, computer equipment, and storage medium for calculating the effective value of an AC quantity.
背景技术Background technique
在交流电系统中,需要获取输入电压和/或输入电流,以及输出电压和/或输出电流,以分析系统中的设备的性能。In an alternating current system, it is necessary to obtain the input voltage and/or input current, and the output voltage and/or output current to analyze the performance of the equipment in the system.
通常,在交流电系统中,输入电压和/或输入电流,以及输出电压和/或输出电流的数值实际是有效值。例如,在三相交流电系统中,其中,三相交流电系统是由三个频率相同、电势振幅相等、相位差互差120°角的交流电路组成的电力系统。有效值计算方式具体为:先把三相交流量的采样值作3s/2s坐标变换,得到两相坐标系下的两个交流分量,再对这两个交流分量作平方和开根号得到三相交流量有效值。又如,对于单相交流量有效值的计算方式为:预存一个交流量周期内采样次数的正余弦表,然后利用DFT公式(对实部、虚部的累加和作平方和开根号)计算出单相交流量有效值。Generally, in an alternating current system, the input voltage and/or input current, and the value of the output voltage and/or output current are actually effective values. For example, in a three-phase AC power system, the three-phase AC power system is a power system composed of three AC circuits with the same frequency, the same potential amplitude, and the phase difference by 120°. The effective value calculation method is specifically as follows: first transform the sampled value of the three-phase alternating current into a 3s/2s coordinate transformation to obtain two alternating components in a two-phase coordinate system, and then square and root the two alternating components to obtain a three-phase intersection Effective value of flow. For another example, the calculation method for the effective value of the single-phase AC quantity is: pre-store the sine and cosine table of the number of sampling times in an AC quantity cycle, and then use the DFT formula (the cumulative sum of the real and imaginary parts is squared and the root of the square) is calculated The effective value of the single-phase AC quantity is output.
上述的交流量有效值的计算涉及多次乘除法和根号运算,尤其是单相交流量有效值计算时,需要预存正余弦表,而有效值的计算精度取决于正余弦表中的数值精度,通常存储的数值的精度越高,存储的数字越多,从而占用的存储空间的越大。目前交流量有效值计算方法的计算量大,占用的存储空间大,降低有效值的计算效率,为了保证有效值计算效率,需要提高CPU性能,导致变频器的成本升高。The calculation of the effective value of the AC quantity mentioned above involves multiple multiplication and division and radical operation, especially when calculating the effective value of the single-phase AC quantity, a sine and cosine table needs to be pre-stored, and the calculation accuracy of the effective value depends on the numerical precision in the sine and cosine table. , Generally, the higher the accuracy of the stored value, the more the stored number, and the larger the storage space occupied. At present, the calculation method of effective value of the communication volume is large, and it takes up a large storage space, which reduces the calculation efficiency of the effective value. In order to ensure the effective value calculation efficiency, the CPU performance needs to be improved, which causes the cost of the inverter to increase.
发明内容Summary of the invention
本发明实施例提供一种交流量有效值计算方法、装置、计算机设备及存储介质,可以提高交流量有效值的计算效率,同时减少计算交流量有效值所需的占用空间。The embodiments of the present invention provide a method, a device, a computer device and a storage medium for calculating the effective value of the communication amount, which can improve the calculation efficiency of the effective value of the communication amount and reduce the occupied space required for calculating the effective value of the communication amount.
第一方面,本发明实施例提供了一种交流量有效值计算方法,包括:In the first aspect, an embodiment of the present invention provides a method for calculating the effective value of the communication volume, including:
在一个交流电的周期内,通过采样电路以设定采样频率对目标电路中的交流量进行采样,得到交流量采样值,其中,所述采样频率与所述交流电的频率的比值为整数;In a cycle of alternating current, sampling the alternating current in the target circuit at a set sampling frequency by the sampling circuit to obtain a sampling value of the alternating current, wherein the ratio of the sampling frequency to the frequency of the alternating current is an integer;
计算全部交流量采样值之和,作为交流量有效值。Calculate the sum of all the sampled values of the AC as the effective value of the AC.
第二方面,本发明实施例还提供了一种交流量有效值计算装置,包括:In the second aspect, the embodiment of the present invention also provides a device for calculating the effective value of the communication volume, including:
交流量采样模块,用于在一个交流电的周期内,通过采样电路以设定采样频率对目标电路中的交流量进行采样,得到交流量采样值,其中,所述采样频率与所述交流电的频率的比值为整数;The AC quantity sampling module is used to sample the AC quantity in the target circuit at a set sampling frequency by the sampling circuit within one alternating current cycle to obtain the AC quantity sampled value, wherein the sampling frequency is the same as the frequency of the alternating current The ratio of is an integer;
交流量有效值计算模块,用于计算全部交流量采样值之和,作为交流量有效值。The effective value calculation module of the AC is used to calculate the sum of all the sampled values of the AC as the effective value of the AC.
第三方面,本发明实施例还提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序所述处理器执行所述程序时实现如本发明实施例中任一所述的交流量有效值计算方法。In the third aspect, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor. The processor executes the program when the program is executed. The calculation method of the effective value of the communication amount described in any of the examples.
第四方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明实施例中任一所述的交流量有效值计算方法。In a fourth aspect, an embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the effective value of the communication amount is calculated as described in any of the embodiments of the present invention. method.
本发明实施例通过对一个交流电周期内的目标电路的交流量进行采样,得到多个交流量采样值并进行累加,得到交流量有效值,将有效值的计算转换为大量加和计算,有效减少根号和乘除法运算次数,解决了现有技术中需要通过多次乘除法和根号运算,以及占据大量存储空间的正余弦表的有效值计算方法的效率低的问题,提高有效值的计算效率,并降低有效值的计算成本。In the embodiment of the present invention, by sampling the AC quantity of the target circuit in one AC cycle, multiple AC quantity sampled values are obtained and accumulated to obtain the AC quantity effective value, and the effective value calculation is converted into a large number of addition calculations, which effectively reduces The number of radicals and multiplication and division operations solves the problem of low efficiency in the effective value calculation method of the sine-cosine table that requires multiple multiplication and division and radical operations in the prior art, as well as the sine-cosine table that occupies a large amount of storage space, and improves the calculation of the effective value. Efficiency, and reduce the effective value calculation cost.
附图说明Description of the drawings
图1是本发明实施例一中的一种交流量有效值计算方法的流程图;Fig. 1 is a flowchart of a method for calculating the effective value of the communication quantity in the first embodiment of the present invention;
图2a是本发明实施例二中的一种交流量有效值计算方法的流程图;Fig. 2a is a flowchart of a method for calculating the effective value of the communication quantity in the second embodiment of the present invention;
图2b是本发明实施例二中的一种交流量有效值计算方法的流程图;Fig. 2b is a flowchart of a method for calculating the effective value of the communication quantity in the second embodiment of the present invention;
图3是本发明实施例三中的一种交流量有效值计算装置的结构示意图;FIG. 3 is a schematic structural diagram of a device for calculating the effective value of an AC quantity in the third embodiment of the present invention;
图4是本发明实施例四中的一种计算机设备的结构示意图。Fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for ease of description, the drawings only show a part of the structure related to the present invention instead of all of the structure.
实施例一Example one
图1为本发明实施例一中的一种交流量有效值计算方法的流程图,本实施例可适用于计算电路中交流量的有效值的情况,该方法可以由本发明实施例提供的交流量有效值计算装置 来执行,该装置可采用软件和/或硬件的方式实现,并一般可集成计算机设备中。如图1所示,本实施例的方法具体包括:FIG. 1 is a flowchart of a method for calculating the effective value of an AC quantity in Embodiment 1 of the present invention. This embodiment can be applied to the case of calculating the effective value of an AC quantity in a circuit. The method can be provided by the embodiment of the present invention. The effective value calculation device is implemented, which can be implemented in software and/or hardware, and can generally be integrated into computer equipment. As shown in Figure 1, the method of this embodiment specifically includes:
S110,在一个交流电的周期内,通过采样电路以设定采样频率对目标电路中的交流量进行采样,得到交流量采样值,其中,所述采样频率与所述交流电的频率的比值为整数。S110: In an alternating current cycle, sample the alternating current in the target circuit at a set sampling frequency through the sampling circuit to obtain an alternating current sampling value, where the ratio of the sampling frequency to the frequency of the alternating current is an integer.
具体的,交流电是电流方向随时间作周期性变化的电流。交流电的频率可以是指在电流方向在单位时间内周期性变化的次数。采样电路用于周期性对目标电路进行采样。采样频率用于确定采样电路的采样次数。目标电路为待采样电路,目标电路的供电电源为交流电源。交流量通常为电压或者电流。交流量采样值可以是指当前时刻目标电路中的交流量的数值。Specifically, alternating current is a current whose current direction changes periodically with time. The frequency of alternating current may refer to the number of times the direction of the current changes periodically within a unit time. The sampling circuit is used to periodically sample the target circuit. The sampling frequency is used to determine the sampling frequency of the sampling circuit. The target circuit is a circuit to be sampled, and the power supply of the target circuit is an AC power supply. The AC quantity is usually voltage or current. The sampled value of the AC quantity may refer to the value of the AC quantity in the target circuit at the current moment.
需要说明的是,在电路中电流和电压均为模拟量,需要将模拟量转换为数字量,即进行模数转换(Analog to Digital,A/D)。交流量采样值实际为数字量,也就是说在采样电路包括A/D转换器或者目标电路包括A/D转换器。It should be noted that the current and voltage in the circuit are both analog, and it is necessary to convert the analog to digital, that is, perform analog to digital (A/D) conversion. The AC sampled value is actually a digital value, that is to say, the sampling circuit includes an A/D converter or the target circuit includes an A/D converter.
通常,采样频率大于交流电的频率。可以理解的是,如果采样频率小于交流电的频率,则无法得到采样结果;如果采样频率等于交流电的频率,则仅有一个采样结果,采样的准确性难以评估。相应的,采样次数等于采样频域与交流电的频率的比值,为了保证采样的准确性,采样次数通常为整数,且采样次数的数值大于等于2。相应的,在一个交流电的周期内,采样得到的交流量采样值的个数大于等于2。Generally, the sampling frequency is greater than the frequency of alternating current. It is understandable that if the sampling frequency is less than the frequency of the alternating current, the sampling result cannot be obtained; if the sampling frequency is equal to the frequency of the alternating current, there is only one sampling result, and the accuracy of the sampling is difficult to evaluate. Correspondingly, the number of samplings is equal to the ratio of the sampling frequency domain to the frequency of the alternating current. In order to ensure the accuracy of sampling, the number of samplings is usually an integer, and the number of samplings is greater than or equal to 2. Correspondingly, in a cycle of alternating current, the number of sampling values of alternating current obtained by sampling is greater than or equal to 2.
S120,计算全部交流量采样值之和,作为交流量有效值。S120: Calculate the sum of all the sampled values of the AC as the effective value of the AC.
将交流量采样值之和进行累加,作为交流量有效值。Accumulate the sum of the sampled values of the AC quantity as the effective value of the AC quantity.
实际上,交流电和直流电分别通过阻值相同的电阻,如果在相同的时间内,这两种电流产生相同的热量,就把这时的直流电的数值称为交流电的有效值。In fact, alternating current and direct current respectively pass through resistors with the same resistance. If the two currents generate the same amount of heat in the same time, the value of the direct current at this time is called the effective value of the alternating current.
需要说明的是,交流量有效值,包括交流电的电流有效值和/或交流电的电压有效值。It should be noted that the effective value of the alternating current includes the effective value of the current of the alternating current and/or the effective value of the voltage of the alternating current.
交流电的电流方向发生改变会导致电流和电压为反方向,也即电流和电压的数值为负值,在计算累加和时,实际上计算的是绝对值之和。A change in the direction of alternating current will cause the current and voltage to be in the opposite direction, that is, the values of current and voltage are negative. When calculating the cumulative sum, the actual calculation is the sum of absolute values.
可选的,所述计算全部交流量采样值之和,包括:计算各所述交流量采样值的绝对值之和。Optionally, the calculating the sum of all the sampled values of the AC includes: calculating the sum of the absolute values of the sampled values of each of the ACs.
通过计算交流量采样值的绝对值,可以排除数值为负导致求和不准的情况,准确得到交流量有效值。By calculating the absolute value of the sampled value of the AC quantity, it is possible to eliminate the situation where the value is negative and the sum is not accurate, and the effective value of the AC quantity can be accurately obtained.
可选的,所述计算全部交流量采样值之和,包括:对各所述交流量采样值进行误差修正;计算全部修正后的交流量采样值之和。Optionally, the calculating the sum of all the sampling values of the AC includes: performing error correction on each of the sampling values of the AC; and calculating the sum of all the corrected sampling values of the AC.
通常,在目标电路中存在噪音干扰,可以对交流量采样值进行误差修正,减少目标电路 中的干扰,提高交流量采样值的精度。Usually, there is noise interference in the target circuit, and error correction can be performed on the AC sampled value to reduce the interference in the target circuit and improve the accuracy of the AC sampled value.
通过对交流量采样值进行误差修正,并采用修正后的交流量采样值进行求和计算,可以减少交流量采样值的误差,提高交流量采样值的精度,从而提高交流量有效值的精度。By correcting the error of the AC sampled value, and using the corrected AC sampled value for sum calculation, the error of the AC sampled value can be reduced, the accuracy of the AC sampled value can be improved, and the accuracy of the effective value of the AC can be improved.
可选的,所述对所述交流量采样值进行误差修正,包括:通过所述采样电路以所述采样频率对所述目标电路在无源条件下进行采样,得到交流量偏移值;将所述交流量采样值与所述交流量偏移值的差值作为修正后的交流量采样值。Optionally, the performing error correction on the sampled value of the AC amount includes: sampling the target circuit under a passive condition at the sampling frequency by the sampling circuit to obtain an offset value of the AC amount; The difference between the AC amount sampling value and the AC amount offset value is used as the corrected AC amount sampling value.
其中,无源条件用于确定目标电路在没有供电电源的情况下。交流量偏移值用于作为目标电路的干扰值。实际上,交流量偏移值是指在没有供电电源的情况下,目标电路中存在的干扰电流。Among them, the passive condition is used to determine when the target circuit has no power supply. The AC offset value is used as the interference value of the target circuit. In fact, the AC offset value refers to the interference current in the target circuit when there is no power supply.
交流量采样值与交流量偏移值的差值,可以是指修正后的交流量采样值。修正后的交流量采样值为交流量采样值减去误差之后的修正值。The difference between the AC sampled value and the AC offset value may refer to the corrected AC sampled value. The corrected AC sampling value is the corrected AC sampling value minus the error.
通过获取交流量偏移值,并在交流量采样值中减去交流量偏移值,排除交流量采样值中的误差干扰,提高交流量采样值的精度。By obtaining the AC offset value, and subtracting the AC offset value from the AC sampling value, the error interference in the AC sampling value is eliminated, and the accuracy of the AC sampling value is improved.
可选的,所述计算全部交流量采样值之和,作为交流量有效值,包括:计算与所述目标电路相连的放大电路的放大系数与全部交流量采样值之和的乘积,得到交流量有效值。Optionally, the calculating the sum of all the sampled values of the alternating current as the effective value of the alternating current includes: calculating the product of the amplification factor of the amplifying circuit connected to the target circuit and the sum of the sampled values of all the alternating currents to obtain the alternating current Valid value.
放大电路用于放大或者缩小目标电路中的电流和/或电压。其中,放大电路可以属于采样电路,即采样电路中包括放大电路。或者放大电路在采样电路的采样的电路范围之外。放大系数用于放大或者缩小目标电路中的电流和/或电压。放大系数与全部交流量采样值之和的乘积得到的交流量有效值,实际为放大后的交流量有效值或者缩小后的交流量有效值。The amplifying circuit is used to amplify or reduce the current and/or voltage in the target circuit. Among them, the amplifying circuit may belong to a sampling circuit, that is, the sampling circuit includes an amplifying circuit. Or the amplifying circuit is outside the sampling circuit range of the sampling circuit. The amplification factor is used to amplify or reduce the current and/or voltage in the target circuit. The effective value of the AC obtained by the product of the amplification factor and the sum of the sampled values of all the ACs is actually the effective value of the amplified AC or the effective value of the reduced AC.
可以理解的是,通常元器件需要较小的电压进行供电,需要将目标电路中的电压缩小,避免电压过大造成击穿元器件,导致元器件损毁的情况。由此,通过放大电路实现目标电路中的电压和/或电流需要进行相应缩小。It is understandable that usually components require a smaller voltage for power supply, and the voltage in the target circuit needs to be reduced to avoid excessive voltage causing breakdown of the components and damage to the components. Therefore, the voltage and/or current in the target circuit needs to be reduced accordingly through the amplification circuit.
通过放大电路的放大系数,将交流量有效值进行放大或者缩小,进一步提高交流量有效值的精度。Through the amplification factor of the amplifying circuit, the effective value of the AC is enlarged or reduced to further improve the accuracy of the effective value of the AC.
可选的,所述计算全部交流量采样值之和,作为交流量有效值,包括:当供电电源为单相交流电源时,将计算得到的交流量有效值作为单相电源的目标交流量有效值;当供电电源为三相交流电源时,如果确定所述三相交流电源满足平衡条件,则将计算得到的交流量有效值作为三相电源的目标交流量有效值,其中,所述交流量包括线电压和/或相电流。Optionally, the calculation of the sum of all sampled values of the AC quantity as the effective value of the AC quantity includes: when the power supply is a single-phase AC power supply, the calculated effective value of the AC quantity is valid as the target AC quantity of the single-phase power supply Value; when the power supply is a three-phase AC power source, if it is determined that the three-phase AC power source satisfies the balance condition, the calculated effective value of the AC value is used as the target AC value of the three-phase power source, where the AC amount Including line voltage and/or phase current.
可以理解的是,在单相交流电源中,仅有一个电源,计算得到的交流量有效值,即为目标交流量有效值。在三相交流电源中,相当于存在三个电源,只有在三个电源平衡时,电源 内部没有环流,此时计算得到的任意两相电路之间的交流量有效值,即为目标交流量有效值。可以理解的是,三相交流电源在不平衡状态下,电流方向的变化不是稳定的,不是周期性变化的,此时采用并计算得到的交流量有效值精度差。It is understandable that in the single-phase AC power supply, there is only one power supply, and the calculated effective value of the AC is the effective value of the target AC. In a three-phase AC power supply, there are three power supplies. Only when the three power supplies are balanced, there is no circulating current inside the power supply. At this time, the calculated effective value of the AC between any two-phase circuits is the target AC effective. value. It is understandable that, when the three-phase AC power supply is in an unbalanced state, the change of the current direction is not stable and does not change periodically. At this time, the accuracy of the effective value of the AC quantity that is used and calculated is poor.
通过区分交流电的类型,并根据交流电的类型确定目标交流量有效值,实现准确确定不同类型交流电的交流量有效值,提高交流量有效值的精度。By distinguishing the types of alternating current, and determining the effective value of the target alternating current according to the type of alternating current, the effective value of the alternating current of different types of alternating current can be accurately determined, and the accuracy of the effective value of the alternating current can be improved.
可选的,所述确定所述三相交流电源满足平衡条件,包括:分别计算至少两路线电压有效值和相电流有效值;如果根据所述至少两路线电压有效值和相电流有效值,确定各路之间的线电压有效值的比值分别与匹配的相电流有效值的比值之差小于设定比例阈值,则确定所述三相交流电源满足平衡条件。Optionally, the determining that the three-phase AC power source satisfies the balance condition includes: calculating at least two line effective voltage values and phase current effective values; if the at least two line voltage effective values and phase current effective values are used, determining The difference between the ratio of the effective value of the line voltage between each path and the ratio of the effective value of the matched phase current is less than the set ratio threshold, then it is determined that the three-phase AC power supply satisfies the balance condition.
线电压有效值和相电流有效值均为交流量有效值,可以通过前述步骤计算获取。设定比例阈值用于判断至少两路的线电压比值与相电流比值是否相同或相近。平衡条件用于判断三相交流电源中的三条电路中的电压和电流是否平衡。The effective value of the line voltage and the effective value of the phase current are both the effective value of the alternating current, which can be calculated through the foregoing steps. The set ratio threshold is used to determine whether the line voltage ratio and the phase current ratio of at least two circuits are the same or similar. The balance condition is used to judge whether the voltage and current in the three circuits of the three-phase AC power supply are balanced.
具体的,若存在两路的线电压的比值与这两路的相电流比值相同或相近,表明三相交流电源内部不存在环流,此时三相交流电源平衡。Specifically, if the ratio of the line voltages of the two circuits is the same or similar to the ratio of the phase currents of the two circuits, it indicates that there is no circulating current inside the three-phase AC power supply, and the three-phase AC power supply is balanced at this time.
通过至少两路的线电压的比值与该至少两路的相电流的比值是否相同或相近,判断三相交流电源是否平衡,可以在三相交流电源平衡时,将交流量有效值作为三相交流电源的目标交流量有效值,从而准确确定三相交流电源的目标交流量有效值。Determine whether the three-phase AC power supply is balanced by determining whether the ratio of the line voltage of at least two circuits is the same or similar to the ratio of the phase currents of the at least two circuits. When the three-phase AC power supply is balanced, the effective value of the AC can be regarded as the three-phase AC The effective value of the target AC quantity of the power supply, so as to accurately determine the effective value of the target AC quantity of the three-phase AC power supply.
本发明实施例通过对一个交流电周期内的目标电路的交流量进行采样,得到多个交流量采样值并进行累加,得到交流量有效值,将有效值的计算转换为大量加和计算,有效减少根号和乘除法运算次数,解决了现有技术中需要通过多次乘除法和根号运算,以及占据大量存储空间的正余弦表的有效值计算方法的效率低的问题,提高有效值的计算效率,并降低有效值的计算成本。In the embodiment of the present invention, by sampling the AC quantity of the target circuit in one AC cycle, multiple AC quantity sampled values are obtained and accumulated to obtain the AC quantity effective value, and the effective value calculation is converted into a large number of addition calculations, which effectively reduces The number of radicals and multiplication and division operations solves the problem of low efficiency in the effective value calculation method of the sine-cosine table that requires multiple multiplication and division and radical operations in the prior art, as well as the sine-cosine table that occupies a large amount of storage space, and improves the calculation of the effective value. Efficiency, and reduce the effective value calculation cost.
实施例二Example two
图2a为本发明实施例二中的一种交流量有效值计算方法的流程图,本实施例以上述实施例为基础进行优化。本实施例的方法具体包括:Fig. 2a is a flowchart of a method for calculating the effective value of the communication amount in the second embodiment of the present invention. This embodiment is optimized on the basis of the foregoing embodiment. The method of this embodiment specifically includes:
S210,在一个交流电的周期内,通过采样电路以设定采样频率对目标电路中的交流量进行采样,得到交流量采样值,其中,所述采样频率与所述交流电的频率的比值为整数。S210: In an alternating current cycle, sample the alternating current in the target circuit at a set sampling frequency through the sampling circuit to obtain an alternating current sampling value, where the ratio of the sampling frequency to the frequency of the alternating current is an integer.
具体的额,目标电路包括变频器。Specifically, the target circuit includes an inverter.
在一个具体的例子中,采样频率为f c,交流电的频率为f 0,采样次数n为f c除以f 0得到 的比值,其中,n大于等于2。示例性的,通过采样电路采样得到交流量采样值分别为ADC1、ADC2…ADCn。 In a specific example, the sampling frequency is f c , the frequency of alternating current is f 0 , and the number of sampling times n is the ratio of f c divided by f 0 , where n is greater than or equal to 2. Exemplarily, the AC sampling values obtained by sampling by the sampling circuit are ADC1, ADC2...ADCn.
S220,通过所述采样电路以所述采样频率对所述目标电路在无源条件下进行采样,得到交流量偏移值。S220, sampling the target circuit under a passive condition by the sampling circuit at the sampling frequency to obtain an AC offset value.
通过采样电路采样得到交流量偏移值为ADCOFFSET。The AC offset value obtained by sampling by the sampling circuit is ADCOFFSET.
S230,将所述交流量采样值与所述交流量偏移值的差值作为修正后的交流量采样值。S230: Use the difference between the AC amount sample value and the AC amount offset value as a corrected AC amount sample value.
修正后的交流量采样值分别为:ADC1-ADCOFFSET、ADC2-ADCOFFSET…ADCn-ADCOFFSET;也即:adc1、adc2……adcn。The corrected AC sampling values are: ADC1-ADCOFFSET, ADC2-ADCOFFSET...ADCn-ADCOFFSET; that is: adc1, adc2...adcn.
S240,计算与所述目标电路相连的放大电路的放大系数与全部修正后的交流量采样值的绝对值之和的乘积,作为交流量有效值。S240: Calculate the product of the amplification factor of the amplifying circuit connected to the target circuit and the sum of the absolute values of all the corrected alternating current sample values as the effective value of the alternating current.
全部修正后的交流量采样值的绝对值之和为
Figure PCTCN2020117610-appb-000001
The sum of the absolute values of all corrected AC sampling values is
Figure PCTCN2020117610-appb-000001
其中,放大系数为A,则交流量有效值为RMS=A×Sum。Among them, the amplification factor is A, and the effective value of the AC quantity is RMS=A×Sum.
S250,当供电电源为单相交流电源时,将计算得到的交流量有效值作为单相电源的目标交流量有效值。S250: When the power supply is a single-phase AC power, the calculated effective value of the AC is used as the target effective value of the single-phase power.
S260,当供电电源为三相交流电源时,如果确定所述三相交流电源满足平衡条件,则将计算得到的交流量有效值作为三相电源的目标交流量有效值,其中,所述交流量包括线电压和/或相电流。S260: When the power supply is a three-phase AC power supply, if it is determined that the three-phase AC power supply satisfies the balance condition, use the calculated effective value of the alternating current as the target effective value of the three-phase power supply. Including line voltage and/or phase current.
可选的,所述确定所述三相交流电源满足平衡条件,包括:分别计算至少两路线电压有效值和相电流有效值;如果根据所述至少两路线电压有效值和相电流有效值,确定各路之间的线电压有效值的比值分别与匹配的相电流有效值的比值之差小于设定比例阈值,则确定所述三相交流电源满足平衡条件。Optionally, the determining that the three-phase AC power source satisfies the balance condition includes: calculating at least two line effective voltage values and phase current effective values; if the at least two line voltage effective values and phase current effective values are used, determining The difference between the ratio of the effective value of the line voltage between each path and the ratio of the effective value of the matched phase current is less than the set ratio threshold, then it is determined that the three-phase AC power supply satisfies the balance condition.
通过前述步骤分别计算出两路的线电压RSM U1和RSM U2,以及这两路的相电流RSM I1和RSM I2。当RSM U1/RSM U2与RSM I1/RSM I2小于设定比例阈值时,则RSM U1或者RSM U2为三相交流线电压有效值,RSM I1或者RSM I2为三相交流相电流有效值。 Through the foregoing steps, the line voltages RSM U1 and RSM U2 of the two channels, and the phase currents RSM I1 and RSM I2 of the two channels are respectively calculated. When RSM U1 /RSM U2 and RSM I1 /RSM I2 are less than the set ratio threshold, RSM U1 or RSM U2 is the effective value of the three-phase AC line voltage, and RSM I1 or RSM I2 is the effective value of the three-phase AC phase current.
在一个具体的例子中,如图2b所示,本实施例的交流量有效值计算方法具体可以:In a specific example, as shown in FIG. 2b, the method for calculating the effective value of the communication volume of this embodiment may specifically:
S201,循环开始。S201, the cycle starts.
其中,循环是指,一个交流电的周期内的采样操作的循环。Among them, the cycle refers to a cycle of sampling operations within a cycle of alternating current.
S202,获取交流量采样值。S202: Acquire a sample value of the exchange amount.
S203,判断一个交流电的周期采样操作是否完成,如果是,则执行S204;否则执行S202。S203: Determine whether a periodic sampling operation of alternating current is completed, if yes, execute S204; otherwise, execute S202.
S204,分别计算各交流量采样值与交流量偏移值的差值,得到修正后的交流量采样值。S204: Calculate the difference between each AC amount sample value and the AC amount offset value to obtain the corrected AC amount sample value.
其中,交流量偏移值是预先采样得到的。Among them, the AC offset value is obtained by pre-sampling.
S205,计算全部修正后的交流量采样值的绝对值之和。S205: Calculate the sum of the absolute values of all the corrected AC quantity sampled values.
S206,计算计算绝对值之和与放大系数的乘积,得到交流量有效值。S206: Calculate the product of the sum of absolute values and the amplification factor to obtain the effective value of the communication volume.
S207,交流量有效值计算结束。S207: The calculation of the effective value of the communication volume ends.
本发明实施例通过求和计算得到交流量有效值,简化交流量有效值的计算量,有效减少计算交流量有效值的CPU的运算时间,同时减少交流量有效值占据的存储空间,提高计算效率,减少计算成本。The embodiment of the present invention obtains the effective value of the communication amount through summation calculation, simplifies the calculation amount of the effective value of the communication amount, effectively reduces the calculation time of the CPU that calculates the effective value of the communication amount, reduces the storage space occupied by the effective value of the communication amount, and improves the calculation efficiency , Reduce calculation cost.
实施例三Example three
图3为本发明实施例三中的一种交流量有效值计算装置的示意图。实施例三是实现本发明上述实施例提供的交流量有效值计算方法的相应装置,该装置可采用软件和/或硬件的方式实现,并一般可集成计算机设备中。Fig. 3 is a schematic diagram of a device for calculating the effective value of an AC quantity in the third embodiment of the present invention. The third embodiment is a corresponding device for realizing the method for calculating the effective value of the communication quantity provided in the above embodiment of the present invention. The device can be implemented in software and/or hardware, and generally can be integrated into computer equipment.
相应的,本实施例的装置可以包括:Correspondingly, the device of this embodiment may include:
交流量采样模块310,用于在一个交流电的周期内,通过采样电路以设定采样频率对目标电路中的交流量进行采样,得到交流量采样值,其中,所述采样频率与所述交流电的频率的比值为整数;The AC quantity sampling module 310 is used to sample the AC quantity in the target circuit at a set sampling frequency through the sampling circuit within one alternating current cycle to obtain the AC quantity sampled value, wherein the sampling frequency is the same as that of the alternating current. The frequency ratio is an integer;
交流量有效值计算模块320,用于计算全部交流量采样值之和,作为交流量有效值。The effective value calculation module 320 of the AC is used to calculate the sum of all the sampled values of the AC as the effective value of the AC.
本发明实施例通过对一个交流电周期内的目标电路的交流量进行采样,得到多个交流量采样值并进行累加,得到交流量有效值,将有效值的计算转换为大量加和计算,有效减少根号和乘除法运算次数,解决了现有技术中需要通过多次乘除法和根号运算,以及占据大量存储空间的正余弦表的有效值计算方法的效率低的问题,提高有效值的计算效率,并降低有效值的计算成本。In the embodiment of the present invention, by sampling the AC quantity of the target circuit in one AC cycle, multiple AC quantity sampled values are obtained and accumulated to obtain the AC quantity effective value, and the effective value calculation is converted into a large number of addition calculations, which effectively reduces The number of radicals and multiplication and division operations solves the problem of low efficiency in the effective value calculation method of the sine-cosine table that requires multiple multiplication and division and radical operations in the prior art, as well as the sine-cosine table that occupies a large amount of storage space, and improves the calculation of the effective value. Efficiency, and reduce the effective value calculation cost.
进一步的,所述交流量有效值计算模块320,包括:误差修正单元,用于对各所述交流量采样值进行误差修正;计算全部修正后的交流量采样值之和。Further, the AC quantity effective value calculation module 320 includes: an error correction unit configured to perform error correction on each of the AC quantity sampled values; and calculate the sum of all the corrected AC quantity sampled values.
进一步的,所述误差修正单元,包括:无源采样子单元,用于通过所述采样电路以所述采样频率对所述目标电路在无源条件下进行采样,得到交流量偏移值;将所述交流量采样值与所述交流量偏移值的差值作为修正后的交流量采样值。Further, the error correction unit includes: a passive sampling subunit, configured to sample the target circuit under passive conditions at the sampling frequency through the sampling circuit to obtain an AC offset value; The difference between the AC amount sampling value and the AC amount offset value is used as the corrected AC amount sampling value.
进一步的,所述交流量有效值计算模块320,包括:绝对值求和单元,用于计算各所述交流量采样值的绝对值之和。Further, the effective value calculation module 320 of the communication amount includes: an absolute value summation unit for calculating the sum of the absolute values of the sampled values of the communication amount.
进一步的,所述交流量有效值计算装置,还包括:放大运算模块,用于计算与所述目标 电路相连的放大电路的放大系数与全部交流量采样值之和的乘积,得到交流量有效值。Further, the device for calculating the effective value of the AC value further includes: an amplifying operation module for calculating the product of the amplification factor of the amplifying circuit connected to the target circuit and the sum of all the sampled values of the AC value to obtain the effective value of the AC value .
进一步的,所述交流量有效值计算模块320,包括:电源判断单元,用于当供电电源为单相交流电源时,将计算得到的交流量有效值作为单相电源的目标交流量有效值;当供电电源为三相交流电源时,如果确定所述三相交流电源满足平衡条件,则将计算得到的交流量有效值作为三相电源的目标交流量有效值,其中,所述交流量包括线电压和/或相电流。Further, the AC quantity effective value calculation module 320 includes: a power source judgment unit configured to use the calculated effective value of the AC quantity as the target AC quantity effective value of the single-phase power supply when the power supply is a single-phase AC power source; When the power supply is a three-phase AC power source, if it is determined that the three-phase AC power source satisfies the balance condition, the calculated effective value of the AC power is used as the target effective value of the AC power of the three-phase power source, where the AC power includes the line Voltage and/or phase current.
进一步的,所述电源判断单元,包括:三相交流电源有效值计算子单元,用于分别计算至少两路线电压有效值和相电流有效值;如果根据所述至少两路线电压有效值和相电流有效值,确定各路之间的线电压有效值的比值分别与匹配的相电流有效值的比值之差小于设定比例阈值,则确定所述三相交流电源满足平衡条件。Further, the power source judgment unit includes: a three-phase AC power supply effective value calculation subunit, configured to calculate at least two line voltage effective values and phase current effective values; if according to the at least two line voltage effective values and phase currents Effective value, determining that the difference between the ratio of the effective value of the line voltage between each circuit and the ratio of the effective value of the matched phase current is less than the set ratio threshold, then it is determined that the three-phase AC power supply meets the balance condition.
上述交流量有效值计算装置可执行本发明实施例所提供的交流量有效值计算方法,具备执行的交流量有效值计算方法相应的功能模块和有益效果。The foregoing communication amount effective value calculation device can execute the communication amount effective value calculation method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the executed communication amount effective value calculation method.
实施例四Example four
图4为本发明实施例四提供的一种计算机设备的结构示意图。图4示出了适于用来实现本发明实施方式的示例性计算机设备12的框图。图4显示的计算机设备12仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。FIG. 4 is a schematic structural diagram of a computer device according to Embodiment 4 of the present invention. Figure 4 shows a block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention. The computer device 12 shown in FIG. 4 is only an example, and should not bring any limitation to the function and application scope of the embodiment of the present invention.
如图4所示,计算机设备12以通用计算设备的形式表现。计算机设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。计算机设备12可以是挂接在总线上的设备。As shown in FIG. 4, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16). The computer device 12 may be a device connected to a bus.
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture,ISA)总线,微通道体系结构(Micro Channel Architecture,MCA)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association,VESA)局域总线以及外围组件互连(Peripheral Component Interconnect,PCI)总线。The bus 18 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure among multiple bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (Video Electronics Standards) Association, VESA) local bus and Peripheral Component Interconnect (PCI) bus.
计算机设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)30和/或高速缓存存储器32。计算机设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可 移动的、非易失性磁介质(图4未显示,通常称为“硬盘驱动器”)。尽管图4中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM),数字视盘(Digital Video Disc-Read Only Memory,DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。系统存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. For example only, the storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 4, and is commonly referred to as a "hard drive"). Although not shown in FIG. 4, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and a removable non-volatile optical disk (such as a compact disk read-only memory (Compact Disk)) can be provided. Disc Read-Only Memory, CD-ROM), Digital Video Disc-Read Only Memory (DVD-ROM) or other optical media) read and write optical disc drives. In these cases, each drive can be connected to the bus 18 through one or more data media interfaces. The system memory 28 may include at least one program product, the program product having a set (for example, at least one) program modules configured to perform the functions of the various embodiments of the present invention.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如系统存储器28中,这样的程序模块42包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本发明所描述的实施例中的功能和/或方法。A program/utility tool 40 having a set of (at least one) program module 42 can be stored in, for example, the system memory 28. Such program module 42 includes, but is not limited to, an operating system, one or more application programs, and others. Program modules and program data, each of these examples or some combination may include the realization of a network environment. The program module 42 generally executes the functions and/or methods in the described embodiments of the present invention.
计算机设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该计算机设备12交互的设备通信,和/或与使得该计算机设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(Input/Output,I/O)接口22进行。并且,计算机设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network,LAN),广域网(Wide Area Network,WAN)通信。如图所示,网络适配器20通过总线18与计算机设备12的其它模块通信。应当明白,尽管图4中未示出,可以结合计算机设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、(Redundant Arrays of Inexpensive Disks,RAID)系统、磁带驱动器以及数据备份存储系统等。The computer device 12 may also communicate with one or more external devices 14 (such as keyboards, pointing devices, displays 24, etc.), and may also communicate with one or more devices that enable users to interact with the computer device 12, and/or communicate with Any device (such as a network card, modem, etc.) that enables the computer device 12 to communicate with one or more other computing devices. This communication can be performed through an input/output (Input/Output, I/O) interface 22. In addition, the computer device 12 may also communicate with one or more networks (for example, Local Area Network (LAN), Wide Area Network, WAN) through the network adapter 20. As shown in the figure, the network adapter 20 communicates with one or more networks through the bus 18. Communication with other modules of the computer device 12. It should be understood that although not shown in Figure 4, other hardware and/or software modules can be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external Disk drive arrays, (Redundant Arrays of Expensive Disks, RAID) systems, tape drives, data backup storage systems, etc.
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现本发明任意实施例所提供的一种交流量有效值计算方法。The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, to implement a method for calculating the effective value of the communication amount provided by any embodiment of the present invention.
实施例五Example five
本发明实施例五提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请所有发明实施例提供的交流量有效值计算方法:The fifth embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for calculating the effective value of the communication amount as provided in all the embodiments of the present application is implemented:
也即,该程序被处理器执行时实现:在一个交流电的周期内,通过采样电路以设定采样频率对目标电路中的交流量进行采样,得到交流量采样值,其中,所述采样频率与所述交流电的频率的比值为整数;计算全部交流量采样值之和,作为交流量有效值。That is, when the program is executed by the processor, it is realized: in a cycle of alternating current, the alternating current in the target circuit is sampled by the sampling circuit at a set sampling frequency to obtain the sampling value of the alternating current, wherein the sampling frequency is equal to The ratio of the frequency of the alternating current is an integer; the sum of all the sampling values of the alternating current is calculated as the effective value of the alternating current.
本发明实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、RAM、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、闪存、光纤、便携式CD-ROM、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media (non-exhaustive list) include: electrical connections with one or more wires, portable computer disks, hard disks, RAM, Read Only Memory (ROM), erasable Erasable Programmable Read Only Memory (EPROM), flash memory, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。The computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and computer-readable program code is carried therein. This propagated data signal can take many forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、无线电频率(RadioFrequency,RF)等等,或者上述的任意合适的组合。The program code contained on the computer-readable medium can be transmitted by any suitable medium, including, but not limited to, wireless, wire, optical cable, radio frequency (Radio Frequency, RF), etc., or any suitable combination of the above.
可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括LAN或WAN——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code used to perform the operations of the present invention can be written in one or more programming languages or a combination thereof. The programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network including LAN or WAN, or may be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。Note that the above are only the preferred embodiments of the present invention and the applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made to those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present invention. The scope of is determined by the scope of the appended claims.

Claims (10)

  1. 一种交流量有效值计算方法,其特征在于,包括:A method for calculating the effective value of the communication quantity, which is characterized in that it includes:
    在一个交流电的周期内,通过采样电路以设定采样频率对目标电路中的交流量进行采样,得到交流量采样值,其中,所述采样频率与所述交流电的频率的比值为整数;In a cycle of alternating current, sampling the alternating current in the target circuit at a set sampling frequency by the sampling circuit to obtain a sampling value of the alternating current, wherein the ratio of the sampling frequency to the frequency of the alternating current is an integer;
    计算全部交流量采样值之和,作为交流量有效值。Calculate the sum of all the sampled values of the AC as the effective value of the AC.
  2. 根据权利要求1所述的方法,其特征在于,所述计算全部交流量采样值之和,包括:The method according to claim 1, wherein the calculating the sum of all the sampled values of the communication volume comprises:
    对各所述交流量采样值进行误差修正;Perform error correction on each of the sampled values of the exchange amount;
    计算全部修正后的交流量采样值之和。Calculate the sum of all the corrected AC sampling values.
  3. 根据权利要求2所述的方法,其特征在于,所述对所述交流量采样值进行误差修正,包括:The method according to claim 2, wherein the performing error correction on the sampled value of the AC quantity comprises:
    通过所述采样电路以所述采样频率对所述目标电路在无源条件下进行采样,得到交流量偏移值;Sampling the target circuit under passive conditions by the sampling circuit at the sampling frequency to obtain an AC offset value;
    将所述交流量采样值与所述交流量偏移值的差值作为修正后的交流量采样值。The difference between the AC amount sample value and the AC amount offset value is used as the corrected AC amount sample value.
  4. 根据权利要求1所述的方法,其特征在于,所述计算全部交流量采样值之和,包括:The method according to claim 1, wherein the calculating the sum of all the sampled values of the communication volume comprises:
    计算各所述交流量采样值的绝对值之和。Calculate the sum of the absolute values of the sampled values of each of the AC quantities.
  5. 根据权利要求1所述的方法,其特征在于,所述计算全部交流量采样值之和,作为交流量有效值,包括:The method according to claim 1, wherein the calculating the sum of all the sampled values of the AC as the effective value of the AC comprises:
    计算与所述目标电路相连的放大电路的放大系数与全部交流量采样值之和的乘积,得到交流量有效值。Calculate the product of the amplification factor of the amplifying circuit connected to the target circuit and the sum of all the sampled values of the alternating current to obtain the effective value of the alternating current.
  6. 根据权利要求1所述的方法,其特征在于,所述计算全部交流量采样值之和,作为交流量有效值,包括:The method according to claim 1, wherein the calculating the sum of all the sampled values of the AC as the effective value of the AC comprises:
    当供电电源为单相交流电源时,将计算得到的交流量有效值作为单相电源的目标交流量有效值;When the power supply is a single-phase AC power supply, the calculated effective value of the AC is used as the target effective value of the single-phase power supply;
    当供电电源为三相交流电源时,如果确定所述三相交流电源满足平衡条件,则将计算得到的交流量有效值作为三相电源的目标交流量有效值,其中,所述交流量包括线电压和/或相电流。When the power supply is a three-phase AC power source, if it is determined that the three-phase AC power source satisfies the balance condition, the calculated effective value of the AC power is used as the target effective value of the AC power of the three-phase power source, where the AC power includes the line Voltage and/or phase current.
  7. 根据权利要求6所述的方法,其特征在于,所述确定所述三相交流电源满足平衡条件,包括:The method according to claim 6, wherein the determining that the three-phase AC power source satisfies a balance condition comprises:
    分别计算至少两路线电压有效值和相电流有效值;Calculate the effective value of voltage and phase current of at least two lines respectively;
    如果根据所述至少两路线电压有效值和相电流有效值,确定各路之间的线电压有效值的比值分别与匹配的相电流有效值的比值之差小于设定比例阈值,则确定所述三相交流电源满 足平衡条件。If, according to the at least two line voltage effective values and phase current effective values, it is determined that the difference between the ratio of the effective value of the line voltage and the effective value of the matched phase current between the paths is less than the set ratio threshold, then it is determined that the The three-phase AC power supply satisfies the balance condition.
  8. 一种交流量有效值计算装置,其特征在于,包括:A device for calculating the effective value of a communication quantity, which is characterized in that it comprises:
    交流量采样模块,用于在一个交流电的周期内,通过采样电路以设定采样频率对目标电路中的交流量进行采样,得到交流量采样值,其中,所述采样频率与所述交流电的频率的比值为整数;The AC quantity sampling module is used to sample the AC quantity in the target circuit at a set sampling frequency by the sampling circuit within one alternating current cycle to obtain the AC quantity sampled value, wherein the sampling frequency is the same as the frequency of the alternating current The ratio of is an integer;
    交流量有效值计算模块,用于计算全部交流量采样值之和,作为交流量有效值。The effective value calculation module of the AC is used to calculate the sum of all the sampled values of the AC as the effective value of the AC.
  9. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1-7中任一所述的交流量有效值计算方法。A computer device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor executes the program as described in any one of claims 1-7 The calculation method of the effective value of the communication amount mentioned above.
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7中任一所述的交流量有效值计算方法。A computer-readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the method for calculating the effective value of the communication quantity according to any one of claims 1-7.
PCT/CN2020/117610 2019-11-19 2020-09-25 Alternating current quantity effective value calculation method and apparatus, computer device, and storage medium WO2021098377A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911135570.0A CN110806502A (en) 2019-11-19 2019-11-19 Method and device for calculating effective value of Alternating Current (AC) quantity, computer equipment and storage medium
CN201911135570.0 2019-11-19

Publications (1)

Publication Number Publication Date
WO2021098377A1 true WO2021098377A1 (en) 2021-05-27

Family

ID=69490511

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117610 WO2021098377A1 (en) 2019-11-19 2020-09-25 Alternating current quantity effective value calculation method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN110806502A (en)
WO (1) WO2021098377A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110806502A (en) * 2019-11-19 2020-02-18 日立楼宇技术(广州)有限公司 Method and device for calculating effective value of Alternating Current (AC) quantity, computer equipment and storage medium
CN112147407B (en) * 2020-09-27 2021-12-17 广东电网有限责任公司佛山供电局 Method and system for calculating effective value of rapid analog quantity without being influenced by frequency change
CN113866488A (en) * 2021-10-21 2021-12-31 重庆华虹仪表有限公司 Method and device for calculating true effective value

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201773147U (en) * 2010-03-16 2011-03-23 付永文 Circuit for calculating virtual value of commercial electricity voltage
CN103149415A (en) * 2011-12-07 2013-06-12 中国科学院沈阳自动化研究所 High precision high frequency sin wave virtual value real-time detection method
CN103278676A (en) * 2013-05-29 2013-09-04 陕西科技大学 Electric current true virtual value detection circuit of electromotor soft starter
US8547120B1 (en) * 2009-05-13 2013-10-01 Keithley Instruments, Inc. High speed AC current source
CN103439587A (en) * 2013-09-10 2013-12-11 深圳市禾望电气有限公司 Three-phase alternating current detecting method
CN103743944A (en) * 2014-01-16 2014-04-23 贵州省计量测试院 Alternating current and direct current voltage true virtual value measurement method capable of automatically identifying type of signal
CN109444525A (en) * 2018-10-29 2019-03-08 南京国电南自维美德自动化有限公司 Transformer station measurement and control device AC sampling data valid and power factor calculate method
CN110806502A (en) * 2019-11-19 2020-02-18 日立楼宇技术(广州)有限公司 Method and device for calculating effective value of Alternating Current (AC) quantity, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1566965A (en) * 2003-06-19 2005-01-19 张若愚 Novel method for AC sampling calculation and true effective value sampling integrated circuit based on the same
CN101806825B (en) * 2010-03-12 2012-07-04 上海电机学院 Method and system for measuring effective value of electric parameter of electric motor powered up by frequency converter
CN102207518A (en) * 2011-03-11 2011-10-05 华为技术有限公司 Method and device for detecting effective value of alternating current (AC) voltage

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8547120B1 (en) * 2009-05-13 2013-10-01 Keithley Instruments, Inc. High speed AC current source
CN201773147U (en) * 2010-03-16 2011-03-23 付永文 Circuit for calculating virtual value of commercial electricity voltage
CN103149415A (en) * 2011-12-07 2013-06-12 中国科学院沈阳自动化研究所 High precision high frequency sin wave virtual value real-time detection method
CN103278676A (en) * 2013-05-29 2013-09-04 陕西科技大学 Electric current true virtual value detection circuit of electromotor soft starter
CN103439587A (en) * 2013-09-10 2013-12-11 深圳市禾望电气有限公司 Three-phase alternating current detecting method
CN103743944A (en) * 2014-01-16 2014-04-23 贵州省计量测试院 Alternating current and direct current voltage true virtual value measurement method capable of automatically identifying type of signal
CN109444525A (en) * 2018-10-29 2019-03-08 南京国电南自维美德自动化有限公司 Transformer station measurement and control device AC sampling data valid and power factor calculate method
CN110806502A (en) * 2019-11-19 2020-02-18 日立楼宇技术(广州)有限公司 Method and device for calculating effective value of Alternating Current (AC) quantity, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110806502A (en) 2020-02-18

Similar Documents

Publication Publication Date Title
WO2021098377A1 (en) Alternating current quantity effective value calculation method and apparatus, computer device, and storage medium
US11309902B2 (en) Gain and memory error estimation in a pipeline analog to digital converter
CN109558604B (en) Machine translation method and device, electronic equipment and storage medium
US10734927B2 (en) Motor drive phase sector buffer, offset and gain error circuitry
CN110175128A (en) A kind of similar codes case acquisition methods, device, equipment and storage medium
CN111181559B (en) Method, device, equipment and storage medium for rotary soft decoding
JP6770777B2 (en) Systems and methods for calculating mathematical functions
CN116594589B (en) Method, device and arithmetic logic unit for floating point number multiplication calculation
JP2010067251A (en) Integer division circuit with allowable error
CN110633447A (en) Spherical distance fixed-point calculation method based on FPGA and calculation device thereof
CN115097196A (en) Output voltage acquisition method and analog-to-digital conversion circuit of digital arc welding power supply
CN110309877A (en) A kind of quantization method, device, electronic equipment and the storage medium of feature diagram data
KR20190044977A (en) Temperature sensing circuit and semiconductor device
CN114545086A (en) Calibration circuit, method and device for resistor to be tested
CN102868405B (en) A kind of parallel analog-digital signal conversion device
CN113961168B (en) Data processing method, device, electronic equipment and storage medium
CN116979965A (en) Multi-dimensional multipath analog-to-digital converter calibration method and device and electronic equipment
CN101685384B (en) Integer division operational circuit tolerating errors
CN110752607A (en) Impedance analysis method and device for flexible direct current transmission converter and storage medium
WO2024168610A1 (en) Analog-to-digital conversion circuit, control method therefor, and terminal
CN116558423A (en) Moire fringe anti-electromagnetic interference method for metering
US20240213998A1 (en) Methods and apparatus to capture switch charge injections and comparator kickback effects
CN114338320B (en) CPM signal differential phase generation method, CPM signal differential phase generation device, CPM signal differential phase generation equipment and storage medium
TWI748679B (en) Neural network processing device, data processing method and device
CN117595698B (en) Inverter operation parameter prediction method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20888803

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.10.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20888803

Country of ref document: EP

Kind code of ref document: A1