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

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

Info

Publication number
CN110806502A
CN110806502A CN201911135570.0A CN201911135570A CN110806502A CN 110806502 A CN110806502 A CN 110806502A CN 201911135570 A CN201911135570 A CN 201911135570A CN 110806502 A CN110806502 A CN 110806502A
Authority
CN
China
Prior art keywords
alternating current
sampling
value
effective value
current quantity
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201911135570.0A
Other languages
Chinese (zh)
Inventor
袁俊波
刘真
秦鹏
荣洪凯
郭耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Building Technology Guangzhou Co Ltd
Original Assignee
Hitachi Building Technology Guangzhou Co Ltd
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 Hitachi Building Technology Guangzhou Co Ltd filed Critical Hitachi Building Technology Guangzhou Co Ltd
Priority to CN201911135570.0A priority Critical patent/CN110806502A/en
Publication of CN110806502A publication Critical patent/CN110806502A/en
Priority to PCT/CN2020/117610 priority patent/WO2021098377A1/en
Pending legal-status Critical Current

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

Landscapes

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

Abstract

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.

Description

Method and device for calculating effective value of Alternating Current (AC) quantity, computer equipment and storage medium
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.
Example one
Fig. 1 is a flowchart of a method for calculating an effective value of an alternating current amount in an embodiment of the present invention, where this embodiment is applicable to a case of calculating an effective value of an alternating current amount in a circuit, and the method may be executed by an apparatus for calculating an effective value of an alternating current amount provided in an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated into a computer device. As shown in fig. 1, the method of this embodiment specifically includes:
s110, sampling the alternating current quantity in the target circuit through a sampling circuit at a set sampling frequency in a period of the 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.
Specifically, the alternating current is a current whose current direction changes periodically with time. The frequency of the alternating current may refer to the number of times the direction of the current changes periodically per unit time. The sampling circuit is used for periodically sampling the target circuit. The sampling frequency is used to determine the number of samples taken by the sampling circuit. The target circuit is a circuit to be sampled, and the power supply of the target circuit is an alternating current power supply. The alternating current is typically a voltage or a current. The sampled value of the alternating current amount may refer to a value of the alternating current amount in the target circuit at the current time.
In the circuit, both the current and the voltage are Analog quantities, and the Analog quantities need to be converted into Digital quantities, i.e., Analog to Digital (a/D) conversion is performed. The sampled value of the alternating current is actually a digital value, that is, the sampling circuit includes an a/D converter or the target circuit includes an a/D converter.
Typically, the sampling frequency is greater than the frequency of the alternating current. It can be understood 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 sampling frequency is equal to the ratio of the sampling frequency domain to the frequency of the alternating current, in order to ensure the sampling accuracy, the sampling frequency is usually an integer, and the value of the sampling frequency is greater than or equal to 2. Correspondingly, in a period of the alternating current, the number of sampling values of the alternating current quantity obtained by sampling is more than or equal to 2.
And S120, calculating the sum of all the sampling values of the alternating current quantity as an effective value of the alternating current quantity.
And accumulating the sum of the sampling values of the alternating current quantity to be used as an effective value of the alternating current quantity.
In fact, alternating current and direct current pass through resistors with the same resistance respectively, and if the two currents generate the same heat in the same time, the value of the direct current at this time is called the effective value of the alternating current.
The effective value of the alternating current amount includes an effective value of a current of the alternating current and/or an effective value of a voltage of the alternating current.
A change in the current direction of the alternating current results in the current and voltage being in opposite directions, i.e. the current and voltage values are negative, and when calculating the cumulative sum, the sum is actually calculated as an absolute sum.
Optionally, the calculating the sum of all the ac traffic sampling values includes: and calculating the sum of the absolute values of the sampled values of the alternating current.
By calculating the absolute value of the sampling value of the alternating current quantity, the condition that the summation is inaccurate due to the fact that the numerical value is negative can be eliminated, and the effective value of the alternating current quantity is accurately obtained.
Optionally, the calculating the sum of all the ac traffic sampling values includes: 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.
In general, noise interference exists in a target circuit, error correction can be carried out on an alternating current quantity sampling value, interference in the target circuit is reduced, and accuracy of the alternating current quantity sampling value is improved.
By carrying out error correction on the alternating current quantity sampling value and carrying out summation calculation by adopting the corrected alternating current quantity sampling value, the error of the alternating current quantity sampling value can be reduced, the precision of the alternating current quantity sampling value is improved, and the precision of the alternating current quantity effective value is improved.
Optionally, the performing error correction on the ac sampling value includes: 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.
Wherein the passive condition is used to determine that the target circuit is in the absence of a power supply. The alternating current offset value is used as an interference value of the target circuit. In practice, the ac offset value refers to the interference current present in the target circuit in the absence of the power supply.
The difference between the ac sampling value and the ac offset value may be a corrected ac sampling value. The corrected AC value is obtained by subtracting the error from the AC value.
By obtaining the deviation value of the alternating current quantity and subtracting the deviation value of the alternating current quantity from the sampling value of the alternating current quantity, the error interference in the sampling value of the alternating current quantity is eliminated, and the precision of the sampling value of the alternating current quantity is improved.
Optionally, the calculating a sum of all the ac value sampling values as an ac effective value includes: 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.
The amplifying circuit is used for amplifying or reducing current and/or voltage in a target circuit. 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 circuit range of sampling by 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 alternating current quantity obtained by multiplying the amplification factor by the sum of all the sampling values of the alternating current quantity is actually the effective value of the alternating current quantity after amplification or the effective value of the alternating current quantity after reduction.
It can be understood that, generally, the components need a smaller voltage for power supply, and the voltage in the target circuit needs to be reduced, so as to avoid the situation that the components are broken down due to the fact that the voltage is too large, and the components are damaged. Thus, the voltage and/or current in the target circuit needs to be reduced accordingly by the amplification circuit.
The effective value of the alternating current quantity is amplified or reduced by the amplification factor of the amplification circuit, and the precision of the effective value of the alternating current quantity is further improved.
Optionally, the calculating a sum of all the ac value sampling values as an ac effective value includes: 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.
It is understood that in the single-phase ac power supply, there is only one power supply, and the calculated effective value of the ac quantity is the target effective value of the ac quantity. In the three-phase alternating current power supply, three power supplies are equivalently present, only when the three power supplies are balanced, no circulating current exists in the power supplies, and the calculated effective value of the alternating current quantity between any two-phase circuits is the target effective value of the alternating current quantity. It can be understood that, in the unbalanced state of the three-phase ac power supply, the change of the current direction is not stable and not periodically changed, and the effective value of the ac quantity obtained and calculated at this time is not accurate.
By distinguishing the types of the alternating current and determining the target alternating current quantity effective value according to the types of the alternating current, the alternating current quantity effective values of the different types of alternating current are accurately determined, and the precision of the alternating current quantity effective values is improved.
Optionally, the determining that the three-phase ac power supply satisfies a balance condition includes: 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.
The effective values of the line voltage and the phase current are effective values of the alternating current quantity, and can be obtained through calculation in the steps. And setting a proportion threshold value for judging whether the line voltage ratio and the phase current ratio of at least two paths are the same or similar. The balance condition is used for judging whether the voltage and the current in three circuits in the three-phase alternating current power supply are balanced or not.
Specifically, if the ratio of the line voltages of the two paths is the same as or similar to the phase current ratio of the two paths, it is indicated that no circulating current exists in the three-phase alternating-current power supply, and the three-phase alternating-current power supply is balanced.
And judging whether the three-phase alternating-current power supply is balanced or not by judging whether the ratio of the line voltages of the at least two paths is the same as or similar to the ratio of the phase currents of the at least two paths, wherein the effective value of the alternating-current quantity can be used as the effective value of the target alternating-current quantity of the three-phase alternating-current power supply when the three-phase alternating-current power supply is balanced, so that the effective value of the target alternating-current quantity of the three-phase.
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.
Example two
Fig. 2a is a flowchart of an effective value calculation method of an alternating current amount in a second embodiment of the present invention, which is optimized based on the above embodiments. The method of the embodiment specifically includes:
s210, sampling the alternating current quantity in the target circuit through a sampling circuit at a set sampling frequency in a period of the 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.
Specifically, the target circuit includes a frequency converter.
In a specific example, the sampling frequency is fcFrequency of alternating current of f0The number of sampling times n is fcDivided by f0The ratio is obtained, wherein n is greater than or equal to 2. Illustratively, the sampling values of the ac quantities obtained by sampling by the sampling circuit are ADC1 and ADC2 … ADCn, respectively.
And S220, sampling the target circuit under a passive condition through the sampling circuit at the sampling frequency to obtain an alternating current offset value.
The offset value of the alternating current quantity is acquired by sampling through a sampling circuit.
And S230, taking the difference value between the alternating current quantity sampling value and the alternating current quantity offset value as the corrected alternating current quantity sampling value.
The corrected sampling values of the alternating current quantity are respectively as follows: ADC1-ADCOFFSET, ADC2-ADCOFFSET … ADCn-ADCOFFSET; namely: adc1, adc2 … … adc n.
And S240, calculating the product of the amplification factor of the amplification circuit connected with the target circuit and the sum of the absolute values of all the corrected sampling values of the alternating current quantity to serve as the effective value of the alternating current quantity.
The sum of the absolute values of all the corrected sampled values of the AC quantities is
Figure BDA0002279503980000091
Where the amplification factor is a, the effective value of the ac quantity is RMS × Sum.
And S250, when the power supply is a single-phase alternating current power supply, taking the calculated effective value of the alternating current quantity as a target effective value of the alternating current quantity of the single-phase power supply.
And S260, 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, taking the calculated effective value of the alternating current quantity 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.
Optionally, the determining that the three-phase ac power supply satisfies a balance condition includes: 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.
Respectively calculating two lines of line voltages RSM through the stepsU1And RSMU2And the two-way phase current RSMI1And RSMI2. When RSMU1/RSMU2And RSMI1/RSMI2When the ratio is less than the set ratio threshold, the RSM is executedU1Or RSMU2Is an effective value of three-phase AC line voltage, RSMI1Or RSMI2The effective value of the three-phase alternating current phase current is obtained.
In a specific example, as shown in fig. 2b, the effective value calculation method for the alternating current amount in this embodiment may specifically include:
s201, the cycle is started.
Here, the cycle refers to a cycle of a sampling operation within one period of the alternating current.
S202, acquiring an alternating current quantity sampling value.
S203, judging whether the periodic sampling operation of the alternating current is finished, if so, executing S204; otherwise, S202 is performed.
And S204, respectively calculating the difference value between each alternating current quantity sampling value and the alternating current quantity offset value to obtain the corrected alternating current quantity sampling value.
The offset value of the alternating current quantity is obtained by sampling in advance.
And S205, calculating the sum of the absolute values of all the corrected sampling values of the alternating current quantity.
And S206, calculating the product of the sum of the calculated absolute values and the amplification factor to obtain the effective value of the alternating current quantity.
And S207, finishing the calculation of the effective value of the alternating current quantity.
According to the embodiment of the invention, the effective value of the alternating current is obtained through summation calculation, the calculation amount of the effective value of the alternating current is simplified, the operation time of a CPU (central processing unit) for calculating the effective value of the alternating current is effectively reduced, the storage space occupied by the effective value of the alternating current is reduced, the calculation efficiency is improved, and the calculation cost is reduced.
EXAMPLE III
Fig. 3 is a schematic diagram of an ac effective value calculation apparatus according to a third embodiment of the present invention. The third embodiment is a corresponding apparatus for implementing the method for calculating an effective value of an alternating current quantity provided by the foregoing embodiments of the present invention, and the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated into a computer device.
Accordingly, the apparatus of the present embodiment may include:
the alternating current quantity sampling module 310 is configured to sample, by a sampling circuit, an alternating current quantity in a target circuit at a set sampling frequency within a period of an alternating current to obtain an alternating current quantity sampling value, where a ratio of the sampling frequency to a frequency of the alternating current is an integer;
and the alternating current quantity effective value calculating module 320 is used for calculating the sum of all the alternating current quantity sampling values as the alternating current quantity effective value.
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.
Further, the alternating current quantity effective value calculating module 320 includes: the error correction unit is used for 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.
Further, the error correction unit includes: the passive sampling subunit is used for sampling the target circuit under a passive condition through 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.
Further, the alternating current quantity effective value calculating module 320 includes: and the absolute value summing unit is used for calculating the sum of the absolute values of the sampling values of the alternating current quantities.
Further, the alternating current quantity effective value calculation device further includes: and the amplification operation module is used for 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.
Further, the alternating current quantity effective value calculating module 320 includes: the power supply judging unit is used for taking the calculated effective value of the alternating current quantity as a target effective value of the alternating current quantity of the single-phase power supply when the power supply is the single-phase alternating current 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.
Further, the power supply determination unit includes: the three-phase alternating current power supply effective value operator unit is used for respectively calculating the effective values of the voltage and the phase current of at least two lines of lines; 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.
The alternating current quantity effective value calculating device can execute the alternating current quantity effective value calculating method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executed alternating current quantity effective value calculating method.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 4 is only one example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 4, computer device 12 is in the form of a general purpose computing device. The components of 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 that couples various system components including the system memory 28 and the processing unit 16. The computer device 12 may be a device that is attached to a bus.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
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. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read-Only Memory (CD-ROM), Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an Input/Output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., Local Area Network (LAN), Wide Area Network (WAN)) via Network adapter 20. As shown, Network adapter 20 communicates with other modules of computer device 12 via bus 18. it should be understood that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to microcode, device drivers, Redundant processing units, external disk drive Arrays, (Redundant Arrays of Inesponsive Disks, RAID) systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing a method for calculating an effective value of an alternating current amount provided in any of the embodiments of the present invention.
EXAMPLE five
An embodiment five of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for calculating an effective value of an alternating current quantity according to any of the inventive embodiments of the present application:
that is, the program when executed by the processor implements: 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.
Computer storage media for embodiments of the invention may employ 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. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a RAM, a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely 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 type of network, including a LAN or a WAN, or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

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.
CN201911135570.0A 2019-11-19 2019-11-19 Method and device for calculating effective value of Alternating Current (AC) quantity, computer equipment and storage medium Pending CN110806502A (en)

