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 x(t) at each Ts seconds (periodic and uniform sampling) can be modeled as the multiplication of x(t) by a periodic function p(t) with fundamental period Ts. For example, p(t) can be a train of pulses with duty cycle T1. However, instead of using pulses or other alternatives, it is mathematically convenient19 to adopt an impulse train

p(t) = k=δ(t kT s),
(3.52)

which allows to model the sampled signal as

xs(t) = x(t)p(t) = k=x(kT s)δ(t kTs),
(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 xs(t) is

Xs(f) = X(f)P(f),
(3.54)

where X(f) = F{x(t)} and P(f) = F{p(t)} is another impulse train, but in frequency domain. As indicated by Eq. (B.22), the impulses in P(f) are spaced by Fs = 1Ts and have an area equals to Fs = 1Ts.

The convolution of X(f) with the impulses in P(f) creates infinite replicas of X(f) at frequencies values that are multiples of Fs as depicted in Figure 3.28. If Fs is not sufficiently large, these replicas will overlap and create aliasing. But in case Fs > 2Fmax, all replicas are “perfect” copies of X(f) scaled by Ts.

PIC

Figure 3.28: Spectrum Xs(f) of a sampled signal xs(t) obtained by the convolution between X(f) and P(f) as indicated in Eq. (3.54).

An alternative view of the sampling process is illustrated in Figure 3.29, which also incorporates the A/DT process.

PIC

Figure 3.29: Spectra X(f), Xs(f) and X(ejΩ) corresponding to the respective time-domain signals x(t), xs(t) and x[n] observed in a A/DT (analog to discrete-time) conversion.

Figure 3.29 emphasizes that both xs(t) and x[n] have periodic spectra, represented by Xs(f) and X(ejΩ), respectively. The fundamental equation Eq. (1.35) provides the mapping between Fmax in Xs(f) and Ωmax = 2πFmaxTs in X(ejΩ).

3.6.2  Signal reconstruction as convolution in time-domain

The reconstruction process, which converts a sampled signal xs(t) into a continuous-time signal x(t), was discussed in Section 1.7.7. Now, we are capable of mathematically modeling this process as the convolution of xs(t) with a signal h(t) to obtain x(t) = xs(t)h(t). The signal h(t) is the impulse response of the reconstruction (or interpolation) filter, and the reconstruction process can be pictorially depicted as:

xs(t)  h(t) x(t).
(3.55)

When one starts with the discrete-time signal x[n], the process has two stages: DT/S conversion, that transforms the discrete-time x[n] into a continuous sampled signal xs(t) and then processed by the reconstruction filter to obtain x(t), as indicated below:

x[n]  DT/S xs(t)  h(t) x(t).
(3.56)

Figure 3.30 illustrates the ideal reconstruction process, where the original signal x(t) is recovered by a proper reconstruction stage.

PIC

Figure 3.30: Spectra X(ejΩ), Xs(f) and X(f) corresponding to the respective time-domain signals x[n], xs(t) and x(t) observed in a DT/A (discrete-time to analog) conversion and ideal reconstruction.

There are many options for the impulse response h(t) of the reconstruction filter, and the following two important options were discussed in Section 1.7.7:

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 X(s) can be recovered by a reconstruction filter that operates at Xs(f) 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 BW = Fs2 and gain Ts, 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 Xs(f) and recover X(f) using precisely the scaling factor Ts imposed by the spectrum of the pulse train P(f) in Eq. (3.54).

PIC

Figure 3.31: Ideal reconstruction filter.

In summary, a lowpass signal x(t) with maximum frequency Fmax, can be perfectly reconstructed from its sampled version xs(t) if the sampling frequency obeys Fs > 2Fmax (Theorem 1) and the reconstructed signal x(t) in Figure 3.31 is obtained by passing xs(t) through an ideal lowpass filter with frequency response H(f) having gain Ts over the passband.

From Eq. (B.14) and the duality property, the impulse response of this ideal lowpass filter in Figure 3.31 is

h(t) = F1{H(f)} = sinc(tT s).

This multiplication of Xs(f) by H(f) in frequency-domain to obtain X(f) = Xs(f)H(f), corresponds to the convolution of xs(t) with the reconstruction filter’s impulse response h(t) = sinc(tTs). Hence, this convolution is written as

x(t) = xs(t)h(t) = n=x sa(nT s)sinc ( t Ts n),
(3.57)

which corresponds to the convolution of sinc(tTs) with impulses20 of area xsa(nTs). The time shift by n in Eq. (3.57) positions the sincs at nTs, 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 x(nTs) were converted to areas xsa(nTs), which are converted to x[n] = xsa(nTs). Hence, Eq. (3.57) can be conveniently rewritten as

x(t) = xs(t)h(t) = DT/S{x[n]}h(t) = n=x[n]sinc ( t Ts n).
(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 Fs > 2Fmax of the sampling theorem can be obtained by the following reasoning:

f 1.
Figure 3.29 shows that replicas of the original spectrum X(f) are repeated with period Fs.
f 2.
To avoid overlapping replicas, X(f) must be band-limited. Therefore, we assume that |X(f)| = 0 when |f| > Fmax .
f 3.
Observing Xs(f) in Figure 3.29, in the range f [0,Fs], one must guarantee: a) an interval of Fmax  Hz to the replica centered in f = 0, and b) another interval of Fmax  Hz (from Fs Fmax to Fs) to accommodate the range originally corresponding to negative frequencies of X(s) due to its replica centered in f = Fs.
f 4.
Hence, twice the interval Fmax must be accomodated within the range [0,Fs], which demands that Fs > 2Fmax to avoid overlapping replicas.

