[go: up one dir, main page]

CN102169134A - A hardware-based transient voltage recording method - Google Patents

A hardware-based transient voltage recording method Download PDF

Info

Publication number
CN102169134A
CN102169134A CN2010105939643A CN201010593964A CN102169134A CN 102169134 A CN102169134 A CN 102169134A CN 2010105939643 A CN2010105939643 A CN 2010105939643A CN 201010593964 A CN201010593964 A CN 201010593964A CN 102169134 A CN102169134 A CN 102169134A
Authority
CN
China
Prior art keywords
comparer
data
wave data
value
fpga
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
CN2010105939643A
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.)
China Electric Power Research Institute Co Ltd CEPRI
State Grid Corp of China SGCC
Original Assignee
China Electric Power Research Institute Co Ltd CEPRI
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 China Electric Power Research Institute Co Ltd CEPRI filed Critical China Electric Power Research Institute Co Ltd CEPRI
Priority to CN2010105939643A priority Critical patent/CN102169134A/en
Publication of CN102169134A publication Critical patent/CN102169134A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Analogue/Digital Conversion (AREA)

Abstract

The invention relates to a hardware-based transient voltage recording method. The method is characterized in that real-time compression, peak value calculation, trigger judgment and low rate collection of data can be completed simultaneously in one sampling clock period; the real-time compression, the peak value calculation, the trigger judgment and the low rate collection of data are realized in an FPGA (Field Programmable Gata Array); and the FPGA is connected to an external A/D (Analog-Digital converter). In the scheme provided in the method, the FPGA, which is a programmable device, is employed for real-time compression and storage of wave form. Therefore, the working efficiency of a CPU is improved, the high sampling rate is guaranteed, the storage space is remarkably saved, and the recording demands of transient processes with various high-speed or low-speed changes are satisfied.

Description

一种基于硬件的暂态电压记录方法A Hardware-Based Transient Voltage Recording Method

技术领域technical field

本发明涉及一种电力系统领域的暂态电压记录方法,具体讲涉及一种基于硬件的暂态电压记录方法。The invention relates to a transient voltage recording method in the field of power systems, in particular to a hardware-based transient voltage recording method.

背景技术Background technique

电网在运行中可能会发生各种故障,有的会导致供电中断并致设备损毁。电网故障的过程往往伴随着系统电压的扰动。雷击、操作过电压、工频过电压、污闪、设备故障等,都可以造成电网电压扰动,乃至电网事故。记录电网事故前电网电压的扰动情况,对于事故反演和分析具有重要价值。要完整记录电网电压扰动,既要求有高的采样速率,以满足记录雷电波形等的需要;又要求长的记忆时间,以满足记录持续时间较长的事故过程。当采用较高的采样率时,为了节省存储空间,通常会采用一些压缩算法。在以往的暂态电压记录中,通常采用DSP直接读取高速A/D的数据并作实时压缩、存储以及触发判断等,CPU处于连续取数、压缩、处理的过程中,占用CPU大量时间,导致CPU没有时间去做其它工作,从而不得不降低采样率。随着现场可编程门阵列FPGA的迅速发展,采用FPGA实现数据压缩、处理成为一种新的手段。由于FPGA内部有一定数量的触发器、比较器、较大容量的存储器,为实现数据采集、压缩、判断提供了可能。在电力系统暂态电压记录中,通常要求有电压突变触发、上限触发、下限触发等触发方式,另外还有谐波测量的要求。Various faults may occur during the operation of the power grid, some of which will cause power interruption and equipment damage. The process of power grid fault is often accompanied by the disturbance of system voltage. Lightning strikes, operating overvoltage, power frequency overvoltage, pollution flashover, equipment failure, etc., can cause grid voltage disturbances and even grid accidents. Recording the disturbance of the grid voltage before the grid accident is of great value for accident inversion and analysis. In order to completely record grid voltage disturbances, a high sampling rate is required to meet the needs of recording lightning waveforms, etc.; a long memory time is required to meet the needs of recording accidents with a long duration. When a higher sampling rate is used, in order to save storage space, some compression algorithms are usually used. In the past transient voltage recording, DSP is usually used to directly read high-speed A/D data and perform real-time compression, storage, and trigger judgment. The CPU is in the process of continuous data fetching, compression, and processing, which takes up a lot of CPU time. As a result, the CPU has no time to do other work, so the sampling rate has to be reduced. With the rapid development of Field Programmable Gate Array FPGA, using FPGA to realize data compression and processing has become a new method. Because there are a certain number of flip-flops, comparators, and large-capacity memories inside the FPGA, it is possible to realize data acquisition, compression, and judgment. In power system transient voltage recording, it is usually required to have voltage mutation trigger, upper limit trigger, lower limit trigger and other trigger methods, in addition to the requirement of harmonic measurement.

发明内容Contents of the invention

本发明的目的是提供一种高采样率、快速采集电压波形的暂态电压记录方法。The purpose of the present invention is to provide a transient voltage recording method with high sampling rate and fast acquisition of voltage waveform.

