Method and apparatus for calibrating a multi-bit delta-sigma modular
TECHNICAL FIELD OF THE INVENTION 
     The present invention pertains in general to analog-to-digital converters, and more particularly, to a calibration system for calibrating for non-linearities in the delta-sigma analog modulator and the analog-to-digital converter. 
     CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is related to U.S. patent application Ser. No. 07/870,059, entitled &#34;Delta-Sigma Modulator for an Analog-to-Digital Converter with Low Thermal Noise Performance&#34;, filed concurrently herewith. 
     BACKGROUND OF THE INVENTION 
     High order delta-sigma analog-to-digital converters have a number of noise sources, offsets, etc. that deter the overall performance thereof, especially when resolving very small input voltage levels. DC offsets and gain errors have been sources of error in such ADCS, and these errors have been addressed with self-calibration systems, such as that disclosed in U.S. Pat. No. 4,943,807, issued to Early on Jul. 24, 1990. Another source of error is the non-linearity of the delta-sigma modulator, which is due in part to the feedback DAC. 
     The non-linearity of the feedback DAC is of more concern in a multilevel output delta-sigma modulator, as compared to a one-bit delta-sigma modulator. The one-bit modulator requires only a two-state feedback, which is inherently linear. However, the one-bit modulator does have one disadvantage in that, when the input signal is near mid-scale, large amounts of error are added to the loop during each sampling period. By utilizing a multi-level modulator, and one or more additional DAC levels, the state of the feedback DAC when the input voltage is near mid-scale is a &#34;do nothing&#34; state, which minimizes quantizing error RMS voltage. Such a DAC topology is disclosed in J. J. Paulos, G. T. Brauns, M. B. Steer and S. H. Ardalan, &#34;Improved Signal-To-Noise Ratio Using Tri-Level Delta-Sigma Modulation&#34;, IEEE Proceedings ISCAS, pp. 463-466, May 1987. 
     One disadvantage to a multi-level feedback DAC is that the multi-level feedback no longer provides the inherent linearity of two states, as was the case in a one-bit modulator. In general, the feedback DAC in a multi-level delta-sigma modulator must be linear to the full accuracy of the overall converter. Adjusting even a third feedback state to part-per-million accuracy can be difficult. Careful selection of resistors has been attempted for audio applications, as disclosed in R. W. Adams, &#34;Design and Implementation of an Audio 18-Bit Analog-to-Digital Converter Using Oversampling Techniques&#34;, J. Audio Eng. Soc. Vol. 34, pp. 153-166, March 1986. Another technique utilizes dynamic element matching with a dithering of imprecise DAC elements to convert linearity error into noise, which has been disclosed in L. R. Carley, &#34;A Noise-Shaping Coder Topology for 15+ Bit Converters&#34;, IEEE J. Solid-State Circuits, Vol. SC-24, pp. 267-273, April 1989. 
     These previous techniques suffer a number of disadvantages in that reconfigurations of analog circuit topologies and changes in digital control waveforms are generally undesirable in any self-calibrated architecture. Digital interference coupled into analog circuitry can be removed by calibration, but any differences in interference between the calibration mode and the normal operation mode result in errors not removed by calibration. Therefore, there exists a need for a calibration system that calibrates for the non-linearities in a multi-level feedback DAC prior to utilizing the traditional delta-sigma calibration procedures to eliminate overall gain and offset errors. 
     SUMMARY OF THE INVENTION 
     The present invention disclosed and claimed herein comprises a method and apparatus for compensating for non-linearities in an analog-to-digital converter having a multi-level output delta-sigma modulator. The delta-sigma modulator is an m-level output with m greater than two, the output of which is input to a digital filter. The digital filter operates in accordance with filter coefficients stored in a memory. The memory is also operable to store non-linearity compensation parameters. The operation of the digital filter is controlled to compensate for the non-linearities that exist in the delta-sigma modulator during the operation of the digital filter. 
     In another aspect of the present invention, the digital filter is driven with the m-level output of the delta-sigma modulator. The compensation device is operable to compensate m-2 of the m-levels that are utilized to drive the digital filter in accordance with the stored non-linearity parameters. In the preferred embodiment, the value of m is equal to three. 
     In yet another aspect of the present invention, the multi-level output of the delta-sigma modulator is comprised of a -1 level, a &#34;do nothing&#34; level and a +1 level. The filter is comprised of first and second processors for processing the +1 level and -1 level, respectively, each of the processors for receiving the stored filter coefficients and providing a set of accumulated filter coefficients that are accumulated as a function of the associated level being output from the delta-sigma analog modulator. A summation device is operable to receive the output of the first and second processors and sum the difference therebetween. The compensation device compensates the output of one of the first and second processors in accordance with the stored non-linearity compensation parameters prior to summation with the summation device. 
     In a further aspect of the present invention, a calibration device is provided for determining the non-linearity parameters in response to receiving a calibration signal. The calibration device is operable to change the operation mode from a normal operation mode to a calibration mode. In the calibration mode, the non-linearity parameters are determined and then stored in the memory. Thereafter, the system is returned back to a normal operation mode. 
     In a yet further aspect of the present invention, the calibration device is comprised of a calibration multiplexer for driving the input with a zero input level. A non-linearity adaptive processor is provided for comparing the output of the digital filter with a desired value to define an error. An iteration is performed wherein the non-linearity compensation parameters are iterated for a time sufficient to drive the error below a predetermined value. The non-linearity parameters are then stored in the memory. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     For a more complete understanding of the present invention and the advantages thereof, reference is now made to the following description taken in conjunction with the accompanying Drawings in which: 
     FIG. 1 illustrates a general block diagram of a calibrated analog-to-digital converter providing for self-calibration of non-linearities in the delta-sigma modulator; 
     FIG. 2 illustrates a detailed block diagram of the portion of the calibration system utilized to calibrate out non-linearities in the delta-sigma modulator; 
     FIG. 3 illustrates a block diagram of the general m-bit delta-sigma modulator; 
     FIG. 4 illustrates a more detailed block diagram of a three-level delta-sigma modulator utilizing a three-level feedback DAC; 
     FIG. 5 illustrates the output spectrum for the ideal modulator; 
     FIG. 6 illustrates the digital filter response for the modulator output spectrum of FIG. 5; 
     FIG. 7 illustrates the non-ideal modulator output spectrum; 
     FIG. 8 illustrates the plot of the DAC output and the modulator output for the non-ideal DAC; 
     FIG. 9 illustrates a conventional decimation filter driven by a multilevel delta-sigma modulator; 
     FIG. 10 illustrates the preferred embodiment of the decimation filter; 
     FIG. 11 illustrates a block diagram for the overall calibration operation in the digital filter section; and 
     FIG. 12 illustrates the normal operation after the value of δ has been set. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring now to FIG. 1, there is illustrated a detailed block diagram of an overall analog-to-digital converter utilizing calibration for gain and offset errors and also calibration for non-linearities in a multi-bit delta-sigma modulator. A calibration multiplexer 10 is provided that is operable to receive an analog input signal and three reference voltages, a positive reference voltage, a negative reference voltage and a zero reference voltage. The positive and negative reference voltages are utilized for the overall gain and offset calibration and the zero reference voltage is utilized for the non-linearity calibration, as will be described in more detail hereinbelow. The output of the multiplexer 10 is input to the input of the delta-sigma modulator 12 which provides on the output thereof a multi-level output. In the preferred embodiment, the output is a two-bit output having three levels, +1, 0, -1. 
     The output of the delta-sigma modulator 12 is input to a compensation circuit 14 that is operable to pass through the levels +1 and 0 and to calibrate for the -1 output level with a δ offset coefficient. The δ offset coefficient is stored a δ coefficient block 16, which constitutes a register, and this is input to the compensation circuit 14 for use in the normal operation mode, as will be described in more detail hereinbelow. The output of the compensation circuit 14 is input to a digital filter 18, which is typically a Finite Impulse Response (FIR) filter. In the preferred embodiment, as will be described hereinbelow, the compensation circuit 14 and the digital filter 18 are combined. 
     The output of the digital filter 18 is input to a calibration module 20 which is operable to calibrate for gain and offset errors in accordance with U.S. Pat. No. 4,943,807, issued to Early on Jul. 24, 1990, which patent is incorporated herein by reference. The calibration module 20 is controlled by a calibration control circuit 22, which is connected thereto by a bi-directional bus 23. The calibration module 20 under the control of calibration control circuit 22 is operable to determine the offset/gain calibration parameters and store them in a block 24, which constitutes a memory. During normal operation, these parameters are utilized by the calibration module to perform the actual offset and gain correction. The calibration control 22 also controls the calibration operation that is utilized to generate the δ coefficient in the block 16 through the bus 26, as will be described hereinbelow. The calibration multiplexer 10 is controlled by the calibration control 22 for all calibration operations, and is connected thereto by a bus 28. Further, the calibration control 22 can run in an automatic mode which, in the preferred embodiment, occurs on a power-up sequence. Further, an external calibration signal can be received through a control line 30 to allow the calibration operation to periodically occur in response to external stimuli. Since the parameters of the high-resolution analog-to-digital converter will vary as a function of time, temperature, etc., it is necessary to periodically recalibrate the system. 
     Referring now to FIG. 2, there is illustrated a block diagram of the portion of the calibration operation that is directed toward calibrating for the non-linearities in the delta-sigma modulator 12. The output of the delta-sigma modulator 12 is input to a +1 processor 32 and also to a -1 processor 34. The output of the processor 32 is input to the positive input of a summing junction 36. The output of the -1 processor 34 is input to the compensation circuit 14, the value of which is offset by the δ coefficient in block 16. This compensated value is then input to the minus input-of the summing junction 36. The output of the summing junction 36 provides the overall digital output on a bus 38 representing the digital output of the decimation filter. The filter coefficients for the processors 32 and 34 are stored in a filter coefficient memory 35, which is typically a ROM. 
     During calibration, a non-linearity calibration control circuit 40 is provided, which is an integral part of the calibration control circuit 22. The non-linearity calibration control circuit 40 is operable to control the calibration multiplexer 10 to select a ground or zero input. The digital output on the digital bus 38 is then input to a δ-processor 39 which utilizes an iterative technique to minimize the error. When the error has been minimized, the value of δ is then frozen in the δ coefficient block 16 for normal operation. It can be seen that this calibration operation occurs outside of the delta-sigma modulator 12 such that calibration is not circuit dependent. Further, it will be seen that with m-levels, only m-2 levels need to be compensated for. In the present embodiment, with three levels, only one of the levels, the -1 level, needs to be compensated for in order to remove the non-linearities. 
     Referring now to FIG. 3, there is illustrated a block diagram of an m-level delta-sigma modulator. The delta-sigma modulator is comprised of an input integration stage 50 having a positive and a negative input, the positive input connected to ground and the negative input connected to a summing node 52. A feedback capacitor 54 is connected between the input node and the output of the integrator 50. A current source 56 provides the input to the analog-to-digital converter. However, it should be understood that a voltage input could be utilized with the addition of an input digital switched-capacitor. The output of the integrator 50 is connected to the input of a noise shaping circuit 58 which is typically comprised of a plurality of integrators, as will be described hereinbelow. The noise shaping circuit 58 has a transfer function H&#39;(z). The output of the noise shaping circuit 58 is connected to an input of a (m-1)-threshold imbedded analog-to-digital converter (ADC) 60. 
     The output of the imbedded ADC 60 is also connected to the control input of an m-level digital-to-analog converter (DAC) 64. The m-level DAC provides three normalized levels, +1, 0 and -1, with the &#34;0&#34; level providing &#34;do nothing&#34; level. The m-level DAC 64 has associated therewith a plurality of output voltages to define various feedback levels, with an additional &#34;do nothing&#34; output. 
     Referring now to FIG. 4, there is illustrated a more detailed block diagram of the delta-sigma modulator of FIG. 3, illustrating a two-bit output providing three states. The imbedded ADC 60 is comprised of two comparators, a comparator 66 and a comparator 68. The comparator 66 has the positive input thereof connected to a threshold voltage V 1 , and the negative output thereof connected to the output of the noise-shaping circuit 58. The comparator 68 has the positive input thereof connected to the output of the noise-shaping circuit 58 and the negative input thereof connected to a threshold voltage V 2 . The outputs of the two comparators 66 and 68 comprise the two-bit output that is input to the digital filter 18 and also to the DAC 64. Therefore, when the voltage V A  on the noise-shaping circuit 58 is less than V 1  and greater than V 2 , the output state is a &#34;11&#34; state, whereas the output state when V A  is greater than V 1 , is a &#34;01&#34; state and the output state when V A  is less than V 2  is a &#34;10&#34; state. This provides three separate states. However, the &#34;do nothing&#34; state is the first state, wherein the output is &#34;11&#34;. 
     The DAC 64 is comprised of a switched-capacitor 70 that has one terminal thereof connected to the wiper of a switch 72, switch 72 connectable between ground and the input node 52. The other plate of capacitor 70 is connected to the wiper arm of a switch 74, switch 74 operable to switch between reference voltages -V R  and +V R . The switches are controlled such that the &#34;do nothing&#34; state exists whenever the switch 72 is grounded for a full sampling period. The &#34;+1&#34; state exists whenever the capacitor 70 is charged with the switch 74 configured to contact the reference voltage -V R  and the switch 72 grounded in a first phase of the sampling period. Then, both switches 72 and 74 are switched in a second phase of a sampling period. In the &#34;-1&#34; state, the capacitor 70 is charged up by connecting switch 72 to ground and switch 72 to +V R  in a first phase of the sampling period. Then, switches 72 and 74 are switched in a second phase of the sampling period. 
     Referring now to FIG. 5, there is illustrated a frequency response diagram illustrating the output spectrum for an ideal modulator. It can be seen that the noise levels are significantly reduced within the band of interest, between 0 to a comer frequency of f B . The noise level then goes up significantly. 
     Referring now to FIG. 6, there is illustrated a frequency plot of the digital filter response which, as can be seen from the plot, is a very sharp brick wall filter that has a sharp roll-off at f B . Therefore, the band of interest up to frequency f B  is primarily passed-through with all spectral content above f B  substantially filtered out. This is a conventional filtering technique for analog-to-digital converters utilizing a FIR filter. 
     Referring now to FIG. 7, there is illustrated the frequency response for a non-ideal modulator output spectrum. It can be seen that the frequency between zero and f B  is significantly higher than that with the ideal response of FIG. 5. This is due to thermal noise and feedback DAC non-linearity errors. The system of the present invention removes those errors due to non-linearities in the feedback DAC. 
     Referring now to FIG. 8, there is illustrated a diagram of the DAC output versus the modulator output, representing the three states of the tri-level delta-sigma modulator 12. The &#34;0&#34; or &#34;do nothing&#34; state is represented by a point 76 that is at the intersection of the two axis. This situation occurs for a case where gain and offset errors have been compensated for. The &#34;+1&#34; state is represented by a point 78 with the &#34;-1&#34; state being represented by a point 80. It can be seen that the points 76, 78 and 80 are not on a straight line, the straight line path being represented by a line 82. Since there are two points that will inherently exhibit linearity, it is only necessary to define the linear relationship with two points, such as points 76 and 78, which then defines the line 82. The point 80 deviates from the straight line path by a small amount, this representing the non-linearity in the delta-sigma modulator 12. 
     In accordance with the present invention, rather than driving the digital filter with levels of &#34;-1&#34;, &#34;0&#34; and &#34;+1&#34;, the digital filter is driven with the levels &#34;δ&#34;, &#34;0&#34; and &#34;+1&#34;. The parameter δ is adjusted during a calibration procedure with the modulator input held at the &#34;0&#34; level. The parameter δ is adjusted until the quantization noise at the digital filter output is minimized. Simulations of the delta-sigma modulator have revealed that the optimal noise is achieved when the δ parameter precisely compensates the linearity error of the feedback DAC. Therefore, no a priori knowledge of the DAC non-linearity is required. 
     Referring now to FIG. 9, there is illustrated a block diagram of a conventional FIR decimation filter that is driven with the modulator output levels &#34;δ&#34;, &#34;0&#34; and &#34;+1&#34;, which levels must model the imperfect feedback levels of the modulator DAC. Note that the value of &#34;δ&#34; must be known to the full resolution of the analog-to-digital converter and that precision on the order of 20-bits may be required for high resolution applications. The filter is comprised of a plurality of delays or delay blocks 78 having the transfer function z -1 . The input x(k) is input to the first of the delay blocks 78 with the input x(k) and the output of each of the delay blocks input to an accumulator 81 through multiplication blocks 82 to multiply each of the outputs of the delay blocks 78 and the input x(k) by one of N filter coefficients a 0  through a N-1 . The digital output y(k) is represented by the following equation: ##EQU1## The filter of FIG. 9 is a conventional filter and it only requires generation of the value of δ for the purpose of driving the digital filter. The tap weights {a i  } define the decimation filter transfer function. The tap weights are typically stored in a ROM, and high quality decimation filters can require coefficient precision in excess of 20-bits. Therefore, a hardware multiplier of 20×20-bits is required. However, in most integrated FIR filters, the multiply/accumulate function is timemultiplexed to reduce hardware. In the filter illustrated in FIG. 9, multiplications are required at a frequency of N*f s  /M, wherein N is the number of filter taps and M is the decimation ratio. 
     Referring now to FIG. 10, there is illustrated a multiplierless decimation filter that is the preferred embodiment of the present invention. This type of system was first disclosed in J. J. van der Kam, &#34;A Digital `Decimaling` Filter for Analog-to-Digital Conversion for High-Fi Audio Signals&#34;, Philips Tech. Rev. 42, No. 6/7, pp. 230-238, April 1986. By utilizing this type of structure, the system will avoid the need for a hardware multiplier (a i  *δ),at the oversampled rate. This is done by commutating the operations of δ-scaling and decimation filtering. 
     The input signal x(k) is input to a cascaded series of delay blocks 84, the outputs of which are each input to one of two switches 86 and 88, x(k) also input to one of two switches 86 and 88 for control thereof. The switches 86 and 88 are controlled to receive on the input thereof a tap weight a 0  through a N  or ground. The input signal x(k) is a modulator output having the levels &#34;-1&#34;, &#34;0&#34; and &#34;+1&#34;. The &#34;+1&#34; level controls the switches 86 and the &#34;-1&#34; level controls the operation of switches 88 to switch between ground and the tap weight (filter coefficient). The output of each of the switches 86 is connected to a +1 accumulator 90 and the output of each of the switches 88 is input to one of a plurality of taps of a -1 accumulator 92. Therefore, if the delay line data is a &#34;+1&#34; level, the corresponding coefficient is added to the + 1 accumulator and nothing is added to the &#34;-1&#34; accumulator 92. If the delay line data is &#34;-1&#34; level, the corresponding coefficient is added to the -1 accumulator 92 and nothing is added to the +1 accumulator 90. If the data is &#34;0&#34; level, neither accumulator 90 or 92 adds in anything. The switches 86 and the accumulator 90 comprise the +1 processor 32 and the switches 88 and accumulator 92 comprise the -1 processor 34 illustrated in FIG. 2. 
     The output of accumulator 90 is input to the positive input of the summing junction 36 and the output of accumulator 92 is input to the compensation circuit 14, the output of which is input to the negative input of the summing junction 36. The tap weights a 0  through a N  are stored in the filter coefficient block 35, which is typically a ROM. The δ correction is applied at the decimated output rate (f s  &#39;), which is a much lower frequency than the sampling frequency f s , typically f s  &#39;&gt;2f B . The compensation circuit 14 is a relatively straightforward bit-serial multiply-accumulate engine. 
     Referring now to FIG. 11, there is illustrated a block diagram illustrating the processors 32 and 34 in the calibration operation. The coefficients stored in the coefficient ROM 35 are controlled by an address generator 94 that ensures that the right coefficient operates on the right data at the right time. Two differentiator blocks 96 and 98 are provided, the differentiator block 96 connected between the output of the -1 processor 34 and the input to the compensation circuit 14, and the differentiator block 98 disposed between the output of the +1 processor 32 and the positive input of a summation junction 36. Each of the differentiator blocks 96 and 98 have a transfer function of 1-z -1 . The differentiator blocks 96 and 98 prevent DC offsets from interfering with the calibration operations. These blocks are bypassed after calibration is completed. 
     The calibration operation utilizes the δ processor 39 that receives the output of the differentiator block 96, z(j), and also the output of the summation block 36. The δ processor 39 utilizes an iterative process to generate the δ j  coefficient for storage in the δ coefficient block 16. 
     The calibration procedure utilizes an iterative method to find the value of δ that minimizes the digital output e(j). The output is called e(j) during calibration because the modulator input is set equal to zero, such that anything present at the filter output represents noise and/or modulator error. The value of δ in (j+1) th  iteration, δ j+1 , is changed from its value in the j th  iteration δ j , in accordance with the following relationship: 
     
         δ.sub.j+1 =δ.sub.j +βz(j)e(j) 
    
     In this equation, δ controls the speed at which δ converges to its final value and also determines the robustness of convergence in the presence of noise. Small values of δ enhance noise immunity, but increase calibration time. Clearly, δ converges to a constant value (δ j+1  =δ j ) as e(j) is driven to zero. The convergence effectively minimizes noise in the frequency band of interest caused by DAC non-linearities. 
     The topology described with reference to FIG. 11 filters out the high frequency noise from e(j), noise at frequencies above f B . The use of low-pass filtering required during normal operation greatly reduces e(j) and provides for a better and faster convergence of δ. In general, the bandwidth of the low pass filter during calibration can actually be lower than the bandwidth during conversion to further reduce e(j) and enhance conversion. However, increased filter complexity must be added, although the increased complexity is not required during normal operation. 
     Although the system has been described utilizing a three-level delta-sigma modulator and a three-level feedback DAC, multi-parameter iterative searches can be utilized for delta-sigma modulator systems with values of m that are greater than three in the feedback DAC levels. This would require m-2 adjustable parameters to remove digital errors for an m-level DAC. 
     The iterative process for determining δ j  , is described in Widrow and Stearns, &#34;Adaptive Signal Processing&#34;, Prentice-Hall, Englewood Cliffs, N.J., 1985, Chapter 1. After the iterative search has been performed, the modulator input signal is released from zero with the calibration multiplexer 10, the value of δ is frozen, and the differentiator blocks 96 and 98 are bypassed. This results in the topology illustrated in FIG. 12. The excess in-band noise caused by DAC non-linearities is essentially eliminated in normal operation. After the nonlinearities have been calibrated, the gain errors and DC offsets are calibrated in accordance with the overall calibration scheme described above with reference to FIG. 1. 
     In summary, there has been provided a method for calibrating the nonlinearities in a multi-level delta-sigma modulator. The delta-sigma modulator includes a multi-level feedback DAC that has inherent linearities. The non-linearities are compensated for by altering the driving levels that are input to the digital filter section. With an m-level DAC, only m-2 of the m-levels need to be compensated for in order to calibrate out the non-linearities in the delta-sigma modulator. During the calibration procedure, the input of the delta-sigma modulator is set to zero and the value of the variable parameters input to the digital filter sections varied to minimize the errors. This value is then frozen and, in normal operation, the value is utilized to compensate one of the levels in the input to the digital filter section. This procedure requires no a priori knowledge of the DAC non-linearity. 
     Although the preferred embodiment has been described in detail, it should be understood that various changes, substitutions and alterations can be made therein without departing from the spirit and scope of the invention as defined by the appended claims.