Flatten DAC frequency response
By Ken Yang, Maxim Integrated Products - April 13, 2006
In a generic example, a DAC samples a digital baseband signal (Figure 1). The DAC's frequency response is not flat; it attenuates the analog output at higher frequencies. At 80% of fNYQUIST, for instance (fNYQUIST=fS/2), the frequency response attenuates by 2.42 dB. That amount of loss is unacceptable for some broadband applications requiring a flat frequency response. Fortunately, however, several techniques can cope with the nonflat frequency response of a DAC. These techniques include increasing the DAC's update rate using interpolation techniques, pre-equalization filtering, and post-equalization filtering, all of which reduce or eliminate the effects of the sinc roll-off.
To understand the nonflat frequency response of a DAC, consider the DAC input as a train of impulses in the time domain and a corresponding spectrum in the frequency domain (Figure 2). An actual DAC output is a "zero-order hold" that holds the voltage constant for an update period of 1/fS. In the frequency domain, this zero-order hold introduces sin(x)/x, or aperture, distortion (Reference 1). The amplitude of the output-signal spectrum multiplies by sin(x)/x (the sinc envelope), where x=πf/fS, and
describes the resulting frequency response (Figure 3). Thus, aperture distortion acts as a lowpass filter that attenuates image frequencies but also attenuates the desired in-band signals.
The sin(x)/x (sinc) function is well-known in digital-signal processing. For DACs, the input is an impulse, and the output is a constant-voltage pulse with an update period of 1/fS (the impulse response), whose amplitude changes abruptly in response to the next impulse at the input. You obtain the DAC's frequency response by taking the Fourier transform of the impulse response (a voltage pulse, Reference 2).
The desired signal frequency in the first Nyquist zone reflects as a mirror image into the second Nyquist zone between fS/2 and fS, but the sinc function attenuates its amplitude. Image signals also appear in higher Nyquist zones. In general, a lowpass or bandpass filter, often called a reconstruction filter, must remove or attenuate these image frequencies. Such filters are analogous to the antialiasing filter that an ADC often requires.
As the DAC output frequency approaches its update frequency, fS, the frequency response approaches zero or null. The DAC's output attenuation therefore depends on its update rate. The 0.1-dB-frequency flatness is about 0.17fNYQUIST, where fNYQUIST=fS/2. As the output frequency approaches fS/2, so does the first image frequency. As a result, the maximum usable DAC output frequency for systems in which filtering removes the image frequency is about 80% of fNYQUIST.
The first image frequency is fIMAGE=fS–fOUT. At fOUT=0.8fNYQUIST, fIMAGE=1.2fNYQUIST, leaving only 0.4fNYQUIST between frequency tones for the filter to remove the image. Output frequencies higher than 80% of fNYQUIST make it difficult for a filter to remove the images, but the reduction in usable frequency output allows for realizable reconstruction-filter designs.
Speed the update rate or interpolate?
At 80% of fNYQUIST, the output amplitude attenuates by 2.42 dB. For broadband applications requiring a flat frequency response, that amount of attenuation is unacceptable. Because the DAC's output attenuation depends on its update rate, you can minimize the effect of sinc roll-off and push the 0.1-dB flatness to a higher frequency simply by increasing the converter's update rate and keeping the input-signal bandwidth unchanged.
Increasing the DAC's update rate not only reduces the effect of the nonflat frequency response, but also lowers the quantization noise floor and loosens requirements for the reconstruction filter. Drawbacks include a higher cost for the DAC, higher power consumption, and the need for faster data processing. The benefits of higher update rates are so important, however, that manufacturers are introducing interpolation techniques. Interpolating DACs offer all the benefits of higher update rates and keep the input data rate at a lower frequency.
Interpolation DACs include one or more digital filters that insert a sample after each data sample. In the time domain, the interpolator stuffs an extra data sample for every data sample entered, with a value interpolated between each pair of consecutive data-sample values. The total number of data samples increases by a factor of two, so the DAC must update twice as fast.
One modern DAC, for example, incorporates three interpolation stages to achieve an 8× interpolation; the DAC's update rate is eight times the data rate (Reference 3). In the frequency domain, the sinc-frequency response also moves out by a factor of eight, as does the effective image frequency, which loosens requirements for the reconstruction filter.
Increasing the update rate reduces but does not eliminate the effect of sinc-frequency roll-off. If you are already using the fastest DAC available, you must choose other techniques to make additional improvements. It is possible, for example, to design a digital filter whose frequency response is the inverse of the sinc function, that is, 1/sinc(x). In theory, such a pre-equalization filter exactly cancels the effect of the sinc-frequency response, producing a perfectly flat overall frequency response. A pre-equalization filter filters the digital input data to equalize the baseband signal before it sends the data to the DAC. Removing all image frequencies at the DAC output allows original signal reconstruction without attenuation (Figure 4).
Any digital filter whose frequency response is the inverse of the sinc function will equalize the DAC's inherent sinc-frequency response. Because the sinc-frequency response is arbitrary, however, a FIR (finite-impulse-response) digital filter is preferable. Frequency-sampling techniques are useful in designing the FIR filter. Assuming the signal is in the first Nyquist zone, you sample the frequency response, H(f), from dc to 0.5fS (Figure 5). Then, using the inverse-Fourier transform, you transform the frequency sample points, H(k), to impulse responses in the time domain. The impulse response coefficients are:
where H(k) and k=0, 1, ... N–1 represent the ideal or targeted frequency response. The quantities h(n) and n=0, 1, ... N–1 are the impulse responses of H(k) in the time domain, and α=(N–1)/2. For a linear-phase FIR filter with positive symmetry and even N, you can simplify h(n) using Equation 3. For odd N, the upper limit in the summation is (N–1)/2 (Reference 1).
Increasing the number of frequency sample points (N) of H(k) produces a frequency response closer to the targeted response. A filter with too few sample points reduces the effectiveness of the equalizer by producing a larger deviation from the target frequency response. On the other hand, a filter with too many sample points requires more digital-processing power. A good technique uses large N for computing h(n), truncates h(n) to a small number of points, and then applies a window to smooth h(n) and produce an accurate frequency response.
A sample filter uses N=800 to compute h(n) (Figure 6). You then truncate h(n) to only 100 points and apply a Blackman window to h(n). The frequency response for the combined FIR filter and DAC sinc response exhibits 0.1-dB flatness nearly up to the Nyquist frequency (to approximately 96% of fNYQUIST, where fNYQUIST=fS/2). In contrast, the uncompensated DAC response maintains 0.1-dB flatness only to 17% of fNYQUIST. Because the filter gain is greater than unity, you must take care that the filter's output amplitude does not exceed the DAC's maximum allowed input level.
After obtaining the impulse-response coefficients, you can implement the FIR filter using a standard digital-processing technique. That is, h(n) filters the input signal data x(n):
Dynamic performance for the compensated DAC is lower than that of the uncompensated DAC, because higher gain at the higher input frequencies requires that you intentionally lower the signal level to avoid clipping the input. Assuming the input is a single tone between dc and fMAX (less than fS/2), the attenuation depends on fMAX:
where VIC is the input voltage for the compensated DAC, and VREF is the reference voltage. If, for example, the maximum anticipated input frequency is fMAX=0.8fNYQUIST, you must attenuate the DAC input by VIC=–2.4 dB below VREF.
The resulting output amplitude is flat over frequency, representing perfect compensation, and equals the input amplitude of VOC=VIC=–2.4 dB below VREF. You obtain output noise by integrating the noise power density from near dc to the reconstruction filter's cutoff frequency. DAC manufacturers also often specify SNR by integrating the noise out to fNYQUIST without the use of a reconstruction filter:
where NC is the total noise power or voltage of the compensated DAC, and nQ(f) is the DAC's output noise density, which is usually limited by quantization noise and thermal noise. The maximum SNR for the compensated DAC is constant and independent of frequency, but it depends on the maximum anticipated output frequency:
where VOC is the output amplitude. For the uncompensated DAC, the sinc envelope attenuates the output signal:
Noise power for the uncompensated DAC is same as for the compensated DAC. Thus, the maximum uncompensated-DAC SNR is
You can determine the degradation of the compensated-DAC SNR by dividing the SNRs:
Degradation of the compensated- DAC SNR, unlike that of the uncompensated DAC, is frequency-dependent. Degradation is worse at frequencies lower than fMAX.
Another method of equalizing the DAC's sinc-frequency response over the output-frequency band of interest is to add an analog filter whose frequency response is approximately equal to the inverse-sinc function. Many such analog-equalization filters exist for equalizing transmission lines and amplifiers, and you can adapt those equalization techniques for reducing the effect of a DAC's unwanted sinc response. The postequalization filter inserts after the DAC's reconstruction filter.
This application uses a simple active equalizer (Figure 7). For a given bandwidth, you choose R1, R2, and C1 so that the analog equalizer's frequency response cancels the DAC's sinc-frequency response. Spice-simulation software can help optimize the frequency flatness for a given application. The frequency response for a typical analog equalizer shows that 0.1-dB flatness extends to more than 50% of fNYQUIST. Without the postequalization filter, 0.1-dB flatness extends only to 17% of fNYQUIST. Note that the maximum circuit gain is 1+R1/R2.
A postequalization filter affects the DAC's SNR because it amplifies the noise at higher frequencies. Assuming that quantization noise limits the noise in an uncompensated DAC, the sinx/x envelope attenuates both the output signal and the noise. With a postequalization filter, however, the output-signal amplitude and noise density are constant over frequency, assuming perfect compensation. You obtain the output noise for the compensated and uncompensated DACs by integrating the noise power from near dc to fNYQUIST:
where H(f) is the frequency response for the postequalization filter, nQ(f) is the noise power density, nQO is the unattenuated quantization-noise density near dc, and NC and NU are the total noise power of the compensated and uncompensated DACs, respectively. Maximum SNR normalizes to the reference voltage, VREF. Remember that fNYQUIST equals fS/2. The SNRs are then:
Again, dividing the two SNRs gives the compensated SNR in terms of the uncompensated SNR. The maximum SNR degrades at lower frequencies but improves at higher frequencies:
So far, you assume that the DAC's reconstruction filter is an ideal lowpass filter: Its frequency response is flat to fNYQUIST, and then it drops abruptly to zero. In practice, a reconstruction filter also adds roll-off near its cutoff frequency. Accordingly, the pre-equalization and postequalization techniques can serve an additional purpose of equalizing any roll-off in the reconstruction filter.
The effect of a DAC's inherent sinc-frequency response attenuates output signals, especially at higher frequencies, and the resulting nonflat frequency response reduces the maximum useful bandwidth in broadband applications. Higher update rates flatten the frequency response but increase the DAC's cost and complexity.
The pre-equalization technique, which employs a digital filter to process the data before sending it to the DAC, offers 0.1-dB frequency flatness to 96% of fNYQUIST (fNYQUIST=fS/2) but requires additional digital processing. For comparison, an uncompensated DAC offers 0.1-dB flatness only to 17% of fNYQUIST. Another technique adds a postequalization analog filter to equalize the DAC's output and achieves 0.1-dB flatness to 50% of fNYQUIST but requires additional hardware. Both compensation techniques offer a lower SNR at low output frequencies.