The condition Fs > 2Fmax 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 x(t) 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 Fs 2Fmax, but in this case Fmax would have to be interpreted as the frequency for which X(f) does not have a discrete frequency component δ(f Fmax). The confusion often arises when textbooks pictorially represent X(f) with a triangle shape (in contrast, a pulse is used in Figure 3.28) and, in this case, Fmax is the “maximum” but X(Fmax) = 0 such that Fs 2Fmax “works”. However, as the exercise of Eq. (1.34) suggests, it is not guaranteed to reconstruct a cosine of frequency fc if one takes its samples at rate Fs = 2fc.

Another source of confusion with respect to Fs 2Fmax or Fs > 2Fmax is that when processing a signal sampled at Fs with an FFT, the maximum frequency is the so-called Nyquist frequency Fs2 of Table 1.5. Taking that Fmax = Fs2, it seems reasonable to adopt Fs 2Fmax. Note however that the FFT bin corresponding to the Nyquist frequency is representing all signal components within its width Δf and that, unless X(f) has a discrete frequency component δ(f Fmax) 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 x(t) in an operation known as undersampling or passband sampling. Among other conditions, x(t) has to be a passband signal with spectrum centered at (a relatively high) frequency fc, but with (a relatively small) bandwidth BW < fc, such that Fs > 2BW. In this case, even if Fs < 2fmax, where the maximum frequency is fmax = fc + 0.5BW, x(t) can still be reconstructed from a replica of its spectrum that was shifted in frequency.

For example, consider a passband signal x(t) with spectrum X(f) with BW = 25 Hz and center frequency fc = 70 Hz, as depicted in Figure 3.32. This signal has fmax = fc + 0.5BW = 82.5 Hz and using the sampling theorem as applied to lowpass signals one would be compeled to use Fs > 2 × 82.5 = 165 Hz. However, using Fs = 56 Hz, for example, one can still recover the signal.

PIC

Figure 3.32: Passband signal with BW = 25 Hz and center frequency fc = 70 Hz.

According to the classic model for the sampling operation, it corresponds to the convolution of X(f) with an impulse train P(f) such that Xd(f) = X(f)P(f) and P(f) has impulses separated by Fs = 56. Hence, the sampled signal has spectrum Xd(f) as depicted in Figure 3.33.

Assuming x(t) is real and X(f) has Hermitian symmetry, any of the two “replicas” in Figure 3.32 could be used to reconstruct x(t). Similarly, any of the six (among the infinite) replicas that are shown in Figure 3.33 could be used to reconstruct x(t).

PIC

Figure 3.33: Result of sampling X(f) in Figure 3.32 with Fs = 56 Hz, which places replicas at f = ±14,±42,±,70,±98,, with only the first six shown in this figure.

For example, placing an ideal lowpass filter with cutoff frequency Fs2 would obtain a version of x(t) corresponding to a frequency downconversion of its spectrum X(f) from 70 to 14 Hz.

The theory about undersampling indicates the range of Fs 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 Fs.

Figure 3.34 suggests an example where a complex-valued signal has spectrum X(f) with support from 300 to 100 Hz. A careless interpretation of the sampling theorem could lead to the erroneous conclusion that Fs > 2 × 100 Hz suffices to avoid aliasing. But in this case Fs > 400 Hz is required to avoid the overlap of spectrum replicas. Figure 3.34 adopts Fs = 450 Hz.

PIC

Figure 3.34: Sampling with Fs = 450 Hz a complex-valued signal with non-symmetrical spectrum.

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 Fs.

3.6.6  DSP in practice: analog anti-aliasing and reconstruction filters

The impulse response h(t) of a reconstruction filter can be selected according to the intended application. In analytical derivations, it is often convenient to normalize h(t) 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

