CN113866488A - Method and device for calculating true effective value - Google Patents

Method and device for calculating true effective value Download PDF

Info

Publication number
CN113866488A
CN113866488A CN202111227143.2A CN202111227143A CN113866488A CN 113866488 A CN113866488 A CN 113866488A CN 202111227143 A CN202111227143 A CN 202111227143A CN 113866488 A CN113866488 A CN 113866488A
Authority
CN
China
Prior art keywords
signal
value
voltage
alternating current
sampling
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
CN202111227143.2A
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.)
Chongqing Huahong Instrument Co ltd
Original Assignee
Chongqing Huahong Instrument 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 Chongqing Huahong Instrument Co ltd filed Critical Chongqing Huahong Instrument Co ltd
Priority to CN202111227143.2A priority Critical patent/CN113866488A/en
Publication of CN113866488A publication Critical patent/CN113866488A/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

Landscapes

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

Abstract

The invention provides a method and a device for calculating a true effective value, wherein the method comprises the following steps: setting an analog-to-digital converter to be in an automatic continuous conversion mode, and setting a corresponding conversion frequency; according to the Nyquist sampling theorem, high-speed sampling is carried out on a detected signal and an internal signal through an analog-to-digital converter, and an external alternating current signal and an internal voltage signal are obtained; calculating according to the external alternating current signal and the internal voltage signal to obtain an alternating current signal value; and (4) integrating and calculating according to the alternating current signal value by combining a thermal equivalent principle to obtain a voltage true effective value. The invention can adopt a low-cost scheme, calculates the true effective value according to an integral method, and has good stability and high precision.

Description