为实现本发明的目的,本发明采用下述方案予以实现:For realizing the purpose of the present invention, the present invention adopts following scheme to realize:

一种基于硬件的暂态电压记录方法,其改进之处在于:所述方法在一个采样时钟周期内同时完成数据的实时压缩、峰值计算、触发判断和低速率采集;所述数据的实时压缩、峰值计算、触发判断和低速率采集在FPGA中实现;所述实时压缩是对采集到的波形数据A与D触发器1中的基值B在比较器1中进行实时比较,压缩后的数据存入先进先出存储器FIFO;所述峰值计算是将所述波形数据A与采集到的最大值Max、最小值Min进行比较;所述上限、下限触发判断是将所述波形数据A与给定触发上限值和下限值分别在比较器5和比较器6中进行比较,大于上限值或小于下限值时输出有效的触发信号;所述低速率采集是对采集到的所述波形数据A进行抽点压缩后存入先进先出存储器FIFO2;所述FPGA外接模数转换器A/D。A hardware-based transient voltage recording method, which is improved in that: the method simultaneously completes real-time compression, peak calculation, trigger judgment and low-rate acquisition of data within one sampling clock cycle; the real-time compression of data, Peak calculation, trigger judgment and low-rate acquisition are realized in FPGA; the real-time compression is to compare the collected waveform data A with the base value B in D flip-flop 1 in comparator 1 in real time, and the compressed data is stored in Enter the FIFO of the first-in-first-out memory; the peak calculation is to compare the waveform data A with the collected maximum value Max and the minimum value Min; the upper and lower limit trigger judgments are to compare the waveform data A with a given trigger The upper limit value and the lower limit value are compared in comparator 5 and comparator 6 respectively, and when greater than the upper limit value or less than the lower limit value, an effective trigger signal is output; the low-rate acquisition is to collect the waveform data A performs snapshot compression and stores it into the first-in-first-out memory FIFO2; the FPGA is externally connected with an analog-to-digital converter A/D.

本发明提供的一种优选的技术方案是:所述数据的实时压缩在FPGA中的实时压缩模块中进行;所述实时压缩模块包括D触发器1、计数器1、比较器1、时序控制电路和先进先出存储器FIFO;所述实时压缩对采集到的波形数据A与D触发器1中的基值B在比较器1中进行实时比较时包括下述情况:A kind of preferred technical scheme that the present invention provides is: the real-time compression of described data is carried out in the real-time compression module in FPGA; Described real-time compression module comprises D flip-flop 1, counter 1, comparator 1, timing control circuit and First-in-first-out memory FIFO; Described real-time compression comprises the following situation when comparing in comparator 1 in real-time to the waveform data A collected and the base value B in D flip-flop 1:

A、所述波形数据A与所述基值B相比小于压缩比delta时,所述D触发器1关闭,所述波形数据A被丢弃,所述计数器1加1,所述FIFO的写使能信号无效,没有数据写入所述的FIFO;A. When the waveform data A is smaller than the compression ratio delta compared with the base value B, the D flip-flop 1 is turned off, the waveform data A is discarded, the counter 1 is incremented by 1, and the writing of the FIFO enables The enable signal is invalid, and no data is written into the FIFO;

B、所述波形数据A与所述基值B相比大于压缩比delta时,所述FIFO的写使能信号有效,将所述基值B和计数器中的计数值保存至所述FIFO,所述计数器1清零,所述D触发器1打开,所述波形数据A替换基值B。B. When the waveform data A is greater than the compression ratio delta compared with the base value B, the write enable signal of the FIFO is valid, and the base value B and the count value in the counter are saved to the FIFO, so The counter 1 is cleared, the D flip-flop 1 is turned on, and the waveform data A replaces the base value B.

本发明提供的第二种优选的技术方案是:所述数据的峰值计算在FPGA中的峰值计算模块中进行;所述峰值计算模块包括D触发器2、D触发器3、比较器2、比较器3、比较器4和计数器2;所述峰值计算将所述波形数据A与采集到的最大值Max、最小值Min进行比较时包括下述情况:The second preferred technical solution provided by the present invention is: the peak value calculation of the data is carried out in the peak value calculation module in the FPGA; the peak value calculation module includes D flip-flop 2, D flip-flop 3, comparator 2, comparison Comparator 3, comparator 4 and counter 2; Described peak calculation includes the following situations when comparing the waveform data A with the collected maximum value Max and minimum value Min:

a、当A>Max时,所述比较器2的输出为高电平,所述D触发器2打开,所述波形数据A替换最大值Max;a. When A>Max, the output of the comparator 2 is high level, the D flip-flop 2 is turned on, and the waveform data A replaces the maximum value Max;

b、当A<Min时,所述比较器3的输出为高电平,所述D触发器3打开,所述波形数据A替换最小值Min;b. When A<Min, the output of the comparator 3 is high level, the D flip-flop 3 is turned on, and the waveform data A replaces the minimum value Min;

