It is well-known that practical Analog to Digital Converters (ADCs) suffer from various errors, for example, offset, gain and linearity errors. These errors stem from various sources, such as non-ideal spacing of transistor levels and timing jitter, just to name a few. These errors contribute significantly to the deterioration of the broadband performance of the ADC. Even with superior design of the individual analog components of the ADC, it may still not be possible to achieve the desired performance. In such cases, digital post-processing can be utilized to provide the extra improvement is needed to achieve the performance goal.
In one approach employed in the prior art, the ADC is operated in a calibration mode with a calibrating signal such as a sinusoid applied to the input. An estimate of the frequency, {circumflex over (ω)}, of the input calibrating signal is determined as
where x(k) are the output samples from the ADC. The maximization of the above equation can be performed iteratively using a Fast Fourier Transform (FFT).
It is also known how to perform linear prediction of sinusoidal signals in a more general sense (not necessarily in the context of calibrating ADCs), given a set of current signal samples and past samples. This typically involves the calculation of coefficients which are very compute-intensive. These are given by
where, s′(k) is the estimate of the current sample, x(k−l) are the past output samples from the ADC, and L is the length of the filter. The coefficients c(l) of the prediction filter are given by
In a preferred embodiment, a method and/or apparatus can be used to correct non-linearities of an Analog to Digital Converter (ADC) based on a frequency estimation and signal prediction technique. The method entails one or more of the following steps as explained below.
A first case is when the non-linearities are static, i.e., where the characteristics of the non-linearities can be assumed to not change with frequency.
In this Static Correction Method:
1. A relatively low-frequency signal from a signal generator that activates most levels of the ADC under test is input to the ADC.
2. A coarse estimate of the frequency of the signal is obtained using a zero-crossing technique.
3. Next, a fine frequency estimate is obtained using an adaptive notch filter technique.
4. After the fine frequency is estimated, the signal is predicted using a sinusoid-prediction technique.
5. Entries of a Look-up table (LUT) are generated based on mean-square error criterion that provides optimal quantization levels to the input signal.
6. Once the LUT is generated, the output of the ADC is passed as an address to the LUT and the corresponding output from the LUT is the compensated value in a mean-square sense.
A second case is when the non-linearites are dynamic, i.e., where the characteristics of the non-linearities are expected to change with frequency. Dynamic correction of the ADC can be carried for this case out using two different methods that build on the static method above.
In a First Dynamic Correction Method:
1. The usable frequency spectrum of the ADC can be divided into various regions where the non-linear characteristics change considerably. For each of these regions, a center frequency, for example, can be chosen as the calibration frequency. Such frequencies can be found during the simulation phase of the design.
2. Follow the procedure outlined above for the static characteristics and obtain an LUT for each of these frequencies.
3. By estimating the dominant frequency in the signal, the appropriate LUT can be used for correction.
In a Second Dynamic Correction Method:
Alternatively, if the non-linear characteristics do not deviate much from one another,
1. The LUT entries for different calibration frequencies are determined as in steps 1 and 2 of the First Dynamic Correction Method.
2. Average values for each entry in the multiple LUTs are stored in a single LUT.
3. The single LUT is then used for correction regardless of input signal frequency.
The methods described above can be implemented in software, firmware, hardware, or any combination thereof. For example in one embodiment, the methods are implemented in software, as a stored program containing instructions executed by one or more digital signal processors. Such processors generally include storage devices such as memory for storing data and programs, and input/output (I/O) devices for receiving input signals and providing output signals. As is well known, such processors operate by retrieving a stored program from a computer readable storage medium, storing the program in one or more active memory devices and then executing the instructions to operate on input signals or data and product output signals or data. The methods may also be carried out by more general purpose computers.
While the correction techniques briefly described above were indicated as being implemented as methods, it also should be understood a hardware apparatus can also implement the invention using any of the following technologies, or a combination thereof: discrete logic circuit(s) that including logic gates and/or transistor circuits for implementing logic functions upon input digital signals, an application specific integrated circuit (ASIC) having appropriate combinatorial logic gates, programmable gate array(s) (PGAs), field programmable gate arrays (FPGAs) and so forth.
The foregoing will be apparent from the following more particular description of example embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating embodiments of the present invention.
A description of example embodiments of the invention follows.
A high level model of a preferred embodiment of the calibration scheme 100 is shown in
A frequency estimation block 106 first estimates the frequency of the test signal s(t) using a two part process, viz., including coarse estimation 107 and fine estimation 108.
The coarse estimate 107 is found by using a zero-crossing counting technique 150 which can use a counter, an adder, and a divider. Linear interpolation 152 over a measured time interval is used to determine the zero-crossing instants and hence the frequency. Moreover, only the instants where the signal goes from a negative value to a positive value (or other way around) are calculated. Hence the operations can be pipelined too.
The fine frequency estimate 108 is performed using a notch filter 158 wherein the notch frequency is searched 156 within a small region of frequencies near the coarse estimate frequency. Any suitable line-search method can be used for this purpose. The notch filter can comprise two multipliers, two delay elements and seven adders. Of the multipliers, one of them is represented as a shift-and-add operation.
A linear prediction filter 110 then determines the coefficients of a sinusoid from the fine estimate. The prediction filter can be implemented in a simple manner, such as by using only shift-and-add operations. The linear predictor filter 110 can be obtained based on predicting a sinusoid from past samples. This gives an averaging effect to the prediction of the present sample.
The predicted sinusoid s′(k) is then used by a LUT generation process 112 to determine the entries of a Look Up Table (LUT) 120.
In operation, the output of the ADC 104 is then fed to the LUT 120 for correction (indicated in
A more detailed discussion of each of these elements now follows.
It is fair to assume that the offset error in the ADC 104 can be corrected using the mean value of the output of the ADC 104. Consequently, assume s(k) is a signal of the form
where s(k) is the sampled version of the continuous-time input signal s(t), A is the amplitude of the input signal, k is the sample instant, Fin and Fs are the input and sampling frequencies, and φ is any arbitrary phase. An N-bit ADC 104 takes the sampled signal s(k) and produces a quantized value, viz., x(k)=Q[s(k)], where Q denotes the quantization. Looking at it from a different perspective, the signal s(k) is mapped to a different value x(k) based on the non-linear characteristics of the ADC. Since there are N bits in the ADC, x(k) has M values, where M=2N. By virtue of the finite word-length and non-linearity of the ADC, the value of s(k) is different from x(k). It is, however, assumed that if x(k)ε{x0, x1, . . . , xM-1}, then x0<x1<x2< . . . <xM-1.
In the calibration scheme 100, the value of s(k) is predicted based on the past values of the output of the ADC 104, i.e. x(n−k). In other words, s′(k), an estimate of s(k) is obtained and the entries of the LUT 120 are such that the mean-square error between s(k) and s′(k) is minimized.
It is assumed that a signal generator provides a sine wave with a spectral content better than (i.e., less noisy or purer than) the ADC under test. A signal s(t) of the form shown in Eqn. 4. is input to the ADC 104 through the sample-and-hold circuit 102. In order to predict this signal, the frequency Fin must be estimated. The frequency estimation block 106 is broken into two parts, viz., a coarse estimate 107 and a fine estimate 108.
In order to make a coarse estimate of the frequency of the input signal, a first step is to calculate the timing of the zero-crossing instants. This can be done by detecting the zero-crossings and counting how many zero-crossings occur in a particular time interval. After Nz number of zero-crossings, we can then obtain the coarse estimate of the frequency from the difference in time of the first and last zero crossings.
The process is shown in detail in
Similarly, after counting (step 204) Nz cycles let kL and kL+1 denote the sampling instants during which the signal crosses zero from a negative value to a positive value. If x(kL) and x(kL+1) are the two corresponding values stored (step 206) at these time instants, respectively, then determine (step 209)
Thus, a coarse estimate of the input frequency Finc is given (step 208) by
Another way to obtain a slightly better estimate is as follows. Let t0, t1, . . . , tN
The coarse frequency estimate then can be obtained as
The fine frequency estimation 108 is based on an adaptive notch filter technique. Before embarking on the fine frequency estimation, consider the notch filter mechanism. A digital notch filter can be realized as
where A(z) is an all-pass filter. The characteristics of G(z) are such that
G(ej0)=G(ejπ)=1
G(ejω
where ω0 is the angular notch frequency. A second-order transfer function to effect the all-pass filter is given by
where k1 and k2 are multipliers defining the notch parameters. It can be shown that this choice of all-pass filter allows the independent tuning of ω0 and the 3-dB bandwidth according to
where Ω is the 3-dB bandwidth. As can be seen from Eqn (13), the bandwidth depends on the value of k2. Thus, by appropriately choosing the value of k2 as a Canonic Signed Digit (CSD) number, the need for a multiplication can be circumvented. For e.g., by choosing k2=1−2−3=0.875, obtain a bandwidth of Ω=0.01π.
A second-order all-pass filter A(z) realized using a cascade of single multiplier lattice two-pair is shown in
Towards estimating the fine frequency of the input signal, let us now look at the response of the notch filter for various values of k1, for an example where that sampling rate is 50 MHz. This is shown in
There are many line-search methods to obtain the optimal value of k1. For the sake of exposition, use the Golden-Section Search method wherein a sequence of intervals is generated, viz., {I1, I2, . . . }. The rule by which the lengths of successive intervals are generated is that the ratio of any two adjacent intervals is constant, i.e.,
The value of K is found to be 1.618034. The algorithm (shown in
Step 1. Assign I1=kU,1−kL,1 and compute (item 502)
I
2
=I
1
/K
k
a,1
=k
U,1
−I
2
k
b,1
=k
L,1
+I
2
Calculate (item 503) Pa,1, the power of the signal at the output of the notch filter for k1=ka,1. Similarly, calculate Pb,1, the power of the signal at the output of the notch filter for k1=kb,1. Set r=1.
Step 2. Compute (item 504)
I
r+2
=I
r+1
/K
If Pa,r>Pb,r, then kL,r+1=ka,r
kU,r+1=kU,r
k
a,r+1=kb,e
k
b,r+1
=k
L,r+1
+I
r+2
Pa,r+1=Pb,r
Pb,r+1 is evaluated with k1=kb,r+1.
On the other hand if Pa,r<Pb,r, then kL,r+1=kL,r
kU,r+1=kb,r
k
a,r+1
=k
U,r+1
−I
r+2
kb,r+1=ka,r
Pb,r+1=Pa,r
Pa,r+1 is evaluated with k1=ka,r+1.
Step 3. (item 505) If ka,r+1>kb,r+1, then
If Pa,r+1>Pb,r+1, compute
k
1=0.5(kb,r+1+kU,r+1)
If Pa,r+1=Pb,r+1, compute
k
1*=0.5(ka,r+1+kb,r+1)
If Pa,r+1<Pb,r+1, compute
k
1*=0.5(kL,r+1+ka,r+1)
and stop. At this point k1* is the optimal value of k1.
The fine frequency is now estimated as
Step 4. Set r=r+1 and repeat (item 506) from Step 2 as necessary.
Signal prediction involves the prediction of the present sample based on the past input and output samples. Here we restrict our attention to the prediction using past input samples as it involves finite-impulse response filtering. A straightforward way to predict a sinusoidal signal is to use a set of N samples and obtain the amplitude, frequency, phase and offset using a 4-parameter least-squares fit algorithm, as advanced in the IEEE Standard 1057. Once the parameters are obtained, future samples of the signal can be predicted. While this method is attractive, it is computationally very expensive involving operations with large matrices.
Instead of performing the least-squares fit, the prediction of s′(k) from the samples of the output of the ADC can be performed by linear filtering (see 110 of
where L is the length of the filter. The coefficients c(l) are given by
And ω is set to 2π times the fine frequency estimate, Finƒ. The above method of generating coefficients using Eqn (17) is very cumbersome. A simpler sinusoidal signal prediction technique is below.
It is well known that:
sin((n+1)x)+sin((n−1)x)=2 cos(x)sin(nx) (18)
Rearranging and changing the time index in Eqn (18), we get
sin(nx)=2 cos(x)sin((n−1)x)−sin((n−2)x) (19)
We can write the above equation as a recursive equation in sin(nx) as
y(n)=2 cos(x)y(n−1)−y(n−2) (20)
We have now created a prediction filter with only two coefficients, viz., 2 cos(x) and −1 to predict the present value y(n) from y(n−1) and y(n−2). Interestingly, Eqn (20) can be extended to predicting the present value from more distant past values, viz.,
y(n)=2 cos(Lx)y(n−L)−y(n−2L) (21)
Thus, by choosing a suitable value of L, we can create prediction filter 110 as follows.
Table 1 shows the coefficients of filter 110 characterized by Eqn (22) with L=8. It can be seen that some coefficients are zero. In this case, since L=2μ, some of the coefficients can be represented by simple shift and add operations. The complexity of the coefficients, thus, involves calculating cos(kx).
It must be mentioned that transcendental functions like sin(x) and cos(x) can be generated very efficiently, for e.g., by simple add-and-shift operations of binary numbers using CORDIC.
It should also be understood that other types of prediction filters can be used.
The intent of constructing an LUT 120 by LUT generation 112 is to produce a set of levels given by {s0, s1, . . . , sM-1} such that the entries are optimum from a mean-square sense with respect to the unquantized input signal. The process steps are illustrated in
where i=0, 1, . . . , 2N−1. Let Ai(k) be the number of times a particular level x(k)=xi. Assuming Ai(k)=0 for k<2L, the LUT update (item 602) can be written as
for k≧2L. It must be recalled that y(k) is the predicted value at instant k. After a sufficiently large number of data has been processed (item 603), the LUT 120 is ready for use with the ADC. (In one embodiment herein, 216 samples are processed). The data from the ADC 104 is now an address to the LUT 120 and the output of the LUT is the corrected signal.
A simulation was performed in which a signal source of −120 dBc was assumed. Present day commercial signal generators provide spectral purity of about −160 dBc. We present different non-linear conditions in the simulation by subjecting the input signal to different non-linear transfer functions. The frequency of the input signal is chosen such that
where Fin is the input frequency, B is the total number of samples and A is the number of complete cycles of the input signal and Fs is the sampling frequency. It must be mentioned that A and B are mutually prime. The chosen frequency is such that every quantization level is accessed sufficiently large number of times. The input signal from the signal generator is first passed through a non-linear function which is then passed through an N-bit ADC that produces a quantized output. The imperfect ADC can be thought of as a combination of a non-linear function and an ideal quantizer. Our simulations are performed with N=14.
In the first experiment, a calibration signal at 13.695419 MHz is input to the ADC. An LUT is generated following the method presented above. A test signal at 15.064299 MHz is now input to the ADC.
In the second experiment, we develop a non-linear model such that the SFDR of the uncorrected signal from the ADC is better than in the previous experiment. Again, a calibration signal of frequency 13.898194 MHz is input the ADC and an LUT is generated. A test signal at 15.287936 MHz is input to the ADC. As can be seen from
In the next experiment, we simulate an even better ADC with an SFDR of about 87.95 dBc and a SINAD of 82.7 dB. The ENOB is 13.45 bits. The LUT is generated with a calibration signal of frequency 10.008633 MHz and the ADC is tested at 11.009157 MHz.
In all the above experiments, the calibration signal and testing signal were in close proximity to each other. In the next experiment, we train the LUT at 18.295825 MHz while testing is performed at 64.99998 MHz.
In this section, two methods are provided to carry out dynamic calibration of the non-linear effects of ADCs. In both these methods, multiple calibration frequencies are employed in order to improve the wide-band performance of the converter.
Method 1
In this method (shown in
After determining the contents of the LUTs and while the ADC is placed in an operating mode (e.g., a non-calibrating mode), the process of
In another experiment, the frequency region between 0 and Fs/2 is broken into 5 regions. Five different calibration frequencies between 12.5 MHz and 62.5 MHz are chosen with uniform spacing. For each of the calibration frequency, an LUT is generated using the method mentioned above. Thus a total of 5 LUTs are generated. A test signal of 47.604263 MHz is chosen and passed through the ADC. The spectrum of the uncorrected signal is shown in
In order to demonstrate that it is important to choose the right LUT, based on the dominant frequency, we repeat the above experiment by choosing the wrong LUT. The spectrum of the so-called “corrected” output from the LUT is shown in
Method 2
If the non-linear characteristics do not deviate much from one another, one LUT capturing the average of all the LUT entries for different frequencies can be used. The method entails the following steps as depicted in
Step 1. Choose ƒ1, ƒ2, . . . , ƒr calibration frequencies, set k=1 and initialize si using Eqn (23) (item 2001).
Step 2. Generate si as shown in Eqn (24) using the si from fk-1 (item 2002). If k=r, stop (items 2003, 2004).
Step 3. Set k=k+1 (item 2005) and go to Step 2.
It should be noted that the same LUT is updated for each of the calibrating frequencies.
This document has shown a method of calibrating the non-linearities of ADCs. We first show how the method is applied to the case when the non-linearities are static, i.e., the characteristics of the non-linearities do not change with frequency. In this method, a calibrating signal from a signal generator is input to the ADC. The frequency of the signal is estimated using a two-step technique wherein the frequency is first estimated coarsely and then using this coarse estimate a fine estimate is performed. After the frequency is estimated, the sinusoidal signal is predicted using a linear predictor. By predicting the sinusoidal signal and the actual signal, a LUT is generated based on optimum quantization levels that minimizes the difference between the actual value and the predicted value in a mean-square sense. Once the LUT is generated, the output of the ADC is treated as an address to the LUT whose output is the calibrated signal.
This technique is extended to the case when the dynamic case where the characteristics of the non-linearities change with frequency. In this case, the usable frequency spectrum of interest is broken into several regions. In each of these regions, a frequency is identified and used as a calibrating signal to generate the corresponding LUT. During the regular operation of the ADC, the bin corresponding to dominant frequency of the signal is identified using a short-length FFT. This bin is used to select the appropriate LUT for operating on the output of the ADC to provide the calibrated output.
If the non-linear characteristics do not deviate much from one another, one LUT capturing the average of all the LUT entries for different frequencies can be used.
This application claims the benefit of (a) U.S. Provisional Application No. 61/305,609 filed on Feb. 18, 2010, the entire contents of which are incorporated by reference herein in their entirety.
Number | Date | Country | |
---|---|---|---|
61305609 | Feb 2010 | US |