Method and device for calculating true effective value
Technical Field
The invention relates to the technical field of power signal measurement, in particular to a method and a device for calculating a true effective value.
Background
The true effective value is a basic measurement for the alternating current signal, can reflect the thermal effect generated by the current flowing through the question and has practical application value. The true effective value of the alternating current signal is defined according to the thermal effect of the current, an alternating current and a direct current are respectively passed through the resistors with the same resistance, and if the heat generated in the same time is equal, the value of the direct current is called the effective value of the alternating current.
At present, most of instruments adopt a peak value calculation method or an average value method to calculate effective values, and the problems of large errors and instability exist in signal measurement with waveform distortion or large harmonic content.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method and apparatus for calculating a true effective value.
A method of computing a true valid value, comprising the steps of: setting an analog-to-digital converter to be in an automatic continuous conversion mode, and setting a corresponding conversion frequency; according to the Nyquist sampling theorem, high-speed sampling is carried out on a detected signal and an internal signal through an analog-to-digital converter, and an external alternating current signal and an internal voltage signal are obtained; calculating according to the external alternating current signal and the internal voltage signal to obtain an alternating current signal value; and (4) integrating and calculating according to the alternating current signal value by combining a thermal equivalent principle to obtain a voltage true effective value.
In one embodiment, the obtaining an external ac signal and an internal voltage signal by performing high-speed sampling on a signal to be measured and an internal signal through an analog-to-digital converter according to the nyquist sampling theorem specifically includes: according to the Nyquist sampling theorem, the highest frequency in the signals is set to be Fmax, the sampling frequency is F, F is larger than 2Fmax, and the tested signals and the internal signals are sampled at high speed by the sampling frequency F to obtain external alternating current signals and internal voltage signals.
In one embodiment, the calculating according to the external ac signal and the internal voltage signal to obtain an ac signal value specifically includes:
u=(Rac*k)/Rcore; (1)
wherein, Rcore is the sampling value of the internal voltage signal, Rac is the sampling value of the external alternating current signal, k is the conversion constant, and u is the alternating current signal value.
In one embodiment, the obtaining the voltage true effective value by performing an integral calculation according to an alternating current signal value in combination with a thermal equivalent principle specifically includes:
Figure BDA0003314716190000021
wherein, U is the voltage true effective value, and T is the cycle.
In one embodiment, the period is calculated by the formula:
F=(k*Tn)/Np; (3)
and calculating the acquisition period according to the inverse relation between the period and the frequency, wherein k is a frequency deviation value, Np is the total sampling point number, and Tn is the total period number.
In one embodiment, after the integration calculation is performed according to the ac signal value in combination with the thermal equivalent principle to obtain the true effective voltage value, the method further includes: calculating a true effective value of the check voltage and a check frequency deviation value according to the alternating voltage standard source; and verifying the voltage true effective value and the frequency deviation value according to the verification voltage true effective value and the verification frequency deviation value.
An apparatus for computing a true valid value, comprising: the device comprises a microcontroller, a sampling circuit, a key, a display and a resistance-capacitance voltage reduction power supply; the sampling circuit, the key, the display and the resistance-capacitance voltage reduction power supply are all electrically connected with the microcontroller; the sampling circuit and the resistance-capacitance voltage reduction power supply are connected with an external signal; the sampling circuit is internally provided with an analog-to-digital converter which is used for sampling an external signal and an internal signal of the microcontroller, acquiring an external alternating current signal and an internal voltage signal and transmitting the external alternating current signal and the internal voltage signal to the microcontroller; the microcontroller is used for calculating and acquiring a voltage true effective value according to the external alternating current signal and the internal voltage signal and transmitting the voltage true effective value to the display; the display is used for displaying the voltage true effective value; the key is used for controlling the on-off of the device.
In one embodiment, the display is a four-bit LED display.
Compared with the prior art, the invention has the advantages and beneficial effects that: the invention can process the analog signal transmitted by the sampling circuit and acquire the true effective value of the voltage according to the integral algorithm, and has the advantages of good stability, high precision, wide applicable frequency range and small influence of harmonic wave.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a method for computing a true valid value in one embodiment;
fig. 2 is a schematic structural diagram of an apparatus for calculating a true valid value according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings by way of specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In one embodiment, as shown in FIG. 1, there is provided a method of computing a true valid value, comprising the steps of:
step S101, setting the analog-to-digital converter to be in an automatic continuous conversion mode, and setting a corresponding conversion frequency.
Specifically, the analog-to-digital converter is set to an automatic continuous conversion mode, and a corresponding conversion frequency is set, for example, the conversion frequency is 12.5kHz, so that the measured signal can be continuously sampled subsequently.
And S102, according to the Nyquist sampling theorem, carrying out high-speed sampling on the detected signal and the internal signal through an analog-to-digital converter to obtain an external alternating current signal and an internal voltage signal.
Specifically, according to the nyquist sampling theorem, when the sampling frequency is greater than 2 times the highest frequency in the signal, the digital signal after sampling completely retains the information in the original signal. Therefore, the sampling frequency of the analog-to-digital converter can be set to be 2 times higher than the highest frequency, and the tested signal and the internal signal are sampled at high speed to obtain the external alternating current signal and the internal voltage signal.
According to the Nyquist sampling theorem, the highest frequency in the signals is set to be Fmax, the sampling frequency is F, F is larger than 2Fmax, and the tested signals and the internal signals are sampled at high speed by the sampling frequency F to obtain external alternating current signals and internal voltage signals.
For example, when the actual signal is ac 50Hz, F is 250Fmax, and 250 points are sampled per cycle, which is far beyond the requirement of nyquist sampling theorem. The conversion period T is 1/F is 80 μ s, that is, 80 μ s is converted once, and the conversion is completed and the interrupt is automatically generated.
And step S103, calculating and acquiring an alternating current signal value according to the external alternating current signal and the internal voltage signal.
Specifically, the analog-to-digital converter samples the external alternating current signal and the internal voltage signal respectively in sequence, and the alternating current signal value can be calculated and obtained according to the external alternating current signal and the internal voltage signal because the sampling interval time of two times is short, the fluctuation value of a power supply during two times of sampling can be ignored, and the signal sampled by using the same reference is determined.
The formula for calculating and obtaining the alternating current signal value is as follows:
u=(Rac*k)/Rcore; (1)
wherein, Rcore is the sampling value of the internal voltage signal, Rac is the sampling value of the external alternating current signal, k is the conversion constant, and u is the alternating current signal value.
For example, assuming that the power supply is 5V at a certain time, the internal voltage is 2.5V, and 12BITS ADC, k can be decreased to 2048, and the value calculated by equation (1) is the accurate ac signal value, which is not changed regardless of the power supply variation.
And step S104, integrating and calculating according to the alternating current signal value by combining a thermal equivalent principle to obtain a voltage true effective value.
Specifically, in a sinusoidal alternating current, according to the thermal equivalent principle, the effective value of the voltage is defined as its instantaneous value, and the root mean square value in one period is equivalent to squaring and averaging the real-time sampling value of the measured signal, and then squaring, that is, an integration process. Therefore, the voltage true effective value can be obtained by performing the integral calculation based on the ac signal value.
The formula for calculating the true effective value of the voltage is as follows:
Figure BDA0003314716190000041
wherein, U is the voltage true effective value, and T is the cycle.
Since averaging is an operation that tends to stabilize the varying signal, since its period may vary, the result is a stable value as long as its complete period is evaluated, where the time T of averaging goes to 50 complete periods T of the periodic signal, i.e. 1 second.
When performing the integration, a complete cycle needs to be recorded, a start signal and an end signal are needed. And setting a descending threshold and an ascending threshold, starting to detect the ascending threshold when detecting that the descending threshold is lower for 10 times, and identifying that the period starts and ending the signal in the same way when the ascending threshold is higher for 10 times.
Because of adopting the 1 second average method, after the signal is started, the time interval of each sampling point is the same, the sampling stops until a certain point number, the effective value can be calculated according to the integral and the root mean square, the frequency F can be calculated according to the total point number and the total period number of the sampling, and the formula is as follows:
F=(k*Tn)/Np; (3)
and calculating the acquisition period according to the inverse relation between the period and the frequency, wherein k is a frequency deviation value, Np is the total sampling point number, and Tn is the total period number.
In one embodiment, after step S104, the method further includes: and calculating a true effective value of the check voltage and a check frequency deviation value according to the alternating voltage standard source, and checking the true effective value of the voltage and the frequency deviation value according to the true effective value of the check voltage and the check frequency deviation value to ensure the precision.
In this embodiment, set up analog-to-digital converter for automatic continuous conversion mode, and set up corresponding conversion frequency, according to the nyquist sampling theorem, carry out high-speed sampling to measured signal and internal signal through analog-to-digital converter, obtain outside alternating current signal and internal voltage signal, calculate according to outside alternating current signal and internal voltage signal and obtain the alternating signal value, combine the thermal equivalence principle, carry out integral calculation according to the alternating signal value, obtain the true virtual value of voltage, can handle analog signal, calculate through the integral algorithm and obtain the true virtual value of voltage, have the stability good, applicable frequency range is wide and receive the advantage that the harmonic influences are little.
As shown in fig. 2, there is provided an apparatus for calculating a true valid value, including: the microcontroller 10, the sampling circuit 20, the keys 30, the display 40 and the resistance-capacitance voltage reduction power supply 50; the sampling circuit 20, the key 30, the display 40 and the resistance-capacitance voltage reduction power supply 50 are all electrically connected with the microcontroller 10; the sampling circuit 20 and the resistance-capacitance voltage reduction power supply 50 are connected with external signals; an analog-to-digital converter is arranged in the sampling circuit 20, and is used for sampling an external signal and an internal signal of the microcontroller 10, acquiring an external alternating current signal and an internal voltage signal, and transmitting the external alternating current signal and the internal voltage signal to the microcontroller 10; the microcontroller 10 is configured to calculate and obtain a true effective voltage value according to the external ac signal and the internal voltage signal, and transmit the true effective voltage value to the display 40; the display 40 is used for displaying the true effective value of the voltage; the keys 30 are used to control the switching of the device.
In this embodiment, the external signal and the internal signal of the microcontroller 10 are sampled by the analog-to-digital converter of the sampling circuit 20 to obtain the external ac signal and the internal voltage signal, and the external ac signal and the internal voltage signal are transmitted to the microcontroller 10, the external ac signal and the internal voltage signal are calculated by the microcontroller 10 to obtain the true effective value of the voltage, the true effective value of the voltage is transmitted to the display 40, the true effective value of the voltage is displayed by the display 40, the analog signal transmitted by the sampling circuit 20 can be processed by controlling the on/off of the device through the key 30, and the true effective value of the voltage is obtained according to the integral algorithm.
The resistance-capacitance voltage reduction power supply 50 is only provided with one voltage stabilizing diode, when the resistance-capacitance voltage reduction power supply is directly used as a power supply of the device, the power supply has larger ripples, and because the analog-digital converter is fixed by adopting the power supply voltage as a sampling reference power supply, when the power supply has larger fluctuation, if the sampling result is directly adopted, the instability and the error are large. The 2.5V voltage used by the core logic of the microcontroller 10 is very stable and the analog to digital converter can sample this signal as well.
Therefore, the external signal and the internal signal can be respectively sampled at high speed to obtain an external alternating current signal and an internal voltage signal; because the interval time of the two times of sampling is short, the fluctuation value of the power supply during the two times of sampling can be ignored, the signal is determined as a signal of unified reference sampling, and the true effective value of the voltage can be obtained by calculation according to the external alternating current signal and the internal voltage signal.
Wherein, the display adopts the four-digit LED display.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
It will be apparent to those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and optionally they may be implemented in program code executable by a computing device, such that they may be stored on a computer storage medium (ROM/RAM, magnetic disks, optical disks) and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (8)