c、每进行一次比较,所述计数器2加1,当所述计数器2的值D累加到给定的周期计数值D0,即D>=D0时,所述比较器4的输出为高电平。c. Every time a comparison is performed, the counter 2 adds 1, and when the value D of the counter 2 is accumulated to a given cycle count value D0, that is, when D>=D0, the output of the comparator 4 is a high level .

本发明提供的第三种优选的技术方案是:所述数据的触发判断是在上限、下限触发判断模块中进行;所述上限、下限触发判断模块包括比较器5和比较器6;所述上限、下限触发判断包括下述情况:The third preferred technical solution provided by the present invention is: the trigger judgment of the data is carried out in the upper limit and lower limit trigger judgment modules; the upper limit and lower limit trigger judgment modules include a comparator 5 and a comparator 6; the upper limit , The lower limit trigger judgment includes the following situations:

(1)将所述波形数据A与给定触发上限值up_limit在所述比较器5中进行比较,当A>up_limit时满足上限触发条件,则up_valid有效输出低电平;(1) Comparing the waveform data A with a given trigger upper limit value up_limit in the comparator 5, when A>up_limit meets the upper limit trigger condition, then up_valid effectively outputs a low level;

(2)将所述波形数据A与给定触发下限值down_limit在所述比较器5中进行比较,当A<down_limit时满足下限触发条件,则down_valid有效输出低电平。(2) The waveform data A is compared with a given trigger lower limit value down_limit in the comparator 5 , and when A<down_limit satisfies the lower limit trigger condition, then down_valid effectively outputs a low level.

本发明提供的第四种优选的技术方案是:所述数据的低速率采集在FPGA中的低速率采集模块中进行;所述低速率采集模块包括先进先出存储器FIFO2、计数器3和比较器7;所述低速率采集对采集到的所述波形数据A进行抽点压缩时包括下述情况:The fourth preferred technical solution provided by the present invention is: the low-rate acquisition of the data is carried out in the low-rate acquisition module in the FPGA; the low-rate acquisition module includes a first-in-first-out memory FIFO2, a counter 3 and a comparator 7 ; The low-rate acquisition includes the following situations when performing snapshot compression on the acquired waveform data A:

①将所述计数器3的值C与分频数F在所述比较器7中进行比较,当C<F时,所述比较器7的输出为低电平,FIFO2的写使能信号无效,没有数据写入FIFO2;① comparing the value C of the counter 3 with the frequency division number F in the comparator 7, when C<F, the output of the comparator 7 is low level, and the write enable signal of FIFO2 is invalid, No data is written into FIFO2;

②将所述计数器3的值C与分频数F在所述比较器7中进行比较,当C>F时,所述比较器7的输出为高电平,FIFO2的写使能信号无效,将所述波形数据A写入FIFO2。2. compare the value C of the counter 3 with the frequency division number F in the comparator 7, when C>F, the output of the comparator 7 is a high level, and the write enable signal of the FIFO2 is invalid, Write the waveform data A into FIFO2.

本发明提供的第五种优选的技术方案是:所述模数转换器A/D在时钟信号的上升沿进行模数转换;所述实时压缩、峰值计算、触发判断和低速率采集在时钟信号的下降沿同时进行。The fifth preferred technical solution provided by the present invention is: the analog-to-digital converter A/D performs analog-to-digital conversion on the rising edge of the clock signal; falling edge simultaneously.

与现有技术相比,本发明达到的有益效果是:Compared with prior art, the beneficial effect that the present invention reaches is:

本发明提供的一种基于硬件的暂态电压记录方法,采用可编程门阵列FPGA对波形进行实时压缩存储,提高了CPU工作效率,保障了高采样率,极大地节省了存储空间,满足了对各种快速、慢速变化的暂态过程的记录需求,在FPGA编程中采用了并行的运算方式,在大量数据运算的过程中显示出FPGA数据处理和运算的优越性,一个采样时钟周期内即可完成数据的采集、压缩、存储、峰值计算及触发判断。The present invention provides a hardware-based transient voltage recording method, which uses a programmable gate array FPGA to compress and store waveforms in real time, improves CPU work efficiency, ensures high sampling rates, greatly saves storage space, and meets the requirements for For the recording requirements of various fast and slow changing transient processes, a parallel computing method is adopted in FPGA programming, which shows the superiority of FPGA data processing and computing in the process of massive data computing, within one sampling clock cycle It can complete data collection, compression, storage, peak calculation and trigger judgment.

附图说明Description of drawings

图1是基于FPGA的暂态电压记录系统结构图;Figure 1 is a structural diagram of a transient voltage recording system based on FPGA;

图2是实时压缩模块的FPGA实现示意图;Fig. 2 is the FPGA realization schematic diagram of real-time compression module;

图3是峰值计算模块的FPGA实现示意图;Fig. 3 is the FPGA realization schematic diagram of peak calculation module;

