CN110557121B - Multi-channel high-speed sampling data synchronous calibration method based on FPGA - Google Patents
Multi-channel high-speed sampling data synchronous calibration method based on FPGA Download PDFInfo
- Publication number
- CN110557121B CN110557121B CN201910737418.3A CN201910737418A CN110557121B CN 110557121 B CN110557121 B CN 110557121B CN 201910737418 A CN201910737418 A CN 201910737418A CN 110557121 B CN110557121 B CN 110557121B
- Authority
- CN
- China
- Prior art keywords
- channel
- data
- fifo
- fpga
- 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.)
- Active
Links
- 238000005070 sampling Methods 0.000 title claims abstract description 81
- 238000000034 method Methods 0.000 title claims abstract description 43
- 230000001360 synchronised effect Effects 0.000 title claims abstract description 29
- 238000012545 processing Methods 0.000 claims abstract description 27
- 238000012360 testing method Methods 0.000 claims description 22
- 230000000630 rising effect Effects 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 9
- 125000004122 cyclic group Chemical group 0.000 claims description 2
- 230000003111 delayed effect Effects 0.000 claims 1
- 238000004458 analytical method Methods 0.000 description 11
- 238000013461 design Methods 0.000 description 10
- 238000003860 storage Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B13/00—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
- G05B13/02—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
- G05B13/0205—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric not using a model or a simulator of the controlled system
- G05B13/024—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric not using a model or a simulator of the controlled system in which a parameter or coefficient is automatically adjusted to optimise the performance
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M1/00—Analogue/digital conversion; Digital/analogue conversion
- H03M1/10—Calibration or testing
- H03M1/1009—Calibration
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M1/00—Analogue/digital conversion; Digital/analogue conversion
- H03M1/12—Analogue/digital converters
- H03M1/124—Sampling or signal conditioning arrangements specially adapted for A/D converters
- H03M1/1245—Details of sampling arrangements or methods
- H03M1/1255—Synchronisation of the sampling frequency or phase to the input frequency or phase
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
技术领域technical field
本发明属于数字信号处理领域,具体涉及一种基于FPGA实现的多通道高速采样数据同步校准方法。The invention belongs to the field of digital signal processing, and in particular relates to a multi-channel high-speed sampling data synchronous calibration method realized based on FPGA.
背景技术Background technique
随着芯片集成设计技术和加工工艺的进步,目前GSPS以上高速采样的应用情况在大带宽信号分析中越来越普遍,而高速采样系统由于采样率高,前端模拟部分、采样部分、后端信号处理部分的设计实现难度大,要求高,且实时数据量大,给信号的实时处理分析带来很大负担。而在实际的应用中,由于使用需要,多通道高速采样的情况也越来越普遍,在多通道高速采样应用中,除了以上高速带来的问题,还存在由于设计差异、加工差异、处理过程偏差等带来的多通道间的同步性问题,而对于多通道采样的使用情况,通道间的同步性能往往是整个采集系统性能的关键环节,所以同步性能是多通道高速采样信号分析设计的难题。With the advancement of chip integrated design technology and processing technology, the application of high-speed sampling above GSPS is becoming more and more common in large-bandwidth signal analysis. Due to the high sampling rate of high-speed sampling systems, front-end analog parts, sampling parts, and back-end signal processing Part of the design and implementation is difficult and demanding, and the amount of real-time data is large, which brings a great burden to the real-time processing and analysis of signals. In practical applications, due to the needs of use, multi-channel high-speed sampling is becoming more and more common. In multi-channel high-speed sampling applications, in addition to the problems caused by the above high speeds, there are also differences in design, processing, and processing. The synchronization problem between multi-channels caused by deviation, etc., and for the use of multi-channel sampling, the synchronization performance between channels is often the key link in the performance of the entire acquisition system, so synchronization performance is a difficult problem in the analysis and design of multi-channel high-speed sampling signals .
目前,多通道采样同步实施在硬件实施方面由于设计布局、加工工艺等方面的限制,还没有办法保证多个通道间做到完全的一致性要求,通道间总会有偏差存在。而在软件实施方面,由于数据速率高、数据量大,只能通过大存储设备将数据进行部分存储,然后再进行后续的分析处理,无法满足实时性同步处理要求。At present, due to the limitations of design layout and processing technology in the hardware implementation of multi-channel sampling synchronization, there is no way to ensure complete consistency among multiple channels, and there will always be deviations between channels. In terms of software implementation, due to the high data rate and large amount of data, the data can only be partially stored through large storage devices, and then subsequent analysis and processing can be performed, which cannot meet the requirements of real-time synchronous processing.
现有技术存在如下缺点:There is following shortcoming in prior art:
由于设计加工工艺等方面的限制,多通道间的差异性在硬件实施方面目前已没有办法进行调整。在采样的操作过程中,目前有通过调节通路间采样时钟的相位关系来调节数据同步偏差的操作方法,但调节采样时钟的相位,只能对一个采样时钟周期进行调节,调节范围较窄,只能解决一些特定的情况。并且,采样时钟相位调节也会带来采样时钟间的不同步问题,同样在后续的通道信号分析处理中,显露由于时钟偏差而带来的通道间时钟域异步处理的问题。还有通过调节ADC内部通道延时设置来改善多通道间的同步性能的措施,但ADC内部通道延时设置的可调节容量同样比较窄,一般也在一个最大采样时钟周期左右,无法满足通道间偏差较大的情况。并且有些ADC内部没有通道延时调节功能,需要视ADC具体器件功能情况而使用。还有将采集的多通道高速采样数据先进行存储,然后再通过上位机软件进行后续分析的措施,这种方法不但会造成存储的硬件成本增加,同时也无法满足信号实时处理的要求,只能通过上位机软件后续进行通道间数据的同步处理再分析,也增加了软件方面的工作量。Due to limitations in design and processing technology, there is currently no way to adjust the differences between multi-channels in terms of hardware implementation. During the sampling operation, there is currently an operation method to adjust the data synchronization deviation by adjusting the phase relationship of the sampling clocks between channels, but to adjust the phase of the sampling clock, only one sampling clock period can be adjusted, and the adjustment range is narrow. Can solve some specific situations. In addition, the phase adjustment of the sampling clock will also bring about the asynchronous problem between the sampling clocks. Similarly, in the subsequent channel signal analysis and processing, the problem of asynchronous processing of clock domains between channels due to clock deviation is revealed. There are also measures to improve the synchronization performance between multiple channels by adjusting the ADC internal channel delay setting, but the adjustable capacity of the ADC internal channel delay setting is also relatively narrow, generally around a maximum sampling clock cycle, which cannot meet the needs of inter-channel The case of large deviation. Moreover, some ADCs do not have a channel delay adjustment function inside, which needs to be used depending on the specific device function of the ADC. There is also a measure of storing the collected multi-channel high-speed sampling data first, and then performing subsequent analysis through the host computer software. This method will not only increase the storage hardware cost, but also cannot meet the requirements of real-time signal processing. The subsequent synchronous processing and re-analysis of data between channels through the host computer software also increases the workload of the software.
发明内容Contents of the invention
针对现有技术中存在的上述技术问题,本发明提出了一种基于FPGA实现的多通道高速采样数据同步校准方法,设计合理,克服了现有技术的不足,具有良好的效果。Aiming at the above-mentioned technical problems existing in the prior art, the present invention proposes a multi-channel high-speed sampling data synchronous calibration method based on FPGA, which is reasonable in design, overcomes the deficiencies of the prior art, and has good effects.
为了实现上述目的,本发明采用如下技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:
一种基于FPGA实现的多通道高速采样数据同步校准方法,按照如下步骤进行:A method for synchronous calibration of multi-channel high-speed sampling data realized based on FPGA is carried out according to the following steps:
步骤1:对于给定的n通道高速采集系统,设各通道的高速ADC采样频率为fs,校准测试信号频率为fb,设各通道的FIFO缓存深度为m,通道信号电平判别基准值为V;在各通道的ADC及采样时钟均正常工作的情况下,给各通道输入同步校准测试信号,进行各通道数据采样,假设输入各通道的同步校准测试信号完全同步,则在FPGA的各通道存满一次FIFO数据后暂停接收ADC数据,然后进入步骤2;Step 1: For a given n-channel high-speed acquisition system, set the high-speed ADC sampling frequency of each channel as f s , the calibration test signal frequency as f b , set the FIFO buffer depth of each channel as m, and set the channel signal level as the reference value is V; under the condition that the ADC and the sampling clock of each channel are working normally, input the synchronous calibration test signal to each channel, and carry out the data sampling of each channel. After the channel is full of FIFO data once, stop receiving ADC data, and then enter
步骤2:对n个通道缓存的、每个通道的m点次FIFO数据,依通道信号电平判别基准值V,进行信号上升沿的判别处理,得到每个通道信号上升沿t时刻处的数据样点位置,并计算确定各个通道中上升沿位置t时刻的数据样点在FIFO中缓存的实际样点长度L1、L2...Ln-1、Ln,然后进入步骤3;Step 2: For the m-point FIFO data of each channel buffered by n channels, according to the channel signal level judgment reference value V, the signal rising edge is judged, and the data at the time t of the rising edge of each channel signal is obtained Sample point position, and calculate and determine the actual sample point length L 1 , L 2 ... L n-1 , L n of the data sample point buffered in the FIFO at the time t of the rising edge position in each channel, and then enter step 3;
步骤3:通过循环比较,确定L1、L2...Ln-1、Ln中的最小值和最大值,最小值记为Lmix,最大值记为Lmax,然后进入步骤4;Step 3: Determine the minimum and maximum values among L 1 , L 2 ... L n-1 , L n through cyclic comparison, the minimum value is recorded as L mix , the maximum value is recorded as L max , and then enter step 4;
步骤4:将L1、L2...Ln-1、Ln的长度依次缩减Lmix,形成新的各通道的FIFO缓存深度,记为L’1、L’2...L’n-1、L’n;然后进入步骤5;Step 4: Reduce the length of L 1 , L 2 ... L n-1 , L n in turn by L mix to form a new FIFO buffer depth of each channel, which is denoted as L' 1 , L' 2 ... L' n-1 , L'n; then enter step 5;
步骤5:按照L’1、L’2...L’n-1、L’n的缓存深度,设计各通道的FIFO缓存长度,完成整个多通道高速采样数据的同步校准。Step 5: According to the buffer depth of L' 1 , L' 2 ... L' n-1 , L' n , design the FIFO buffer length of each channel, and complete the synchronous calibration of the entire multi-channel high-speed sampling data.
优选地,步骤1中所述的各通道FIFO缓存深度m需满足条件: Preferably, the FIFO buffer depth m of each channel described in
优选地,在步骤2中,具体按照如下步骤进行:Preferably, in
步骤2.1:设i为通道索引,令i=1;设c为通道缓存数据索引;进入步骤2.2;Step 2.1: Let i be the channel index, let i=1; let c be the channel cache data index; go to step 2.2;
步骤2.2:获取i索引通道的m点次深度FIFO数据,令c=1,进入步骤2.3;Step 2.2: Obtain the m-point sub-depth FIFO data of the i index channel, set c=1, and enter step 2.3;
步骤2.3:获取c索引的通道FIFO数据sc,进入步骤2.4;Step 2.3: Obtain the channel FIFO data s c indexed by c, and proceed to step 2.4;
步骤2.4:判断通道FIFO数据sc与通道信号电平判别基准值V的大小;Step 2.4: Judging the size of the channel FIFO data s c and the channel signal level discrimination reference value V;
若:判断结果是sc小于V,则令c加1,然后进入步骤2.5;If: the judgment result is that s c is less than V, then add 1 to c, and then enter step 2.5;
或判断结果是sc大于或者等于V,则令Li=m-c,令i加1,然后进入步骤2.6;Or if the judgment result is that s c is greater than or equal to V, then set L i =mc, add 1 to i, and then enter step 2.6;
步骤2.5:判断通道缓存数据索引c与FIFO缓存深度m的大小;Step 2.5: Determine the size of the channel cache data index c and the FIFO cache depth m;
若:判断结果是c大于m,则令Li=0,令i加1,然后进入步骤2.6;If: the judgment result is that c is greater than m, then set L i =0, add 1 to i, and then enter step 2.6;
或判断结果是c小于或者等于m,则返回步骤2.3;Or if the judgment result is that c is less than or equal to m, return to step 2.3;
步骤2.6:判断通道索引i与通道数n的大小;Step 2.6: Determine the size of the channel index i and the number of channels n;
若:判断结果是i小于或者等于n,则返回步骤2.2;If: the judgment result is that i is less than or equal to n, return to step 2.2;
或判断结果是i大于n,则整个求取L1、L2...Ln-1、Ln的过程结束。Or if the judgment result is that i is greater than n, then the entire process of obtaining L 1 , L 2 . . . L n-1 , L n ends.
优选地,在步骤3中,具体按照如下步骤进行:Preferably, in step 3, specifically follow the steps below:
步骤3.1:设j为L1、L2...Ln-1、Ln的索引,令j=2,令Lmix=L1,Lmax=L1,进入步骤3.2; Step 3.1 : Let j be the index of L 1 , L 2 .
步骤3.2:获取j的索引数据Lj,然后进入步骤3.3;Step 3.2: Get the index data L j of j, and then go to step 3.3;
步骤3.3:分别判断索引数据Lj与最小值Lmix、最大值Lmax的大小;Step 3.3: Determine the size of the index data L j and the minimum value L mix and the maximum value L max respectively;
若:判断结果是Lj小于或者等于Lmix,则令Lmix=Lj;判断结果是Lj大于或者等于Lmax,则令Lmax=Lj;然后令j加1,然后进入步骤3.4;If: the judgment result is that L j is less than or equal to L mix , then set L mix =L j ; the judgment result is that L j is greater than or equal to L max , then set L max =L j ; then add 1 to j, and then enter step 3.4 ;
或判断结果是Lj大于Lmix或者Lj小于Lmax,则令j加1,然后进入步骤3.4;Or if the judgment result is that L j is greater than L mix or L j is less than L max , add 1 to j, and then enter step 3.4;
步骤3.4:判断j与通道数n的大小;Step 3.4: Determine the size of j and the number of channels n;
若:判断结果是j小于或者等于n,则返回步骤3.2;If: the judgment result is that j is less than or equal to n, return to step 3.2;
或判断结果是j大于n,则求取过程完成。Or if the judgment result is that j is greater than n, then the obtaining process is completed.
优选地,步骤4中所述的L’1、L’2...L’n-1、L’n的值为相应的L1、L2...Ln-1、Ln的值减去Lmix后的值。Preferably, the values of L' 1 , L' 2 ... L' n-1 , L' n described in step 4 are the corresponding values of L 1 , L 2 ... L n-1 , L n The value after subtracting L mix .
优选地,在采集系统每次硬启动后,因需要填充FIFO来达到各通道同步调整的目的,FPGA里各通路FIFO输出的前L个数据是不同步的,需要舍弃,在延时L个数据后各通道FIFO缓存输出的数据达到一致同步性,再接收FIFO输出的数据,提供给后端处理。Preferably, after each hard start of the acquisition system, because the FIFO needs to be filled to achieve the purpose of synchronous adjustment of each channel, the first L data output by each channel FIFO in the FPGA is asynchronous and needs to be discarded. Afterwards, the data output by the FIFO cache of each channel reaches consistent synchronization, and then the data output by the FIFO is received and provided to the back-end for processing.
优选地,L=Lmax-Lmix。Preferably, L = L max - L mix .
优选地,通道信号电平判别基准值V应小于校准测试信号的最大幅度,且大于校准测试信号的最小幅度。Preferably, the channel signal level judgment reference value V should be smaller than the maximum amplitude of the calibration test signal and greater than the minimum amplitude of the calibration test signal.
优选地,校准测试信号频率fb至少小于通道高速ADC采样频率fs的十分之一。Preferably, the frequency f b of the calibration test signal is at least one tenth of the sampling frequency f s of the high-speed ADC of the channel.
本发明所带来的有益技术效果:Beneficial technical effects brought by the present invention:
本发明一种基于FPGA实现的多通道高速采样数据同步校准方法,是一种针对多通道高速采样所实施的通道间采样数据进行同步校准和实施的方法,其有效解决了多通道高速ADC采样后通道间的数据同步问题,本发明方法是在FPGA内部实现的,以FIFO进行采样缓存校准和具体同步过程实现的处理方法,实时响应、速率快、效率高,且不依赖于硬件平台,不对依赖现有硬件的采样时钟或ADC内核参数进行改变,不对现有硬件产生影响,而是在高速采样后端,在信号处理分析之前进行的同步校准。The present invention is a multi-channel high-speed sampling data synchronous calibration method based on FPGA, which is a method for synchronous calibration and implementation of inter-channel sampling data implemented by multi-channel high-speed sampling, which effectively solves the problem of multi-channel high-speed ADC sampling. For the data synchronization problem between channels, the method of the present invention is realized inside the FPGA, and the processing method of sampling buffer calibration and specific synchronization process realization with FIFO has real-time response, fast speed and high efficiency, and does not depend on the hardware platform and does not rely on Changing the sampling clock or ADC core parameters of the existing hardware does not affect the existing hardware, but is a synchronous calibration at the high-speed sampling backend before signal processing and analysis.
相对于其他通过大容量存储进行后续分析的方案,本发明方法有效的解决了多通道高速采集信号同步的实时性处理问题,同时还有效减少了存储的硬件成本,降低了后续软件工作量,具有降本提效的效果;相对于其他实施调节采样时钟或ADC参数的方案,本发明方法更加灵活精确,调节范围宽,且不会对现有硬件条件产生影响,不会由于本发明方法的实施给采样及后续处理环节带来连锁效应影响。Compared with other solutions for subsequent analysis through large-capacity storage, the method of the present invention effectively solves the problem of real-time processing of multi-channel high-speed acquisition signal synchronization, and at the same time effectively reduces the hardware cost of storage, reduces the workload of subsequent software, and has the advantages of The effect of cost reduction and efficiency improvement; compared with other schemes that implement the adjustment of sampling clock or ADC parameters, the method of the present invention is more flexible and accurate, has a wide adjustment range, and will not affect existing hardware conditions, and will not be affected by the implementation of the method of the present invention. Bring knock-on effects to the sampling and subsequent processing links.
附图说明Description of drawings
图1为本发明方法的实现过程图。Fig. 1 is the realization process diagram of the method of the present invention.
图2为FPGA资源开销最小的实现过程图。Fig. 2 is a diagram of the realization process with minimum FPGA resource overhead.
具体实施方式Detailed ways
下面结合附图以及具体实施方式对本发明作进一步详细说明:Below in conjunction with accompanying drawing and specific embodiment the present invention is described in further detail:
本发明一种基于FPGA实现的多通道高速采样数据同步校准方法,专门针对多通道高速采集的通道间数据同步问题而设计,因FPGA作为目前常用ADC数据处理器件,高速ADC采集的数据大都需在FPGA中直接进行处理分析或存储传输,所以在FPGA中实现多通道采样数据的同步校准,使得通道间采样数据完全同步将给FPGA中后续信号处理带来很大益处。本发明方法单元,直接接收高速ADC采样输入到FPGA接口的高速数据,然后在FPGA中建立通道FIFO缓存,通过通道FIFO缓存深度来调节控制缓存输出接口数据的相对时间,从而实现多通道间采样数据的时间偏差调整,达到多通道采样数据的完全同步功能。The present invention is a multi-channel high-speed sampling data synchronous calibration method based on FPGA, which is specially designed for the inter-channel data synchronization problem of multi-channel high-speed acquisition. Because FPGA is currently used as an ADC data processing device, most of the data collected by high-speed ADC needs to The processing, analysis or storage transmission is directly performed in the FPGA, so realizing synchronous calibration of multi-channel sampling data in the FPGA, so that the sampling data between channels is completely synchronized will bring great benefits to the subsequent signal processing in the FPGA. The method unit of the present invention directly receives high-speed ADC sampling input to the high-speed data of the FPGA interface, and then establishes a channel FIFO buffer in the FPGA, and adjusts and controls the relative time of buffer output interface data through the depth of the channel FIFO buffer, thereby realizing sampling data between multiple channels The time deviation adjustment can achieve the full synchronization function of multi-channel sampling data.
本发明方法的实现过程如图1所示,假设有n条高速采集通道在硬件设计方面已按照同步设计要求进行设计,并将采样数据输入到FPGA中进行信号分析处理,n条采样通道分别以ch1、ch2...chn-1、chn表示,每条采样通道的采样数据宽度都是一样的。在通道校准阶段,设通道FIFO缓存深度为m,如图1所示,s1、s2...sm-1、sm表示缓存到通道FIFO中的样点数据,标号表示按时间顺序依次缓存到通道FIFO缓存中,缓存数据遵循先进先出的规则。设采样频率为fs,校准测试信号频率为fb,假设缓存深度m满足这里校准测试信号一般为给入的沿变化比较明显的脉冲信号或方波信号,在校准阶段每个通道使用FIFO的深度可确保能存储一个校准测试信号的采样数据周期。The realization process of the inventive method is as shown in Figure 1, assumes that n high-speed acquisition channels have been designed according to the synchronous design requirements in terms of hardware design, and the sampling data is input into the FPGA for signal analysis and processing, and the n sampling channels are respectively ch 1 , ch 2 . . . ch n-1 , ch n indicate that the sampling data width of each sampling channel is the same. In the channel calibration stage, set the channel FIFO buffer depth to m, as shown in Figure 1, s 1 , s 2 ... s m-1 , s m represent the sample data buffered in the channel FIFO, and the labels represent the time sequence It is buffered in the channel FIFO buffer in turn, and the buffered data follows the first-in-first-out rule. Let the sampling frequency be f s , the calibration test signal frequency be f b , and assume that the buffer depth m satisfies Here, the calibration test signal is generally a pulse signal or a square wave signal with obvious edge changes. In the calibration phase, the depth of the FIFO used by each channel can ensure that a sampling data cycle of the calibration test signal can be stored.
在校准阶段,在各通道ADC及采样时钟均正常工作的情况下,给各通道输入同步校准测试信号进行各通道数据采样,校准测试信号频率为fb,采样频率为fs,且假设输入各通道的同步校准测试信号完全同步。当在FPGA中存满一次FIFO数据后,暂停接收ADC数据,便可在FPGA中对测试信号数据进行分析。对于给定的信号电平判别基准值V,对各通道数据进行与V值的比较判别,当采样数据值小于V时,可判定为信号采样在校准测试信号的低电平阶段,当信号采样数据值大于等于V时,则判定为信号采样在校准测试信号的高电平阶段,在采样数据由低电平变为高电平的地方,则为校准测试信号的信号上升沿变化时刻,记为t时刻。理论上在无通道偏差的情况下,各个通道的t时刻应该都保持在信号采样的一个样点时刻,但由于加工制造中的硬件偏差,使得各个通道在t时刻的数据样点不能够保持一致时刻,所以造成了多通道采样数据的不同步问题。In the calibration stage, when the ADC and sampling clock of each channel are working normally, input a synchronous calibration test signal to each channel for data sampling of each channel. The frequency of the calibration test signal is f b , and the sampling frequency is f s . The synchronous calibration test signals of the channels are fully synchronized. When the FIFO data is fully stored in the FPGA, the receiving of ADC data is suspended, and then the test signal data can be analyzed in the FPGA. For a given signal level judgment reference value V, compare and judge the data of each channel with the V value. When the sampled data value is less than V, it can be judged that the signal sampling is in the low-level stage of the calibration test signal. When the signal sampling When the data value is greater than or equal to V, it is determined that the signal sampling is in the high level stage of the calibration test signal, and when the sampling data changes from low level to high level, it is the rising edge change moment of the calibration test signal, and record is time t. Theoretically, in the case of no channel deviation, the time t of each channel should be kept at one sample point of signal sampling, but due to the hardware deviation in processing and manufacturing, the data sample points of each channel at time t cannot be kept consistent. Time, so it caused the asynchronous problem of multi-channel sampling data.
通过以上对各个通道数据的判别处理,可确定各个通道的校准信号上升沿位置t时刻在FPGA中各个FIFO中的实际位置,由此可确定各个通道中上升沿位置t时刻的数据样点在FIFO中缓存的实际样点长度,即记为L1、L2...Ln-1、Ln,也即反映出校准测试信号上升沿在各个通道中的实际时间位置偏差。Through the above discrimination processing of the data of each channel, the actual position of the calibration signal rising edge position t of each channel in each FIFO in the FPGA can be determined, so that the data samples at the rising edge position t time of each channel can be determined in the FIFO The actual sample point lengths buffered in the buffer are denoted as L 1 , L 2 .
在确定了各个通道中上升沿位置t时刻的数据样点在FIFO中缓存的实际样点长度L1、L2...Ln-1、Ln后,为满足各通道数据的同步功能,将各通路FIFO的缓存深度重新设计为L1、L2...Ln-1、Ln,则在各通道信号采样后,经FIFO缓存输出的数据可保证其同步性要求。After determining the actual sample point lengths L 1 , L 2 ... L n-1 , L n of the data samples buffered in the FIFO at the time of rising edge position t in each channel, in order to satisfy the synchronization function of the data of each channel, Redesign the buffer depth of FIFO of each channel as L 1 , L 2 .
为了减少FPGA资源消耗,可确定实际测试所得的L1、L2...Ln-1、Ln中哪条通道缓存深度最小,记为Lmix,哪条通道缓存深度最大,记为Lmax。所有通道的缓存深度可相应的减少Lmix,即L1-Lmix、L2-Lmix...Ln-1-Lmix、Ln-Lmix,记为L’1、L’2...L’n-1、L’n。则可将通路FIFO的缓存深度重新设计为L’1、L’2...L’n-1、L’n,其中缓存最少的通道将不再使用FIFO,如图2所示,假设chn通道在t时刻判别后其Ln在通道中最小,则chn通道数据不再进行FIFO缓存,其也表征在各通道中,chn通道数据偏差最靠后。其他通路FIFO深度减少Lmix,在图2中,具体缓存的数据深度以粗框内部阴影标注的样点信息进行标识。在这种情况下,即可达到多通道高速采样数据同步的功能,同时对FPGA资源消耗可降到最低。In order to reduce FPGA resource consumption, it is possible to determine which channel has the smallest buffer depth among L 1 , L 2 ... L n-1 , and L n obtained from the actual test, which is recorded as L mix , and which channel has the largest buffer depth, which is recorded as L max . The buffer depth of all channels can be correspondingly reduced by L mix , that is, L 1 -L mix , L 2 -L mix ... L n-1 -L mix , L n -L mix , denoted as L' 1 , L' 2 ...L' n-1 , L' n . Then the buffer depth of the channel FIFO can be redesigned as L' 1 , L' 2 ... L' n-1 , L' n , and the channel with the least buffer will no longer use the FIFO, as shown in Figure 2, assuming ch After the n channel is judged at time t, its L n is the smallest in the channel, then the data of the ch n channel is no longer FIFO buffered, which is also represented in each channel, and the data deviation of the ch n channel is the last. The FIFO depth of other channels is reduced by L mix . In FIG. 2 , the data depth of the specific cache is marked by the sample point information marked with the shadow inside the thick frame. In this case, the function of multi-channel high-speed sampling data synchronization can be achieved, and the consumption of FPGA resources can be minimized.
在具体使用过程中,本发明方法在既有硬件和采样频率不变的情况下,只需校准一次,便可在后续的处理中实施依校准所得的L’1、L’2...L’n-1、L’n通道FIFO深度体制达到多通道的数据同步使用性能,无需再进行校准操作。当通道硬件或采样基本参数进行调节后,可实施本发明方法再次进行校准,以修正更改偏差。In the specific use process, the method of the present invention only needs to be calibrated once under the condition that the existing hardware and sampling frequency remain unchanged, and the L' 1 , L' 2 ... L ' n-1 , L' n- channel FIFO depth system achieves multi-channel data synchronization performance, no need to perform calibration operations. After the channel hardware or basic sampling parameters are adjusted, the method of the present invention can be implemented to calibrate again to correct the change deviation.
在采集系统每次硬启动后,因需要填充FIFO来达到各通道同步调整的目的,FPGA里各通路FIFO输出的前Lmax-Lmix个数据是不同步的,需要舍弃,在延时Lmax-Lmix个数据后再接收FIFO输出数据提供给后端处理。After each hard start of the acquisition system, because the FIFO needs to be filled to achieve the purpose of synchronous adjustment of each channel, the first L max -L mix data output by the FIFO of each channel in the FPGA is not synchronized and needs to be discarded. -L mix data and then receive FIFO output data for back-end processing.
当然,上述说明并非是对本发明的限制,本发明也并不仅限于上述举例,本技术领域的技术人员在本发明的实质范围内所做出的变化、改型、添加或替换,也应属于本发明的保护范围。Of course, the above descriptions are not intended to limit the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or replacements made by those skilled in the art within the scope of the present invention shall also belong to the present invention. protection scope of the invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910737418.3A CN110557121B (en) | 2019-08-12 | 2019-08-12 | Multi-channel high-speed sampling data synchronous calibration method based on FPGA |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910737418.3A CN110557121B (en) | 2019-08-12 | 2019-08-12 | Multi-channel high-speed sampling data synchronous calibration method based on FPGA |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110557121A CN110557121A (en) | 2019-12-10 |
CN110557121B true CN110557121B (en) | 2023-03-24 |
Family
ID=68737379
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910737418.3A Active CN110557121B (en) | 2019-08-12 | 2019-08-12 | Multi-channel high-speed sampling data synchronous calibration method based on FPGA |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110557121B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112187262B (en) * | 2020-06-16 | 2021-06-22 | 中国人民解放军战略支援部队航天工程大学 | A DBBC Synchronous Acquisition Time Delay Control Method |
CN114267407B (en) * | 2022-03-03 | 2022-06-10 | 合肥悦芯半导体科技有限公司 | Precision correction method, device and system and precision correction equipment |
CN114844750A (en) * | 2022-04-15 | 2022-08-02 | 中国电子科技集团公司第五十四研究所 | Rapid amplitude-phase consistency calibration method based on full-synchronous sampling |
CN115694492B (en) * | 2022-10-31 | 2025-07-01 | 成都中微达信科技有限公司 | A method and device for synchronous correction of AD chip based on FPGA |
CN116979978B (en) * | 2023-09-22 | 2024-01-23 | 西安乾景防务技术有限公司 | FPGA-based method and device for calibrating amplitude between receiving channels |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5914991A (en) * | 1997-06-30 | 1999-06-22 | Siemens Medical Systems, Inc. | Syncronizing a data acquisition device with a host |
CN203661045U (en) * | 2013-12-18 | 2014-06-18 | 上海宝钢工业技术服务有限公司 | Multichannel-signal synchronous-collection system |
CN105911460A (en) * | 2016-06-21 | 2016-08-31 | 电子科技大学 | Multichannel logic analyzer with synchronous signal self-calibration function |
CN106383338A (en) * | 2016-11-17 | 2017-02-08 | 中国电子科技集团公司第四十研究所 | Multichannel radar signal acquisition device based on digital channelization |
CN206711081U (en) * | 2017-04-07 | 2017-12-05 | 华中师范大学 | A kind of multi-channel high-speed serial data collection system based on simultaneous techniques |
-
2019
- 2019-08-12 CN CN201910737418.3A patent/CN110557121B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5914991A (en) * | 1997-06-30 | 1999-06-22 | Siemens Medical Systems, Inc. | Syncronizing a data acquisition device with a host |
CN203661045U (en) * | 2013-12-18 | 2014-06-18 | 上海宝钢工业技术服务有限公司 | Multichannel-signal synchronous-collection system |
CN105911460A (en) * | 2016-06-21 | 2016-08-31 | 电子科技大学 | Multichannel logic analyzer with synchronous signal self-calibration function |
CN106383338A (en) * | 2016-11-17 | 2017-02-08 | 中国电子科技集团公司第四十研究所 | Multichannel radar signal acquisition device based on digital channelization |
CN206711081U (en) * | 2017-04-07 | 2017-12-05 | 华中师范大学 | A kind of multi-channel high-speed serial data collection system based on simultaneous techniques |
Non-Patent Citations (2)
Title |
---|
"The Multi-Channel Data Acquisition System Based on FPGA and ADS1252";Bingqi Liu等;《Applied Mechanics and Materials》;20140324;第543-547卷;2440-2443 * |
"基于FPGA的多通道同步数据采集系统设计";宋亮;《中国优秀硕士学位论文全文数据库 信息科技辑》;20161015;I140-151 * |
Also Published As
Publication number | Publication date |
---|---|
CN110557121A (en) | 2019-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110557121B (en) | Multi-channel high-speed sampling data synchronous calibration method based on FPGA | |
CN105911460B (en) | Multichannel logic analyser with synchronizing signal self-calibration function | |
CN104378114B (en) | A kind of method for realizing that multipath A/D converter is synchronous | |
CN106253902A (en) | There is the reset of many device synchronization and identify the multi-channel parallel acquisition system of calibration function | |
CN107145468A (en) | Signal generating and reading device and control method | |
CN102495912A (en) | A multi-channel high-speed data acquisition system with synchronous correction function | |
CN106385256A (en) | Multi-channel parallel acquisition system with storage function and synchronous recognition function | |
CN104901695A (en) | Calibrating module for sampling time error of TIADC (Time-interleaved Analog To Digital Converter) and calculating method for calibrating module | |
CN110596439B (en) | A digital trigger detection method | |
CN101504431A (en) | Nanosecond on-line detection system for random pulse time sequence | |
CN104035124A (en) | Multichannel digital spectrometer with function of spectrum stabilization | |
CN102928772A (en) | Time sequence testing system and testing method thereof | |
CN109240981B (en) | Method, device and computer readable storage medium for synchronous acquisition of multichannel data | |
CN108776264A (en) | The fft analysis device of digital oscilloscope | |
CN109032498A (en) | A kind of waveform quantization synchronous method of the multichannel collecting system of more FPGA | |
CN110750484B (en) | Synchronous acquisition system and acquisition method for data of rotating speed and multiple vibration channels | |
CN110445727B (en) | Data cache transmission device for high-speed ADC performance test | |
CN206849009U (en) | The high-speed data acquistion system of HSSI High-Speed Serial Interface | |
CN101184068B (en) | Method for time delay of receiver | |
CN107425854A (en) | A kind of method for lifting multi-channel A/D C interleave samples system synchronization resetting stabilities | |
CN103048506B (en) | Method for calibrating data merging sequences of parallel acquisition system | |
CN110175095B (en) | Man-machine interaction type multifunctional FPGA coincidence measurement system and measurement method thereof | |
CN108449088B (en) | Multichannel high-speed sampling synchronization method and device | |
CN110955179A (en) | Dual-channel shared clock trigger delay adjusting device based on PCI bus | |
CN112067870B (en) | Automatic oscilloscope parameter measuring device and method based on FPGA |
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 |