IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 63, NO. 6, JUNE 2014
1451
Efficient Spectral Testing With Clipped and Noncoherently Sampled Data Li Xu, Student Member, IEEE, Siva Kumar Sudani, Student Member, IEEE, and Degang Chen, Senior Member, IEEE
Abstract— In built-in self-test (BIST) environment, clipping is hard to avoid if one wants to obtain full range performance of an analog-to-digital converter (ADC). This could be due to several factors such as circuit component mismatch, noise, clock jitter, and so on. Furthermore, coherency is a challenging task to implement in BIST as its accuracy requirement on frequency of input signal is extremely high. This paper proposes a new spectral testing method with the efficiency and accuracy similar to the straightforward fast Fourier transform, but it can simultaneously handle amplitude clipping and noncoherent sampling. By replacing a noncoherent and clipped fundamental with a coherent and unclipped fundamental, correct spectral specifications can be obtained. Simulation results show accurate spectral parameters of four ADCs with different resolutions. The proposed method is validated using measurement result of a commercial 16-bit ADC. The algorithm error is quantitatively bounded using theoretical analysis and also justified with simulation result. Index Terms— Analog-to-digital converter (ADC), clipping, fundamental identification and replacement, noncoherency, spectral testing.
I. I NTRODUCTION
S
PECTRAL testing is an important category in modern measurement technology. It is usually implemented by applying a pure sine wave to the device under test (DUT), and analyzing the spectrum of the output codes after fast Fourier transform (FFT). The spectral parameters, including total harmonic distortion (THD), spurious free dynamic range (SFDR), signal-to-noise ratio (SNR), and effective number of bits (ENOB) can be obtained by analyzing the spectrum of the collected digitized samples. The spectral testing setup of analog-to-digital converter (ADC) is shown in Fig. 1. Sine waves are commonly used in ADC spectral testing because the quality is relatively easy to establish [1]. Filters are optionally used to reduce the noise and harmonic distortion in either the clock or signal paths. To accurately test the spectral performance of an ADC, five conditions are needed for the conventional standard FFT testing method. First, the input sine wave should be pure enough to avoid having distortion
Manuscript received March 4, 2013; revised August 31, 2013; accepted October 15, 2013. Date of publication December 18, 2013; date of current version May 8, 2014. This work was supported in part by the National Science Foundation, in part by the Semiconductor Research Corporation, and in part by Texas Instruments, Inc. The Associate Editor coordinating the review process was Dr. Niclas Bjorsell. The authors are with the Department of Electrical and Computer Engineering, Iowa State University, Ames, IA 50011 USA (e-mail:
[email protected]). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/TIM.2013.2292273
Fig. 1.
Testing setup.
larger than the ADC. Second, the input signal should not exceed the full range (FR) of the ADC. If it exceeds the ADCs FR, the phenomenon clipping happens, which results in spurs in the spectrum and large errors in spectral performance testing. Third, the input signal is coherently sampled, which means the sampled points are exactly an integer number of the input periods. Moreover, the number of sampling cycles and the number of total sampling periods are mutually prime to assure phase distinction. The fourth condition is that the jitter of the clock should be low enough to prevent jitter artifacts from affecting the measured noise floor. Finally, the data window should be long enough, and this is easy to be satisfied in most testing. Built-in self-test (BIST) is receiving attention in [2]–[4] as it offers the stimulus and response verification capabilities for on-chip test. This reduces the test cost and test time, as well as satisfies customers’ demand on higher performances of selfcalibration. In BIST ADCS, it is challenging to control the frequency and amplitude of the input sine wave accurately. Traditionally, a frequency synthesizer is used to generate a desired frequency, which itself is a challenging task in current on chip design. In the other aspect, it is well known that harmonics values are high order nonlinear functions of the input amplitude. An ideal testing is to let the input signal cover exactly the FR of the ADC under test, and the amplitude of the input sine wave is equal to half of the ADC full scale (FS). In bench test, precise and high-cost instrumentation are applied to adjust the input amplitude to approximately cover the FR of ADC without clipping effect. Nevertheless, it is hard to implement on BIST. Deviation of the input amplitude and the FS of the ADC lead to either the input amplitude being much smaller than the ADCs half FS, which cause the testing result not to be accurate, or input clipped by the ADC, which cause spurs in the spectrum or testing result totally incorrect. An alternative approach to obtain the accurate spectral testing
0018-9456 © 2013 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
1452
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 63, NO. 6, JUNE 2014
result is to apply an input covering slightly more than the FR of the ADC, and eliminate the clipping effect to obtain the correct spectrum. In this paper, several methods have been developed to get the correct spectral parameters using noncoherent sampled data. Windowing is a widely used technique to solve the noncoherency problem [5]–[7]. Combined windowing technique, interpolated FFT (IpFFT) was applied to low resolution ADC testing [8]. However, the accuracy of IpFFT and windowing is not sufficient when the resolution of ADC is high or when the noncoherency is severe. In particular, the SNR error can be large. FIR was first proposed in [9], it solved the noncoherency problem successfully, but the computing efficiency is low. References [10] and [11] improved the FIR method to make it more efficient and accurate. However, the noncoherent sampling methods are not intended to solve the simultaneous noncoherency and amplitude clipping problem. The problem of clipping was discussed in the recent past. Sine wave fitting algorithms and interpolation were often used to recover the clipped signal. A four parameter sine fitting algorithm was presented in [12] to measure the ENOB especially when the amplitude of the sine wave was greater than the FS range of the DUT. Reference [13] proposed an improved fitting of the fundamental output sine wave by eliminating clipped samples from the Least Squares (LS) fit. The maximum-likelihood method, which inherently eliminates distortions caused by clipping and incoherence was described in [14], but its run time is much longer than that of the LS method. The efficiency of the sine fit method was improved in [15] by doing the fitting in frequency domain rather than in time domain. In [16] and [17], the four parameter sine fitting method was used to characterize ADCs and digital oscilloscopes for THD and ENOB. The sine fitting algorithm was accurate to estimate the fundamental and high-order harmonics information of the ADC output. However, it is an iterative Newton–Gauss algorithm which is time consuming when the number of points used for fitting is large. It cannot provide a correct SFDR when a nonharmonic spur contributes to SFDR. Oversampling and interpolation method were proposed in [9] and [18]. In this algorithm, the input signal was four times oversampled and then interpolation was applied to fit and recover the clipped samples. Additional filters and clock signals were needed for another three branches, which both increases the chip area and computing complexity. This paper introduces a new accurate and efficient spectral testing method to replace the clipped and noncoherent fundamental component with an unclipped and coherent one when ADC output is clipped and sampled noncoherently. This method can be used as a replacement of the standard FFT algorithm, which the test engineers are prevalently familiar with. Simulation and experimental results of different resolution ADCs demonstrate the accuracy of this method. Error of this algorithm increases with the clipping amount, which is justified with both theoretical analysis and simulation. The algorithm error is bounded quantitatively from mathematical derivation. As clipping can be controlled in a small range, like 1% of the ADC input range, this algorithm can obtain correct spectral parameters.
Fig. 2.
Spectrum of an ADC output under standard sampling.
This paper is organized as follows. Section II discusses standard spectral testing method and the effect of clipping and noncoherency. In Section III, the proposed algorithm is described in detail to solve clipping and noncoherency problem. Section IV presents the simulation results. Experiment results are described in Section V. Section VI discusses the accuracy of the algorithm versus the clipping amount. Finally, conclusion is summarized in Section VII.
II. S TANDARD T ESTING AND E FFECTS OF C LIPPING AND N ONCOHERENCY A. Standard ADC Spectral Testing Let x(t) = A sin(2π f t + ϕ) + Vos be the input signal of an ADC, where A, f, ϕ, and Vos are the amplitude, frequency, initial phase, and offset of the input signal, respectively, and A is slightly less than or equal to the half of FS of the ADC. Let y[n] be the analog interpretation of the digital output codes converted by the ADC H f f Ah sin 2π hn + ϕh y[n] = A sin 2π n + ϕ + fs fs h=2
+Vos + w(n), n = 0, 1, 2 . . . M − 1.
(1)
f s is the sampling frequency, w(n) is the additive noise, Ah is the h th harmonic of the ADC output, H is the total number of harmonics, and M is the total number of sampling points. There are three assumptions in practical ADC testing: 1) the setup of the ADC testing must be stationary with sufficient repeatability; 2) the ADC is continuous, meaning that Ah = fh (A, f, ϕ, Vos , f s ), f h is continuous for all h; and 3) spectral performance is mostly dependent on A, f and fs, which means, ∂ fh /∂ A, ∂ f h /∂ f , ∂ f h /∂ fs are significant but ∂ f h /∂ Vos ≈ ∂ fh /∂ϕ ≈ 0. An example spectrum of an ADC, which is under standard testing is shown in Fig. 2. Under coherent sampling, the window captured must be an exact integer number of periods. Let J be the total number of sampling periods, then M, f, fs , and J are related by (2) M· f = J. fs
(2)
XU et al.: EFFICIENT SPECTRAL TESTING
Fig. 3.
1453
Deviation of input amplitude and ADC FS. (a) Input amplitude slightly less than half of ADC FS. (b) Small input amplitude.
If M is chosen to be a power of 2, then any J that is odd is mutually prime to M. Equation (1) can be represented as y[n] = A sin
H 2π J 2πh J n+ϕ + n + ϕh Ah sin M M
Spectral performance parameters can be calculated as ⎛ H ⎞
Ph ⎟ ⎜ Psig ⎜ h=2 ⎟ THD = 10 log10 ⎜ SNR = 10 log10 ⎟ ⎝ Psig ⎠ Pnoise
h=2
+Vos + w(n), n = 0, 1, 2 . . . M − 1.
The spectral parameters can be accurately obtained by taking discrete Fourier transform (DFT) of M coherently sampled data points y[n]. Applying a DFT to (3), the coefficient at index k is given by
Y [k] =
1 M
M−1
y[n]e− j
2π kn M
Psig Ph + Pnoise
⎟ ⎟ ⎟ ⎠
h=2
n = 0, 1, 2 . . . M − 1.
(4)
It can be observed from (3) and (4) that, for coherent sampling, neglecting the effect of noise Ah j ϕh A jϕ e Y [h J ] = e . 2 2
(5)
The power of input signal and high-order harmonics can be estimated as Psig = 2 |Y [ J ]|2
Ph = 2 |Y [h J ]|2 .
(6)
For other k, Y [k] represents noise as it is neither fundamental nor harmonic, the total power of noise can be calculated as Pnoise =
⎟ ⎜ ⎟ ⎜ ⎟ ⎜ P sig ⎜ SFDR = 10 log10 ⎜ ⎟ 2 |Y [k]| ⎟ max ⎟ ⎜2 · ⎠ ⎝ k = 2, . . . M/2 k = J ⎛ ⎞ ⎜ ⎜ SINAD = 10 log10 ⎜ H ⎝
, k = 0, 1, 2 . . . M − 1
n=0
Y [J] =
⎞
⎛
(3)
M
k=2 k = J, h J h = 2, . . . , H
|Y [k]|2 .
(7)
SINAD − 1.76 (8) 6.02 where SINAD is the signal to noise and distortion ratio. From (8), parameters such as SNR, THD, SFDR, and ENOB can be obtained from the spectrum of the ADC output. ENOB =
B. Issues With Noncoherency and Clipping 1) Clipping: As mentioned in Section I, from the point of view of the amplitude requirement, ideally we hope the input signal exactly covers the FR of the ADC or slightly less in bench test. However, it is extremely hard to be implemented in BIST for: 1) the ADCs’ FS range may vary slightly from one ADC to another; 2) when the sine source is fixed, the amplitude can change due to the nonstationary; and 3) the amplitude may not be equal to the designed value. Under these limits, if we apply an input with amplitude slightly less than the half FS of the ADC, as both the input amplitude and the ADC FS varies, input between the minimum possible value of the ADC FS and the maximum possible value of the ADC input could cause the input exceeds the FS range of ADC, which is shown in Fig. 3(a). In practical testing setup of BIST, smaller input is applied to avoid the clipping effect. Nevertheless, as shown in Fig. 3(b),
1454
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 63, NO. 6, JUNE 2014
in fundamental component [10]. Similarly, it can be assumed that the spurs in the clipping spectrum are mainly caused by the clipping of the fundamental component. The error due to the assumption is discussed in Section VI. In this method, the noncoherency and clipping problem are dealt with together rather than solving one by one. To eliminate the effect caused by noncoherency and clipping, a clipped and noncoherent fundamental component, which is called nonideal fundamental in this paper, is estimated from the sampled data sequence and replaced with a coherent and unclipped component, which is called ideal fundamental in this algorithm. Fig. 4. Spectrum of an ADC output which is sampled noncoherently and with clipping.
A. Fundamental Identification variations between the input and the FS of ADC can be large. Illustrated in Section I, harmonics are high-order nonlinear function of the input amplitude. If the input amplitudes are different, the corresponding spectral parameters obtained are various. In this case, nonlinearity of the gap between the input and the FS of ADC are not tested. 2) Noncoherency: In practical testing, the coherent condition is extremely hard to achieve. For instance, when fs is 10 MHz, M is 2∧ 14 and J is 2555, the input frequency must be 1559.4482421875 kHz. A frequency synthesizer is used to generate the accurate input frequency, which satisfies (1) for a given M, J , and sampling frequency, which is very challenging and unpractical for a BIST. If the coherent requirement is not satisfied, J is not an integer in equations above such as (2) and (3). Let J = Jint + δ, where Jint is the integer part of J, δ is the fractional part of J and −0.5 < δ ≤ 0.5. We all know that even ppm level noncoherency can cause frequency leakage in which some fundamental energy leaks into neighbor frequencies. Fig. 4 shows a spectrum when there are both fundamental skirting and higher harmonics’ spurs in caused by both noncoherency and clipping. One cannot compute spectral performance from the spectrum directly. As described above, for BIST, applying relative small input can lead the testing result to be not accurate while large input lead clipping, and coherency is a challenging and costly task. In this paper, a pure sine wave is still applied to ADC testing, the jitter noise of the clock is controlled in a certain small range, and the number of captured points is larger enough, but the other two requirements of coherency and unclipping are being relaxed. III. P ROPOSED A LGORITHM In this section, a new method to get accurate spectral parameters is presented, when the input signal is clipped and noncoherently sampled. The proposed algorithm is targeted to provide the behavior and result look like the standard FFT. From the above discussion, we know that clipping causes spurs in the spectrum and noncoherency results in power leakage in the fundamental harmonic, both of which conceal the highorder distortion. Our goal of this algorithm is to find an approach to remove the effect of power leakage and spurs from the spectrum. It has been proven that the error of harmonics in noncoherent sampling is mainly due to the noncoherency
J is substituted to be Jint + δ in (3) under noncoherent sampling. Parameters A, Vos , ϕ, Jint , and δ need to be computed from the ADC output accurately to get exact fundamentals. The procedure to estimate the five parameters is explained below. 1) Estimate A and Vos : In this algorithm, the amplitude and offset of the fundamental harmonic are estimated from the number of clipping points [19]. Let K t tells the number of clipping points at the top and K b tells that at the bottom. Vref+ and Vref− are positive and negative reference voltage of the ADC. A and Vos can be estimated by the following: Vref + − Vref − −1)π −1)π + cos (K bM cos (K t M 1 Vref + + Vref − Vos = 2 (K b − 1)π (K t − 1)π cos +A − cos . (9) M M = A
2) Estimate Jint and ϕ: After A and Vos are obtained from the time domain data, Jint and the first time estimation of ϕ are obtained from the frequency domain. Applying DFT to the ADC output sequence y[n], and Jint is estimated from the index of frequency bin, which contains the maximum power excluding the dc component in half spectrum Jint = arg max |Y [k]| .
(10)
2≤k≤M/2
ϕ is the initial phase of the fundamental component of the sampling sequence. From (5), and substituting J = Jint + δ, the first time estimation of ϕ can be computed as ⎧ imag(Y [ Jint ]) ⎪ arctan if, real(Y [ Jint ]) ≥ 0 ⎪ ⎪ real(Y [ Jint ]) ⎪ ⎪ ⎪ ⎪ ⎪arctan imag(Y [ Jint ]) +π if real(Y [ Jint ]) < 0 ⎪ ⎨ real(Y [ Jint ]) ϕ1 = and imag(Y [ Jint ]) > 0 (11) ⎪ ⎪ ⎪ ⎪ [ Jint ]) ⎪ ⎪ arctan imag(Y −π if real(Y [ Jint ]) < 0 ⎪ real(Y [ Jint ]) ⎪ ⎪ ⎩ and imag(Y [ Jint ]) < 0. 3) Estimate δ and Fine Estimation of ϕ: After A, Vos , Jint and initial ϕ were obtained from steps 1) and 2), we apply a fine estimation of ϕ and δ using least square method to zero-crossing points of the ADC output in time domain.
XU et al.: EFFICIENT SPECTRAL TESTING
1455
calculated in (17). Under this condition, there is still the fundamental effect in the residue if only (17) is removed from the output sequence. Assume the error of the fundamental component can be written as 2π J (18) n + ϕe . y f e[n] = ampe · cos M The expression of ampe and ϕe can be obtained from [20] [(22) and (23)]. B. Clipped the Fundamental Component Fig. 5.
Least square fitting line of the phase difference.
The approximate fundamental phase at each point can be described as 2π Jint y f [n] = n+ ϕ1 . (12) M However, as the phase is computed directly from the noncoherent data, it does not represent the actual phase of the input sine wave or the phase of the first sampled point. In addition, δ needs to be calculated to get the actual frequency. In this method, the actual frequency and phase of the input sine wave are corrected from the zero-crossing points set of the sampled points after the offset is removed. There are several approaches to select the fitting points set, the one chosen in this method is defined by y[k] (13) A < 0.1. Neglecting high-order distortion and noise, the actual phase of those points can be described as 2π J k + ϕ, k ∈ I. (14) M I is the set of all k that satisfy (13). The difference between the actual phase and the fundamental phase gives act [k] =
2πδ k (15) act [k] − y f [k] = ϕ0 + M where ϕ0 is the difference of the actual initial phase with the first estimation one and δ is the fraction of the number of periods. Fitting act k− y f [k] with the index of k to a line using the least square method, the estimated ϕ and δ can be obtained from it. As shown in Fig. 5, the sine wave consists of all the output points; the points on the straightline represent the phase difference of those zero-crossing points. Then ϕ and J are obtained ϕ0 ϕ= ϕ1 +
δ. J = Jint +
(16)
4) Fundamental Error: From parameters obtained from the previous three steps, the noncoherent fundamental harmonic is written as 2π J y f nco [n] = A · sin n + ϕ . (17) M Actually, as long as the testing not coherent, the noncoherent fundamental component cannot be removed thoroughly as
The nonideal fundamental component is constructed of two parts: the noncoherent fundamental component and the fundamental error. Being clipped by the FS of the ADC, the nonideal fundamental is represented as followed: y f nid [n] ⎧ ⎨y f nco [n]+ y f e[n], Vref − < y f nco [n]+ y f e[n] < Vref+ y f nco [n]+ y f e[n] ≥ Vref+ = Vref+, (19) ⎩ − Vref , y f nco [n]+ y f e[n] ≤ Vref − . C. Construct the New Sequence When the nonideal fundamental component represented as (19) is subtracted from the sampling points, only the harmonics and noise distortion without noncoherent and clipping remain in the residue. We can add an ideal fundamental to the residue to get a new sequence. The ideal fundamental component represented as (20) with parameters obtained from A) 2π Jint y f id [n] = A · sin n+ ϕ . (20) M After replacing the noncoherent and clipped fundamental component with an ideal one, the new sequence is used to analyze the spectral performance of the ADC y[n] = y[n] − y f nid [n] + y f id [n].
(21)
The proposed algorithm can be described as follows. 1) Collect M points of ADC output y[n], M is power of 2. 2) Count the number of clipped points, estimate A and Vos using (9). 3) Perform DFT on y[n], get Y [k], calculate Jint and initial estimate ϕ using (10) and (11). 4) Apply LS method on zero-crossing points in (13), get estimates of the exact J and ϕ from (16). 5) Calculate fundamental error using (18). 6) Clip the noncoherent fundamental, and get unideal fundamental (19). 7) Construct ideal fundamental (20), and get the new sequence (21). 8) Perform DFT to the new sequence to get spectral performance. Remark 1: In the range of clipping amount discussed in this paper, the influence of clipping on signal power and harmonics calculation is negligible, but the influence on noise is significant. The total noise power calculated from step 8) needs to be scaled up by multiplying M/M − K t + K b .
1456
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 63, NO. 6, JUNE 2014
TABLE I S PECTRAL PARAMETERS ’ T ESTING R ESULTS OF THE P ROPOSED A LGORITHM AND S TANDARD M ETHOD
Fig. 6. Spectrum of simulation result: direct FFT on clipped and noncoherently sampled data.
Fig. 7.
Proposed algorithm on clipped and noncoherently sampled data.
IV. S IMULATION R ESULT A. Functionality The proposed method of spectral testing with clipped and noncoherently sampled data has been validated true by simulation data generated in MATLAB. A 12-bit ADC with INL of 0.6 LSB, 14 bit with INL of 0.5 LSB, 16 bit with 0.9 LSB, and 18-bit ADC with 1.2 LSB were modeled in MATLAB, respectively. The additive noise for each ADC is at the quantization noise level. Two kinds of input sine wave
Fig. 8. Spectrum of simulation result: direct FFT on unclipped and coherently sampled data.
were converted to digital codes by each ADC under test, one with the amplitude slightly less than the half of the FS of the ADC, and other one with an amplitude, which covers 1% more than FR of the ADC. As the space limitation, we only show the spectra of the testing results for the 18-bit ADC, while the test results of other ADCs are shown in Table I. Fig. 6 shows the spectrum of direct FFT applied to the clipping and noncoherently sampled data. Spectral parameters values including SNR, ENOB, THD, and SFDR directly obtained from this spectrum are totally incorrect, which should be discarded. The spectrum of clipped and noncoherently sampled data using the proposed method is shown in Fig. 7 and the spectrum of strait forward FFT applied to the standard sampling data are shown in Fig. 8. It can be observed from Figs. 7 and 8 that the proposed method is capable of removing the clipping and power leakage effect. Standard algorithm can be used to obtain ADC specifications from spectrum in recovered by the proposed method. The measurement results of THD, SFDR, SNR, ENOB, and the corresponding errors are shown in Table I. In this table, X− id is the result of standard method when applying direct FFT to the sampled data with the input signal amplitude slightly less than the FR of the ADC under test and is coherently sampled. X− pro is the result after applying the proposed method to the clipped and noncoherent data. X− err is the error between X− pro and X− id for THD, SNR
XU et al.: EFFICIENT SPECTRAL TESTING
1457
TABLE II C OMPARISON OF C ALCULATION T IME (16-B IT ADC, INL = 0.9 LSB)
and SFDR. It is calculated as the power error of X− pro and X− id, then is converted in units of decibels. ENOB− err is just the difference between ENOB− pro and ENOB− id. It can be observed that when applying the proposed method to the clipped and noncoherently sampled data, specifications as THD, SFDR, SNR, and ENOB can be accurately estimated. B. Compare With the State of the Art Four parameter sine fit method is an accurate method to get the spectral performance with clipped and noncoherently sampled data [12], [13]. However, all unclipped points in data are considered to perform nonlinear least squares used for fitting and the initial guess of the fundamental frequency must be accurate enough to get the convergence. After identification of the fundamental, three parameter sine fit will be applied to get information of high-order harmonics. The fundamental identification of the proposed method can also be replaced by the four parameter sine fit. However, FFT and least square fitting are the two most time consuming blocks in the proposed method, where FFT is computationally efficient as the total number is chosen to be a power of 2, and the LS here is a linear fitting to a small set of data, which consumes small amount of time. In other aspect, the proposed method does not need iterations to get high-order harmonics, and in four parameter sine fit method, the computation time increases as the number of computed harmonics increases. Table II is a comparison between the proposed method and four parameter sine fit method (using MATLAB on a 64 bit, Intel Core i5 CPU with 4-GB memory). The proposed method is accurate and more efficient than the four parameter sine fitting method. The four parameter sine fit method is also accurate on estimation SNR, THD, and ENOB, but it cannot estimate the correct SFDR value when SFDR is not determined by a harmonic spur. V. E XPERIMENT R ESULT The proposed method of spectral testing with clipped and noncoherently sampled data has been validated true by simulation data generated in MATLAB. However, in real testing, there are more unpredictable factors that cannot be simulated and the ultimate application of this algorithm is experimental testing. This proposed method is validated by measurement data using a 16-bit SAR ADC. Two series of data were collected in a bench testing lab at the high precision analog division of Texas Instruments. One series is collected under standard requirement: coherently sampled and the amplitude of the input signal is slightly less than the FR of the ADC. Values of THD, SFDR, SNR, and ENOB are used as reference values to verify the proposed method. The other series of data is collected noncoherently and with clipping (δ = 0.155,
Fig. 9. Spectrum of measurement result. 1: direct FFT on clipped and noncoherently sampled data (green). 2: proposed algorithm on clipped and noncoherently sampled data (blue). 3: standard method (red). TABLE III T ESTING R ESULTS OF A 16-B IT ADC
clipping amount = 0.6%). Both direct FFT and the proposed method were applied to this series of data. All three spectra are shown in Fig. 9. The proposed method is capable of removing the skirting and clipping effect and producing a spectrum, which is essentially the same as that of standard sampling data. The parameters of THD, SFDR, SNR, and ENOB are shown in Table III. It can be concluded that all errors of THD, SFDR, and SNR of the proposed method are small enough to be neglected. Hence, the condition for coherency and clipping is completely eliminated using the proposed method. VI. E RROR V ERSUS THE C LIPPING B OUND In the proposed algorithm, we have mentioned that a coherent and unclipped fundamental sine wave was generated to replace the noncoherent and clipped fundamental component. The method to deal with the noncoherency has been validated [12]. The relationship of the algorithm error versus the clipping bound is discussed in this section. In the analysis, an input sine wave with the amplitude equal to the half of FS of the ADC is taken as the reference. The difference between the testing result of a clipped input signal and the reference is discussed with different clipping amount. Let x(t) be the input signal of an ADC, and at t = nTs , the input voltage is Vn = x(nTs ). The actual output code corresponding to Vn is described in (22), which contains two parts: the code error and the ideal output if there is no nonlinearity in the ADC under test Cn = e(Cn ) + round(G(Vn + wn + Dos )) = e(Cn ) + G(Vn + wn + Dos ) + Q n .
(22)
In which, wn is the additive noise at time nTs , G, and Dos are the gain and offset of the testing ADC, round(x) is the ideal output code of the ADC with the input voltage x, e(Cn ) is the
1458
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 63, NO. 6, JUNE 2014
To observe how much error the clipping algorithm has, one can subtract the ideal error code from the clipped error code
= Cn − Cn = (e(Cn ) − e(Cn ))
+G(wn − wn ) + (Q n − Q n ).
(29)
When we do spectrum analysis, we want to know how much harmonic does this error cause. The second and third terms in (29) are additive noise and quantization error, which can be assumed as white, and are in the noise floor when doing DFT, so these two parts can be ignored. The code error can be represented into a smooth component g(Cn ) plus a quantization component QE Fig. 10.
Different inputs and the code error.
e(Cn ) = g(Cn ) + QE.
(30)
code error at code Cn caused by the nonideality of the ADC, and Q n is the quantization error. For a given input signal, we can get a sequence e(Cn ), and it can be assumed that the relationship between the error code and the input voltage is fixed for a certain ADC. Assume an input sine wave with the amplitude A equal to the ADCs half FS is taken as the reference signal. When it is unfolded to half period, the expression can be written in (23) and the unfolded wave is shown as the solid line in Fig. 10 M M M , − + 1, . . . , − 1. (23) 2 2 2 In this section, the sample index n is from −M/2 to M/2 − 1 to get the phase from −π/2 to π/2 when all points are unfolded to half period. Under this condition, ωTs = π/M. In the other case, the signal with amplitude slightly larger than the FS of the ADC is M M M − 1. Vn = (1 + ε)A sin(ωnTs ), n = − , − + 1, . . . , 2 2 2 (24) Vn = A sin(ωnTs ), n = −
ε is the overdrive ratio. Plug (23) and (24) into the representation (22), we obtain the code error sequences in both cases are Cn = e(Cn ) + G(A sin(ωnTs ) + wn + Dos ) + Q n
(25)
Cn = e(Cn ) + G((1 + ε)A sin(ωnTs ) + wn + Dos ) + Q n (26)
where e(Cn ) and e(Cn ) are shown in Fig. 10. It can be observed that for the clipped segment, e(Cn ) are all 0 as the input is clipped at the top or the bottom, where the output of the ADC is either 0 or 2 N −1 (N is the resolution of the ADC). In the proposed algorithm, an identified and clipped sine wave is subtracted from the clipped output codes. We assume that the sine wave is identified correctly. After the subtraction, the code error is given as
(27)
The code error for the reference signal is Cn = e(Cn ) + Gwn + Q n .
e(Cn ) = g(Cn ) + g (ξ ) · (Cn − Cn ) + Q E
(31)
where ξ is a value between Cn and Cn . Plug e(Cn ) and e(Cn ) to the equation of , now (29) can be written as −e(Cn ), Vn is clipped (32) = g (ξ ) · (Cn − Cn ), Vn is not clipped. The power of is calculated as P( ) =
M−1 n=0
+
| (n)|2 =
e2 (Cn )
clipped
g (ξ ) · (Cn −Cn )
2
≤ [|e(Cn )|max ]2
nonclipped M−1 2 · (K t + K b )+ |g (ξ )| max · (Cn −Cn )2 (33) n=0
where K t and K b are the number of clipped points at top and bottom, respectively, as mentioned in Section III. If the clipping ratio ε is 1%, (K t + K b ) is 9% of M. As [|e(Cn )|max ]2 is at the THD level, the 1st term in (33) [|e(Cn )|max ]2 ·(K t + K b ) is about 10 dB lower than THD. The value of the first term changes as the clipping ratio varies, but the quantitative value is fixed for a given ADC and the clipping ratio. As g(Cn ) is a smooth component of code error at Cn , the magnitude of g(Cn ) is at THD level. The 2nd term in (33) can be written as 2 M−1 |g (ξ )| max · (Cn − Cn )2 n=0
2 M−1 = |g (ξ )| max · ((1 + ε)A sin(ωnTs ) − A sin(ωnTs ))2 n=0
Cn = Cn − G((1 + ε)A sin(ωnTs ) + Dos ) = e(Cn ) + Gwn + Q n .
e(Cn ) and e(Cn ) are similar to each other if the clipping amount is small, do Taylor series expansion to e(Cn ) at code Cn is
2 M−1 = |g (ξ )| max · (ε A sin(ωnTs ))2 ≤
(28)
n=0 M−1 2 2 2 THDωTs · ε ω Ts n2 n=0
≈ THD · ε2 π 2 .
(34)
XU et al.: EFFICIENT SPECTRAL TESTING
1459
R EFERENCES
Fig. 11.
Algorithm error at different clipping amount.
Take ε = 1%, for example, the 2nd term in P(·) is 30 dB lower than THD, which is much smaller than the 1st term and can be neglected. It can be concluded that the algorithm error is mostly from the clipped samples and the error is quantitatively bounded for given clipping amount. This is also verified with the simulation results using the 16-bit ADC modeled in MATLAB described in Section IV. A reference input signal is generated with the amplitude slightly less than the FR of the ADC and it is sampled coherently by the ADC. All harmonics’ values are obtained by spectral analysis. Then, a tested input signal with the amplitude over-range ε is sampled by the ADC. ε is from 0 to 5%. The distortion power difference between the tested signal and the reference signal are shown in Fig. 11, where the value of the red line is obtained from (33). As the clipping amount increases, the bound of harmonics error increases, and the error is bounded by (33). As the clipping amount can be controlled under a certain level, for example 1%, the algorithm is accurate enough to obtain the correct spectral parameters. VII. C ONCLUSION An accurate and efficient algorithm was proposed for ADC spectral testing that allows amplitude larger than half FS and does not require coherency. This method relaxed two strict conditions in the standard spectral test and, thereby makes the accurate spectral testing in BIST possible. Both simulation and experiment results showed that the proposed method is accurate when the output data are slightly clipped and is noncoherently sampled. The measured parameters THD, SFDR, SNR, and ENOB were comparable with those from the standard testing. Theoretical derivation showed that the algorithm error increases with the clipping amount, and it was also validated by simulation results. Although the algorithm is not accurate when the clipping amount is large, severe clipping rarely occurs in testing. In the future work, this method needs to be modified to get correct spectrum parameters when the clipping is severe. ACKNOWLEDGMENT The authors would like to thank M. Nowrozi and R. Ordonez from Texas Instruments for providing helpful suggestions in verifying the proposed method.
[1] IEEE Standard for Terminology and Test Methods for Analog-to-Digital Converters, IEEE Standard 1241, 2010. [2] H. Xing, H. Jiang, D. Chen, and R. L. Geiger, “High-resolution ADC linearity testing using a fully digital-compatible BIST strategy,” IEEE Trans. Instrum. Meas., vol. 58, no. 8, pp. 2697–2705, Aug. 2009. [3] J. Duan and D. Chen, “SNR measurement based on linearity test for ADC BIST,” in Proc. IEEE ISCAS, May 2011, pp. 269–272. [4] D. Jingbo, C. Degang, and R. Geiger, “A low cost method for testing offset and gain error for ADC BIST,” in Proc. IEEE ISCAS, May 2012, pp. 2023–2026. [5] P. Carbone, E. Nunzi, and D. Petri, “Windows for ADC dynamic testing via frequency-domain analysis,” IEEE Trans. Instrum. Meas., vol. 50, no. 6, pp. 1571–1576, Dec. 2001. [6] F. J. Harris, “On the use of windows for harmonic analysis with the discrete Fourier transform,” Proc. IEEE, vol. 66, no. 1, pp. 51–83, Jan. 1978. [7] D. Belega, M. Ciugudean, and D. Stoiciu, “Choice of the cosine-class windows for ADC dynamic testing by spectral analysis,” Measurement, vol. 40, no. 4, pp. 361–371, May 2007. [8] D. K. Mishra, “ADC testing using interpolated fast Fourier transform (IFFT) technique,” Int. J. Electron., vol. 90, no. 7, pp. 459–469, 2003. [9] Z. Yu, D. Chen, and R. Geiger, “A computationally efficient method for accurate spectral testing without requiring coherent sampling,” in Proc. Int. Test Conf., 2004, pp. 1398–1407. [10] S. Sudani, M. Wu, and D. Chen, “A novel robust and accurate spectral testing method for non-coherent sampling,” in Proc. IEEE ITC, Sep. 2011, pp. 1–10. [11] M. Wu and D. Chen, “A faster method for accurate spectral testing without requiring coherent sampling,” in Proc. IEEE Instrum. Meas. Technol. Conf., May 2011, pp. 1–6. [12] N. Giaquinto and A. Trotta, “Fast and accurate ADC testing via an enhanced sine wave fitting algorithm,” IEEE Trans. Instrum. Meas., vol. 46, no. 4, pp. 1020–1025, Aug. 1997. [13] I. Kollar and J. J. Blair, “Improved determination of the best fitting sine wave in ADC testing,” IEEE Trans. Instrum. Meas., vol. 54, no. 5, pp. 1978–1983, Oct. 2005. [14] J. Šaliga, I. Kollár, L. Michaeli, J. Buša, J. Lipták, and T. Virosztek, “A comparison of least squares and maximum likelihood methods using sine fitting in ADC testing,” Measurement, vol. 46, no. 10, pp. 4362–4368, Dec. 2013. [15] V. Palfi and I. Kollar, “Acceleration of the ADC test with sinewave fit,” IEEE Trans. Instrum. Meas., vol. 62, no. 5, pp. 880–888, May 2013. [16] T. Z. Bilau, T. Megyeri, A. Sárhegyi, J. Márkus, and I. Kollár, “Fourparameter fitting of sine wave testing result: Iteration and convergence,” Comput. Standards Interf., vol. 26, no. 1, pp. 51–56, 2004. [17] C. K. Fu, “Estimating parameters of a sine wave by separable nonlinear least squares fitting,” IEEE Trans. Instrum. Meas., vol. 59, no. 12, pp. 3214–3217, Dec. 2010. [18] M. Allén, J. Marttila, and M. Valkama, “Iterative signal processing for mitigation of wideband ADC nonidealities in cognitive radio receiver,” in Proc. 19th Eur. Signal Process. Conf., 2011, pp. 2279–2283. [19] J. Blair, “Histogram measurement of ADC nonlinearities using sine waves,” IEEE Trans. Instrum. Meas., vol. 43, no. 3, pp. 373–383, Jun. 1994. [20] V. K. Jain, W. L. Collins, and D. C. Davis, “High-accuracy analog measurements via interpolated FFT,” IEEE Trans. Instrum. Meas., vol. 28, no. 2, pp. 113–122, Jun. 1979.
Li Xu (S’13) received the B.S. degree in testing and control technologies instruments from the Nanjing University of Aeronautics and Astronautics, Nanjing, China, in 2008, and the M.S. degree in test measurement technology and instruments from Zhejiang University, Hangzhou, China, in 2011. She is currently pursuing the Ph.D. degree with the Electrical and Computer Engineering Department, Iowa State University, Ames, IA, USA. Her current research interests include analog and mixed signal design and testing.
1460
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 63, NO. 6, JUNE 2014
Siva Kumar Sudani (S’05) received the B.Tech. degree in electrical engineering from the Institute of Technology, Banaras Hindu University, Varanasi, India, in 2006, and the Ph.D. degree in electrical engineering from Iowa State University, Ames, IA, USA, in 2013. He has been a Characterization Engineer with Texas Instruments, Tucson, AZ, USA, since 2013. From 2006 to 2007, he was with Tata Consultancy Services as an Assistant Systems Engineer. In 2011, he was a Design Engineering Intern with Agilent Technologies, Santa Clara, CA, USA, involved in metastable resistant ADCs, and he was a Test Engineering Intern with Texas Instruments in 2012 involved in low cost test methods for ADCs. His current research interests include analog circuit design and low cost built-in self-test. Dr. Sudani is a co-recipient of the first prize in the Student Paper Contest at the Midwest Symposium on Circuits and Systems in 2012.
Degang Chen (M’90–SM’01) received the B.S. degree in instrumentation and automation from Tsinghua University, Beijing, China, in 1984, and the M.S. and Ph.D. degrees in electrical and computer engineering from the University of California, Santa Barbara, CA, USA, in 1988 and 1992, respectively. He was with the Beijing Institute of Control Engineering, Beijing, from 1984 to 1986. In 1992, he was the John R. Pierce Instructor of electrical engineering with the California Institute of Technology, Pasadena, CA, USA. He joined Iowa State University, Ames, IA, USA, where he is currently a Professor of electrical and computer engineering. He was with Boeing Company in 1999, Dallas Semiconductor-Maxim, Dallas, TX, USA, in 2001, and Texas Instruments, Tucson, AZ, USA, in 2011 and 2012. He has published over 200 refereed journal and conference publications. His current research interests include analog and mixed-signal integrated circuit design and testing, low-cost integrated circuit sensor design with applications in biosensing, nondestructive evaluation and structural health monitoring, with a special emphasis on test time reduction and on high-precision test not requiring precision instruments. Dr. Chen has received Best Paper Awards and other honors, including the ITC Ned Kornfield Best Paper Award in 2013. He received the SRC Technology Invention Reward in 2005 and he was the A. D. Welliver Faculty Fellow with Boeing Company in 1999.