图4是上限、下限触发判断模块的FPGA实现示意图;Fig. 4 is the FPGA realization schematic diagram of upper limit, lower limit trigger judgment module;

图5是低速率采集模块的FPGA实现示意图。Figure 5 is a schematic diagram of the FPGA implementation of the low-rate acquisition module.

具体实施方式Detailed ways

下面结合附图,对本发明的具体实施方式作进一步的详细说明。The specific embodiment of the present invention will be further described in detail below in conjunction with the accompanying drawings.

图1是基于FPGA的暂态电压记录系统结构图,利用FPGA的并行处理能力,实时压缩、触发判断都在FPGA中实现,FPGA共包含如下模块:Figure 1 is a structural diagram of the FPGA-based transient voltage recording system. Using the parallel processing capability of the FPGA, real-time compression and trigger judgment are all implemented in the FPGA. The FPGA contains the following modules:

(1)实时压缩模块;(1) real-time compression module;

(2)峰值计算模块;(2) Peak calculation module;

(3)上限、下限触发判断模块;(3) Upper limit and lower limit trigger judgment module;

(4)低速率采集模块。(4) Low-rate acquisition module.

图2是实时压缩模块的FPGA实现示意图,实时压缩模块包括D触发器1、计数器1、比较器1、时序控制逻辑器和先进先出存储器FIFO;在本发明中采用模数转换器A/D进行模数转换,模数转换器A/D的采样率较高,采集的数据量较大,节省存储空间,采用实时压缩方法来对数据进行压缩存储。Fig. 2 is the FPGA realization synoptic diagram of real-time compression module, and real-time compression module comprises D flip-flop 1, counter 1, comparator 1, sequential control logic device and first-in-first-out memory FIFO; Adopt analog-to-digital converter A/D in the present invention For analog-to-digital conversion, the sampling rate of the analog-to-digital converter A/D is high, the amount of collected data is large, and the storage space is saved. The real-time compression method is used to compress and store the data.

高速模数转换器A/D在时钟的上升沿进行模数转换,在时钟的下降沿,采集到的波形数据A与基值B进行实时比较,当波形数据A与基值B相比小于给定的压缩比delta时,控制变量agb=0,则压缩命令compress=0,D触发器1关闭,波形数据A被丢弃,计数器1加1,且FIFO的写使能信号write_enable无效,没有数据写入FIFO;当波形数据A与基值B相比大于delta时,控制变量agb=1,且FIFO的写使能信号write_enable有效,在下一个时钟信号的上升沿时,将基值B和计数器1的计数值保存至FIFO,同时compress=1,使计数器1清零,D触发器1打开,用波形数据A替换基值B。进行实时压缩后保存在FIFO中的数据只有压缩后的部分采样值和压缩点数。计数器1中Clr表示清零标志,D触发器1中的Enable表示使能信号。The high-speed analog-to-digital converter A/D performs analog-to-digital conversion on the rising edge of the clock. On the falling edge of the clock, the collected waveform data A is compared with the base value B in real time. When the waveform data A and the base value B are less than the given When the compression ratio delta is fixed, the control variable agb=0, then the compression command compress=0, the D flip-flop 1 is closed, the waveform data A is discarded, the counter 1 is incremented by 1, and the write enable signal write_enable of the FIFO is invalid, and no data is written into the FIFO; when the waveform data A is greater than delta compared with the base value B, the control variable agb=1, and the write enable signal write_enable of the FIFO is valid, at the rising edge of the next clock signal, the base value B and counter 1 The count value is saved to the FIFO, and at the same time compress=1, the counter 1 is cleared, the D flip-flop 1 is turned on, and the base value B is replaced with the waveform data A. The data stored in the FIFO after real-time compression is only the compressed part of the sampling value and the number of compression points. Clr in counter 1 represents a clear flag, and Enable in D flip-flop 1 represents an enable signal.

在比较器1中写入的程序为:The program written in comparator 1 is:

If(|A-B|>delta)If(|A-B|>delta)

agb=1;agb=1;

ElseElse

agb=0;agb=0;

如果不使用FPGA,直接将模数转换器A/D与CPU相连,这样系统工作时,A/D将不停地高速采样、CPU将处于连续地间隔取数的状态,这样会占用CPU的大部分时间,导致CPU不能从事其它的工作,也有可能会出现CPU还没有处理完上次的数据,又要处理下一批次的数据,这种矛盾在高速采样的情况下会尤其突出。采用FPGA来对数据进行压缩、缓存,大大提高CPU的工作效率;并且FIFO两端也可接异步时钟,从而很好地解决跨时钟域的数据传输。If you do not use FPGA, directly connect the analog-to-digital converter A/D to the CPU, so that when the system is working, the A/D will continuously sample at high speed, and the CPU will be in the state of continuously fetching data at intervals, which will take up a lot of CPU time. Part of the time, the CPU cannot do other work, and it may also happen that the CPU has not finished processing the last data, but also needs to process the next batch of data. This contradiction will be particularly prominent in the case of high-speed sampling. FPGA is used to compress and cache data, which greatly improves the working efficiency of CPU; and both ends of FIFO can also be connected to asynchronous clocks, so as to solve the data transmission across clock domains well.