Priority Applications (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
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

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN110806502A true CN110806502A (en) 2020-02-18

Family

ID=69490511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911135570.0A Pending 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

Country Status (2)

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

Cited By (3)

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

Citations (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
CN101806825A (en) * 2010-03-12 2010-08-18 上海电机学院 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

Family Cites Families (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
CN203376390U (en) * 2013-05-29 2014-01-01 陕西科技大学 Current true RMS detection circuit of motor soft starter
CN103439587B (en) * 2013-09-10 2016-03-02 深圳市禾望电气股份有限公司 The detection method of three-phase alternating current
CN103743944B (en) * 2014-01-16 2016-03-23 贵州省计量测试院 A kind of real effective combined-voltage measuring method of automatic identification signal type
CN109444525B (en) * 2018-10-29 2020-10-09 南京国电南自维美德自动化有限公司 Method for calculating AC sampling data effective value and power factor of transformer substation measurement and control device
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

Patent Citations (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
CN101806825A (en) * 2010-03-12 2010-08-18 上海电机学院 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

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021098377A1 (en) * 2019-11-19 2021-05-27 日立楼宇技术(广州)有限公司 Alternating current quantity effective value calculation method and apparatus, computer device, and storage medium
CN112147407A (en) * 2020-09-27 2020-12-29 广东电网有限责任公司佛山供电局 Method and system for calculating effective value of rapid analog quantity without being influenced by frequency change
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

Also Published As

Publication number Publication date
WO2021098377A1 (en) 2021-05-27

Similar Documents

Publication Publication Date Title
WO2021098377A1 (en) Alternating current quantity effective value calculation method and apparatus, computer device, and storage medium
CN109558604B (en) Machine translation method and device, electronic equipment and storage medium
CN109272348B (en) Method and device for determining number of active users, storage medium and electronic equipment
CN109885819B (en) Data table dynamic adjustment method, system, device and storage medium
CN113125851B (en) Power consumption statistical method, device, equipment and storage medium
US10734927B2 (en) Motor drive phase sector buffer, offset and gain error circuitry
CN106685421B (en) Analog signal acquisition method and device
EP3008477A1 (en) Dynamic sensitivity adjustment for adc measurements
CN110175128B (en) Similar code case acquisition method, device, equipment and storage medium
US20130335250A1 (en) Hybrid successive approximation analog-to-digital converter
CN108877969B (en) Nuclear power theoretical model establishing and verifying method, system and terminal equipment
JP2004070947A (en) Histogram calculation system, electronic testing device and histogram calculating method
CN111181559A (en) Rotary soft decoding method, device, equipment and storage medium
CN111125564A (en) Thermodynamic diagram generation method and device, computer equipment and storage medium
CN115097196A (en) Output voltage acquisition method and analog-to-digital conversion circuit of digital arc welding power supply
CN111859252B (en) Method, device, equipment and storage medium for determining loading and unloading duration
CN115473216A (en) Method and system for improving line loss calculation of power grid
CN116594589B (en) Method, device and arithmetic logic unit for floating point number multiplication calculation
CN114137360A (en) Power distribution network fault positioning method and device and storage medium
CN101685384B (en) Integer division operational circuit tolerating errors
CN113961168A (en) Data processing method and device, electronic equipment and storage medium
CN116979965A (en) Multi-dimensional multipath analog-to-digital converter calibration method and device and electronic equipment
CN113010182B (en) Method and device for generating upgrade file and electronic equipment
CN116558423A (en) Moire fringe anti-electromagnetic interference method for metering
CN117725889A (en) Data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200218

RJ01 Rejection of invention patent application after publication