[go: up one dir, main page]

CN106918735B - A method of current measurement data processing - Google Patents

A method of current measurement data processing Download PDF

Info

Publication number
CN106918735B
CN106918735B CN201710193531.0A CN201710193531A CN106918735B CN 106918735 B CN106918735 B CN 106918735B CN 201710193531 A CN201710193531 A CN 201710193531A CN 106918735 B CN106918735 B CN 106918735B
Authority
CN
China
Prior art keywords
measurement data
accumulator
current
data
zero
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.)
Active
Application number
CN201710193531.0A
Other languages
Chinese (zh)
Other versions
CN106918735A (en
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.)
Liaoning University
Original Assignee
Liaoning University
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 Liaoning University filed Critical Liaoning University
Priority to CN201710193531.0A priority Critical patent/CN106918735B/en
Publication of CN106918735A publication Critical patent/CN106918735A/en
Application granted granted Critical
Publication of CN106918735B publication Critical patent/CN106918735B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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)
  • Indication And Recording Devices For Special Purposes And Tariff Metering Devices (AREA)

Abstract

一种电流测量数据处理方法,其步骤为:1)、初始化:测量数据计数器置零,测量数据增量累加器置零,测量数据累加器置零,预设计数器与累加器的阈值值;2)、对电流测量数据进行处理,具体步骤为:2a)、累加;2b)、判断;2c)、输出数据;3)、清零:累加器与计数器清零,返回。本发明方法根据被测电流及电流变化的大小,自适应调整滤波器的长度,在有效削弱噪声影响、降低测量误差的同时,对被测电流快速、大范围变化亦具有快的响应速度。同时,本发明提供的数据处理方法可以根据实际测量精度与仪表响应速度灵活调整参数,且计算量小、占用资源少。

A current measurement data processing method, the steps are: 1), initialization: the measurement data counter is set to zero, the measurement data incremental accumulator is set to zero, the measurement data accumulator is set to zero, and the threshold value of the counter and the accumulator is preset; 2 ), process the current measurement data, the specific steps are: 2a), accumulation; 2b), judgment; 2c), output data; 3), clear: the accumulator and the counter are cleared and returned. The method of the invention adaptively adjusts the length of the filter according to the measured current and the magnitude of the current change, effectively weakens the influence of noise and reduces the measurement error, and also has a fast response speed to the fast and large-scale changes of the measured current. At the same time, the data processing method provided by the present invention can flexibly adjust parameters according to the actual measurement accuracy and the response speed of the instrument, and the calculation amount is small and the resources are occupied.

Description

一种电流测量数据处理方法A method of current measurement data processing

技术领域technical field

本发明涉及一种数据处理方法,尤其是一种电流测量数据处理方法。The invention relates to a data processing method, in particular to a current measurement data processing method.

背景技术Background technique

与电压有效值测量相比,电力电测仪表中电流有效值测量不仅要面对噪声干扰的影响,还需应对动态范围宽的问题。如何在满足测量精度的同时,还能具有较好的动态响应速度,是仪表数据处理的一个难题。数字滤波方法由于在一致性、灵活性、实现成本等方面上具有较大的优势,已逐渐替代硬件成为改善仪表性能的主流方法。Compared with the voltage RMS measurement, the current RMS measurement in the electric power measuring instrument not only faces the influence of noise interference, but also needs to deal with the problem of a wide dynamic range. How to meet the measurement accuracy, but also have a better dynamic response speed, is a difficult problem in instrument data processing. The digital filtering method has gradually replaced the hardware and become the mainstream method to improve the performance of the instrument due to its advantages in consistency, flexibility, and implementation cost.

然而在面对动态范围宽、变化速度快的电流信号时,现有的数字滤波方法均难以适用。以滑动平均滤波法为例,滤波器队列的长度越长,对噪声的抑制作用越强,对被测量信号的响应速度越慢;反之,缩短滤波器队列长度,响应速度会提高,但滤波效果会恶化。扩展卡尔曼滤波与粒子滤波对于处理该类问题具有较强的优势,但限于算法的复杂以及微控制器有限的资源较少被采用。However, the existing digital filtering methods are difficult to apply to current signals with wide dynamic range and fast changing speed. Taking the moving average filtering method as an example, the longer the length of the filter queue, the stronger the noise suppression effect, and the slower the response speed to the measured signal; on the contrary, shortening the length of the filter queue will improve the response speed, but the filtering effect will be higher. will deteriorate. Extended Kalman filter and particle filter have strong advantages in dealing with such problems, but they are rarely used due to the complexity of the algorithm and the limited resources of the microcontroller.