在采用电压突变触发时,需要计算电压的正、负峰值,图3是峰值计算模块的FPGA实现示意图,峰值计算模块包括D触发器2、比较器2、D触发器3、比较器3和计数器2和比较器4;峰值计算模块的输入有模数转换器A/D采样的波形数据A和周期计数值D0。周期计数值D0=采样率*20/1000,即一个工频周期的采样时钟数。在时钟信号的下降沿,FPGA将采样的波形数据值A与该工频周期内已经采集到的最大值Max和最小值Min在峰值计算模块中作出比较:如果A>Max,则比较器2的输出Ea为高电平,在下一个时钟的上升沿D触发器2打开,用波形数据A代替最大值Max;如果A<Min,则比较器3的输出Eb为高电平,在下一个时钟的上升沿D触发器3打开,用波形数据A代替最小值Min,每进行一次比较,计数器2加1,当计数器2中的值D累加到给定的周期计数值D0,即D>=D0,在一个工频周期时,比较器4的输出Ec为高电平,使计数器2清零,则FPGA输出Valid有效,此时CPU可以读取正、负峰值。在下一个时钟信号的下降沿,开始下一周期的峰值计算。计数器2中的Clr表示清零标志,D触发器2和D触发器3中的Enable表示使能信号。When triggering with a sudden change in voltage, it is necessary to calculate the positive and negative peak values of the voltage. Figure 3 is a schematic diagram of the FPGA implementation of the peak calculation module. The peak calculation module includes D flip-flop 2, comparator 2, D flip-flop 3, comparator 3 and a counter 2 and comparator 4; the input of the peak calculation module has the waveform data A sampled by the analog-to-digital converter A/D and the cycle count value D0. Period count value D0 = sampling rate * 20/1000, that is, the number of sampling clocks in one power frequency period. On the falling edge of the clock signal, the FPGA compares the sampled waveform data value A with the maximum value Max and minimum value Min already collected in the power frequency cycle in the peak value calculation module: if A>Max, the value of comparator 2 The output Ea is high level, and D flip-flop 2 is turned on at the rising edge of the next clock, and the maximum value Max is replaced by waveform data A; if A<Min, the output Eb of comparator 3 is high level, and at the rising edge of the next clock Turn on the flip-flop 3 along D, replace the minimum value Min with the waveform data A, and add 1 to the counter 2 every time a comparison is made, when the value D in the counter 2 is accumulated to the given cycle count value D0, that is, D>=D0, in During a power frequency cycle, the output Ec of the comparator 4 is high level, so that the counter 2 is cleared, then the FPGA output Valid is valid, and the CPU can read the positive and negative peak values at this time. On the falling edge of the next clock signal, the peak calculation for the next cycle starts. Clr in counter 2 represents the clear flag, and Enable in D flip-flop 2 and D flip-flop 3 represents the enable signal.

在比较器2中写入的程序为:The program written in comparator 2 is:

If(A>=Max)If(A>=Max)

Ea=1;Ea=1;

ElseElse

Ea=0;Ea=0;

在比较器3中写入的程序为:The program written in comparator 3 is:

If(A<=Min)If(A<=Min)

Eb=1;Eb=1;

ElseElse

Eb=0;Eb=0;

在比较器4中写入的程序为:The program written in comparator 4 is:

If(D>=D0)If(D>=D0)

Ec=1;Ec=1;

ElseElse

Ec=0;Ec=0;

图4是上限、下限触发判断模块的FPGA实现示意图,上限、下限触发判断模块包括比较器5和比较器6;上限、下限触发判断模块在时钟信号的下降沿,由比较器5将采样的波形数据A与给定触发上限值up_limit进行比较,当A>up_limit时,满足上限触发条件,则up_valid有效输出低电平;由比较器6将采样的波形数据A与给定触发下限值down_limit进行比较,当A<down_limit时,满足下限触发条件,则down_valid有效输出低电平。比较过程由FPGA的上限、下限触发判断模块自动完成,CPU只需在接收到有效的触发信号up_limit和down_limit时将数据进行存储即可,提高了工作效率。Fig. 4 is the FPGA realization sketch map of upper limit, lower limit trigger judgment module, upper limit, lower limit trigger judgment module comprise comparator 5 and comparator 6; Data A is compared with the given trigger upper limit value up_limit. When A>up_limit, the upper limit trigger condition is satisfied, then up_valid effectively outputs a low level; the sampled waveform data A is compared with the given trigger lower limit value down_limit by comparator 6 For comparison, when A<down_limit, the lower limit trigger condition is met, then down_valid outputs a low level effectively. The comparison process is automatically completed by the upper limit and lower limit trigger judgment modules of the FPGA, and the CPU only needs to store the data when receiving valid trigger signals up_limit and down_limit, which improves work efficiency.

