How does an equalizer prevent a sample and hold effect?
Does a reconstruction filter only smooth out the output of an DAC (+S&H) or does it have another function?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.Sign up to join this community
Equalizers do not prevent the sample and hold effect, though if you are talking about compensation filters, see the edit below.
There are two types of reconstruction filters (also known as low-pass filters): analog and digital. An analog low-pass filter can smooth out the output of a DAC. A digital low-pass filter cannot, since it comes before the DAC. What it can do is reduce the effect of the sample and hold by increasing the sample rate (assuming it is an interpolation filter) and then getting rid of the aliases via the low-pass filtering. The effect of the sample and hold is reduced due to the increased sample rate.
EDIT: As Robert points out, the frequency droop that happens as a result of the zero-order hold can be partially compensated for with digital filters whose frequency domain gain is the inverse of the zero-order hold effect. While this will not eliminate the sample and hold effect, it will mitigate it.
Let me first distinguish mathematical exactness and practical engineering: From a pure mathematical perspective, the Sample and Hold process in frequency is has a Sine(x)/x response. Sine(x)/x is transcendental, so we cannot exactly compensate for it with digital filter (equalizer) implementations, either with FIR or IIR structures. From a practical engineering perspective, and within a defined spectral range of interest, an equalizer can sufficiently compensate for the DAC (Digital to Analog Converter) reconstruction such that the distortion due to the sine(x)/x "pass-band droop" is reduced to below a level of concern (This distortion comes from the zero order hold reconstruction technique commonly implemented in D/A Converters).
This is done by simply providing the inverse Sinc response digitally to the waveform within the passband of interest; we can design the filter up to the complexity needed that will for practical purposes push the residual distortion below our requirements on total distortion.
The question then is how complicated will the filter need to be to sufficiently match an inverse Sinc response?
Below is one example of an amazingly simple two multiplier (three coefficient linear-phase FIR filter) solution I have used for compensating the same Sine(x)/(x) droop in CIC filters which could work equally well for a digital filter prior to DAC reconstruction:
How this works is explained simply by considering that this filter contains three samples as its impulse response: a large impulse in the center with magnitude $1+\alpha$, and two smaller impulses leading and trailing with magnitude $-\alpha/2$.
What the three impulses in time represent in frequency: It may be more intuitive for many to use the reciprocal property of the Fourier Transform and consider instead what those same three impulses in frequency would be in time: A dominant impulse at $f=0$ represents a DC offset. The two smaller and identical impulses on each side represent a cosine of small magnitude. Thus we get a small cosine with a DC offset. The exact same result is what happens for those three impulses in time- we get a cosine ripple in frequency with an offset to otherwise pass all signals with that ripple as depicted for each of the components of the resulting Fourier Transform below:
This works since for small frequency offsets, the $Sin(\omega)/\omega \approx (1+\alpha)- \alpha\cos(\omega)$! This results in a reasonable compensation where we can adjust $\alpha$ to minimize mean squared error from a flat response, with the effectiveness of the result based on our overall occupied bandwidth (the wider the percentage of the sampled bandwidth that we use, the more deviation from ideal will result with just the three coefficient solution used). An example compensation is shown in the plot below.