CN103344825B  Based on the electric energy metered system of AC sampling  Google Patents
Based on the electric energy metered system of AC sampling Download PDFInfo
 Publication number
 CN103344825B CN103344825B CN201310284687.1A CN201310284687A CN103344825B CN 103344825 B CN103344825 B CN 103344825B CN 201310284687 A CN201310284687 A CN 201310284687A CN 103344825 B CN103344825 B CN 103344825B
 Authority
 CN
 China
 Prior art keywords
 voltage
 analog
 current
 sampling
 value
 Prior art date
Links
 238000005070 sampling Methods 0.000 title claims abstract description 75
 244000171263 Ribes grossularia Species 0.000 claims abstract description 64
 238000007493 shaping process Methods 0.000 claims abstract description 7
 238000000034 methods Methods 0.000 claims description 17
 238000006243 chemical reactions Methods 0.000 claims description 13
 230000004044 response Effects 0.000 abstract description 3
 238000010586 diagrams Methods 0.000 description 7
 101710048884 ADC Proteins 0.000 description 4
 101710048882 SPE2 Proteins 0.000 description 4
 230000002093 peripheral Effects 0.000 description 4
 101710059262 DMA2 Proteins 0.000 description 3
 238000004364 calculation methods Methods 0.000 description 3
 238000005516 engineering processes Methods 0.000 description 3
 229920002574 CR39 Polymers 0.000 description 2
 241001330499 Corsiaceae Species 0.000 description 2
 101710048924 adhT Proteins 0.000 description 2
 230000003321 amplification Effects 0.000 description 2
 238000004458 analytical methods Methods 0.000 description 2
 238000004422 calculation algorithm Methods 0.000 description 2
 230000003750 conditioning Effects 0.000 description 2
 238000003199 nucleic acid amplification method Methods 0.000 description 2
 230000000737 periodic Effects 0.000 description 2
 230000037010 Beta Effects 0.000 description 1
 210000004369 Blood Anatomy 0.000 description 1
 101710059253 DMA1 Proteins 0.000 description 1
 210000004940 Nucleus Anatomy 0.000 description 1
 281000006858 STMicroelectronics companies 0.000 description 1
 281000079097 UtahIdaho Sugar Company companies 0.000 description 1
 230000005540 biological transmission Effects 0.000 description 1
 239000008280 blood Substances 0.000 description 1
 238000004891 communication Methods 0.000 description 1
 230000002596 correlated Effects 0.000 description 1
 230000001808 coupling Effects 0.000 description 1
 238000010168 coupling process Methods 0.000 description 1
 238000005859 coupling reactions Methods 0.000 description 1
 238000000354 decomposition reactions Methods 0.000 description 1
 229920005994 diacetyl cellulose Polymers 0.000 description 1
 238000003379 elimination reactions Methods 0.000 description 1
 238000005259 measurements Methods 0.000 description 1
 230000000051 modifying Effects 0.000 description 1
 238000004088 simulation Methods 0.000 description 1
 230000003068 static Effects 0.000 description 1
 230000001360 synchronised Effects 0.000 description 1