在比较器5中写入的程序是:The program written in Comparator 5 is:

If(A>up_limit)If(A>up_limit)

Up_valid=0;Up_valid = 0;

ElseElse

Up_valid=1;Up_valid = 1;

在比较器6中写入的程序是:The program written in Comparator 6 is:

If(A<down_limit)If(A<down_limit)

Down_valid=0;Down_valid = 0;

ElseElse

Down_valid=1;Down_valid = 1;

图5是低速率采集模块的FPGA实现示意图,低速率采集模块包括先进先出存储器FIFO2、计数器3和比较器7;分频数F=A/D采样速率/所需采样率,即在采样的波形数据A中,每F个数据抽取一个数据,无需另外增加模数转换器A/D。具体工作过程为:在时钟信号的下降沿,比较器7将计数器3的值C与分频数F进行比较,如果C<F,则比较器7的输出Ec为低电平,FIFO2的写使能信号Write_enable无效,没有数据写入FIFO2;当C>=F时,比较器7的输出Ec为高电平,FIFO2的写使能信号Write_enable有效,在下一个时钟信号的上升沿将波形数据A写入FIFO2。FIFO2中存储的就是从高采样率采集的数据中抽取出来低速率采样值,也可以称作是抽点压缩。Fig. 5 is the FPGA realization schematic diagram of low-rate acquisition module, and low-rate acquisition module comprises first-in-first-out memory FIFO2, counter 3 and comparator 7; In the waveform data A, one data is extracted for every F data, and there is no need to add an additional analog-to-digital converter A/D. The specific working process is: on the falling edge of the clock signal, the comparator 7 compares the value C of the counter 3 with the frequency division number F, if C<F, the output Ec of the comparator 7 is low level, and the writing of FIFO2 enables The enable signal Write_enable is invalid, and no data is written into FIFO2; when C>=F, the output Ec of the comparator 7 is high level, the write enable signal Write_enable of FIFO2 is valid, and the waveform data A is written on the rising edge of the next clock signal into FIFO2. What is stored in FIFO2 is the low-rate sampling value extracted from the data collected at high sampling rate, which can also be called snapshot compression.

在比较器7中写入的程序是:The program written in Comparator 7 is:

If(C<F)If(C<F)

Ec=0;Ec=0;

ElseElse

Ec=1;Ec=1;

实施例1Example 1

本发明提供的一种基于硬件的暂态电压记录方法应用在VER200暂态电压记录仪中。VER200采用A/D+FPGA+DSP的结构,实时压缩、触发判断均在FPGA中完成,DSP只需读取压缩后的数据,并在读取到有效的触发信号后存储数据,多通道的同步采样率达到20Msps,数据压缩率达到99%以上,最多可记录300秒的工频电压波形,满足了对各种快速、慢速变化的暂态过程的记录需求。A hardware-based transient voltage recording method provided by the present invention is applied to a VER200 transient voltage recorder. VER200 adopts the structure of A/D+FPGA+DSP. Real-time compression and trigger judgment are all completed in FPGA. DSP only needs to read the compressed data and store the data after reading the effective trigger signal. Multi-channel synchronization The sampling rate reaches 20Msps, the data compression rate reaches more than 99%, and the power frequency voltage waveform can be recorded for up to 300 seconds, which meets the recording requirements for various fast and slow changing transient processes.

最后应该说明的是:结合上述实施例仅说明本发明的技术方案而非对其限制。所属领域的普通技术人员应当理解到:本领域技术人员可以对本发明的具体实施方式进行修改或者等同替换,但这些修改或变更均在申请待批的权利要求保护范围之中。Finally, it should be noted that: the combination of the above embodiments only illustrates the technical solution of the present invention rather than limiting it. Those of ordinary skill in the art should understand that: those skilled in the art can make modifications or equivalent replacements to the specific embodiments of the present invention, but these modifications or changes are all within the protection scope of the pending claims.

Claims (6)