发明内容SUMMARY OF THE INVENTION

为了解决上述技术问题,本发明创造提供了一种电流测量数据处理方法,针对初始化后对数据依次进行累加、判断、输出数据等处理,其方法灵活简便,解决了现有技术中存在的滤波效果和响应速度不能同时保证的问题。In order to solve the above technical problems, the present invention creates and provides a current measurement data processing method, which is flexible and simple, and solves the filtering effect existing in the prior art for processing data such as accumulating, judging, and outputting data in sequence after initialization. And the problem that the response speed cannot be guaranteed at the same time.

为了实现上述目的,本发明采用的技术方案是:In order to achieve the above object, the technical scheme adopted in the present invention is:

一种电流测量数据处理方法,其步骤为:A current measurement data processing method, the steps are:

1)、初始化:测量数据计数器N置零,测量数据累加器E置零,测量数据增量累加器DE置零,当前数据处理输出初值置零,设置测量数据计数器阈值NTH、测量数据累加器阈值ETH和测量数据增量累加器阈值DETH1) Initialization: the measurement data counter N is set to zero, the measurement data accumulator E is set to zero, the measurement data increment accumulator DE is set to zero, the initial value of the current data processing output is set to zero, the measurement data counter threshold N TH is set, and the measurement data is accumulated threshold E TH and measurement data delta accumulator threshold DE TH ;

2)、对于每次采样得到的电流测量数据,根据以往得到的测量数据及当前数据处理输出进行处理;2) The current measurement data obtained by each sampling is processed according to the measurement data obtained in the past and the current data processing output;

2a)、累加:将当前采样得到的电流测量数据xi加入测量数据累加器,将当前采样得到的电流测量数据xi与当前数据处理输出yn的差值加入测量数据增量累加器,同时测量数据计数器+1;即2a), accumulation: add the current measurement data xi obtained by the current sampling into the measurement data accumulator, add the difference between the current measurement data xi obtained by the current sampling and the current data processing output yn into the measurement data increment accumulator, and at the same time Measured data counter + 1; i.e.

E=E+xi E=E+ xi

DE=DE+xi-yn DE=DE+x i -y n

N=N+1N=N+1

2b)、判断:当如下3个条件同时满足时返回,否则进入步骤2c);2b), judgment: return when the following 3 conditions are satisfied at the same time, otherwise go to step 2c);

I、测量计数器数值N小于测量数据计数器阈值NTH1. The measurement counter value N is less than the measurement data counter threshold N TH ;

II、测量数据累加器数值E小于测量数据累加器阈值ETHII. The measured data accumulator numerical value E is less than the measured data accumulator threshold E TH ;

III、测量数据增量累加器DE数值的绝对值小于测量数据增量累加器阈值DETHIII. The absolute value of the numerical value of the measured data increment accumulator DE is less than the measured data increment accumulator threshold DE TH ;

2c)、更新处理数据输出:将测量数据累加器当前数值与测量数据计数器当前数值的商作为数据处理输出;即2c), update processing data output: take the quotient of the current value of the measurement data accumulator and the current value of the measurement data counter as the data processing output; that is,

3)、对测量数据计数器置零、测量数据累加器置零、测量数据增量累加器置零,返回。3) Set the measurement data counter to zero, the measurement data accumulator to zero, the measurement data increment accumulator to zero, and return.

所述的测量数据增量累加器阈值DETH根据被测电流的额定值设置,即The measured data incremental accumulator threshold DE TH is set according to the rated value of the measured current, namely

DETH≤0.5Dn DE TH ≤0.5D n

其中Dn为被测电流在额定值输入时测量数值的估值。Where D n is the estimated value of the measured current when the rated value is input.

