Sampling of Continuous-Time Signals PDF
Document Details
Uploaded by NavigableNihonium
University of Tehran
Tags
Related
Summary
This document discusses sampling of continuous-time signals, including periodic sampling, and its representation in the frequency domain. It covers the concept of continuous-to-discrete-time (C/D) conversion and its mathematical representation using impulse train modulation. The text also touches on the frequency-domain relationship between the input and output of an ideal C/D converter.
Full Transcript
4 Sampling of Continuous-Time Signals 4.0 INTRODUCTION Discrete-time signals can arise in many ways, but they occur most commonly as repre- sentations of sampled continuous-time signals. While sampling wil...
4 Sampling of Continuous-Time Signals 4.0 INTRODUCTION Discrete-time signals can arise in many ways, but they occur most commonly as repre- sentations of sampled continuous-time signals. While sampling will no doubt be familiar to many readers, we shall review many of the basic issues such as the phenomenon of aliasing and the important fact that continuous-time signal processing can be imple- mented through a process of sampling, discrete-time processing, and reconstruction of a continuous-time signal. After a thorough discussion of these basic issues, we dis- cuss multirate signal processing, A/D conversion, and the use of oversampling in A/D conversion. 4.1 PERIODIC SAMPLING Discrete representations of signals can take many forms including basis expansions of various types, parametric models for signal modeling (Chapter 11), and nonuniform sampling (see for example Yen (1956), Yao and Thomas (1967) and Eldar and Oppen- heim (2000)). Such representations are often based on prior knowledge of properties of the signal that can be exploited to obtain more efficient representations. However, even these alternative representations generally begin with a discrete-time representa- tion of a continuous-time signal obtained through periodic sampling; i.e., a sequence of samples, x[n], is obtained from a continuous-time signal xc (t) according to the relation x[n] = xc (nT ), −∞ < n < ∞. (4.1) 153 154 Chapter 4 Sampling of Continuous-Time Signals C/D Figure 4.1 Block diagram xc (t) x [n] = xc (nT ) representation of an ideal continuous-to-discrete-time (C/D) T converter. In Eq. (4.1), T is the sampling period, and its reciprocal, fs = 1/T , is the sampling frequency, in samples per second. We also express the sampling frequency as s = 2π/T when we want to use frequencies in radians per second. Since sampling representations rely only on the assumption of a bandlimited Fourier transform, they are applicable to a wide class of signals that arise in many practical applications. We refer to a system that implements the operation of Eq. (4.1) as an ideal continuous-to-discrete-time (C/D) converter, and we depict it in block diagram form as indicated in Figure 4.1. As an example of the relationship between xc (t) and x[n], in Figure 2.2 we illustrated a continuous-time speech waveform and the corresponding sequence of samples. In a practical setting, the operation of sampling is implemented by an analog-to- digital (A/D) converter. Such systems can be viewed as approximations to the ideal C/D converter. In addition to sampling rate, which is sufficient to define the ideal C/D con- verter, important considerations in the implementation or choice of an A/D converter include quantization of the output samples, linearity of quantization steps, the need for sample-and-hold circuits, and limitations on the sampling rate. The effects of quantiza- tion are discussed in Sections 4.8.2 and 4.8.3. Other practical issues of A/D conversion are electronic circuit concerns that are outside the scope of this text. The sampling operation is generally not invertible; i.e., given the output x[n], it is not possible in general to reconstruct xc (t), the input to the sampler, since many continuous-time signals can produce the same output sequence of samples. The inherent ambiguity in sampling is a fundamental issue in signal processing. However, it is possible to remove the ambiguity by restricting the frequency content of input signals that go into the sampler. It is convenient to represent the sampling process mathematically in the two stages depicted in Figure 4.2(a). The stages consist of an impulse train modulator, followed by conversion of the impulse train to a sequence. The periodic impulse train is ∞ s(t) = δ(t − nT ), (4.2) n=−∞ where δ(t) is the unit impulse function, or Dirac delta function. The product of s(t) and xc (t) is therefore xs (t) = xc (t)s(t) ∞ ∞ = xc (t) δ(t − nT ) = xc (t)δ(t − nT ). (4.3) n=−∞ n=−∞ Using the property of the continuous-time impulse function, x(t)δ(t) = x(0)δ(t), some- times called the “sifting property” of the impulse function, (see e.g., Oppenheim and Section 4.1 Periodic Sampling 155 Willsky, 1997), xs (t) can be expressed as ∞ xs (t) = xc (nT )δ(t − nT ), (4.4) n=−∞ i.e., the size (area) of the impulse at sample time nT is equal to the value of the continuous-time signal at that time. In this sense, the impulse train modulation of Eq. (4.3) is a mathematical representation of sampling. Figure 4.2(b) shows a continuous-time signal xc (t) and the results of impulse train sampling for two different sampling rates. Note that the impulses xc (nT )δ(t − nT ) are represented by arrows with length proportional to their area. Figure 4.2(c) depicts the corresponding output sequences. The essential difference between xs (t) and x[n] is that xs (t) is, in a sense, a continuous-time signal (specifically, an impulse train) that is zero, C/D converter s (t) Conversion from impulse train to discrete-time xc (t) xs (t) x [n] = xc (nT ) sequence (a) T = T1 T = 2T1 xc (t) xs (t) xc (t) xs (t)............ −4T −2T 0 2T 4T −2T −T 0 T 2T t (b) t x [n] x [n]............ −4 −3 −2 −1 0 1 2 3 4 −4 −3 −2 −1 0 1 2 3 4 n n (c) Figure 4.2 Sampling with a periodic impulse train, followed by conversion to a discrete-time sequence. (a) Overall system. (b) xs (t) for two sampling rates. (c) The output sequence for the two different sampling rates. 156 Chapter 4 Sampling of Continuous-Time Signals except at integer multiples of T. The sequence x[n], on the other hand, is indexed on the integer variable n, which, in effect, introduces a time normalization; i.e., the sequence of numbers x[n] contains no explicit information about the sampling period T. Furthermore, the samples of xc (t) are represented by finite numbers in x[n] rather than as the areas of impulses, as with xs (t). It is important to emphasize that Figure 4.2(a) is strictly a mathematical repre- sentation convenient for gaining insight into sampling in both the time domain and frequency domain. It is not a close representation of any physical circuits or systems designed to implement the sampling operation. Whether a piece of hardware can be construed to be an approximation to the block diagram of Figure 4.2(a) is a secondary issue at this point. We have introduced this representation of the sampling operation because it leads to a simple derivation of a key result and because the approach leads to a number of important insights that are difficult to obtain from a more formal derivation based on manipulation of Fourier transform formulas. 4.2 FREQUENCY-DOMAIN REPRESENTATION OF SAMPLING To derive the frequency-domain relation between the input and output of an ideal C/D converter, consider the Fourier transform of xs (t). Since, from Eq. (4.3), xs (t) is the product of xc (t) and s(t), the Fourier transform of xs (t) is the convolution of the Fourier 1 transforms X c (j ) and S(j ) scaled by 2π. The Fourier transform of the periodic impulse train s(t) is the periodic impulse train ∞ 2π S(j ) = δ( − k s ), (4.5) T k=−∞ where s = 2π/T is the sampling frequency in radians/s (see Oppenheim and Willsky, 1997 or McClellan, Schafer and Yoder, 2003). Since 1 X s (j ) = X c (j ) ∗ S(j ), 2π where ∗ denotes the operation of continuous-variable convolution, it follows that ∞ 1 X s (j ) = X c (j ( − k s )). (4.6) T k=−∞ Equation (4.6) is the desired relationship between the Fourier transforms of the input and the output of the impulse train modulator in Figure 4.2(a). Equation (4.6) states that the Fourier transform of xs (t) consists of periodically repeated copies of X c (j ), the Fourier transform of xc (t). These copies are shifted by integer multiples of the sampling frequency, and then superimposed to produce the periodic Fourier transform of the impulse train of samples. Figure 4.3 depicts the frequency-domain representation of impulse train sampling. Figure 4.3(a) represents a bandlimited Fourier transform having the property that X c (j ) = 0 for || ≥ N. Figure 4.3(b) shows the periodic impulse train S(j ), and Figure 4.3(c) shows X s (j ), the result of convolving 1 X c (j ) with S(j ) and scaling by 2π. It is evident that when s − N ≥ N , or s ≥ 2N , (4.7) Section 4.2 Frequency-Domain Representation of Sampling 157 Xc (j) 1 – N N (a) S( j ) 2 T –2s – s 0 s 2s 3s (b) Xs (j ) 1 T –2s – s – N N s 2s 3s (s – N) (c) Xs (j ) 1 T (s – N) s 2s (d) Figure 4.3 Frequency-domain representation of sampling in the time domain. (a) Spectrum of the original signal. (b) Fourier transform of the sampling function. (c) Fourier transform of the sampled signal with s > 2N. (d) Fourier transform of the sampled signal with s < 2N. as in Figure 4.3(c), the replicas of X c (j ) do not overlap, and therefore, when they are added together in Eq. (4.6), there remains (to within a scale factor of 1/T ) a replica of X c (j ) at each integer multiple of s. Consequently, xc (t) can be recovered from xs (t) with an ideal lowpass filter. This is depicted in Figure 4.4(a), which shows the impulse train modulator followed by an LTI system with frequency response H r (j ). For X c (j ) as in Figure 4.4(b), X s (j ) would be as shown in Figure 4.4(c), where it is assumed that s > 2N. Since X r (j ) = H r (j )X s (j ), (4.8) 158 Chapter 4 Sampling of Continuous-Time Signals s (t) = (t – nT ) n = – Hr (j ) xc (t) xs (t) xr (t) (a) Xc (j ) 1 –N N (b) Xs (j ) 1 s > 2N T – s – N N s (c) (s – N) Hr (j ) N c (s – N) T – c c (d) Xr (j ) 1 Figure 4.4 Exact recovery of a – N N continuous-time signal from its samples (e) using an ideal lowpass filter. it follows that if H r (j ) is an ideal lowpass filter with gain T and cutoff frequency c such that N ≤ c ≤ (s − N ), (4.9) then X r (j ) = X c (j ), (4.10) as depicted in Figure 4.4(e) and therefore xr (t) = xc (t). If the inequality of Eq. (4.7) does not hold, i.e., if s < 2N , the copies of X c (j ) overlap, so that when they are added together, X c (j ) is no longer recoverable by Section 4.2 Frequency-Domain Representation of Sampling 159 lowpass filtering. This is illustrated in Figure 4.3(d). In this case, the reconstructed output xr (t) in Figure 4.4(a) is related to the original continuous-time input through a distortion referred to as aliasing distortion, or, more simply, aliasing. Figure 4.5 illustrates aliasing in the frequency domain for the simple case of a cosine signal of the form xc (t) = cos 0 t, (4.11a) whose Fourier transform is Xc (j ) = π δ( − 0 ) + π δ( + 0 ) (4.11b) as depicted in Figure 4.5(a). Note that the impulse at −0 is dashed. It will be helpful to observe its effect in subsequent plots. Figure 4.5(b) shows the Fourier transform of xs (t) with 0 < s /2, and Figure 4.5(c) shows the Fourier transform of xs (t) with s 2 < 0 < s. Figures 4.5(d) and (e) correspond to the Fourier transform of the Xc (j ) – 0 0 (a) Xs (j) s T 0 < = T 2 T T – s – 0 0 s s 2 (b) Xs (j) s T < 0 < s 2 T T – s –0 s 0 s 2 (c) No aliasing X r ( j) 0 < T – 0 0 (d) Aliasing Xr (j) s < 0 < s 2 – (s – 0) (s – 0) Figure 4.5 The effect of aliasing in the (e) sampling of a cosine signal. 160 Chapter 4 Sampling of Continuous-Time Signals lowpass filter output for 0 < s /2 = π/T and s /2 < 0 < s , respectively, with c = s /2. Figures 4.5(c) and (e) correspond to the case of aliasing. With no aliasing [Figures 4.5(b) and (d)], the reconstructed output is xr (t) = cos 0 t. (4.12) With aliasing, the reconstructed output is xr (t) = cos(s − 0 )t; (4.13) i.e., the higher frequency signal cos 0 t has taken on the identity (alias) of the lower frequency signal cos(s − 0 )t as a consequence of the sampling and reconstruction. This discussion is the basis for the Nyquist sampling theorem (Nyquist 1928; Shannon, 1949), stated as follows. Nyquist-Shannon Sampling Theorem: Let xc (t) be a bandlimited signal with X c (j ) = 0 for || ≥ N. (4.14a) Then xc (t) is uniquely determined by its samples x[n] = xc (nT ), n = 0, ±1, ±2,... , if 2π s = ≥ 2N. (4.14b) T The frequency N is commonly referred to as the Nyquist frequency, and the frequency 2N as the Nyquist rate. Thus far, we have considered only the impulse train modulator in Figure 4.2(a). Our eventual objective is to express X (ej ω ), the discrete-time Fourier transform (DTFT) of the sequence x[n], in terms of X s (j ) and X c (j ). Toward this end, let us consider an alternative expression for X s (j ). Applying the continuous-time Fourier transform to Eq. (4.4), we obtain ∞ X s (j ) = xc (nT )e−j T n. (4.15) n=−∞ Since x[n] = xc (nT ) (4.16) and ∞ X (e ) = jω x[n]e−j ωn , (4.17) n=−∞ it follows that X s (j ) = X (ej ω )|ω=T = X (ej T ). (4.18) Consequently, from Eqs. (4.6) and (4.18), ∞ 1 X (ej T ) = X c (j ( − k s )), (4.19) T k=−∞ Section 4.2 Frequency-Domain Representation of Sampling 161 or equivalently, ∞ 1 ω 2π k X (e ) = jω Xc j −. (4.20) T T T k=−∞ From Eqs. (4.18)–(4.20), we see that X (ej ω ) is a frequency-scaled version of X s (j ) with the frequency scaling specified by ω = T. This scaling can alternatively be thought of as a normalization of the frequency axis so that the frequency = s in X s (j ) is normalized to ω = 2π for X (ej ω ). The frequency scaling or normalization in the transformation from X s (j ) to X (ej ω ) is directly a result of the time normalization in the transformation from xs (t) to x[n]. Specifically, as we see in Figure 4.2, xs (t) retains a spacing between samples equal to the sampling period T. In contrast, the “spacing” of sequence values x[n] is always unity; i.e., the time axis is normalized by a factor of T. Correspondingly, in the frequency domain the frequency axis is normalized by fs = 1/T. For a sinusoid of the form xc (t) = cos(0 t), the highest (and only) frequency is 0. Since the signal is described by a simple equation, it is easy to compute the samples of the signal. The next two examples use sinusoidal signals to illustrate some important points about sampling. Example 4.1 Sampling and Reconstruction of a Sinusoidal Signal If we sample the continuous-time signal xc (t) = cos(4000πt) with sampling period T = 1/6000, we obtain x[n] = xc (nT ) = cos(4000πT n) = cos(ω0 n), where ω0 = 4000πT = 2π/3. In this case, s = 2π/T = 12000π, and the highest frequency of the signal is 0 = 4000π, so the conditions of the Nyquist sampling theorem are satisfied and there is no aliasing. The Fourier transform of xc (t) is X c (j ) = πδ( − 4000π) + πδ( + 4000π). Figure 4.6(a) shows ∞ 1 X s (j ) = X c [j ( − k s )] (4.21) T k=−∞ for s = 12000π. Note that X c (j ) is a pair of impulses at = ±4000π, and we see shifted copies of this Fourier transform centered on ±s , ±2s , etc. Plotting X (ej ω ) = X s (j ω/T ) as a function of the normalized frequency ω = T results in Figure 4.6(b), where we have used the fact that scaling the independent variable of an impulse also scales its area, i.e., δ(ω/T ) = T δ(ω) (Oppenheim and Willsky, 1997). Note that the original frequency 0 = 4000π corresponds to the normalized frequency ω0 = 4000πT = 2π/3, which satisfies the inequality ω0 < π, corresponding to the fact that 0 = 4000π < π/T = 6000π. Figure 4.6(a) also shows the frequency response of an ideal reconstruction filter H r (j ) for the given sampling rate of s = 12000π. This figure shows that the reconstructed signal would have frequency 0 = 4000π , which is the frequency of the original signal xc (t). 162 Chapter 4 Sampling of Continuous-Time Signals Xs ( j) Hr ( j) T T T T T T T... –16000 –12000 –8000 – 6000 –4000 0 4000 6000 8000 12000 16000 (a) X(e j) = Xs ( j/T) ... – 8 –2 – 4 – – 2 0 2 4 2 8 3 3 3 3 3 3 (b) Figure 4.6 (a) Continuous-time and (b) discrete-time Fourier transforms for sam- pled cosine signal with frequency 0 = 4000π and sampling period T = 1/6000. Example 4.2 Aliasing in Sampling a Sinusoidal Signal Now suppose that the continuous-time signal is xc (t) = cos(16000πt), but the sampling period is T = 1/6000, as it was in Example 4.1. This sampling period fails to satisfy the Nyquist criterion, since s = 2π/T = 12000π < 20 = 32000π. Consequently, we expect to see aliasing. The Fourier transform X s (j ) for this case is identical to that of Figure 4.6(a). However, now the impulse located at = −4000π is from X c [j ( − s )] in Eq. (4.21) rather than from X c (j ,) and the impulse at = 4000π is from X c [j ( + s )]. That is, the frequencies ±4000π are alias frequencies. Plotting X (ej ω ) = X s (j ω/T ) as a function of ω yields the same graph as shown in Figure 4.6(b), since we are normalizing by the same sampling period. The fundamental reason for this is that the sequence of samples is the same in both cases; i.e., cos(16000πn/6000) = cos(2πn + 4000πn/6000) = cos(2πn/3). (Recall that we can add any integer multiple of 2π to the argument of the cosine without changing its value.) Thus, we have obtained the same sequence of samples, x[n] = cos(2πn/3), by sampling two different continuous-time signals with the same sampling frequency. In one case, the sampling frequency satisfied the Nyquist criterion, and in the other case it did not. As before, Figure 4.6(a) shows the frequency response of an ideal reconstruction filter H r (j ) for the given sampling rate of s = 12000π. It is clear from this figure that the signal that would be reconstructed would have the frequency 0 = 4000π , which is the alias frequency of the original frequency 16000π with respect to the sampling frequency s = 12000π. Examples 4.1 and 4.2 use sinusoidal signals to illustrate some of the ambiguities that are inherent in the sampling operation. Example 4.1 verifies that if the conditions of the sampling theorem hold, the original signal can be reconstructed from the samples. Example 4.2 illustrates that if the sampling frequency violates the sampling theorem, we cannot reconstruct the original signal using an ideal lowpass reconstruction filter with cutoff frequency at one-half the sampling frequency. The signal that is reconstructed Section 4.3 Reconstruction of a Bandlimited Signal from Its Samples 163 is one of the alias frequencies of the original signal with respect to the sampling rate used in sampling the original continuous-time signal. In both examples, the sequence of samples was x[n] = cos(2πn/3), but the original continuous-time signal was different. As suggested by these two examples, there are unlimited ways of obtaining this same set of samples by periodic sampling of a continuous-time sinusoid. All ambiguity is removed, however, if we choose s > 20. 4.3 RECONSTRUCTION OF A BANDLIMITED SIGNAL FROM ITS SAMPLES According to the sampling theorem, samples of a continuous-time bandlimited signal taken frequently enough are sufficient to represent the signal exactly, in the sense that the signal can be recovered from the samples and with knowledge of the sampling period. Impulse train modulation provides a convenient means for understanding the process of reconstructing the continuous-time bandlimited signal from its samples. In Section 4.2, we saw that if the conditions of the sampling theorem are met and if the modulated impulse train is filtered by an appropriate lowpass filter, then the Fourier transform of the filter output will be identical to the Fourier transform of the original continuous-time signal xc (t), and thus, the output of the filter will be xc (t). If we are given a sequence of samples, x[n], we can form an impulse train xs (t) in which successive impulses are assigned an area equal to successive sequence values, i.e., ∞ xs (t) = x[n]δ(t − nT ). (4.22) n=−∞ The nth sample is associated with the impulse at t = nT , where T is the sampling period associated with the sequence x[n]. If this impulse train is the input to an ideal lowpass continuous-time filter with frequency response H r (j ) and impulse response hr (t), then the output of the filter will be ∞ xr (t) = x[n]hr (t − nT ). (4.23) n=−∞ A block diagram representation of this signal reconstruction process is shown in Fig- ure 4.7(a). Recall that the ideal reconstruction filter has a gain of T [to compensate for the factor of 1/T in Eq. (4.19) or (4.20)] and a cutoff frequency c between N and s − N. A convenient and commonly used choice of the cutoff frequency is c = s /2 = π/T. This choice is appropriate for any relationship between s and N that avoids aliasing (i.e., so long as s ≥ 2N ). Figure 4.7(b) shows the frequency response of the ideal reconstruction filter. The corresponding impulse response, hr (t), is the inverse Fourier transform of H r (j ), and for cutoff frequency π/T it is given by sin(π t/T ) hr (t) =. (4.24) π t/T This impulse response is shown in Figure 4.7(c). Substituting Eq. (4.24) into Eq. (4.23) leads to ∞ sin[π(t − nT )/T ] xr (t) = x[n]. (4.25) n=−∞ π(t − nT )/T 164 Chapter 4 Sampling of Continuous-Time Signals Ideal reconstruction system Ideal Convert from reconstruction sequence to filter x [n] impulse train xs ( t) xr (t) Hr ( j ) Sampling period T (a) Hr ( j ) T – T T (b) hr ( t) 1 Figure 4.7 (a) Block diagram of an ideal bandlimited signal reconstruction –4T –3T –T 0 T 3T 4T t system. (b) Frequency response of an ideal reconstruction filter. (c) Impulse (c) response of an ideal reconstruction filter. Equations (4.23) and (4.25) express the continuous-time signal in terms of a linear combination of basis functions hr (t − nT ) with the samples x[n] playing the role of coefficients. Other choices of the basis functions and corresponding coefficients could be used to represent other classes of continuous-time functions [see, for example Unser (2000)]. However, the functions in Eq. (4.24) and the samples x[n] are the natural basis functions and coefficients for representing bandlimited continuous-time signals. From the frequency-domain argument of Section 4.2, we saw that if x[n] = xc (nT ), where X c (j ) = 0 for || ≥ π/T , then xr (t) is equal to xc (t). It is not immediately obvious that this is true by considering Eq. (4.25) alone. However, useful insight is gained by looking at that equation more closely. First, let us consider the function hr (t) given by Eq. (4.24). We note that hr (0) = 1. (4.26a) Section 4.3 Reconstruction of a Bandlimited Signal from Its Samples 165 This follows from l’Hôpital’s rule or the small angle approximation for the sine function. In addition, hr (nT ) = 0 for n = ±1, ±2,.... (4.26b) It follows from Eqs. (4.26a) and (4.26b) and Eq. (4.23) that if x[n] = xc (nT ), then xr (mT ) = xc (mT ) (4.27) for all integer values of m. That is, the signal that is reconstructed by Eq. (4.25) has the same values at the sampling times as the original continuous-time signal, independently of the sampling period T. In Figure 4.8, we show a continuous-time signal xc (t) and the corresponding mod- ulated impulse train. Figure 4.8(c) shows several of the terms sin[π(t − nT )/T ] x[n] π(t − nT )/T and the resulting reconstructed signal xr (t). As suggested by this figure, the ideal lowpass filter interpolates between the impulses of xs (t) to construct a continuous-time signal xr (t). From Eq. (4.27), the resulting signal is an exact reconstruction of xc (t) at the sampling times. The fact that, if there is no aliasing, the lowpass filter interpolates the xc (t) t (a) xs (t) t T (b) xr (t) t T Figure 4.8 Ideal bandlimited (c) interpolation. 166 Chapter 4 Sampling of Continuous-Time Signals Ideal reconstruction system Ideal Convert from reconstruction sequence to D/C filter x[n] impulse train xs ( t) xr (t) x [n] xr (t) Hr (j ) T Sampling period T (a) (b) Figure 4.9 (a) Ideal bandlimited signal reconstruction. (b) Equivalent represen- tation as an ideal D/C converter. correct reconstruction between the samples follows from our frequency-domain analysis of the sampling and reconstruction process. It is useful to formalize the preceding discussion by defining an ideal system for reconstructing a bandlimited signal from a sequence of samples. We will call this system the ideal discrete-to-continuous-time (D/C) converter. The desired system is depicted in Figure 4.9. As we have seen, the ideal reconstruction process can be represented as the conversion of the sequence to an impulse train, as in Eq. (4.22), followed by filtering with an ideal lowpass filter, resulting in the output given by Eq. (4.25). The intermediate step of conversion to an impulse train is a mathematical convenience in deriving Eq. (4.25) and in understanding the signal reconstruction process. However, once we are familiar with this process, it is useful to define a more compact representation, as depicted in Figure 4.9(b), where the input is the sequence x[n] and the output is the continuous-time signal xr (t) given by Eq. (4.25). The properties of the ideal D/C converter are most easily seen in the frequency do- main. To derive an input/output relation in this domain, consider the Fourier transform of Eq. (4.23) or Eq. (4.25), which is ∞ X r (j ) = x[n]H r (j )e−j T n. n=−∞ Since H r (j ) is common to all the terms in the sum, we can write X r (j ) = H r (j )X (ej T ). (4.28) Equation (4.28) provides a frequency-domain description of the ideal D/C converter. According to Eq. (4.28), X (ej ω ) is frequency scaled (in effect, going from the sequence to the impulse train causes ω to be replaced by T ). Then the ideal lowpass filter H r (j ) selects the base period of the resulting periodic Fourier transform X (ej T ) and compensates for the 1/T scaling inherent in sampling. Thus, if the sequence x[n] has been obtained by sampling a bandlimited signal at the Nyquist rate or higher, the reconstructed signal xr (t) will be equal to the original bandlimited signal. In any case, it is also clear from Eq. (4.28) that the output of the ideal D/C converter is always bandlimited to at most the cutoff frequency of the lowpass filter, which is typically taken to be one-half the sampling frequency. Section 4.4 Discrete-Time Processing of Continuous-Time Signals 167 4.4 DISCRETE-TIME PROCESSING OF CONTINUOUS-TIME SIGNALS A major application of discrete-time systems is in the processing of continuous-time signals. This is accomplished by a system of the general form depicted in Figure 4.10. The system is a cascade of a C/D converter, followed by a discrete-time system, followed by a D/C converter. Note that the overall system is equivalent to a continuous-time system, since it transforms the continuous-time input signal xc (t) into the continuous- time output signal yr (t). The properties of the overall system are dependent on the choice of the discrete-time system and the sampling rate. We assume in Figure 4.10 that the C/D and D/C converters have the same sampling rate. This is not essential, and later sections of this chapter and some of the problems at the end of the chapter consider systems in which the input and output sampling rates are not the same. The previous sections of the chapter have been devoted to understanding the C/D and D/C conversion operations in Figure 4.10. For convenience, and as a first step in understanding the overall system of Figure 4.10, we summarize the mathematical representations of these operations. The C/D converter produces a discrete-time signal x[n] = xc (nT ), (4.29) i.e., a sequence of samples of the continuous-time input signal xc (t). The DTFT of this sequence is related to the continuous-time Fourier transform of the continuous-time input signal by ∞ 1 ω 2π k X (ej ω ) = Xc j −. (4.30) T T T k=−∞ The D/C converter creates a continuous-time output signal of the form ∞ sin[π(t − nT )/T ] yr (t) = y[n] , (4.31) n=−∞ π(t − nT )/T where the sequence y[n] is the output of the discrete-time system when the input to the system is x[n]. From Eq. (4.28), Yr (j ), the continuous-time Fourier transform of yr (t), and Y (ej ω ), the DTFT of y[n], are related by T Y (ej T ), || < π/T , Yr (j ) = H r (j )Y (e j T )= (4.32) 0, otherwise. Next, let us relate the output sequence y[n] to the input sequence x[n], or equiva- lently, Y (ej ω ) to X (ej ω ). A simple example is the identity system, i.e., y[n] = x[n]. This Discrete-time C/D D/C system xc (t) x [n] y [n] yr (t) T T Figure 4.10 Discrete-time processing of continuous-time signals. 168 Chapter 4 Sampling of Continuous-Time Signals is in effect the case that we have studied in detail so far. We know that if xc (t) has a band- limited Fourier transform such that X c (j ) = 0 for || ≥ π/T and if the discrete-time system in Figure 4.10 is the identity system such that y[n] = x[n] = xc (nT ), then the output will be yr (t) = xc (t). Recall that, in proving this result, we utilized the frequency- domain representations of the continuous-time and discrete-time signals, since the key concept of aliasing is most easily understood in the frequency domain. Likewise, when we deal with systems more complicated than the identity system, we generally carry out the analysis in the frequency domain. If the discrete-time system is nonlinear or time varying, it is usually difficult to obtain a general relationship between the Fourier transforms of the input and the output of the system. (In Problem 4.51, we consider an example of the system of Figure 4.10 in which the discrete-time system is nonlinear.) However, the LTI case leads to a rather simple and generally useful result. 4.4.1 Discrete-Time LTI Processing of Continuous-Time Signals If the discrete-time system in Figure 4.10 is linear and time invariant, we have Y (ej ω ) = H (ej ω )X (ej ω ), (4.33) where H (ej ω ) is the frequency response of the system or, equivalently, the Fourier transform of the unit sample response, and X (ej ω ) and Y (ej ω ) are the Fourier transforms of the input and output, respectively. Combining Eqs. (4.32) and (4.33), we obtain Yr (j ) = H r (j )H (ej T )X (ej T ). (4.34) Next, using Eq. (4.30) with ω = T , we have ∞ 1 2π k Yr (j ) = H r (j )H (e j T ) Xc j −. (4.35) T T k=−∞ If X c (j ) = 0 for || ≥ π/T , then the ideal lowpass reconstruction filter H r (j ) cancels the factor 1/T and selects only the term in Eq. (4.35) for k = 0; i.e., H (ej T )X c (j ), || < π/T , Yr (j ) = (4.36) 0, || ≥ π/T. Thus, if X c (j ) is bandlimited and the sampling rate is at or above the Nyquist rate, the output is related to the input through an equation of the form Yr (j ) = H eff (j )X c (j ), (4.37) where H (ej T ), || < π/T , H eff (j ) = (4.38) 0, || ≥ π/T. That is, the overall continuous-time system is equivalent to an LTI system whose effective frequency response is given by Eq. (4.38). It is important to emphasize that the linear and time-invariant behavior of the sys- tem of Figure 4.10 depends on two factors. First, the discrete-time system must be linear and time invariant. Second, the input signal must be bandlimited, and the sampling rate must be high enough so that any aliased components are removed by the discrete-time Section 4.4 Discrete-Time Processing of Continuous-Time Signals 169 system. As a simple illustration of this second condition being violated, consider the case when xc (t) is a single finite-duration unit-amplitude pulse whose duration is less than the sampling period. If the pulse is unity at t = 0, then x[n] = δ[n]. However, it is clearly pos- sible to shift the pulse so that it is not aligned with any of the sampling times, i.e., x[n] = 0 for all n. Such a pulse, being limited in time, is not bandlimited, and the conditions of the sampling theorem cannot hold. Even if the discrete-time system is the identity system, such that y[n] = x[n], the overall system will not be time invariant if aliasing occurs in sampling the input. In general, if the discrete-time system in Figure 4.10 is linear and time invariant, and if the sampling frequency is at or above the Nyquist rate associated with the bandwidth of the input xc (t), then the overall system will be equivalent to an LTI continuous-time system with an effective frequency response given by Eq. (4.38). Fur- thermore, Eq. (4.38) is valid even if some aliasing occurs in the C/D converter, as long as H (ej ω ) does not pass the aliased components. Example 4.3 is a simple illustration of this. Example 4.3 Ideal Continuous-Time Lowpass Filtering Using a Discrete-Time Lowpass Filter Consider Figure 4.10, with the LTI discrete-time system having frequency response 1, |ω| < ωc , H (ej ω ) = (4.39) 0, ωc < |ω| ≤ π. This frequency response is periodic with period 2π, as shown in Figure 4.11(a). For bandlimited inputs sampled at or above the Nyquist rate, it follows from Eq. (4.38) that the overall system of Figure 4.10 will behave as an LTI continuous-time system with frequency response 1, |T | < ωc or || < ωc /T , H eff (j ) = (4.40) 0, |T | ≥ ωc or || ≥ ωc /T. As shown in Figure 4.11(b), this effective frequency response is that of an ideal lowpass filter with cutoff frequency c = ωc /T The graphical illustration given in Figure 4.12 provides an interpretation of how this effective response is achieved. Figure 4.12(a) represents the Fourier transform H(e j) 1 –2 – c c 2 (a) Heff (j) 1 c c – T T (b) Figure 4.11 (a) Frequency response of discrete-time system in Figure 4.10. (b) Corresponding effective continuous-time frequency response for bandlimited inputs. 170 Chapter 4 Sampling of Continuous-Time Signals Xc (j ) 1 –N N (a) Xs (j ) = X(e jT ) 1 T 2 – N T – 2 – N 2 T T T T (b) X(e j) 1 T H(e j) –2 – c c NT 2 – NT (2 – NT) (c) j 1 Y(e ) T –2 – c c 2 (d) 1 Y(e jT ) T T Hr (j) c c – 2 2 – – T T T T T T (e) Yr (j) 1 c c – T T (f) Figure 4.12 (a) Fourier transform of a bandlimited input signal. (b) Fourier trans- form of sampled input plotted as a function of continuous-time frequency . (c) Fourier transform X (e jω ) of sequence of samples and frequency response H(e jω ) of discrete-time system plotted versus ω. (d) Fourier transform of output of discrete-time system. (e) Fourier transform of output of discrete-time system and frequency response of ideal reconstruction filter plotted versus . (f) Fourier transform of output. Section 4.4 Discrete-Time Processing of Continuous-Time Signals 171 of a bandlimited signal. Figure 4.12(b) shows the Fourier transform of the intermediate modulated impulse train, which is identical to X (ej T ), the DTFT of the sequence of samples evaluated for ω = T. In Figure 4.12(c), the DTFT of the sequence of samples and the frequency response of the discrete-time system are both plotted as a function of the normalized discrete-time frequency variable ω. Figure 4.12(d) shows Y (ej ω ) = H (ej ω )X (ej ω ), the Fourier transform of the output of the discrete-time system. Figure 4.12(e) illustrates the Fourier transform of the output of the discrete-time system as a function of the continuous-time frequency , together with the frequency response of the ideal reconstruction filter H r (j ) of the D/C converter. Finally, Figure 4.12(f) shows the resulting Fourier transform of the output of the D/C converter. By comparing Figures 4.12(a) and 4.12(f), we see that the system behaves as an LTI system with frequency response given by Eq. (4.40) and plotted in Figure 4.11(b). Several important points are illustrated in Example 4.3. First, note that the ideal lowpass discrete-time filter with discrete-time cutoff frequency ωc has the effect of an ideal lowpass filter with cutoff frequency c = ωc /T when used in the configuration of Figure 4.10. This cutoff frequency depends on both ωc and T. In particular, by using a fixed discrete-time lowpass filter, but varying the sampling period T , an equivalent continuous-time lowpass filter with a variable cutoff frequency can be implemented. For example, if T were chosen so that N T < ωc , then the output of the system of Figure 4.10 would be yr (t) = xc (t). Also, as illustrated in Problem 4.31, Eq. (4.40) will be valid even if some aliasing is present in Figures 4.12(b) and (c), as long as these distorted (aliased) components are eliminated by the filter H (ej ω ). In particular, from Figure 4.12(c), we see that for no aliasing to be present in the output, we require that (2π − N T ) ≥ ωc , (4.41) compared with the Nyquist requirement that (2π − N T ) ≥ N T. (4.42) As another example of continuous-time processing using a discrete-time system, let us consider the implementation of an ideal differentiator for bandlimited signals. Example 4.4 Discrete-Time Implementation of an Ideal Continuous-Time Bandlimited Differentiator The ideal continuous-time differentiator system is defined by d yc (t) = [xc (t)], (4.43) dt with corresponding frequency response H c (j ) = j . (4.44) Since we are considering a realization in the form of Figure 4.10, the inputs are re- stricted to be bandlimited. For processing bandlimited signals, it is sufficient that j , || < π/T , H eff (j ) = (4.45) 0, || ≥ π/T , as depicted in Figure 4.13(a). The corresponding discrete-time system has frequency response jω H (ej ω ) = , |ω| < π, (4.46) T 172 Chapter 4 Sampling of Continuous-Time Signals and is periodic with period 2π. This frequency response is plotted in Figure 4.13(b). The corresponding impulse response can be shown to be π 1 j ω j ωn πn cos πn − sin πn h[n] = e dω = , −∞ < n < ∞, 2π −π T πn2 T or equivalently, ⎧ ⎨ 0, n = 0, h[n] = cos πn (4.47) ⎩ , n = 0. nT Thus, if a discrete-time system with this impulse response was used in the con- figuration of Figure 4.10, the output for every appropriately bandlimited input would be the derivative of the input. Problem 4.22 concerns the verification of this for a sinusoidal input signal. |Heff (j )| T – T T ⱔHeff (j ) – 2 T – T 2 (a) |H(e j)| T –2 – 2 ⱔH( e j) 2 – 2 (b) Figure 4.13 (a) Frequency response of a continuous-time ideal bandlimited dif- ferentiator Hc (j) = j, || < π/T. (b) Frequency response of a discrete-time filter to implement a continuous-time bandlimited differentiator. Section 4.4 Discrete-Time Processing of Continuous-Time Signals 173 4.4.2 Impulse Invariance We have shown that the cascade system of Figure 4.10 can be equivalent to an LTI system for bandlimited input signals. Let us now assume that, as depicted in Figure 4.14, we are given a desired continuous-time system that we wish to implement in the form of Figure 4.10. With H c (j ) bandlimited, Eq. (4.38) specifies how to choose H (ej ω ) so that H eff (j ) = H c (j ). Specifically, H (ej ω ) = H c (j ω/T ), |ω| < π, (4.48) with the further requirement that T be chosen such that H c (j ) = 0, || ≥ π/T. (4.49) Under the constraints of Eqs. (4.48) and (4.49), there is also a straightforward and useful relationship between the continuous-time impulse response hc (t) and the discrete-time impulse response h[n]. In particular, as we shall verify shortly, h[n] = T hc (nT ); (4.50) i.e., the impulse response of the discrete-time system is a scaled, sampled version of hc (t). When h[n] and hc (t) are related through Eq. (4.50), the discrete-time system is said to be an impulse-invariant version of the continuous-time system. Equation (4.50) is a direct consequence of the discussion in Section 4.2. Specifically, with x[n] and xc (t) respectively replaced by h[n] and hc (t) in Eq. (4.16), i.e., h[n] = hc (nT ), (4.51) Eq. (4.20) becomes ∞ 1 ω 2π k H (ej ω ) = Hc j − , (4.52) T T T k=−∞ Continuous-time LTI system xc (t) hc (t), Hc ( j ) yc (t) (a) Discrete-time C/D LTI system D/C xc (t) x [n] h [n], H(e j) y [n] yr (t) = yc (t) T T Heff ( j ) = Hc ( j ) (b) Figure 4.14 (a) Continuous-time LTI system. (b) Equivalent system for bandlim- ited inputs. 174 Chapter 4 Sampling of Continuous-Time Signals or, if Eq. (4.49) is satisfied, 1 ω H (ej ω ) = Hc j , |ω| < π. (4.53) T T Modifying Eqs. (4.51) and (4.53) to account for the scale factor of T in Eq. (4.50), we have h[n] = T hc (nT ), (4.54) ω H (ej ω ) = H c j , |ω| < π. (4.55) T Example 4.5 A Discrete-Time Lowpass Filter Obtained by Impulse Invariance Suppose that we wish to obtain an ideal lowpass discrete-time filter with cutoff fre- quency ωc < π. We can do this by sampling a continuous-time ideal lowpass filter with cutoff frequency c = ωc /T < π/T defined by 1, || < c , H c (j ) = 0, || ≥ c. The impulse response of this continuous-time system is sin(c t) hc (t) = , πt so we define the impulse response of the discrete-time system to be sin(c nT ) sin(ωc n) h[n] = T hc (nT ) = T = , πnT πn where ωc = c T. We have already shown that this sequence corresponds to the DTFT 1, |ω| < ωc , H (ej ω ) = 0, ωc ≤ |ω| ≤ π, which is identical to H c (j ω/T ), as predicted by Eq. (4.55). Example 4.6 Impulse Invariance Applied to Continuous-Time Systems with Rational System Functions Many continuous-time systems have impulse responses composed of a sum of expo- nential sequences of the form hc (t) = A es0 t u(t). Such time functions have Laplace transforms A H c (s) = Re(s) > Re(s0 ). s − s0 If we apply the impulse invariance concept to such a continuous-time system, we obtain the impulse response h[n] = T hc (nT ) = A T es0 T n u[n], Section 4.5 Continuous-Time Processing of Discrete-Time Signals 175 which has z-transform system function AT H (z) = |z| > |es0 T | 1 − es0 T z−1 and, assuming Re(s0 ) < 0, the frequency response AT H (ej ω ) =. 1 − es0 T e−j ω In this case, Eq. (4.55) does not hold exactly, because the original continuous-time system did not have a strictly bandlimited frequency response, and therefore, the re- sulting discrete-time frequency response is an aliased version of H c (j ). Even though aliasing occurs in such a case as this, the effect may be small. Higher-order systems whose impulse responses are sums of complex exponentials may in fact have fre- quency responses that fall off rapidly at high frequencies, so that aliasing is minimal if the sampling rate is high enough. Thus, one approach to the discrete-time simulation of continuous-time systems and also to the design of digital filters is through sampling of the impulse response of a corresponding analog filter. 4.5 CONTINUOUS-TIME PROCESSING OF DISCRETE-TIME SIGNALS In Section 4.4, we discussed and analyzed the use of discrete-time systems for processing continuous-time signals in the configuration of Figure 4.10. In this section, we consider the complementary situation depicted in Figure 4.15, which is appropriately referred to as continuous-time processing of discrete-time signals. Although the system of Fig- ure 4.15 is not typically used to implement discrete-time systems, it provides a useful interpretation of certain discrete-time systems that have no simple interpretation in the discrete domain. From the definition of the ideal D/C converter, X c (j ) and therefore also Yc (j ), will necessarily be zero for || ≥ π/T. Thus, the C/D converter samples yc (t) without aliasing, and we can express xc (t) and yc (t) respectively as ∞ sin[π(t − nT )/T ] xc (t) = x[n] (4.56) n=−∞ π(t − nT )/T and ∞ sin[π(t − nT )/T ] yc (t) = y[n] , (4.57) n=−∞ π(t − nT )/T h [n], H(e j) hc (t) D/C C/D Hc ( j) x[n] xc (t) yc (t) y [n] T T Figure 4.15 Continuous-time processing of discrete-time signals. 176 Chapter 4 Sampling of Continuous-Time Signals where x[n] = xc (nT ) and y[n] = yc (nT ). The frequency-domain relationships for Figure 4.15 are X c (j ) = T X (ej T ), || < π/T , (4.58a) Yc (j ) = H c (j )X c (j ), (4.58b) 1 ω Y (ej ω ) = Yc j , |ω| < π. (4.58c) T T Therefore, by substituting Eqs. (4.58a) and (4.58b) into Eq. (4.58c), it follows that the overall system behaves as a discrete-time system whose frequency response is ω H (ej ω ) = H c j , |ω| < π, (4.59) T or equivalently, the overall frequency response of the system in Figure 4.15 will be equal to a given H (ej ω ) if the frequency response of the continuous-time system is H c (j ) = H (ej T ), || < π/T. (4.60) Since X c (j ) = 0 for || ≥ π/T , H c (j ) may be chosen arbitrarily above π/T. A convenient—but arbitrary—choice is H c (j ) = 0 for || ≥ π/T. With this representation of a discrete-time system, we can focus on the equivalent effect of the continuous-time system on the bandlimited continuous-time signal xc (t). This is illustrated in Examples 4.7 and 4.8. Example 4.7 Noninteger Delay Let us consider a discrete-time system with frequency response H (ej ω ) = e−j ω , |ω| < π. (4.61) When is an integer, this system has a straightforward interpretation as a delay of , i.e., y[n] = x[n − ]. (4.62) When is not an integer, Eq. (4.62) has no formal meaning, because we cannot shift the sequence x[n] by a noninteger amount. However, with the use of the system of Figure 4.15, a useful time-domain interpretation can be applied to the system specified by Eq. (4.61). Let H c (j ) in Figure 4.15 be chosen to be H c (j ) = H (ej T ) = e−j T. (4.63) Then, from Eq. (4.59), the overall discrete-time system in Figure 4.15 will have the frequency response given by Eq. (4.61), whether or not is an integer. To interpret the system of Eq. (4.61), we note that Eq. (4.63) represents a time delay of T seconds. Therefore, yc (t) = xc (t − T ). (4.64) Furthermore, xc (t) is the bandlimited interpolation of x[n], and y[n] is obtained by sampling yc (t). For example, if = 21 , y[n] would be the values of the bandlim- ited interpolation halfway between the input sequence values. This is illustrated in Section 4.5 Continuous-Time Processing of Discrete-Time Signals 177 Figure 4.16. We can also obtain a direct convolution representation for the system defined by Eq. (4.61). From Eqs. (4.64) and (4.56), we obtain y[n] = yc (nT ) = xc (nT − T ) ∞ sin[π(t − T − kT )/T ] = x[k] (4.65) π(t − T − kT )/T t=nT k=−∞ ∞ sin π(n − k − ) = x[k] , π(n − k − ) k=−∞ which is, by definition, the convolution of x[n] with sin π(n − ) h[n] = , −∞ < n < ∞. π(n − ) When is not an integer, h[n] has infinite extent. However, when = n0 is an integer, it is easily shown that h[n] = δ[n−n0 ], which is the impulse response of the ideal integer delay system. xc (t) x [n] 0 T 2T t (a) yc (t) = xc t – T 2 y [n] 0 T 2T t (b) Figure 4.16 (a) Continuous-time processing of the discrete-time sequence (b) can produce a new sequence with a “half-sample” delay. The noninteger delay represented by Eq. (4.65) has considerable practical sig- nificance, since such a factor often arises in the frequency-domain representation of systems. When this kind of term is found in the frequency response of a causal discrete- time system, it can be interpreted in the light of this example. This interpretation is illustrated in Example 4.8. Example 4.8 Moving-Average System with Noninteger Delay In Example 2.16, we considered the general moving-average system and obtained its frequency response. For the case of the causal (M + 1)-point moving-average system, 178 Chapter 4 Sampling of Continuous-Time Signals M 1 = 0 and M 2 = M, and the frequency response is 1 sin[ω(M + 1)/2] −j ωM/2 H (ej ω ) = e , |ω| < π. (4.66) (M + 1) sin(ω/2) This representation of the frequency response suggests the interpretation of the (M + 1)-point moving-average system as the cascade of two systems, as indicated in Figure 4.17. The first system imposes a frequency-domain amplitude weighting. The second system represents the linear-phase term in Eq. (4.66). If M is an even integer (meaning the moving average of an odd number of samples), then the linear-phase term corresponds to an integer delay, i.e., y[n] = w[n − M/2]. (4.67) However, if M is odd, the linear-phase term corresponds to a noninteger delay, specif- ically, an integer-plus-one-half sample interval. This noninteger delay can be inter- preted in terms of the discussion in Example 4.7; i.e., y[n] is equivalent to bandlim- ited interpolation of w[n], followed by a continuous-time delay of MT /2 (where T is the assumed, but arbitrary, sampling period associated with the D/C interpola- tion of w[n]), followed by C/D conversion again with sampling period T. This frac- tional delay is illustrated in Figure 4.18. Figure 4.18(a) shows a discrete-time sequence x[n] = cos(0.25πn). This sequence is the input to a six-point (M = 5) moving-average filter. In this example, the input is “turned on” far enough in the past so that the output consists only of the steady-state response for the time interval shown. Figure 4.18(b) shows the corresponding output sequence, which is given by 1 1 y[n] = H (ej 0.25π ) ej 0.25πn + H (e−j 0.25π ) e−j 0.25πn 2 2 1 sin[3(0.25π)] −j (0.25π)5/2 j 0.25πn 1 sin[3(−0.25π)] j (0.25π)5/2 −j 0.25πn = e e + e e 2 6 sin(0.125π) 2 6 sin(−0.125π) = 0.308 cos[0.25π(n − 2.5)]. Thus, the six-point moving-average filter reduces the amplitude of the cosine signal and introduces a phase shift that corresponds to 2.5 samples of delay. This is apparent in Figure 4.18, where we have plotted the continuous-time cosines that would be inter- polated by the ideal D/C converter for both the input and the output sequence. Note in Figure 4.18(b) that the six-point moving-average filtering gives a sampled cosine signal such that the sample points have been shifted by 2.5 samples with respect to the sample points of the input. This can be seen from Figure 4.18 by comparing the positive peak at 8 in the interpolated cosine for the input to the positive peak at 10.5 in the interpolated cosine for the output. Thus, the six-point moving-average filter is seen to have a delay of 5/2 = 2.5 samples. H(e j) 1 sin ((M + 1) /2) e–jM /2 x[n] M+1 sin (/2) w [n] y[n] Figure 4.17 The moving-average system represented as a cascade of two systems. Section 4.6 Changing the Sampling Rate Using Discrete-Time Processing 179 1 0.5 0 –0.5 –1 –5 0 5 10 15 20 n (a) 1 M/2 0.5 0 –0.5 –1 –5 0 5 10 15 20 n (b) Figure 4.18 Illustration of moving-average filtering. (a) Input signal x [n] = cos(0.25πn). (b) Corresponding output of six-point moving-average filter. 4.6 CHANGING THE SAMPLING RATE USING DISCRETE-TIME PROCESSING We have seen that a continuous-time signal xc (t) can be represented by a discrete-time signal consisting of a sequence of samples x[n] = xc (nT ). (4.68) Alternatively, our previous discussion has shown that, even if x[n] was not obtained originally by sampling, we can always use the bandlimited interpolation formula of Eq. (4.25) to reconstruct a continuous-time bandlimited signal xr (t) whose samples are x[n] = xr (nT ) = xc (nT ), i.e., the samples of xc (t) and xr (t) are identical at the sampling times even when xr (t) = xc (t). It is often necessary to change the sampling rate of a discrete-time signal, i.e., to obtain a new discrete-time representation of the underlying continuous-time signal of the form x1 [n] = xc (nT1 ), (4.69) where T1 = T. This operation is often called resampling. Conceptually, x1 [n] can be ob- tained from x[n] by reconstructing xc (t) from x[n] using Eq. (4.25) and then resampling xc (t) with period T1 to obtain x1 [n]. However, this is not usually a practical approach, 180 Chapter 4 Sampling of Continuous-Time Signals M x [n] xd [n] = x [nM] Sampling Sampling Figure 4.19 Representation of a period T period Td = MT compressor or discrete-time sampler. because of the nonideal analog reconstruction filter, D/A converter, and A/D converter that would be used in a practical implementation. Thus, it is of interest to consider methods of changing the sampling rate that involve only discrete-time operations. 4.6.1 Sampling Rate Reduction by an Integer Factor The sampling rate of a sequence can be reduced by “sampling” it, i.e., by defining a new sequence xd [n] = x[nM] = xc (nMT ). (4.70) Equation (4.70) defines the system depicted in Figure 4.19, which is called a sampling rate compressor (see Crochiere and Rabiner, 1983 and Vaidyanathan, 1993) or simply a compressor. From Eq. (4.70), it follows that xd [n] is identical to the sequence that would be obtained from xc (t) by sampling with period Td = MT. Furthermore, if X c (j ) = 0 for || ≥ N , then xd [n] is an exact representation of xc (t) if π/Td = π/(MT ) ≥ N. That is, the sampling rate can be reduced to π/M without aliasing if the original sampling rate is at least M times the Nyquist rate or if the bandwidth of the sequence is first reduced by a factor of M by discrete-time filtering. In general, the operation of reducing the sampling rate (including any prefiltering) is called downsampling. As in the case of sampling a continuous-time signal, it is useful to obtain a frequency- domain relation between the input and output of the compressor. This time, however, it will be a relationship between DTFTs. Although several methods can be used to de- rive the desired result, we will base our derivation on the results already obtained for sampling continuous-time signals. First, recall that the DTFT of x[n] = xc (nT ) is ∞ 1 ω 2π k X (ej ω ) = Xc j −. (4.71) T T T k=−∞ Similarly, the DTFT of xd [n] = x[nM] = xc (nTd ) with Td = MT is ∞ 1 ω 2π r X d (e ) = jω Xc j −. (4.72) Td r=−∞ Td Td Now, since Td = MT , we can write Eq. (4.72) as ∞ 1 ω 2π r X d (e ) = jω Xc j