1. a hardware based transient voltage recording method is characterized in that, described method is finished data simultaneously at a sampling clock in the cycle Real Time Compression, peak value calculates, triggers and judge and the low rate collection; The Real Time Compression of described data, peak value calculating, triggering judgement and low rate are captured among the FPGA and realize; Described Real Time Compression is that Wave data A that collects and the base value B in the d type flip flop 1 are compared in comparer 1 in real time, and the data after the compression deposit push-up storage FIFO in; Described peak meter compares described Wave data A and the maximal value Max, the minimum M in that collect at last; The described upper limit, lower limit trigger judges it is that described Wave data A is compared respectively with given triggering higher limit and lower limit in comparer 5 and comparer 6, export effective trigger signals during greater than higher limit or less than lower limit; Described low rate collection is to deposit push-up storage FIFO2 in after the described Wave data A that collects is taken out a compression; The external modulus converter A/D of described FPGA.
2. a kind of hardware based transient voltage recording method as claimed in claim 1 is characterized in that, carries out in the Real Time Compression module of the Real Time Compression of described data in FPGA; Described Real Time Compression module comprises d type flip flop 1, counter 1, comparer 1, sequential control circuit and push-up storage FIFO; Described Real Time Compression carries out comprising when comparing in real time following situation to Wave data A and the base value B in the d type flip flop 1 that collects in comparer 1:
When A, described Wave data A compared less than ratio of compression delta with described base value B, described d type flip flop 1 was closed, and described Wave data A is dropped, and described counter 1 adds 1, described FIFO to write enable signal invalid, do not have data to write described FIFO;
When B, described Wave data A compare greater than ratio of compression delta with described base value B, described FIFO to write enable signal effective, the count value in the described base value B sum counter is saved to described FIFO, described counter 1 zero clearing, described d type flip flop 1 is opened, and described Wave data A replaces base value B.
3. a kind of hardware based transient voltage recording method as claimed in claim 1 is characterized in that, carries out in the peak value computing module of peak value calculating in FPGA of described data; Described peak value computing module comprises d type flip flop 2, d type flip flop 3, comparer 2, comparer 3, comparer 4 sum counters 2; Described peak value calculates described Wave data A and the maximal value Max that collects, comprises following situation when minimum M in compares:
A, when A>Max, described comparer 2 is output as high level, described d type flip flop 2 is opened, described Wave data A replaces maximal value Max;
B, when A<Min, described comparer 3 is output as high level, described d type flip flop 3 is opened, described Wave data A replaces minimum M in;
C, whenever once compare, described counter 2 adds 1, and when the value D of described counter 2 is added to given cycle count value D0, promptly during D>=D0, described comparer 4 is output as high level.
4. a kind of hardware based transient voltage recording method as claimed in claim 1 is characterized in that, the triggering of described data judges it is to trigger in the judge module at the upper limit, lower limit to carry out; The described upper limit, lower limit trigger judge module and comprise comparer 5 and comparer 6; The described upper limit, lower limit trigger judges the following situation that comprises:
(1) described Wave data A and given triggering higher limit up_limit are compared in described comparer 5, when A>up_limit, satisfy upper limit trigger condition, the then effective output low level of up_valid;
(2) described Wave data A and given triggering lower limit down_limit are compared in described comparer 5, when A<down_limit, satisfy lower limit trigger condition, the then effective output low level of down_valid.
5. a kind of hardware based transient voltage recording method as claimed in claim 1 is characterized in that, the low rate of described data is captured in the low rate acquisition module among the FPGA carries out; Described low rate acquisition module comprises push-up storage FIFO2, counter 3 and comparer 7; Described low rate collection comprises following situation when the described Wave data A that collects is taken out some compression:
1. value C and the divider ratio F with described counter 3 compares in described comparer 7, and when C<F, described comparer 7 is output as low level, FIFO2 to write enable signal invalid, do not have data to write FIFO2;
2. value C and the divider ratio F with described counter 3 compares in described comparer 7, and when C>F, described comparer 7 is output as high level, FIFO2 to write enable signal invalid, described Wave data A is write FIFO2.
6. a kind of hardware based transient voltage recording method as claimed in claim 1 is characterized in that described modulus converter A/D carries out analog to digital conversion in rising edge of clock signal; The negative edge that described Real Time Compression, peak value calculating, triggering judgement and low rate are captured in clock signal carries out simultaneously.
CN2010105939643A 2010-12-17 2010-12-17 A hardware-based transient voltage recording method Pending CN102169134A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105939643A CN102169134A (en) 2010-12-17 2010-12-17 A hardware-based transient voltage recording method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105939643A CN102169134A (en) 2010-12-17 2010-12-17 A hardware-based transient voltage recording method

Publications (1)

Publication Number Publication Date
CN102169134A true CN102169134A (en) 2011-08-31

Family

ID=44490371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105939643A Pending CN102169134A (en) 2010-12-17 2010-12-17 A hardware-based transient voltage recording method

Country Status (1)