1. A method of computing a true valid value, comprising the steps of:
setting an analog-to-digital converter to be in an automatic continuous conversion mode, and setting a corresponding conversion frequency;
according to the Nyquist sampling theorem, high-speed sampling is carried out on a detected signal and an internal signal through an analog-to-digital converter, and an external alternating current signal and an internal voltage signal are obtained;
calculating according to the external alternating current signal and the internal voltage signal to obtain an alternating current signal value;
and (4) integrating and calculating according to the alternating current signal value by combining a thermal equivalent principle to obtain a voltage true effective value.
2. The method according to claim 1, wherein the obtaining of the external ac signal and the internal voltage signal by sampling the signal under test and the internal signal through the analog-to-digital converter at high speed according to nyquist sampling theorem specifically comprises:
according to the Nyquist sampling theorem, the highest frequency in the signals is set to be Fmax, the sampling frequency is F, F is larger than 2Fmax, and the tested signals and the internal signals are sampled at high speed by the sampling frequency F to obtain external alternating current signals and internal voltage signals.
3. A method according to claim 1, wherein said ac signal value is obtained by calculation based on said external ac signal and said internal voltage signal, specifically:
u=(Rac*k)/Rcore; (1)
wherein, Rcore is the sampling value of the internal voltage signal, Rac is the sampling value of the external alternating current signal, k is the conversion constant, and u is the alternating current signal value.
4. The method according to claim 3, wherein the obtaining the voltage true effective value by performing an integral calculation according to the ac signal value in combination with a thermal equivalent principle specifically comprises:
Figure FDA0003314716180000011
wherein, U is the voltage true effective value, and T is the cycle.
5. A method for calculating a true valid value according to claim 4, wherein the calculation formula of the period is:
F=(k*Tn)/Np; (3)
and calculating the acquisition period according to the inverse relation between the period and the frequency, wherein k is a frequency deviation value, Np is the total sampling point number, and Tn is the total period number.
6. The method of claim 5, wherein after the obtaining the voltage true effective value by performing an integral calculation according to the ac signal value in combination with the thermal equivalence principle, the method further comprises:
calculating a true effective value of the check voltage and a check frequency deviation value according to the alternating voltage standard source;
and verifying the voltage true effective value and the frequency deviation value according to the verification voltage true effective value and the verification frequency deviation value.
7. An apparatus for computing a true valid value, comprising: the device comprises a microcontroller, a sampling circuit, a key, a display and a resistance-capacitance voltage reduction power supply; the sampling circuit, the key, the display and the resistance-capacitance voltage reduction power supply are all electrically connected with the microcontroller; the sampling circuit and the resistance-capacitance voltage reduction power supply are connected with an external signal; the sampling circuit is internally provided with an analog-to-digital converter which is used for sampling an external signal and an internal signal of the microcontroller, acquiring an external alternating current signal and an internal voltage signal and transmitting the external alternating current signal and the internal voltage signal to the microcontroller; the microcontroller is used for calculating and acquiring a voltage true effective value according to the external alternating current signal and the internal voltage signal and transmitting the voltage true effective value to the display; the display is used for displaying the voltage true effective value; the key is used for controlling the on-off of the device.
8. An apparatus for calculating a true valid value according to claim 7, wherein said display is a four-bit LED display.
CN202111227143.2A 2021-10-21 2021-10-21 Method and device for calculating true effective value Pending CN113866488A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111227143.2A CN113866488A (en) 2021-10-21 2021-10-21 Method and device for calculating true effective value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111227143.2A CN113866488A (en) 2021-10-21 2021-10-21 Method and device for calculating true effective value