Abstract
Description
Technical field
The utility model belongs to electric energy metrical sampling system, concretely, belongs to the electric energy metered system based on AC sampling.
Background technology
Along with the raising day by day of Automation of Electric Systems level, the acquisition of parameters of electric power and management become more and more important.The popularization and application of microcomputer technology in electric system, makes the measurement and monitoring technology of electric system be developed rapidly.Obtain from conventional instrument various in style the requirement that parameters of electric power can not meet system, development high precision, multiparameter, multifunctional, digitized Modularized power instrument have become a current heat subject.
Usually adopt electric energy computation chip ADE7753 as electric power side control instrument scheme in prior art, the release of ADE7753 is provided convenience to electric energy exploitation, but as electric power observation and control instrument scheme, it also exists response time and harmonic measure and cost aspect and there is certain limitation.
STMicw Electronics releases the Cortex of STM32 series 32 ^{tM}the ARM ofM3 kernel be ST Microelectronics in the industry cycle release at first based on nucleus product in ARMCortexM3, inherit the excellent blood lineage of CortexM3 kernel, add the high performance peripheral hardware resource of ST simultaneously, FLASH, SRAM memory, abundant serial communication interface, as IIC, SPI, USART, CAN, USB etc., and the ADC of 12 and DAC module, support the FSMC of static memory controller flexibly of external memory access.The sampling rate of its 1M, two ADC provides basis for realizing AC synchronization sampling.Powerful peripheral functionality forms a reliable and stable SOC (system on a chip), has good cost performance, develops the electrical measuring instrument platform of AC sampling.
Utility model content
The utility model is intended to solve foregoing problems, and provide a kind of electric energy metered system based on AC sampling, its response time is short.
An aspect of the present utility model provides a kind of electric energy metered system based on AC sampling, and it comprises
Voltage sample part, for sampling to obtain voltage analog sampled value to the signal from electrical network of access;
Current sample part, for sampling to obtain currentmode analog quantity sampled value to the signal from electrical network of access;
Voltage signal processing section, nurses one's health the voltage analog sampled value obtained and is biased to the voltage analog sampled value in predetermined threshold value;
Current signal processing section, nurses one's health the currentmode analog quantity sampled value obtained and is biased to the currentmode analog quantity sampled value in predetermined threshold value;
Zero cross signal processing section, receives the voltage analog sampled value from voltage sample part, carries out Zerocross comparator and shaping filter to voltage analog sampled value, obtains zerocrossing pulse signal and gives processor section component voltage zero passage detection;
The processor part based on ARM with analog to digital converter: comprise voltage sample value analog to digital converter, current sampling data analog to digital converter, zero passage interrupt unit and parameter arithmetic section; Wherein, voltage sample value analog to digital converter is used for carrying out analog to digital conversion by zerocrossing pulse signal enabling to the voltage analog sampled value in the predetermined threshold value from voltage signal processing section and digitized voltage sample value being kept at a magnitude of voltage storage part; Current sampling data analog to digital converter is used for carrying out analog to digital conversion by zerocrossing pulse signal enabling to the currentmode analog quantity sampled value in the predetermined threshold value from current signal processing section and digitized current sampling data being kept at a current value storage part; This parameter arithmetic section calculates the electric energy metrical parameter for this electrical network according to the digitized voltage sample value obtained and digitized current sampling data according to sampling techniques.
This voltage sample part also comprises phase compensation portion.
This current sample part also comprises phase compensation portion.
AC sample system based on arm processor of the present utility model and method, have employed the arm processor STM32F103RC of ST company, establish the public sample circuit of AC Data Acquisition, software algorithm platform, the powerful peripheral functionality of STM32 and processing speed, conveniently can realize electric power observation and control instrument, multifunctional electric energy meter, the electrical measuring instrument exploitations such as read out instrument and harmonic wave instrument, establish standardized sampling module, realize resource reuse, improve product development speed and development quality.
Accompanying drawing explanation
Fig. 1 is according to the theory diagram based on AC sampling electric energy metered system of the present utility model;
Fig. 2 is according to the circuit diagram based on the voltage sample part of AC sampling electric energy metered system and a kind of embodiment of voltage signal processing section of the present utility model;
Fig. 3 is according to the circuit diagram based on the current sample part of AC sampling electric energy metered system and a kind of embodiment of current signal processing section of the present utility model;
Fig. 4 is the circuit diagram of a kind of embodiment of zero cross signal processing section;
Fig. 5 is according to the process flow diagram based on AC sampling electric energy gauging method of the present utility model.
Fig. 6 is the process flow diagram of the method for sampling one embodiment.
Embodiment
As shown in Figure 1, wherein, the hardware of this AC sample system comprises the sample circuit such as voltage sample part, current sample part to a kind of embodiment of AC sample system of the present utility model; Voltage signal processing section, current signal processing section and zero cross signal handling part grade frontend processing circuit; And the processor part (MCU) based on ARM of band analog to digital converter, can be such as the processor module of the STM32F103RC of STMicw Electronics (TM).
Voltage sample can be obtained by electric resistance partial pressure, as shown in Figure 2.Wherein, example is sampled as with A phase voltage, by resistance R6, R9, R23, R11, R24, R25, R27, R28 dividing potential drop, signal is through VREF bias voltage 1.65VDC, after R24, R25 obtain signal conversion process, again by after filter amplifier U4B filter and amplification, one tunnel sends the ADC1 sampling of processor calculating part (MCU) to, zero cross signal treatment circuit (Fig. 4) UA_PLUS is passed to through U1B Zerocross comparator and shaping filter in another road, obtain the external interrupt I/O port that UAINT zerocrossing pulse signal gives MCU, carry out A phase voltage zero passage detection.
Fig. 3 shows for a certain phase, such as A phase, current sample part and a kind of circuit diagram of embodiment of current signal processing section.Wherein, for A phase current, A phase current is sampled through current transformer T2, then by after U4A filter and amplification, sends the ADC2 sampling of MCU to;
Abovementionedly be described the sample circuit of voltage, electric current for A phase current voltage, B, C phase current voltage sampling circuit principle, realizing can be completely the same with A phase, repeats no more here.
Threephase voltage and threephase current become 0V ~ 1.65V ~ 3.3V voltage through signal conditioning circuit and 1.65V reference offset circuit conversion, send into ADC1 and ADC2 converter respectively, realize 6 tunnel simulating signal inphase sampling and conversions, ensure that every phase voltage, current detecting is samephase, its precision is 12; For the phase delay that elimination mutual inductor and circuit produce, phase compensation can be provided when circuit design, as the electric capacity C10 in Fig. 2, as the electric capacity C14 in Fig. 3.
The data obtained can shift through DMA queue memory, few to cpu resource occupancy; Voltage signal becomes square wave to send STM32 external interrupt input port to detect through Zerocross comparator circuit conversion, obtains the cycle of AC signal;
STM32 has powerful peripheral hardware and calculation processing power, easily realizes instrument and measures in real time, analyzes: the parameters of electric power such as U, I, P, Q, S, COS Φ, F, kWh, kvarh.
In system, STM32 processor working procedure completes: control A/D data sampling, carry out FFT computing to sampled result, and the hardware parameter according to sampling techniques coupling system calculates all parameters in electricity, result is sent into RAM for subsequent use.Its flow process is illustrated in fig. 5 shown below.
The method comprises: sample to obtain voltage analog sampled value to the signal from electrical network of access; Sample to obtain currentmode analog quantity sampled value to the signal from electrical network of access; The voltage analog sampled value obtained is nursed one's health and is biased to the voltage analog sampled value in predetermined threshold value; The currentmode analog quantity sampled value obtained is nursed one's health and is biased to the currentmode analog quantity sampled value in predetermined threshold value; Receive the voltage analog sampled value from voltage sample part, Zerocross comparator and shaping filter are carried out to voltage analog sampled value, obtain zerocrossing pulse signal and give processor section component voltage zero passage detection; And by zerocrossing pulse signal enabling analog to digital conversion is carried out to the voltage analog sampled value in the predetermined threshold value from voltage signal processing section and digitized voltage sample value is kept at a magnitude of voltage storage part; By zerocrossing pulse signal enabling analog to digital conversion is carried out to the currentmode analog quantity sampled value in the predetermined threshold value from current signal processing section and digitized current sampling data is kept at a current value storage part; The electric energy metrical parameter for this electrical network is calculated according to sampling techniques according to the digitized voltage sample value obtained and digitized current sampling data.
Wherein, the phase differential eliminated and produce in voltage sample process is also comprised.
Wherein, the phase differential eliminated and produce in current sample process is also comprised.
Wherein, also comprise and carry out FFT to through digitized voltage and current sample value.
Wherein, adjust in real time according to the sample frequency of frequency to voltage, current signal of the electrical network detected in real time.
The concrete method of sampling is, as shown in Figure 6:
First, by DMA1 constantly by voltage, the AD value of electric current puts into an array AD_Value [7] S101, then interrupt finding to open an initial point by the outside zero passage of a UA_INT, 128 times are adopted by a timer in oneperiod, and sample each time 7 data are put in the array of a Tmp_AD_Value [128*7], enable DMA2 when sampling for the 128th time in oneperiod the data in the array of Tmp_AD_Value [128*7] to be put in Cal_AD_Value [128*7] simultaneously, use during for calculating, complete in interruption at DMA2 and forbid DMA2 and startup simulation process S103.
Wherein, interrupt finding out T cycle length by the outside zero passage of a UA_INT, then frequency is exactly F=1/T;
The phase angle finding out UA and UC is interrupted by the zero passage of another lower outside interruption U CINT;
The phase angle finding out U and I is interrupted by the zero passage of another lower external interrupt IAINT;
Ac cycle detects, and the external hardware that the squarewave signal that voltage transitions becomes sends into STM32 interrupts, and reads the count value of timer, convert the cycle (frequency) to, according to the cycle of period modulation systematic sampling in interrupt service routine.
Adopt AC sampling on hardware circuit basis, by parameters of electric power such as the very convenient acquisition of 115 formula U, I, P, Q, S, COS Φ, F, kWh, kvarh
AC sampling is sampled to the instantaneous value of measured signal according to certain rules, then try to achieve measured value with certain numerical algorithm, more accurate relative to the direct current sampling carrying out sampled measurements after DC rectifier again.
In the utility model, can apply STM32F103RC is instrument intelligent kernel parts, adopts the A/D transducer of this chip internal as data acquisition unit, carries out pointwise instantaneous sampling to the electric signal in the electrical network of access, voltage, current effective value is calculated again by singlechip microcomputer, active power, reactive power, applied power, power factor, signal frequency, active energy, reactive energy and frequency analysis etc.
Wherein, the calculation procedure of voltage effective value is as follows:
First, by voltage effective value formula
Discretize, replaces continually varying function of voltage value in oneperiod with limited sampled voltage digital quantity in oneperiod, then obtains
In formula: Δ Tm is the time interval of adjacent double sampling; u _{m}it is the voltage sample instantaneous value in m1 the time interval; N is the sampling number in 1 cycle.Make the time interval of adjacent two samplings equal, namely Δ Tm is constant Δ T, considers N=(T/ Δ T)+1, then has
Formula (3) is exactly the formula according to each sampled instantaneous value of oneperiod and each cycle sampling number calculating voltage signal effective value.
In like manner, current effective value computing formula is as follows:
Formula (1) is exactly the formula according to each sampled instantaneous value of oneperiod and each cycle sampling number calculating voltage signal effective value.
Calculate a certain phase active power, the definition of calculating from consecutive periods signal effective value of power and the definition of power, replace continuous integration with numerical integration is approximate.The computing formula of active power is such as formula (5)
After discretize be
In formula: im, um are electric current, the voltage sample value of synchronization.
Applied power: S=UI
In formula, U, I are the effective value of voltage and current;
Power factor can be tried to achieve by following formula:
cosφ＝P/S＝P/UI
Calculate reactive power and have many algorithms, adopt digital phase shift Microcomputer Calculation amount less, data processing realtime is good.Because activepower P and reactive power Q only differ from 90 ° in voltage and current phase place, reactive power is write as
I in formula _{(k+N/4)}represent the current sampling data (sampled value after phase shift 90 °) that (k+N/4) is secondary, when (k+N/4) is greater than N, (k+N/4) is taken as (k3N/4).
In threephase fourwire system, use ternary method, after discrete, ask the expression formula of power as follows:
In formula, Uuk, Uvk, Uwk represent the kth time sampled value of three phase voltages in oneperiod; i _{uK}, i _{vK}, i _{wK}represent the kth time sampled value of three phase currents in oneperiod.
With twodimensional method in threephase threewire system, after discretize, ask the formula of power as follows:
U in formula _{uvk}, u _{vwk}represent the kth time sampled value of two line voltages in 1 cycle respectively.
Applied power S and powerfactorcosφ can be obtained with following formula:
Active power and reactive power just can be obtained active energy and reactive energy to time integral respectively.
FFT computing:
The cosine signal of the voltage and current in electric power transmission line, by the impact of nonlinear load, the waveform of electrical network can distort, it is still periodic function after distortion, and meet Di Liheli condition, by fourier series decomposition method, voltage and current can be resolved into the superposition of firstharmonic and series of harmonic, namely
U in formula _{0}, I _{0}the DC component ofvoltage, electric current;
U _{n}, I _{n}the peak value ofeach harmonic amplitude; α _{n}, β _{n}difference be that harmonic phase is poor.
Realtime sampling is carried out to the continuous time signal of electrical network and obtains discrete sample sequence, with fft algorithm, timefrequency domain conversion is carried out to it, amplitude and the phase condition of firstharmonic and each harmonic can be analyzed, to realize the monitoring of harmonic wave.In addition, in electrical network, between the phase voltage on each road and phase current, there is phase differential, FFT conversion is carried out to voltage and current signal synchronized sampling, just can calculate the phase differential of each harmonic, measure the meritorious of each harmonic and reactive power exactly.
And FFT is calculated, if the end points of sampled data set is discontinuous, just need to introduce window function, thus add the fussy degree of calculating.And meeting correlated sampling principle, when the data point set of sampling is just in time complete cycle, sampled data set twoendpoint is continuous, just sampled signal sequence can be similar to and regard infinite periodic signal as, thus FFT calculated amount is reduced.
The determination of sampling number:
According to timedomain samples theorem native system requires to analyze 63 subharmonic, and therefore minimum in oneperiod sampling number is 78 points, and when FFT butterfly computation itself requires that sampling number is the power of 2, computing velocity is the fastest, and the sample frequency of device is 256 times of fundamental frequency.Due to mains frequency, can fluctuate up and down at about 50Hz, therefore on hardware implementing, cannot sample to voltage, current signal by fixed frequency, and will according to the frequency of electrical network, sampling rate adjusting in real time.
Native system adopts 128 fft algorithms, namely completes a FFT computing at sampling two all after dates, wherein has oneperiod to be the result of sampling last time; The time completing 128 FFT computings is about 0.5ms, thus can meet instrument online checkingi and analysis.
The frequency of AC network is determined, the method determined is also many, and native system adopts and carrys out measuring period by the method for hardware, send STM32F103RC to carry out timing, thus obtain the frequency of AC network by alternating voltage after conditioning with shaping; Frequency change due to electrical network has larger inertia, and software lowpass filter thus can be adopted to process measured data.
Claims (6)
Priority Applications (3)
Application Number  Priority Date  Filing Date  Title 

CN201220738856  20121228  
CN201220738856.5  20121228  
CN201310284687.1A CN103344825B (en)  20121228  20130708  Based on the electric energy metered system of AC sampling 
Applications Claiming Priority (1)
Application Number  Priority Date  Filing Date  Title 

CN201310284687.1A CN103344825B (en)  20121228  20130708  Based on the electric energy metered system of AC sampling 
Publications (2)
Publication Number  Publication Date 

CN103344825A CN103344825A (en)  20131009 
CN103344825B true CN103344825B (en)  20160120 
Family
ID=49279638
Family Applications (1)
Application Number  Title  Priority Date  Filing Date 

CN201310284687.1A CN103344825B (en)  20121228  20130708  Based on the electric energy metered system of AC sampling 
Country Status (1)
Country  Link 

CN (1)  CN103344825B (en) 
Families Citing this family (9)
Publication number  Priority date  Publication date  Assignee  Title 

CN103605030A (en) *  20131128  20140226  国家电网公司  Chip and method for measuring power quality 
CN104502698B (en) *  20141210  20170714  广东电网有限责任公司电力科学研究院  The frequency measurement method and system of electric power signal 
CN105652077A (en) *  20151230  20160608  天津诚电科技有限公司  Current testing instrument 
CN107543956A (en) *  20160624  20180105  东方电气集团东方电机有限公司  Excitation system synchronizing signal modulate circuit and its implementation 
CN106053931B (en) *  20160809  20190426  河南森尼瑞电气有限公司  Protective relaying device based on 12 AD inside SOC chip 
CN107233664B (en) *  20170718  20200310  南京仙能医疗科技有限公司  Electric needle treatment system based on acupuncture point impedance 
CN108761193A (en) *  20180604  20181106  江苏师范大学  Quick selfadapted electric parameter metering without phase difference sensor and computational methods 
CN109142868A (en) *  20180810  20190104  上海电机学院  Electric harmonic detector 
CN109828145A (en) *  20181230  20190531  南京传麒信息技术合伙企业(普通合伙)  A kind of wide scope adaptive voltage monitoring device and method 
Citations (5)
Publication number  Priority date  Publication date  Assignee  Title 

EP1498740A1 (en) *  20030715  20050119  Iskraemeco, Merjenje in Upravljanje Energije, D.D.  Watthourmeter measuring circuit including a detection of an incorrect line connection 
CN201289504Y (en) *  20080918  20090812  李颖  Wide range energy counting device 
CN102230959A (en) *  20110421  20111102  深圳市锐能微科技有限公司  Method and system for calibrating electric energy meter and electric energy meter 
CN102565523A (en) *  20120112  20120711  上海理工大学  Current harmonic detection system and working method 
CN202486210U (en) *  20111231  20121010  广东电网公司韶关供电局  Device for increasing accuracy of electric energy measurement under effect of harmonic wave 

2013
 20130708 CN CN201310284687.1A patent/CN103344825B/en active IP Right Grant
Patent Citations (5)
Publication number  Priority date  Publication date  Assignee  Title 

EP1498740A1 (en) *  20030715  20050119  Iskraemeco, Merjenje in Upravljanje Energije, D.D.  Watthourmeter measuring circuit including a detection of an incorrect line connection 
CN201289504Y (en) *  20080918  20090812  李颖  Wide range energy counting device 
CN102230959A (en) *  20110421  20111102  深圳市锐能微科技有限公司  Method and system for calibrating electric energy meter and electric energy meter 
CN202486210U (en) *  20111231  20121010  广东电网公司韶关供电局  Device for increasing accuracy of electric energy measurement under effect of harmonic wave 
CN102565523A (en) *  20120112  20120711  上海理工大学  Current harmonic detection system and working method 
Also Published As
Publication number  Publication date 

