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 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, it is mathematically convenient3 to adopt an impulse train
| (3.14) |
which allows to model the sampled signal as
| (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 is
| (3.16) |
where and is another impulse train, but in frequency domain. As indicated by Eq. (A.61), the impulses in are spaced by and have area .
The convolution of with the impulses in creates infinite replicas of at frequencies values that are multiples of as depicted in Figure 3.11. As well-discussed in textbooks, if is not sufficiently large, these replicas will overlap and create aliasing. But in case , all replicas are “perfect” copies of scaled by . 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 and gain . This ideal filter will then cancel the undesired replicas of and recover using precisely the scaling factor .
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 is obtained by passing through an ideal lowpass filter with frequency response having gain over the passband.
The spectrum of corresponds to . The multiplication of by in frequency-domain corresponds to the convolution of with the filter’s impulse response . From Eq. (A.54) and the duality property, in this case. Hence, this convolution is written as
| (3.17) |
which corresponds to the convolution of the scaled sinc with impulses4 of area . The time shift by in Eq. (3.17) positions the sincs at , 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)):
| (3.18) |
where is the discussed ideal filter.
Using the notation suggested by Block (3.18), the samples were converted to areas , which are converted to . Hence, Eq. (3.17) can be conveniently rewritten as
| (3.19) |
3.5.2 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. (A.121), 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 transformations5 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/D conversion, normalized by the associated , i. e.
| (3.20) |
For example, the pulse train of Eq. (3.14) 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.14) 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. (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 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.28), its energy can be written as
| (3.21) |
where is the energy of . A similar reasoning can be applied to power signals. Rewriting Eq. (1.23) with leads to
From Eq. (3.22) and Eq. (3.20), Block (3.18) can be simplified as
| (3.23) |
where .
3.5.4 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 as in Figure 3.11 and, in this case, is the “maximum” but such that “works”. However, as the exercise of Eq. (1.33) 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.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 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.12. 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.13.
Assuming is real and has Hermitian symmetry, any of the two “replicas” in Figure 3.12 could be used to reconstruct . Similarly, any of the six (among the infinite) replicas that are shown in Figure 3.13 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.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 .
Figure 3.14 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.14 adopts Hz.
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 .
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 with DTFT is converted into a sampled signal with Fourier transform via a D/S conversion, as discussed in Section 1.7.6, it has a frequency-domain description given by
| (3.24) |
In other words, the value of for a specific frequency rad/s is obtained from where rad, as dictated by Eq. (1.36).
The notation is such that the subscript in indicates the Fourier transform of a “sampled” signal or, alternatively, 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 , originally specified in rad, to create with an abscissa in rad/s. Figure 3.15 provides an example of the spectra involved in this D/S conversion.
The datatips in Figure 3.15 highlight that the value at rad was converted to where rad/s.
The replicas that occur in the spectrum of a sampled signal are located in Nyquist zones, which are intervals of when the frequency is specified in Hertz. For example, the first Nyquist zone is , the second is and so on. When the frequencies and are specified in rad/s and rad, the bandwidths of the Nyquist zones are and , respectively.
In summary, inherits the periodicity of in spite of the notation indicating it only by the subscript of “sampled”. Therefore, in some situations, it is convenient to denote the spectrum of as , 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 in rad/s is to use and represent in Hz.
The adoption of a filter to eliminate or attenuate the periodic replicas of a sampled signal 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 into a continuous-time signal , is mathematically modeled by convolving with a signal to obtain . As discussed along the text, the signal can be interpreted as the impulse response of a system and the reconstruction process can be pictorially depicted as:
| (3.25) |
When one starts with the discrete-time signal , the D/A process has two stages: D/S conversion, that transforms the discrete-time into a continuous sampled signal and then processing (or “filtering”) with to obtain .
There are two important options for :
- Zero-order hold reconstruction: where is a pulse with duration and amplitude 1
- Unitary energy reconstruction: where has unitary energy as, for example, the normalized pulse
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 of and discrete-time of are the same.
In practice, the reconstruction process heavily depends on the respective analog filter and the DAC sampling frequency . It is often necessary to use higher than the one suggested by the sampling theorem, to simplify the job that must be done by the reconstruction filter .
For a signal with approximate bandwidth BW, it is tempting to use , 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 . Even when , 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 are located at multiples of rad/s (see, e. g., Figure 3.15), which correspond to replicas at multiples of when considering with the frequency in Hz.
Figure 3.16 presents an extended version of Figure 1.36 that incorporates the filters and (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 .
Note that there are two reconstruction filters in Figure 1.36, represented by and . Their effect could be combined in only one filter with impulse response , where is the inverse Laplace transform of , but it is often pedagogical to distinguish them as follows.
The internal filter represents the filtering process that occurs within a DAC chip. Modern DACs can already incorporate a sophisticated , but is is assumed here that this is not the case, and may implement ZOH or a filter with small order. The “external” reconstruction filter complements and provides improved rejection of the undesired spectrum replicas of that may still be present in . In summary, the main role of 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.
Example 3.6. Examples of signal reconstruction. Figure 3.17 is the result of an example7 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 and in Figure 3.16.
The top plot in Figure 3.17 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.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 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.18, 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.17, in which the reconstruction seems adequate, the Nyquist frequency is four times the signal BW.
Combined digital filtering and D/S steps
When a digital filter (subindices will be used here to avoid confusion and disambiguate and ) 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 and D/S into one “analog” filter with frequency response . 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
| (3.26) |