Publications (1)

Publication Number Publication Date
CN113866488A true CN113866488A (en) 2021-12-31

Family

ID=78997012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111227143.2A Pending CN113866488A (en) 2021-10-21 2021-10-21 Method and device for calculating true effective value

Country Status (1)

Country Link
CN (1) CN113866488A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001133488A (en) * 1999-11-08 2001-05-18 Kawamura Electric Inc Ac voltage-measuring device and method
CN102539892A (en) * 2012-01-16 2012-07-04 南京磐能电力科技股份有限公司 Method for obtaining true effective values of AC (alternating current) signals
CN103107812A (en) * 2013-01-16 2013-05-15 航天科工深圳(集团)有限公司 Alternating signal sampling device and implementation method thereof
KR20150108150A (en) * 2014-03-17 2015-09-25 엘에스산전 주식회사 A generator of the RMS value of the AC signal based on digital implementation
KR101719251B1 (en) * 2016-05-02 2017-03-23 전자부품연구원 Apparatus and method for estimating root mean square value of the voltage and current
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
CN112578278A (en) * 2020-12-16 2021-03-30 河南省计量科学研究院 Residual current protector action characteristic tester calibration device and system algorithm
JP2021113792A (en) * 2020-01-21 2021-08-05 横河電機株式会社 Effective value calculator

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001133488A (en) * 1999-11-08 2001-05-18 Kawamura Electric Inc Ac voltage-measuring device and method
CN102539892A (en) * 2012-01-16 2012-07-04 南京磐能电力科技股份有限公司 Method for obtaining true effective values of AC (alternating current) signals
CN103107812A (en) * 2013-01-16 2013-05-15 航天科工深圳(集团)有限公司 Alternating signal sampling device and implementation method thereof
KR20150108150A (en) * 2014-03-17 2015-09-25 엘에스산전 주식회사 A generator of the RMS value of the AC signal based on digital implementation
KR101719251B1 (en) * 2016-05-02 2017-03-23 전자부품연구원 Apparatus and method for estimating root mean square value of the voltage and current
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
JP2021113792A (en) * 2020-01-21 2021-08-05 横河電機株式会社 Effective value calculator
CN112578278A (en) * 2020-12-16 2021-03-30 河南省计量科学研究院 Residual current protector action characteristic tester calibration device and system algorithm