CN103344825A (en)  20131009 
Similar Documents
Publication  Publication Date  Title 

US8489346B2 (en)  Parametric multicycle averaging in an intelligent electronic device  
Shmilovitz  On the definition of total harmonic distortion and its effect on measurement interpretation  
CN100480706C (en)  Method and circuit for measuring samefrequency signal phase difference using fixed phase shift  
CN1967270B (en)  Method and system for testing battery impedance spectroscopy  
CN101627312B (en)  Ac electric quantity measuring device  
CN202443082U (en)  Merging unit test system with analog input and university  
CN1108528C (en)  Vector electricity meters and associated vector electricity metering methods  
CN104808070B (en)  A kind of converter valve thyristor level damping circuit parameter test device and method  
CN102435844B (en)  Sinusoidal signal phasor calculating method being independent of frequency  
CN103308804B (en)  Based on quick KS converting electric power quality disturbance signal time and frequency parameter extracting method  
CN203965514U (en)  Digital power tester  
US4459546A (en)  Electronic kilowatthour meter  
CN102508035B (en)  Fuel cell AC impedance online testing system and measuring and controlling method  
CN101034117B (en)  Power transmission line power frequency parameters measuring method and device  
CN103336264B (en)  Digital electric energy meter quantity value tracing system based on analog quantity detection and digital electric energy meter quantity value tracing method based analog quantity detection  
CN102782512A (en)  Power source device and programmable controller  
CN203083519U (en)  Noncontact silicon chip thickness and resistivity detection system  
CN104535890B (en)  A kind of method for quick of grid voltage sags  
CN103926456B (en)  Flicker value calculation method based on improved FFT and inverter  
CN103543335A (en)  Method for measuring synchronous phasor  
CN102928810A (en)  System and method for evaluating accuracy of digital electric energy meter  
CN102799715A (en)  Digital and physical hybrid simulation method and system for power primary system  
US9551732B2 (en)  Apparatus and method for alternating current physical signals measurement and data acquisition  
CN104237622B (en)  The method of sampling and wideband voltage/calibration of power device based on software based frequency tracking  
CN104198537A (en)  Method and device for detecting moisture content and electric conductivity of soil 
Legal Events
Date  Code  Title  Description 

C06  Publication  
PB01  Publication  
C10  Entry into substantive examination  
SE01  Entry into force of request for substantive examination  
C14  Grant of patent or utility model  
GR01  Patent grant 