本发明创造的有益效果在于:本发明可以根据被测电流的大小,自适应调整滤波器的长度,在有效削弱噪声影响、降低测量误差的同时,对被测电流快速、大范围变化亦具有快的响应速度,响应速度优于卡尔曼滤波器及滑动平均值滤波器(见图2)。同时,可以根据实际检测条件与仪表要求灵活调整参数,与卡尔曼滤波器及滑动平均值滤波器相比,计算量小、占用资源少。The beneficial effects created by the present invention are: the present invention can adaptively adjust the length of the filter according to the magnitude of the measured current, while effectively weakening the influence of noise and reducing the measurement error, it also has the advantages of fast and large-scale changes of the measured current. The response speed is better than that of the Kalman filter and the moving average filter (see Figure 2). At the same time, the parameters can be flexibly adjusted according to the actual detection conditions and instrument requirements. Compared with the Kalman filter and the moving average filter, the calculation amount is small and the resource occupation is small.

附图说明Description of drawings

图1:为本发明流程图。Fig. 1 is a flow chart of the present invention.

图2:为在处理动态范围为1:100的快速变化电流信号时,卡尔曼滤波器、滑动平均值滤波器与本发明方法的对比。Fig. 2 shows the comparison between the Kalman filter, the moving average filter and the method of the present invention when processing a rapidly changing current signal with a dynamic range of 1:100.

具体实施方式Detailed ways

以AD7858实现的精度为0.5%的三相电测仪表中三相电流有效值的测量为例,设其电流测量的额定值为5A。5A的被测电流经电流互感器(5A/2.5mA)与采样电阻(20Ω)后进入AD7858的电流通道,AD7858的测量结果约为271696。电测仪表经标定后,在电流通道为额定值输入时,经长度为4的算术平均滤波器处理后即可满足0.5%的精度要求。相关参数设置为Taking the measurement of the three-phase current RMS in the three-phase electrical measuring instrument with an accuracy of 0.5% realized by AD7858 as an example, the rated value of its current measurement is set to 5A. The measured current of 5A enters the current channel of the AD7858 through the current transformer (5A/2.5mA) and the sampling resistor (20Ω). The measurement result of the AD7858 is about 271696. After the electrical measuring instrument is calibrated, when the current channel is the rated value input, it can meet the accuracy requirement of 0.5% after being processed by the arithmetic mean filter of length 4. The relevant parameters are set to

Dn=271696D n = 271696

ETH=1.5×106 E TH = 1.5×10 6

DETH=0.5×106 DE TH = 0.5×10 6

电测仪表的微控制器每隔10mS响应AD7858的中断,并读取电流有效值的测量数据。为满足电测仪表显示输出1Hz的刷新速度,其他相关参数可设置为The microcontroller of the electric measuring instrument responds to the interruption of AD7858 every 10mS, and reads the measurement data of the current RMS. In order to meet the refresh rate of the display output of the electrical measuring instrument of 1Hz, other related parameters can be set as

fS=100Hzf S = 100Hz

fO=1Hzf O = 1Hz

NTH=100N TH = 100

对于每次采样得到的电流测量数据,按照附图1的流程处理。The current measurement data obtained by each sampling is processed according to the flow chart of FIG. 1 .

本发明提出的电流检测数据处理方法,根据被测电流的大小,自适应调整滤波器的长度,在有效削弱噪声影响、降低测量误差的同时,对被测电流快速、大范围变化亦具有较强的适应性。同时,本发明提供的数据处理方法可以根据实际测量精度与仪表响应速度的要求灵活调整参数,且计算量小、占用资源少。The current detection data processing method proposed by the present invention adaptively adjusts the length of the filter according to the magnitude of the measured current, which can effectively weaken the influence of noise and reduce the measurement error, and also has a strong effect on the rapid and large-scale changes of the measured current. adaptability. At the same time, the data processing method provided by the present invention can flexibly adjust parameters according to the requirements of actual measurement accuracy and response speed of the instrument, and has a small amount of calculation and less resource occupation.

Claims (2)