Similar Documents

Publication Publication Date Title
CN102782512A (en) Power source device and programmable controller
RU2009135814A (en) MEASURING THE FULL RESISTANCE OF THE ELECTRIC TRANSMISSION LINE
CN104198091B (en) A kind of intelligent platinum resistance temperature measurement tester and its method of calibration
CN111934760B (en) Signal processing transmission delay characteristic detection device and method and terminal equipment
CN114047472B (en) Metering error monitoring system of intelligent ammeter and monitoring method and device thereof
CN110780110B (en) Fundamental voltage zero crossing point automatic detection method and system and sampling device
CN109471058A (en) A kind of field-checking measurement error system and method
US20180231586A1 (en) Non-contact type voltage sensor for dual-wire power cable and method for compensating installation position variation thereof
CN207366731U (en) A kind of intelligent electric energy meter detection device
CN109085414B (en) Voltage detection method and device
CN113866661A (en) Power supply dynamic response test method, system and related components
Gallo et al. Real-time digital multifunction instrument for power quality integrated indexes measurement
CN113866488A (en) Method and device for calculating true effective value
CN114200381A (en) System and method for detecting reliability of intelligent electric meter
CN110208596A (en) Load current monitoring circuit and method
CN112067165A (en) Temperature sensor precision testing system, testing method, testing device and storage medium
CN108627788B (en) Hall current sensor hysteresis detection method and system
CN109085484B (en) Method and circuit for measuring voltage holding time of voltage endurance tester
US11553568B2 (en) Flicker measurement method and flicker measurement system
CN114966360A (en) System and method for testing avalanche voltage of optical device
CN111190134B (en) Dynamic response time characteristic test method and verification device for electric energy meter
JP6457771B2 (en) RMS value measuring method and apparatus
Warda Adaptive correction of the quantisation error in the frequency-to-code converter
Gherasim et al. Development of a flickermeter for grid-connected wind turbines using a DSP-based prototyping system
CN114337614B (en) Comparator-based high-precision edge detection method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination