3.5  Advanced: Sampling and Signal Reconstruction Revisited

Having established the fundamentals of convolution and Fourier transforms, it is possible now to sketch a proof of the sampling theorem (Theorem 1) without difficulties.

3.5.1  A proof sketch of the sampling theorem

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, it is mathematically convenient3 to adopt an impulse train

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

which allows to model the sampled signal as

xs(t) = x(t)p(t) = k=x(kT s)δ(t kTs),
(3.15)

as anticipated in Eq. (1.31).

From Eq. (3.15) and the Fourier convolution property discussed in Section 3.4.7, the Fourier transform of xs(t) is

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

where X(f) = F{x(t)} and P(f) = F{p(t)} is another impulse train, but in frequency domain. As indicated by Eq. (A.61), the impulses in P(f) are spaced by Fs = 1Ts and have area 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.11. As well-discussed in textbooks, 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. The original spectrum can then be recovered by keeping one replica and eliminating the others. This filtering procedure is assumed here to be done with an ideal lowpass filter with bandwidth BW = Fmax and gain Ts. This ideal filter will then cancel the undesired replicas of Xs(f) and recover X(f) using precisely the scaling factor Ts.

PIC

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

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) = x(t) is obtained by passing xs(t) through an ideal lowpass filter with frequency response H(f) having gain Ts over the passband.

The spectrum X^(f) of x^(t) corresponds to X^(f) = Xs(f)H(f). The multiplication of Xs(f) by H(f) in frequency-domain corresponds to the convolution of xs(t) with the filter’s impulse response h(t) = F{H(f)}. From Eq. (A.54) and the duality property, h(t) = sinc(tTs) in this case. Hence, this convolution is written as

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

which corresponds to the convolution of the scaled sinc h(t) with impulses4 of area xsa(nTs). The time shift by n in Eq. (3.17) positions the sincs at nTs, and was discussed in Example 1.5.

Eq. (3.17) represents the reconstruction of a band-limited signal by the sinc interpolation of its samples and is called the Whittaker-Shannon interpolation formula.

Hence, 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.69)):

x(t)(Pc) sampling xs(t)(Ps) SD x[n](Pd) DS xs(t)(Ps) h(t) x^(t)(Pc) = x(t)
(3.18)

where h(t) = sinc(tTs) is the discussed ideal filter.

Using the notation suggested by Block (3.18), the samples x(nTs) were converted to areas xsa(nTs), which are converted to x[n] = xsa(nTs). Hence, Eq. (3.17) can be conveniently rewritten as

x^(t) = xs(t)h(t) = D/S{x[n]}h(t) = n=x[n]sinc ( t Ts n).
(3.19)

3.5.2  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. (A.121), 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 transformations5 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/D conversion, normalized by the associated Ts, i. e.

Ps=defPd Ts .
(3.20)

For example, the pulse train of Eq. (3.14) 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.14) 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. (A.52).

3.5.3  Energy / power conservation after sampling and reconstruction

With the help of Eq. (3.19), it is possible to sketch a proof for Eq. (1.71), which is valid when the sampling theorem is obeyed.

Eq. (3.19) 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.28), 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.21)

where Ed is the energy of x[n]. A similar reasoning can be applied to power signals. Rewriting Eq. (1.23) 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.22)

From Eq. (3.22) and Eq. (3.20), Block (3.18) can be simplified as

x(t)(P) sampling xs(t)(PTs) SD x[n](P) DS xs(t)(PTs) h(t) x^(t)(P) = x(t),
(3.23)

where P = Pc = Pd.

3.5.4  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 as in Figure 3.11 and, in this case, Fmax is the “maximum” but X(Fmax) = 0 such that Fs 2Fmax “works”. However, as the exercise of Eq. (1.33) 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.33), there is no major practical issue.

3.5.5  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.12. 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.12: 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.13.

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

PIC

Figure 3.13: Result of sampling X(f) in Figure 3.12 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.6

3.5.6  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.14 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.14 adopts Fs = 450 Hz.

PIC

Figure 3.14: 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.7.2.0). But Figure 3.14 (and Figure 3.11) 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.5.7  Signal reconstruction and D/S conversion revisited

Similar to sampling, the D/S conversion can now be better understood. After that, the important topic of signal reconstruction is discussed.

D/S conversion revisited

When a discrete-time signal x[n] with DTFT X(ejΩ) is converted into a sampled signal xs(t) with Fourier transform Xs(ω) via a D/S conversion, as discussed in Section 1.7.6, it has a frequency-domain description given by

Xs(ω) = X(ejΩ)| Ω=ωTs = X(eTs ).
(3.24)

In other words, the value of Xs(ω0) for a specific frequency ω0 rad/s is obtained from X(ejΩ0) where Ω0 = ω0Ts rad, as dictated by Eq. (1.36).

The notation is such that the subscript in Xs(ω) indicates the Fourier transform of a “sampled” signal or, alternatively, X(eTs) can be used. In both cases, the reader should have in mind that a sampled signal has a periodic spectrum.

Eq. (3.24) corresponds to scaling the abscissa of X(ejΩ), originally specified in rad, to create X(eTs) with an abscissa ω = ΩFs in rad/s. Figure 3.15 provides an example of the spectra involved in this D/S conversion.

PIC

Figure 3.15: Result of converting x[n] with spectrum X(ejΩ) into xs(t) with Xs(ω) = X(eTs) via a D/S conversion using Fs = 10 Hz.