1.一种电流测量数据处理方法,其步骤为:1. A current measurement data processing method, the steps of which are: 1)、初始化:测量数据计数器置零,测量数据累加器置零,测量数据增量累加器置零,当前数据处理输出初值置零,设置测量数据计数器阈值NTH、测量数据累加器阈值ETH及测量数据增量累加器阈值DETH1) Initialization: the measurement data counter is set to zero, the measurement data accumulator is set to zero, the measurement data increment accumulator is set to zero, the initial value of the current data processing output is set to zero, the measurement data counter threshold N TH and the measurement data accumulator threshold E are set TH and measurement data increment accumulator threshold DE TH ; 2)、对于每次采样得到的电流测量数据,根据以往得到的测量数据及当前数据处理输出进行处理:2) For the current measurement data obtained by each sampling, process it according to the measurement data obtained in the past and the current data processing output: 2a)、累加:将当前采样得到的电流测量数据xi加入测量数据累加器,将当前采样得到的电流测量数据xi与当前数据处理输出yn的差值加入测量数据增量累加器,同时测量数据计数器+1;即2a), accumulation: add the current measurement data xi obtained by the current sampling into the measurement data accumulator, add the difference between the current measurement data xi obtained by the current sampling and the current data processing output yn into the measurement data increment accumulator, and at the same time Measured data counter + 1; i.e. E=E+xi E=E+ xi DE=DE+xi-yn DE=DE+x i -y n N=N+1N=N+1 其中E为测量数据累加器的数值;DE为测量数据增量累加器的数值;N为测量数据计数器的数值;Among them, E is the value of the measurement data accumulator; DE is the value of the measurement data increment accumulator; N is the value of the measurement data counter; 2b)、判断:当如下3个条件同时满足时返回,否则进入步骤2c);2b), judgment: return when the following 3 conditions are satisfied at the same time, otherwise go to step 2c); I、测量数据计数器数值N小于测量数据计数器阈值NTH1. The measured data counter value N is less than the measured data counter threshold N TH ; II、测量数据累加器数值E小于测量数据累加器阈值ETHII. The measured data accumulator numerical value E is less than the measured data accumulator threshold E TH ; III、测量数据增量累加器数值DE的绝对值小于测量数据增量累加器阈值DETHIII. The absolute value of the measured data incremental accumulator numerical value DE is less than the measured data incremental accumulator threshold DE TH ; 2c)、更新处理数据输出:将测量数据累加器当前数值E与测量数据计数器当前数值N的商作为处理数据输出;即2c), update processing data output: take the quotient of the current value E of the measurement data accumulator and the current value N of the measurement data counter as the processing data output; that is 3)、对测量数据计数器置零、测量数据累加器置零和测量数据增量累加器置零,返回。3) Set the measurement data counter to zero, the measurement data accumulator to zero, and the measurement data increment accumulator to zero, and return. 2.根据权利要求1所述的一种电流测量数据处理方法,其特征在于:所述的测量数据增量累加器阈值DETH根据以下公式设置,即2. A current measurement data processing method according to claim 1, characterized in that: the measurement data incremental accumulator threshold DE TH is set according to the following formula: DETH≤0.5Dn DE TH ≤0.5D n 其中Dn为被测电流在额定值输入时测量数值的估值。Where D n is the estimated value of the measured current when the rated value is input.
CN201710193531.0A 2017-03-28 2017-03-28 A method of current measurement data processing Active CN106918735B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710193531.0A CN106918735B (en) 2017-03-28 2017-03-28 A method of current measurement data processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710193531.0A CN106918735B (en) 2017-03-28 2017-03-28 A method of current measurement data processing

Publications (2)

Publication Number Publication Date
CN106918735A CN106918735A (en) 2017-07-04
CN106918735B true CN106918735B (en) 2019-07-02

Family

ID=59460480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710193531.0A Active CN106918735B (en) 2017-03-28 2017-03-28 A method of current measurement data processing

Country Status (1)

