3.6 Review of Sampling and Signal Reconstruction Using Convolution
Having established the fundamentals of convolution in this chapter and Fourier transforms in Chapter 2, it is now possible to thoroughly review two stages already introduced in Section 1.7: sampling and reconstruction. The convolution is useful in modeling both stages, which are used in the A/D and D/A processes, respectively.
3.6.1 Sampling as convolution in frequency-domain
As discussed in Chapter 1 (see, e. g. Section 1.5.2), sampling a signal at each seconds (periodic and uniform sampling) can be modeled as the multiplication of by a periodic function with fundamental period . For example, can be a train of pulses with duty cycle . However, instead of using pulses or other alternatives, it is mathematically convenient19 to adopt an impulse train
|
| (3.52) |
which allows to model the sampled signal as
|
| (3.53) |
as anticipated in Eq. (1.32).
Now we can get extra insight by observing the sampling operation in frequency-domain. In fact, from Eq. (3.53) and the Fourier convolution property discussed in Section 3.3.4, the Fourier transform of is
|
| (3.54) |
where and is another impulse train, but in frequency domain. As indicated by Eq. (B.22), the impulses in are spaced by and have an area equals to .
The convolution of with the impulses in creates infinite replicas of at frequencies values that are multiples of as depicted in Figure 3.28. If is not sufficiently large, these replicas will overlap and create aliasing. But in case , all replicas are “perfect” copies of scaled by .
An alternative view of the sampling process is illustrated in Figure 3.29, which also incorporates the A/DT process.
Figure 3.29 emphasizes that both and have periodic spectra, represented by and , respectively. The fundamental equation Eq. (1.35) provides the mapping between in and in .
3.6.2 Signal reconstruction as convolution in time-domain
The reconstruction process, which converts a sampled signal into a continuous-time signal , was discussed in Section 1.7.7. Now, we are capable of mathematically modeling this process as the convolution of with a signal to obtain . The signal is the impulse response of the reconstruction (or interpolation) filter, and the reconstruction process can be pictorially depicted as:
|
| (3.55) |
When one starts with the discrete-time signal , the process has two stages: DT/S conversion, that transforms the discrete-time into a continuous sampled signal and then processed by the reconstruction filter to obtain , as indicated below:
|
| (3.56) |
Figure 3.30 illustrates the ideal reconstruction process, where the original signal is recovered by a proper reconstruction stage.
There are many options for the impulse response of the reconstruction filter, and the following two important options were discussed in Section 1.7.7:
- Zero-order hold reconstruction: where is a pulse with duration and amplitude 1
- Sync reconstruction: where is a sinc with amplitudes equal to zero at .
The next section discusses that perfect reconstruction is obtained withe the second option: sync reconstruction.
3.6.3 Perfect reconstruction with the ideal filter (equivalent to sinc interpolation)
After sampling in a way that obeys the sampling theorem (Theorem 1), the original spectrum can be recovered by a reconstruction filter that operates at to keep one replica of the original spectrum and eliminate all others. For perfect reconstruction, this filtering procedure is done with an ideal lowpass filter of bandwidth and gain , as depicted in Figure 3.31 (which focus on the reconstruction filter of Figure 3.30). The ideal filter in Figure 3.31 will then cancel the undesired replicas of and recover using precisely the scaling factor imposed by the spectrum of the pulse train in Eq. (3.54).
In summary, a lowpass signal with maximum frequency , can be perfectly reconstructed from its sampled version if the sampling frequency obeys (Theorem 1) and the reconstructed signal in Figure 3.31 is obtained by passing through an ideal lowpass filter with frequency response having gain over the passband.
From Eq. (B.14) and the duality property, the impulse response of this ideal lowpass filter in Figure 3.31 is
This multiplication of by in frequency-domain to obtain , corresponds to the convolution of with the reconstruction filter’s impulse response . Hence, this convolution is written as
|
| (3.57) |
which corresponds to the convolution of with impulses20 of area . The time shift by in Eq. (3.57) positions the sincs at , and was discussed in Example 1.5.
Eq. (3.57) represents the reconstruction of a band-limited signal by the sinc interpolation of its samples and is called the Whittaker-Shannon interpolation formula.
Using the notation suggested by Block (3.60), the samples were converted to areas , which are converted to . Hence, Eq. (3.57) can be conveniently rewritten as
|
| (3.58) |
With this background, we can then sketch a proof of the sampling theorem (Theorem 1) in the next section.
3.6.4 A proof sketch of the sampling theorem
The inequality of the sampling theorem can be obtained by the following reasoning:
- f 1.
- Figure 3.29 shows that replicas of the original spectrum are repeated with period .
- f 2.
- To avoid overlapping replicas, must be band-limited. Therefore, we assume that when .
- f 3.
- Observing in Figure 3.29, in the range , one must guarantee: a) an interval of Hz to the replica centered in , and b) another interval of Hz (from to ) to accommodate the range originally corresponding to negative frequencies of due to its replica centered in .
- f 4.
- Hence, twice the interval must be accomodated within the range , which demands that to avoid overlapping replicas.
The condition guarantees that there are no overlapping replicas. And Figure 3.31 can be used to illustrate that, according to the sampling theorem, the original signal can be recovered via an ideal lowpass reconstruction filter. This ideal filter cannot be exactly implemented in practice, but the sampling theorem provides a theoretical result that helps the design of DSP systems that involve sampling.
The previous reasoning also facilitates observing that the sampling theorem uses a strict inequality. Some authors state this theorem as , but in this case would have to be interpreted as the frequency for which does not have a discrete frequency component . The confusion often arises when textbooks pictorially represent with a triangle shape (in contrast, a pulse is used in Figure 3.28) and, in this case, is the “maximum” but such that “works”. However, as the exercise of Eq. (1.34) suggests, it is not guaranteed to reconstruct a cosine of frequency if one takes its samples at rate .
Another source of confusion with respect to or is that when processing a signal sampled at with an FFT, the maximum frequency is the so-called Nyquist frequency of Table 1.5. Taking that , it seems reasonable to adopt . Note however that the FFT bin corresponding to the Nyquist frequency is representing all signal components within its width and that, unless has a discrete frequency component to create ambiguity as exemplified in Eq. (1.34), there is no major practical issue.
3.6.5 Advanced sampling use cases
Undersampling or passband sampling
Most digital signal processing (DSP) systems are designed to combat aliasing but there are exceptions. In digital communications, it is common to use aliasing to lower the frequency of a signal in an operation known as undersampling or passband sampling. Among other conditions, has to be a passband signal with spectrum centered at (a relatively high) frequency , but with (a relatively small) bandwidth , such that . In this case, even if , where the maximum frequency is , can still be reconstructed from a replica of its spectrum that was shifted in frequency.
For example, consider a passband signal with spectrum with Hz and center frequency Hz, as depicted in Figure 3.32. This signal has Hz and using the sampling theorem as applied to lowpass signals one would be compeled to use Hz. However, using Hz, for example, one can still recover the signal.
According to the classic model for the sampling operation, it corresponds to the convolution of with an impulse train such that and has impulses separated by . Hence, the sampled signal has spectrum as depicted in Figure 3.33.
Assuming is real and has Hermitian symmetry, any of the two “replicas” in Figure 3.32 could be used to reconstruct . Similarly, any of the six (among the infinite) replicas that are shown in Figure 3.33 could be used to reconstruct .
For example, placing an ideal lowpass filter with cutoff frequency would obtain a version of corresponding to a frequency downconversion of its spectrum from 70 to 14 Hz.
The theory about undersampling indicates the range of that can be used in each situation and can be found in DSP textbooks.21
Sampling a complex-valued signal
The sampling theorem (Theorem 1) assumed a real-valued signal, which consequently, allowed to assume the spectrum magnitude is even (symmetric). In the more general case of a complex-valued signal, the same principle of having spectrum replicas that cannot overlap is valid, but the “maximum positive frequency” is not enough to determine the minimum .
Figure 3.34 suggests an example where a complex-valued signal has spectrum with support from to 100 Hz. A careless interpretation of the sampling theorem could lead to the erroneous conclusion that Hz suffices to avoid aliasing. But in this case Hz is required to avoid the overlap of spectrum replicas. Figure 3.34 adopts Hz.
Stating the sampling theorem for complex-valued signals requires more elaborated definitions of bandwidth (this is discussed in Section 3.4.6.0). But Figure 3.34 (and Figure 3.28) indicate that an efficient strategy is to follow the basic principle of avoiding aliasing after convolving the original spectrum with the train of impulses spaced by .
3.6.6 DSP in practice: analog anti-aliasing and reconstruction filters
The impulse response of a reconstruction filter can be selected according to the intended application. In analytical derivations, it is often convenient to normalize to have unit energy, which avoids introducing an additional scaling factor when relating the power of the discrete-time sequence to that of the reconstructed continuous-time signal. For example, the pulse
has unit energy and therefore preserves this normalization. In practical DSP implementations, the signals are not perfectly band-limited as in, e. g., Figure 3.29 in which for . This imposes requirements not only on the reconstruction filter to attenuate the periodic replicas of a sampled signal , but also demand an efficient anti-aliasing filter to constrain the bandwidth of the input signal . These requirements are discussed in this section.
Practical DSP systems typically employ two analog filters: an anti-aliasing filter before the ADC and a reconstruction filter after the DAC. The anti-aliasing filter attenuates frequency components above the Nyquist frequency , reducing the distortion caused by spectral aliasing during sampling. On the output side, many DACs perform reconstruction internally using a simple ZOH, whose frequency response is often insufficient to suppress the spectral replicas generated by the D/A conversion process. Consequently, an analog reconstruction filter is commonly placed after the DAC to attenuate these undesired images. Rather than focusing on idealized textbook models, this section discusses the practical role of these two filters.
Figure 3.35 presents the extended version of Figure 1.42 that incorporates the filters and (these two analog filters are also indicated in Figure 3.22). Figure 3.35 assumes ZOH reconstruction is internally executed by the DAC chip, while the external reconstruction filter has an arbitrary impulse response .
In Figure 3.35, two reconstruction filters are being used: ZOH and , with impulse response and , respectively. Their effect can be eventually combined in a single filter with impulse response .
Signal reconstruction with non-ideal filters
The ZOH reconstruction filter with impulse response in Figure 3.35 represents the filtering process that occurs within a DAC chip. Modern DACs can already incorporate a sophisticated reconstruction filter, but is is assumed hereafter that this is not the case, and is needed.
The “external” reconstruction filter in Figure 3.35 complements the ZOH and provides improved rejection of the undesired spectrum replicas of that may still be present in . In summary, the main role of the ZOH is the conversion of the sampled signal into an analog signal , while aims at achieving the specified level of performance with respect to filtering out the replicas in . The following example illustrates how signal reconstruction can be challenging in practice, with non-ideal filters.
Example 3.25. Examples of signal reconstruction. Figure 3.36 is the result of an example22 where a random signal with kHz and kHz, is converted to an analog signal . The reconstruction is performed by a DAC followed by a 5-th order analog filter , with cutoff frequency . This analog filter combines the effects of the ZOH filter and in Figure 3.35.
The top plot in Figure 3.36 shows the magnitude of the DTFT of , superimposed to the frequency response of the reconstruction filter. The multiples of are identified in the grid of dashed lines. The bottom plot shows the magnitude of the resulting Fourier transform .
Figure 3.37 was obtained under the same conditions used for Figure 3.36 but the signal bandwidth increased from 25 to 80 kHz. In this case, the filter did not significantly attenuate the two spectrum replicas in that are neighbors of the one centered at . Thinking of an asymptotic Bode-diagram, one can expect the fifth-order to drop at 6 dB/octave per pole and, from 80 to 160 kHz, reach dB. The replica centered at 200 kHz, for example, has its band starting at 120 kHz, and the reconstruction filter has an attenuation of only (approximately) 20 dB at 120 kHz.
As illustrated by Figure 3.37, in practice, it is typically adopted a value for large enough due to the non-ideal reconstruction filter. In the example corresponding to Figure 3.36, in which the reconstruction seems adequate, the Nyquist frequency is four times the signal BW.
Oversampled versus critically-sampled signals
As suggested by Figure 3.37, a practical remedy to simplify the design of the reconstruction filter in Figure 3.35 is the adoption of oversampling.
For a lowpass signal whose highest frequency component is , a sampling frequency that avoids aliasing obeys . The sampling frequency is known as the Nyquist rate, and when , the signal is said to be critically sampled.
If the spectrum of a critically-sampled signal does not have a discrete component at the spectral replicas created by sampling at are adjacent but do not overlap, leaving no transition band for a practical reconstruction filter. Consequently, perfect reconstruction in this case requires an ideal lowpass filter with cutoff frequency .
In practice, DSP systems typically choose rather than sampling at the Nyquist rate. The resulting guard band between adjacent spectral replicas simplifies the design of the reconstruction filter by allowing a finite transition band. For instance, selecting doubles the Nyquist rate and provides substantial separation between the baseband spectrum and its replicas.
The following sections discuss issues related to energy and power of signals along the stages of sampling and reconstruction.
3.6.7 Advanced: Energy and power of a sampled signal
The squared of the continuous-time impulse is not defined. This creates a problem when one considers the energy or power of . When is interpreted as a pulse with unit area and amplitude , one can argue that when as in Eq. (B.42), the resulting area of the squared pulse is , which leads to . However, this would not be mathematically rigorous given that is a distribution. Hence, the following route is taken here: instead of defining new transformations23 on the distribution , the instantaneous power of a sampled signal is defined as the instantaneous power of its equivalent discrete-time signal obtained via a S/DT conversion, normalized by the associated , i. e.
|
| (3.59) |
For example, the pulse train of Eq. (3.52) has average power because when converted to discrete-time its power is .
The same reasoning can be applied to sampled signals for which the independent variable is not . The Fourier transform of Eq. (3.52) has power because its discrete-frequency version has power and the normalizing factor is in this case. Note that, with this definition of instantaneous power of a sampled signal, the power of the impulse trains and are the same, as expected from Eq. (B.12).
3.6.8 Advanced: Energy / power conservation after sampling and reconstruction
When the sampling theorem is obeyed, the whole chain is as follows (the signals are depicted with their associated power in parenthesis as in Block (1.75)):
|
| (3.60) |
where is the impulse response of the ideal filter depicted in Figure 3.31.
As illustrated in Figure 1.41, DT/S followed by zero-order hold reconstruction is a simplified model for the actual process executed by a DAC chip. A consequence of ZOH is that Eq. (1.77) holds, and the power in continuous of and discrete-time of are the same.
With the help of Eq. (3.58), it is possible to sketch a proof for Eq. (1.77), which is valid when the sampling theorem is obeyed.
Eq. (3.58) states that any band-limited signal can be represented by its samples . The interest here is to relate their respective power values and . Assuming is an energy signal and from Eq. (A.25), its energy can be written as
|
| (3.61) |
where is the energy of . A similar reasoning can be applied to power signals. Rewriting Eq. (1.24) with leads to
From Eq. (3.62) and Eq. (3.59), Block (3.60) can be simplified as
|
| (3.63) |
where .