ACTA IMEKO  September 2014, Volume 3, Number 3, 43 – 49  www.imeko.org    ACTA IMEKO | www.imeko.org  September 2014 | Volume 3 | Number 3 | 43  Multi tapped delay line time‐interval measurement system  implemented in a programmable structure  Marek Zieliński, Dariusz Chaberski, Maciej Gurski, Marcin Kowalski  Institute of Physics, Nicolaus Copernicus University, Grudziądzka 5/7, 87‐100 Toruń, Poland  Section: RESEARCH PAPER   Keywords: Time‐interval measurement, measurement systems, FPGA applications, QNM method.  Citation: Marek Zieliński, Dariusz Chaberski, Maciej Gurski, Marcin Kowalski, Multi tapped delay line time interval measurement system implemented in  programmable structure, Acta IMEKO, vol. 3, no. 3, article 10, September 2014, identifier: IMEKO‐ACTA‐03 (2014)‐03‐10  Editor: Paolo Carbone, University of Perugia   Received February 4 th , 2013; In final form April 22 th , 2014; Published September 2014  Copyright: © 2014 IMEKO. This is an open‐access article distributed under the terms of the Creative Commons Attribution 3.0 License, which permits  unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited  Funding: This work was supported by the Polish National Science Centre (NCN ) Grant No N N505 484540  Corresponding author: Marek Zieliński, e‐mail: marziel@fizyka.umk.pl    1.  INTRODUCTION  During the last several years many time-interval measurement methods and systems were described and discussed in different scientific journals and conference proceedings [1 - 4]. Usually, high resolution TIMS (Time- Interval Measurement System) should be characterized by a resolution better than 1 ns, and fortunately, can be realized by modern FPGA (Field Programmable Gate Array) devices [5-6]. High resolution TIMS are widely applied. Examples of TIMS with single-stage interpolation implemented in CMOS FPGA devices are systems for life-time of the excited atomic states measurement, systems for clock characterization, systems for quantum cryptography experiments, systems for ultrasonic flow-meters or monitoring systems of time-of-flight mass spectrometer [7, 8]. Of course, it should be noticed that systems implemented in FPGA devices require relatively much energy. Limiting the total time of measurements by parallelization leads to shortening of the duty cycle and limits the total power consumption [4]. The measurement system presented in this paper enables the increase of the system resolution that leads to higher precision of the single time-interval measurement. 2.  PRINCIPLE OF TIME‐INTERVAL MEASUREMENT   The main task of the measuring system is the registration and collection of time-stamps corresponding to incoming pulses, which appeared at the “START” and “STOP” inputs. The measured time-interval is calculated by using a pair of time-stamps. The system can work in simple Start / Stop mode Figure 1. Principle of time‐interval measurement.   ABSTRACT   This paper describes a time‐interval measurement system with  increased resolution using multiple taped delay  lines.  In this time‐ interval measurement system, sixteen time‐stamps are registered during a single measuring cycle (one shot). It means that the value  of the measured time‐interval can be  interpolated with higher resolution without  increasing the number of measurements or the  interpolation time. Limiting the total measurement time reduces the energy consumption which is particularly important in battery  powered systems.   ACTA IMEKO | www.imeko.org  September 2014 | Volume 3 | Number 3 | 44  or in multi-Stop mode. Most of the high resolution TIMS use the measurement method shown in   |  49 [1, 4]. In this method the measured time-interval is divided into three parts, which are separately measured: 1) Δtp – the time interval between rising edges of the “STOP” pulse and the nearest period of the clock signal, 2) Δtk – the time interval between rising edges of the “START” pulse and the nearest clock period, 3) ΔtN – the integer number N of standard clock periods (ΔtN = NT0) which appeared between “START” and “STOP” pulses. The result of time-interval measurement will be given as: 0m N p k p kt t t t t t NT            (1) Usually, integer number of clock cycles is counted by two counters of which the first one is incremented by the clock rising edge and the second one is incremented by the clock falling edge. In some cases the number of standard clock period counters can be increased to obtain correct information about ΔtN for each tapped delay line (TDL). Precision of TIMS in practice depends on the resolution of interpolators (type of interpolator and its implementation technology), that measure residual time intervals Δtp, Δtk and standard clock stability (accumulated jitter). In case of small ranges of measured time-intervals (10 ns – 10 μs), for example: measurement of small flow or time-of-flight in mass spectrometry, precision does not depend on accumulated jitter [4]. If TDL is used in the design of the interpolator then the value of the single segment delay τ and its deviation (nonlinearity) determine the precision of the time-interval Δtm measurement. If the interpolator consists of n TDLs, then during the single measurement cycle it is possible to obtain n different results of the Δtm measurement. Such a solution leads straight to an increase of the time-interval measurement resolution. The knowledge of TDLs characteristics such as DNL (Differential Nonlinearity) and INL (Integral Nonlinearity) and use of the quantization-and-nonlinearity-minimization (QNM) method allow to obtain a two-sample (“START” and “STOP”) difference histogram with higher resolution [9]. 3. ARCHITECTURE OF THE TIMS   TIMS as a virtual instrument consists of a hardware unit, flexible software and a computer. The block diagram of the new TIMS architecture is shown in Figure 2. The system consists of a group of sixteen TDLs (sixty-four delay elements each) with independent registers, code converter, four clock cycles counters, block of memory, interface and control unit. Such TIMS can be implemented in a single Spartan or Virtex FPGA device. In case the incoming pulses have different amplitudes, two constant fraction discriminators should be applied accordingly to the both “START” and “STOP” inputs [10]. Application of the constant fraction discriminators decreases the pulse position error and increases the precision of the time-interval measurement. Multiplying of the clock cycles counter ensures sufficient set-up time during incrementation and the data can be asynchronously read-out from one of the counters and can extend the information about the measurand. The code converter enables data conversion from the pseudo-thermometric code to the natural binary code. In the presented measurement system a single code converter is applied. Such solution significantly decreases FPGA resources used for implementation, decreases power consumption and increases slightly the total conversion time. Figure 2. The block diagram of TIMS.  Figure 3. TIMS implementation in Virtex‐4 device.     Figure 4. Single delay‐line element.  ACTA IMEKO | www.imeko.org  September 2014 | Volume 3 | Number 3 | 45  Each measurand consists of a main part, which is taken from one of the clock cycles counters and a residual part, which is taken from one of the delay-line registers through the data converter. Carry chains of CLBs (Configurable Logical Block) are used to TDLs and register implementation as shown in Figure 4. When using the carry chains for the delay elements implementation, an average resolution for single TDL of approximately 50 ps can be obtained. Each TDL is placed in a single FPGA column of the CLB. Selection of appropriate delay elements is forced by the UCF (User Constrains File). Calibration of the delay-line elements is possible but not easy. Firstly, the place of the delay-line can be changed by the choice of the proper CLB column. Secondly, in each CLB the proper one of two SLICES can also be chosen. Delay of individual elements can be increased by increasing the input capacity, which is possible by connecting additional elements in the FPGA structure. 4. MULTI‐TAPPED DELAY LINES UNIT  Even if the calibration process of the TDLs runs very precisely which is not always possible, the characteristics of the TDLs will be different. It means that the time-bins in different lines have a different width. The widths of bins for sixteen TDLs obtained using the statistical method [5, 6] are shown in Figure 5. However the characteristics of the lines are not identical, the results of the time-interval measurements have a Gaussian statistic, as is shown in Figure 6. Assuming that residual time-intervals Δtp, Δtk are interpolated by sixteen independent delay lines and the obtained measurements are not correlated it is possible to improve the system uncertainty by a factor of four. In practice, the interpolators are correlated and further improvement of the measurement uncertainty is possible because of the direct increase in resolution [9]. 5. TIME‐INTERVAL HISTOGRAM CALCULATION  The simplest and the most effective way of time-interval histogram calculation when the multi-tapped-delay-line (MTDL) is being applied is the QNM method [9]. When the TIMS consists of n TDLs then for each time-interval, the time-interval histogram is updated n times. When all TDL characteristics are uncorrelated, the time-interval histogram can be calculated even with n times greater resolution (smaller bin- size). For each time-interval, two time-stamps are being generated by each TDL. The contribution that is added to the time- interval histogram equals the modified convolution of the time- stamp probability-density-functions (PDF). The argument of the first function has been changed in sign [9]. Let the i -th time-stamp be registered in the ikP , -th quantization step, the j -th time-stamp be registered in the jkP , -th quantization step and  tnk , be the PDF of the n -th (all TDL considered) quantization step (Figure 7). In this case, the value that should be added to the time-interval histogram in the range  21, tt for the k -th TDL equals       2 1 1 2 k,P k,Pk,i k, j t k,i, j E E t ρ t , t σ σ dτ    . (2) When the measurement module consists of n TDLs then for each time-interval, the time-interval histogram in the range Figure 5. Comparison of the line delay characteristics.  Figure 6. The time‐intervals histogram.  Figure 7. Two exemplary convolutions obtained as the result of time interval  measurement  between  the  i ‐th  and  j ‐th  pulses  registered  by  the  k ‐th  and  l ‐th  tapped  delay  lines;  the  quantization  steps  a)  differ  in  width  ( jkik PkPk EE ,, ,,  ), b) equal to each other ( jlil PlPl EE ,, ,,  ).  ACTA IMEKO | www.imeko.org  September 2014 | Volume 3 | Number 3 | 46   21, tt is updated by the sum of all contributions, so     1 , 1 2 , , 1 2 0 , , n i j k i j k t t t t      . (3) Figure 7 shows the calculation of contributions generated by the k -th and l -th TDLs. The two quantization steps in the k - th TDL into which the time-stamp has been registered are different in width ( jkik PkPk EE ,, ,,  ), so the PDF of this contribution is trapezoidal (Fig. 6a). The contribution that is generated by the l -th TDL is isometric triangular (Figure 7b) because the widths of two time-stamps, into which the time- interval has been registered in this TDL, are equal ( jlil PlPl EE ,, ,,  ). The contributions introduced by these two TDLs differ because of TDL characteristics lack correlation. The area of the rising pattern represents the contribution that is added by the k -th TDL in the range  21, tt to the resultant time-interval histogram (Figure 7a) and analogically the area of the falling pattern is the contribution that is added by the l -th TDL. Application of the QNM method allows to obtain a time- interval histogram where the position of the time peak is determined with greater certainty (Figure 8b) than in the time- interval histogram shown in Figure 6. Figure 8a shows time- interval histograms obtained from four randomly chosen TDLs. The time unit was chosen to be equal to average the value of the quantization step, and the average value of the peak position equals to 0 because the information about the number of periods was removed. 6. TIME‐INTERVAL MEASUREMENT  A series of time-interval measurements was performed to verify the new measurement system. For the test, a single section of a coaxial cable was used as a delay element as shown in Figure 9. The results of time-interval measurements obtained during the test are shown in Figure 10. Certainty of time-interval determination increases when the number of TDLs increases. Uncertainty of time-interval determination during a single measuring cycle is about 50 ps when the TIMS contains only a single TDL but significantly decreases to several picoseconds when the TIMS contains sixteen TDLs. 7. ERROR ANALYSIS  The time-to-digital converter, in the system described above, consists of sixteen independent tapped delay lines. The delay of a single segment for each line can be calculated by a statistical method [1]. If we mark the total number of measurements made in a series by N, the number of data included in the i-th segment by ni,j and the j-th line, then the delay of a single segment for the j- th line can be written as: a) b) Figure 8. Time‐interval histogram after QNM correction; a) contribution  histograms obtained separately from four randomly chosen TDLs, b) the  resultant time‐interval histogram.  Figure 9. Verification of the measurement system.  Figure 10. Probability density functions of measured time‐intervals versus  the number of the TDL.  ACTA IMEKO | www.imeko.org  September 2014 | Volume 3 | Number 3 | 47      , , 0 , 0, 1, ..., 1 , 0, 1, ..., 1 i j i j n q T i M N j K      (4) where T0 is the system clock period, M is the number of time channels, and K is the number of tapped delay lines. If all segment delays (within a single tapped delay line) are summed up, and divided by the number of TDL segments, then it is possible to calculate the average segment delay: 1 , 0 1 M i jj i q q M     . (5) By subtracting the width of the i-th segment from the average value, the differential nonlinearity can be calculated as: , ,i j i j jDNL q q  . (6) Summing up the particular deviation from the average segment width, the integral nonlinearity errors are given (for each line) by: 1 , , 0 M i j i j i INL DNL     . (7) The integral nonlinearity determines how large an error during the measurement of time-interval, using this module, will be committed. For a single delay line, a time-interval measure is described by equation [11]:   0j j j jt n m q NT     , (8) where mj and nj are the delay segment numbers, for “START” and “STOP” pulses respectively, N the total number of clock cycles and T0 the standard clock period. The integral nonlinearity error is associated with each delay segment. Therefore the uncertainty, associated with the time- to-digital converter characteristic in a single time-interval measurement can be described by:    ,2 max , 0, , 1jt n jINL n M    . (9) Because of the finite size of the quantization step to obtain the total uncertainty, the quantization error must be taken into account. Assuming that the constant time-interval t is measured, the two time intervals tnT  11 and tnT  12 are obtained, where  is a time-interval measurement module segment delay (resolution). Introducing a new factor 1 /c n N and defining it as the probability that the measured time-interval t will have a length 1T , and defining  2Tq as the probability that the measured time-interval t will have a length 2T , the following relation applies [1]:  1p T c , (10)  2 1q T c  . (11) The time interval can be described by:    1 0 2 0T p T T q T T     . (12) The standard deviation associated with quantization effect is given by:    1 2q p T q T   . (13) In this way, the maximal uncertainty associated with the quantization effect is defined as: 2 q    . (14) LabView environment was used to prepare the simulation, and results are shown in Figure 11. The total uncertainty for the j-th tapped delay line is described by the relation: 2 2 j j jall t q     . (15) When the single time-interval is measured by sixteen tapped delay lines, sixteen different time-intervals are registered as a result of this measurement. Each of them has different uncertainty jall  . Because each time interval is measured with different uncertainty, the average time interval measured by sixteen tapped delay lines is described by equation: 2 0 2 0 1 j j K j j all K j all t t          . (16) In fact, it is a weighted average value with weights: 2 1 j j all w   . (17) Two estimators of variance can be calculated, the internal variance: 2 int 2 0 1 1 j K j all     (18) and the external variance: Figure 11. Quantization error as a function of channel width.  ACTA IMEKO | www.imeko.org  September 2014 | Volume 3 | Number 3 | 48  2 2 2 int 0 j K j ext j all t t K               . (19) Internal and external variances, during the experimental process, can be different. When this occurs, then the larger of them is chosen. The total uncertainty for the j-th tapped delay line is described by the relation:  2 2 2intmax , .extt    (20) The uncertainty of a single time interval measurement was verified using a real time interval measurement system. Results of these investigations are shown in Table 1. 8. EXPERIMENTAL RESULTS  This section contains measurement module characteristics, time-stamp histograms for “START” and “STOP” and time- interval histograms of exemplary time-interval measurements. Figure 12 shows DNLs of four chosen TDLs. It is clearly visible that although the character of all DNLs is similar they are not fully correlated, so each shot appearance time can be determined more precisely than the average resolution of a single TDL. The lack of this correlation can also be confirmed by INL characteristics (Figure 14). It is not significant and it is not fault that all chosen INL characteristics are positive, actually almost all other INLs are positive, too. The varying components differ enough to be treated as random errors which contribute to average time interval error reduction. Figure 13 can be helpful in explanation of the INLs character. One can observe that first delay segment widths are slightly greater than the average value of all segment widths and that additionally average value is being lowered by the last segment widths. All TDLs INLs (Figure 14) for the last segment approach zero – the INL error is being reset periodically, so the INL error has only a local (standard-clock period) range. It does not matter that almost all time-stamps are overstated. The time-intervals are being calculated as the differences of two consecutive time-stamps, so these overstatements are reduced and do not play any role. Figure 15 and Figure 16 show time-stamp histograms obtained for “START” and “STOP” pulses. It should be noticed that the area of both diagrams is equal to the number of TDLs. Figure 17 shows the time-interval histogram obtained as a difference between “START” and “STOP” measurements. It is worth being noticed that the uncertainty of the time- Table  1.  A  single  time  interval  measurement  uncertainty  using  a  single  jall   and sixteen delay lines t .  J  psjall j  psjall  pst 0 174.1 8 109.0 30.9 1 149.1 9 152.1 2 137.2 10 129.6 3 143.2 11 100.5 4 107.9 12 117.5 5 109.8 13 101.9 6 130.7 14 104.0 7 128.1 15 175.8 Figure 12. Differential non‐linearity diagrams obtained for the 0th, 1st, 2nd  and the last tapped‐delay‐line.    Figure 13. Channel widths obtained for the 0 th , 1 st , 2 nd  and the last tapped‐ delay‐line.  Figure 14.  Integral nonlinearity diagrams  obtained for the 0 th ,  1 st ,  2 nd  and  the last tapped‐delay‐line.  ACTA IMEKO | www.imeko.org  September 2014 | Volume 3 | Number 3 | 49  interval did not increase significantly in comparison to source time-stamp uncertainties. This advantage is achieved mainly by INL reduction, mentioned earlier in this section, while the time-interval is being calculated. 9. SUMMARY AND CONCLUSIONS  Implementation of the time-interval measuring module in the FPGA devices allows to greatly increase the scale of system integration. Moreover, using the multi-tap delay lines technique enables to significantly increase the system resolution. Application of the QNM method and implementation of the tapped delay lines using the carry path may result in a system resolution of picoseconds. Such a resolution can significantly improve the quality of time-of-flight mass spectrometers, ultrasonic flow-meters and life-time measuring systems. We also want to point out that application of the programmable logical devices, especially the FPGA devices, increases the flexibility and reliability of the measuring system. ACKNOWLEDGMENTS  This work was supported by the Polish National Science Centre (NCN ) Grant No N N505 484540. REFERENCES  [1] J. Kalisz, “Review of methods for time interval measurements with picosecond resolution”, Metrologia, no. 41, pp 17-32, 2004. [2] W. Zhou, X. Ou, H. Zhou, B. Wang, X. Yang, “A Time Interval Measurement Technique Based on Time – Space Relationship Processing”, IEEE Int. Freq. Contr. Symp. and Exposition, pp. 260-266, June 2006. [3] J. Song, Q. An, and S. Liu, “A High-Resolution Time-to-Digital Converter Implemented in Field-Programmable-Gate-Arrays”, IEEE Trans. On Nucl. Sci., vol. 53, no. 1, pp. 236-241, Feb. 2006. [4] M. Zieliński, “Review of single-stage time-interval measurement modules implemented in FPGA devices”, Metrology and Measurement Systems, vol XVI, no.4, pp 641-647, 2010. [5] Jinhong Wang, Shubin Liu, Qi Shen, Hao Li, Qi An, “A Fully Fledged TDC Implemented in Field-Programmable Gate Arrays", IEEE Transactions on Nuclear Science, vol.57, no.2, pp.4460-450, April 2010. [6] M. Zieliński, D. Chaberski, M. Kowalski, R. Frankowski and S. Grzelak, „High-resolution time-interval measuring system implemented in single FPGA device”, Measurement, vol 35, no. 3, pp. 311 – 317, 2004. [7] M. Daigneault, J.P. David, "A novel 10 ps resolution TDC architecture implemented in a 130nm process FPGA", 8th IEEE International NEWCAS Conference (NEWCAS), pp.281,284, 20- 23 June 2010. [8] W. Wasilewski, P. Kolenderski, R. Frankowski, “Spectral density matrix of a single photon measured”, Phys. Rev. Lett. vol. 99, no. 12, p. 123601, 2007. [9] M. Zieliński, D. Chaberski, S. Grzelak, „The New method of calculation sum and difference histogram for quantized data”, Measurement vol. 42, no. 9, pp. 1388 – 1394, 2009. [10] M. Zieliński, D. Chaberski, S. Grzelak, R. Frankowski and M. Kowalski, “High-resolution real-time multichannel scaler implemented in single FPGA device”, XVII IMEKO World Congress, Dubrovnik, Croatia 2003. Figure 15. Time‐stamp histogram obtained for “START” pulse.  Figure 16. Time‐stamp histogram obtained for “STOP” pulse.  Figure 17. Time‐interval histogram.