Country Link
CN (1) CN106918735B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0064902A1 (en) * 1981-05-07 1982-11-17 Enertec Societe Anonyme Digital filters
CN1308802A (en) * 1998-06-30 2001-08-15 因芬尼昂技术股份公司 Method for digital timing recovery and selective filtering
CN1975754A (en) * 2006-12-20 2007-06-06 北京中星微电子有限公司 Four-quadrant multiplication circuit
CN102195275A (en) * 2011-05-18 2011-09-21 北京四方继保自动化股份有限公司 Protecting method of current change rate with self-adaptive output time-delay characteristic
CN103715908A (en) * 2013-09-11 2014-04-09 上海交通大学 Sampling Method of Voltage-Electro-Rheological Period of AC-AC Converter
CN105743462A (en) * 2016-03-28 2016-07-06 浙江涵普电力科技有限公司 Electric power signal digital filtering method with adjustable measuring response time
CN105738686A (en) * 2016-04-12 2016-07-06 辽宁大学 Current detection method
CN105763170A (en) * 2016-03-28 2016-07-13 浙江涵普电力科技有限公司 Power signal digital filtering method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0064902A1 (en) * 1981-05-07 1982-11-17 Enertec Societe Anonyme Digital filters
CN1308802A (en) * 1998-06-30 2001-08-15 因芬尼昂技术股份公司 Method for digital timing recovery and selective filtering
CN1975754A (en) * 2006-12-20 2007-06-06 北京中星微电子有限公司 Four-quadrant multiplication circuit
CN102195275A (en) * 2011-05-18 2011-09-21 北京四方继保自动化股份有限公司 Protecting method of current change rate with self-adaptive output time-delay characteristic
CN103715908A (en) * 2013-09-11 2014-04-09 上海交通大学 Sampling Method of Voltage-Electro-Rheological Period of AC-AC Converter
CN105743462A (en) * 2016-03-28 2016-07-06 浙江涵普电力科技有限公司 Electric power signal digital filtering method with adjustable measuring response time
CN105763170A (en) * 2016-03-28 2016-07-13 浙江涵普电力科技有限公司 Power signal digital filtering method
CN105738686A (en) * 2016-04-12 2016-07-06 辽宁大学 Current detection method

Also Published As

Publication number Publication date
CN106918735A (en) 2017-07-04

Similar Documents

Publication Publication Date Title
CN102175296B (en) Fast two-stage filter algorithm applied to high precision digital weighing sensor
CN102946253B (en) Data sampling method and system and the application process in parameter identification thereof and system
EP3133476B1 (en) Signal to noise ratio parameter optimization method and apparatus
CN103684351B (en) There is the self adaptation digital filter method of PID exponential factor
CN108168680A (en) A kind of dynamic weighing filtering method and its system
CN104461136A (en) Dynamic threshold adjusting circuit in touch-control device
CN105738686B (en) A method of current detection
CN110702986A (en) Method and system for dynamically generating self-adaptive signal search threshold in real time
CN106918735B (en) A method of current measurement data processing
CN105759142B (en) Method and system for calibrating skin capacitance threshold of wearable device
CN102346218B (en) Small-signal filtering algorithm used for wide-range energy meter
CN105319434A (en) Method and device applied to current measurement of electric energy meter
CN112420066B (en) Noise reduction method, device, computer equipment and computer readable storage medium
CN105004899B (en) A kind of direct current signal variable quantity self-adapting detecting method and device
CN111181526B (en) Filtering method for signal processing
JP5505185B2 (en) Lightning impulse withstand voltage test system, reference waveform calculation program, and lightning impulse withstand voltage test method
CN104237633A (en) Quick frequency measurement method
CN102957380A (en) Motor rotating speed computing method
CN108132399B (en) A Simplified Interpolation Method for Improving the Accuracy of Power Quality Analysis in Digital Substation
WO2019127357A1 (en) Filter method, device and system for signal of quadrature encoder
CN105656450B (en) The digital low-pass filtering method and device of integer arithmetic
CN111025026B (en) Method and system for determining dynamic characteristic coefficient of valve plate network of voltage limiter
CN113049872B (en) An electrical signal zero detection method for multiple low frequency current ripple suppression
CN204537043U (en) A kind of computing machine voltage-stabilized power supply circuit
CN105318940B (en) A kind of multi-way stream gauge calibrating installation pulse counting signal reconstructing method

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
GR01 Patent grant
GR01 Patent grant