The datatips in Figure 3.15 highlight that the value |X(ejΩ0)| = 18.86 at Ω0 = 1.571 rad was converted to |X(ω0)| where ω0 = Ω0Fs = 15.71 rad/s.

The replicas that occur in the spectrum of a sampled signal are located in Nyquist zones, which are intervals of Fs2 when the frequency f is specified in Hertz. For example, the first Nyquist zone is [0,Fs2[, the second is [Fs2,Fs[ and so on. When the frequencies ω and Ω are specified in rad/s and rad, the bandwidths of the Nyquist zones are πFs and π, respectively.

In summary, Xs(ω) inherits the periodicity of X(ejΩ) in spite of the notation indicating it only by the subscript s of “sampled”. Therefore, in some situations, it is convenient to denote the spectrum of xs(t) as X(eTs), which indicates that the independent variable ω is in rad/s and makes explicit that this spectrum is periodic. An alternative to describing the sampled-signal spectrum X(eTs) in rad/s is to use ω = 2πf and represent X(ej2πfTs) in Hz.

The adoption of a filter to eliminate or attenuate the periodic replicas of a sampled signal X(eTs) is discussed in the sequel.

Signal reconstruction

Digital signal processing systems that interface with the analog world typically require two analog filters: the anti-aliasing and reconstruction, as indicated in Figure 3.30.

The reconstruction process, which converts a sampled signal xs(t) into a continuous-time signal x(t), is mathematically modeled by convolving xs(t) with a signal h(t) to obtain x(t) = xs(t)h(t). As discussed along the text, the signal h(t) can be interpreted as the impulse response of a system and the reconstruction process can be pictorially depicted as:

xs(t)  h(t) x(t).
(3.25)

When one starts with the discrete-time signal x[n], the D/A process has two stages: D/S conversion, that transforms the discrete-time x[n] into a continuous sampled signal xs(t) and then processing (or “filtering”) with h(t) to obtain x(t).

There are two important options for h(t):

As illustrated in Figure 1.35, D/S followed by zero-order hold reconstruction is a simplified model for the actual process executed by a DAC chip. It is adopted here for simplicity. A consequence of ZOH is that Eq. (1.71) holds, and the power in continuous Pc of x(t) and discrete-time Pd of x[n] are the same.

In practice, the reconstruction process heavily depends on the respective analog filter and the DAC sampling frequency Fs. It is often necessary to use Fs higher than the one suggested by the sampling theorem, to simplify the job that must be done by the reconstruction filter H(f) = F{h(t)}.

For a signal with approximate bandwidth BW, it is tempting to use Fs = 2BW, which is denoted as Nyquist sampling. In this case the signal is called critically-sampled and the reconstruction should be done by an ideal lowpass filter with passband from 0 to Fs2. Even when Fs > 2BW, the transition band of the reconstruction filter should be small enough to significantly attenuate the neighboring spectrum replicas of the sampled signal at the output of the D/S conversion.

Recall that the spectrum replicas of X(eTs) are located at multiples of 2πFs rad/s (see, e. g., Figure 3.15), which correspond to replicas at multiples of Fs when considering X(ej2πfTs) with the frequency f in Hz.

Figure 3.16 presents an extended version of Figure 1.36 that incorporates the filters A(s) and R(s) (these two analog filters are also indicated in Figure 3.30). While Figure 1.36 assumed ZOH reconstruction, Figure 3.16 illustrates the general case of an arbitrary reconstruction filter h(t).

PIC

Figure 3.16: Extended version of Figure 1.36 using an arbitrary reconstruction filter h(t) and incorporating the filters A(s) and R(s).

Note that there are two reconstruction filters in Figure 1.36, represented by h(t) and R(s). Their effect could be combined in only one filter with impulse response hr(t) = h(t)r(t), where r(t) is the inverse Laplace transform of R(s), but it is often pedagogical to distinguish them as follows.

The internal filter h(t) represents the filtering process that occurs within a DAC chip. Modern DACs can already incorporate a sophisticated h(t), but is is assumed here that this is not the case, and h(t) may implement ZOH or a filter with small order. The “external” reconstruction filter R(s) complements h(t) 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 h(t) 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.

Example 3.6. Examples of signal reconstruction. Figure 3.17 is the result of an example7 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 h(t) and R(s) in Figure 3.16.

The top plot in Figure 3.17 shows the magnitude of the DTFT Y (e2πTsf) of ys(t) = D/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.17: 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.18 was obtained under the same conditions used for Figure 3.17 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.18: Same as Figure 3.17, 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.18, 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.17, in which the reconstruction seems adequate, the Nyquist frequency Fs2 is four times the signal BW.   

Combined digital filtering and D/S steps

When a digital filter Hz(z) (subindices will be used here to avoid confusion and disambiguate H(z) and H(s)) is part of an analog signal processing scheme such as the one depicted in Figure 3.16, it is sometimes useful to combine the roles of Hz(z) and D/S into one “analog” filter with frequency response Hz(eTs). This can be interpreted as a simple abscissa scaling in graphs such as Figure 3.15. Another view is that, while Eq. (3.24) refers to a sampled signal, a corresponding version of an equivalent (analog) “system” is

Hs(ω) = Hz(ejΩ)| Ω=ωTs = Hz(eTs ).
(3.26)