Country Link
CN (1) CN102169134A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102354295A (en) * 2011-09-21 2012-02-15 北京广利核系统工程有限公司 CPU (central processing unit) load testing method for equipment in DCS (distributed control system)
CN104749429A (en) * 2015-04-08 2015-07-01 四川拓普测控科技有限公司 Lightning overvoltage signal losslessly compressing and recording system
CN107807271A (en) * 2017-09-29 2018-03-16 中国电力科学研究院 A kind of method and system for being compressed automatically to over-voltage monitoring data
CN107831354A (en) * 2017-12-10 2018-03-23 南京宁普防雷设备制造有限公司 Low-power consumption lightning current peak value acquisition system
CN110824249A (en) * 2019-11-19 2020-02-21 中国科学技术大学 System and method for measuring transport property of nano device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1198066A (en) * 1997-02-17 1998-11-04 索尼公司 Digital signal recording method and apparatus and digital signal reproduction method and apparatus
EP0944086A2 (en) * 1998-03-20 1999-09-22 Pioneer Electronic Corporation Data recording method and data recording system
CN1892528A (en) * 2004-08-06 2007-01-10 三星电子株式会社 Circuit and method for generating digital signal processor and storage
CN101267644A (en) * 2008-04-22 2008-09-17 广东高新兴通信股份有限公司 A storage method for monitoring data
CN101441597A (en) * 2007-11-22 2009-05-27 威刚科技股份有限公司 Adjustable mixed-density memory storage device and control method thereof
CN201331550Y (en) * 2009-01-09 2009-10-21 中国电力科学研究院 Transient voltage recording device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1198066A (en) * 1997-02-17 1998-11-04 索尼公司 Digital signal recording method and apparatus and digital signal reproduction method and apparatus
EP0944086A2 (en) * 1998-03-20 1999-09-22 Pioneer Electronic Corporation Data recording method and data recording system
CN1237852A (en) * 1998-03-20 1999-12-08 日本先锋公司 Data recording method and data recording system
CN1892528A (en) * 2004-08-06 2007-01-10 三星电子株式会社 Circuit and method for generating digital signal processor and storage
CN101441597A (en) * 2007-11-22 2009-05-27 威刚科技股份有限公司 Adjustable mixed-density memory storage device and control method thereof
CN101267644A (en) * 2008-04-22 2008-09-17 广东高新兴通信股份有限公司 A storage method for monitoring data
CN201331550Y (en) * 2009-01-09 2009-10-21 中国电力科学研究院 Transient voltage recording device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102354295A (en) * 2011-09-21 2012-02-15 北京广利核系统工程有限公司 CPU (central processing unit) load testing method for equipment in DCS (distributed control system)
CN102354295B (en) * 2011-09-21 2013-08-07 北京广利核系统工程有限公司 CPU (central processing unit) load testing method for equipment in DCS (distributed control system)
CN104749429A (en) * 2015-04-08 2015-07-01 四川拓普测控科技有限公司 Lightning overvoltage signal losslessly compressing and recording system
CN107807271A (en) * 2017-09-29 2018-03-16 中国电力科学研究院 A kind of method and system for being compressed automatically to over-voltage monitoring data
CN107831354A (en) * 2017-12-10 2018-03-23 南京宁普防雷设备制造有限公司 Low-power consumption lightning current peak value acquisition system
CN110824249A (en) * 2019-11-19 2020-02-21 中国科学技术大学 System and method for measuring transport property of nano device
CN110824249B (en) * 2019-11-19 2021-03-09 中国科学技术大学 System and method for measuring transport property of nano device

Similar Documents

Publication Publication Date Title
CN102169134A (en) A hardware-based transient voltage recording method
CN102401871B (en) Failure message integrated device based on FPGA and ARM hardware platform
CN103424608B (en) A kind of low cost rapid high ac voltage signal sampling system
CN100529772C (en) Power network overvoltage signal frequency conversion sampling method
CN113109680B (en) Partial discharge analysis system for stator winding of large-sized hydraulic generator
CN101957439A (en) Sampling and calculating separated type electric energy meter calibrating method and electric energy meter site parameter recorder
CN103389473B (en) Control method for double-path real-time signal power supply monitoring device
CN102437856A (en) Three-level data compression method for subway comprehensive monitoring system based on feature point extraction
CN201804075U (en) An FPGA-based single-end fault location device for transmission lines
CN110672981A (en) A fault location method for DC distribution network based on MMC
CN102721902A (en) Electric transmission line fault detection method based on voltage traveling wave prediction
CN204758755U (en) Power system fault wave recording instrument of parallel record ripples based on high -speed serial communication
CN202159093U (en) Transmission line malfunction traveling wave current full wave collecting device
CN102222980B (en) Transient wave-recording playback system of series capacitor compensation device or fault current limiter device
CN103399205B (en) A kind of warning device and method thereof detecting vehicle-mounted converter harmonic
CN102175907A (en) Flexible wide area power grid phase measurement system
CN100424515C (en) A real-time waveform compression storage method for recording power system transient process
CN116359662A (en) An anomaly detection and wave recording system for power grid and its implementation method
CN202372607U (en) Fault information integrating device based on field programmable gate array (FPGA) and advanced RISC machine (ARM) hardware platform
CN205353187U (en) Transient voltage recorder based on FPGA
CN105067876A (en) Tail-end voltage qualified rate monitoring device
CN205941741U (en) Electrical power quality data collection system
CN102565584A (en) Power quality multi-index data processing module based on FPGA (Field Programmable Gate Array)
CN202453439U (en) Comprehensive handheld power quality tester
CN100527184C (en) Method for collecting transient data in power system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: STATE GRID CORPORATION OF CHINA

Effective date: 20140123

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20140123

Address after: 100192 Beijing city Haidian District Qinghe small Camp Road No. 15

Applicant after: China Electric Power Research Institute

Applicant after: State Grid Corporation of China

Address before: 100192 Beijing city Haidian District Qinghe small Camp Road No. 15

Applicant before: China Electric Power Research Institute

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110831