h(t) = 1 Ts [u(t) u(t Ts)]

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 |X(f)| = 0 for |f| > Fmax . This imposes requirements not only on the reconstruction filter to attenuate the periodic replicas of a sampled signal X(eTs), but also demand an efficient anti-aliasing filter to constrain the bandwidth of the input signal x(t). 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 Fs2, 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 A(s) and R(s) (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 r(t).

PIC

Figure 3.35: Extended version of Figure 1.42 using a DAC with a ZOH reconstruction filter and incorporating the filters A(s) and R(s). Quantization is not considered here.

In Figure 3.35, two reconstruction filters are being used: ZOH and R(s), with impulse response z(t) and r(t), respectively. Their effect can be eventually combined in a single filter with impulse response h(t) = z(t)r(t).

Signal reconstruction with non-ideal filters

The ZOH reconstruction filter with impulse response z(t) 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 R(s) is needed.

The “external” reconstruction filter R(s) in Figure 3.35 complements the ZOH and provides improved rejection of the undesired spectrum replicas of ys(t) that may still be present in y(t). In summary, the main role of the ZOH is the conversion of the sampled signal ys(t) into an analog signal y(t), while R(s) aims at achieving the specified level of performance with respect to filtering out the replicas in ys(t). 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 y[n] with BW = 25 kHz and Fs = 200 kHz, is converted to an analog signal y(t). The reconstruction is performed by a DAC followed by a 5-th order analog filter H(f), with cutoff frequency fc = BW. This analog filter combines the effects of the ZOH filter and R(s) in Figure 3.35.

The top plot in Figure 3.36 shows the magnitude of the DTFT Y (e2πTsf) of ys(t) = DT/S{y[n]}, superimposed to the frequency response |H(f)| of the reconstruction filter. The multiples of Fs are identified in the grid of dashed lines. The bottom plot shows the magnitude of the resulting Fourier transform Y (f) = F{y(t)}.

PIC

Figure 3.36: Reconstruction of a digital signal with BW = 25 kHz and Fs = 200 kHz using an analog filter with cutoff frequency fc = 25 kHz.

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 Y (e2πTsf) that are neighbors of the one centered at f = 0. Thinking of an asymptotic Bode-diagram, one can expect the fifth-order |H(f)| to drop at 6 dB/octave per pole and, from 80 to 160 kHz, reach 5 × (6) = 30 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.

PIC

Figure 3.37: Same as Figure 3.36, but for a signal with BW = fc = 80 kHz. In this case, the reconstruction generates significant out-of-band power due to the spectrum replicas.

As illustrated by Figure 3.37, in practice, it is typically adopted a value for Fs 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 Fs2 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 R(s) in Figure 3.35 is the adoption of oversampling.

For a lowpass signal whose highest frequency component is fmax , a sampling frequency Fs that avoids aliasing obeys Fs > 2fmax . The sampling frequency Fs = 2fmax is known as the Nyquist rate, and when Fs = 2fmax , the signal is said to be critically sampled.

If the spectrum of a critically-sampled signal does not have a discrete component at fmax the spectral replicas created by sampling at Fs = 2fmax 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 Fs2.

In practice, DSP systems typically choose Fs > 2fmax 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 Fs = 4fmax 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 δ2(t) is not defined. This creates a problem when one considers the energy or power of δ(t). When δ(t) is interpreted as a pulse p(t) with unit area and amplitude 1Δ, one can argue that when lim Δ0 as in Eq. (B.42), the resulting area of the squared pulse p2(t) is 1Δ, which leads to δ2(t) = . However, this would not be mathematically rigorous given that δ(t) is a distribution. Hence, the following route is taken here: instead of defining new transformations23 on the distribution δ(t), the instantaneous power of a sampled signal xs(t) is defined as the instantaneous power of its equivalent discrete-time signal x[n] obtained via a S/DT conversion, normalized by the associated Ts, i. e.

P s =def P d Ts .
(3.59)

For example, the pulse train of Eq. (3.52) has average power Ps = 1Ts because when converted to discrete-time its power is Pd = 1.

The same reasoning can be applied to sampled signals for which the independent variable is not t. The Fourier transform P(f) = {p(t)} of Eq. (3.52) has power 1Ts because its discrete-frequency version has power 1Ts2 and the normalizing factor is 1Ts in this case. Note that, with this definition of instantaneous power of a sampled signal, the power of the impulse trains p(t) and P(f) 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)):

x(t)(Pc) sampling xs(t)(Ps) SDT x[n](Pd) DTS xs(t)(Ps) h(t) x(t)(Pc)
(3.60)

where h(t) = sinc(tTs) 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 Pc of x(t) and discrete-time Pd of x[n] 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 x(t) can be represented by its samples x[n]. The interest here is to relate their respective power values Pc and Pd. Assuming x(t) is an energy signal and from Eq. (A.25), its energy Ec can be written as

Ec =|x(t)|2dt = | n=x[n]sinc(tT s n)|2dt = T s n=|x[n]|2 = T sEd,
(3.61)

where Ed is the energy of x[n]. A similar reasoning can be applied to power signals. Rewriting Eq. (1.24) with Δt = NTs leads to

Pc = lim N [ 1 (2N + 1)TsNTsNTs | n=NNx[n]sinc(tT s n)|2dt] = lim N [ Ts (2N + 1)Ts n=NN|x[n]|2] = Pd. (3.62)

From Eq. (3.62) and Eq. (3.59), Block (3.60) can be simplified as

x(t)(P) sampling xs(t)(PTs) SDT x[n](P) DTS xs(t)(PTs) h(t) x^ (t)(P) = x(t),
(3.63)

where P = Pc = Pd.