Digital Processing of Continuous-Time Signals • Digital processing of a continuous-time signal involves the following basic steps: (1) Conversion of the continuous-time signal into a discrete-time signal, (2) Processing of the discrete-time signal, (3) Conversion of the processed discretetime signal back into a continuous-time signal 1

1 Copyright © 2001, S. K. Mitra

Digital Processing of Continuous-Time Signals • Conversion of a continuous-time signal into digital form is carried out by an analog-todigital (A/D) converter • The reverse operation of converting a digital signal into a continuous-time signal is performed by a digital-to-analog (D/A) converter 2

2 Copyright © 2001, S. K. Mitra

Digital Processing of Continuous-Time Signals • Since the A/D conversion takes a finite amount of time, a sample-and-hold (S/H) circuit is used to ensure that the analog signal at the input of the A/D converter remains constant in amplitude until the conversion is complete to minimize the error in its representation 3

3 Copyright © 2001, S. K. Mitra

Digital Processing of Continuos-Time Signals • To prevent aliasing, an analog anti-aliasing filter is employed before the S/H circuit • To smooth the output signal of the D/A converter, which has a staircase-like waveform, an analog reconstruction filter is used

4

4 Copyright © 2001, S. K. Mitra

Digital Processing of Continuous-Time Signals Complete block-diagram Antialiasing filter

5

S/H

A/D

Digital processor

D/A

Reconstruction filter

• Since both the anti-aliasing filter and the reconstruction filter are analog lowpass filters, we review first the theory behind the design of such filters • Also, the most widely used IIR digital filter design method is based on the conversion of an analog lowpass prototype 5 Copyright © 2001, S. K. Mitra

Sampling of Continuous-Time Signals • As indicated earlier, discrete-time signals in many applications are generated by sampling continuous-time signals • We have seen earlier that identical discretetime signals may result from the sampling of more than one distinct continuous-time function 6

6 Copyright © 2001, S. K. Mitra

Sampling of Continuous-Time Signals • In fact, there exists an infinite number of continuous-time signals, which when sampled lead to the same discrete-time signal • However, under certain conditions, it is possible to relate a unique continuous-time signal to a given discrete-time signals 7

7 Copyright © 2001, S. K. Mitra

Sampling of Continuous-Time Signals • If these conditions hold, then it is possible to recover the original continuous-time signal from its sampled values • We next develop this correspondence and the associated conditions

8

8 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Let g a (t ) be a continuous-time signal that is sampled uniformly at t = nT, generating the sequence g[n] where g [n] = g a (nT ), − ∞ < n < ∞

9

with T being the sampling period • The reciprocal of T is called the sampling frequency FT , i.e., FT = 1 T

9 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Now, the frequency-domain representation of g a (t ) is given by its continuos-time Fourier transform (CTFT): ∞ − jΩt g ( t ) e dt a −∞

Ga ( jΩ) = ∫ • The frequency-domain representation of g[n] is given by its discrete-time Fourier transform (DTFT): G ( e jω ) = 10



∞ − jω n g [ n ] e n = −∞ 10 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • To establish the relation between Ga ( jΩ) jω and G (e ) , we treat the sampling operation mathematically as a multiplication of g a (t ) by a periodic impulse train p(t): ∞

p (t ) = ∑ δ(t − nT ) n = −∞

g a (t ) 11

× p (t )

g p(t ) 11 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • p(t) consists of a train of ideal impulses with a period T as shown below

12

• The multiplication operation yields an impulse train: ∞ g p (t ) = g a (t ) p (t ) = ∑ g a (nT )δ(t − nT ) n = −∞

12 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • g p (t ) is a continuous-time signal consisting of a train of uniformly spaced impulses with the impulse at t = nT weighted by the sampled value g a (nT ) of g a (t ) at that instant

13

13 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • There are two different forms of G p ( jΩ): • One form is given by the weighted sum of the CTFTs of δ(t − nT ) : ∞ − jΩnT G p ( jΩ) = ∑n = −∞ g a (nT ) e • To derive the second form, we note that p(t) can be expressed as a Fourier series: jΩT kt j ( 2π / T ) kT 1 ∞ 1 ∞ p(t ) = ∑ k = −∞ e = ∑ k = −∞ e T T where ΩT = 2π / T 14

14 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • The impulse train g p (t ) therefore can be expressed as  1 ∞ jΩ kt  g p (t ) =  ∑ e T  ⋅ g a (t )  T k = −∞  • From the frequency-shifting property of the CTFT, the CTFT of e jΩT kt g a (t ) is given by Ga ( j (Ω − kΩT ) ) 15

15 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Hence, an alternative form of the CTFT of g p (t ) is given by G p ( jΩ ) = 1 T

16



∑ Ga ( j (Ω − kΩT ) )

k = −∞

• Therefore, G p ( jΩ) is a periodic function of Ω consisting of a sum of shifted and scaled replicas of Ga ( jΩ) , shifted by integer multiples of ΩT and scaled by 1 T

16 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • The term on the RHS of the previous equation for k = 0 is the baseband portion of G p ( jΩ) , and each of the remaining terms are the frequency translated portions of G p ( jΩ )

17

• The frequency range ΩT ΩT − ≤Ω≤ 2 2 • is called the baseband or Nyquist band 17 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Assume g a (t ) is a band-limited signal with a CTFT Ga ( jΩ) as shown below

• The spectrum P ( jΩ) of p(t) having a sampling period T = Ω2π is indicated below T

18

18 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Two possible spectra of G p ( jΩ) are shown below

19

19 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • It is evident from the top figure on the previous slide that if ΩT > 2Ω m , there is no overlap between the shifted replicas of Ga ( jΩ) generating G p ( jΩ) • On the other hand, as indicated by the figure on the bottom, if ΩT < 2Ω m , there is an overlap of the spectra of the shifted replicas of Ga ( jΩ) generating G p ( jΩ) 20

20 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain If ΩT > 2Ω m , g a (t ) can be recovered exactly from g a (t ) by passing it through an ideal lowpass filter H r ( jΩ) with a gain T and a cutoff frequency Ωc greater than Ω m and less than ΩT − Ω m as shown below

21

21 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • The spectra of the filter and pertinent signals are shown below

22

22 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • On the other hand, if ΩT < 2Ω m , due to the overlap of the shifted replicas of Ga ( jΩ) , the spectrum Ga ( jΩ) cannot be separated by filtering to recover Ga ( jΩ) because of the distortion caused by a part of the replicas immediately outside the baseband folded back or aliased into the baseband 23

23 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain Sampling theorem - Let g a (t ) be a bandlimited signal with CTFT Ga ( jΩ) = 0 for Ω > Ωm

• Then g a (t ) is uniquely determined by its samples g a (nT ) , − ∞ ≤ n ≤ ∞ if ΩT ≥ 2Ω m where ΩT = 2π / T 24

24 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • The condition ΩT ≥ 2Ω m is often referred to as the Nyquist condition ΩT • The frequency is usually referred to as 2 the folding frequency

25

25 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Given {g a (nT )}, we can recover exactly g a (t ) by generating an impulse train ∞ g p (t ) = ∑n = −∞ g a (nT )δ(t − nT ) and then passing it through an ideal lowpass filter H r ( jΩ) with a gain T and a cutoff frequency Ωc satisfying Ω m < Ωc < (ΩT − Ω m ) 26

26 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • The highest frequency Ω m contained in g a (t ) is usually called the Nyquist frequency since it determines the minimum sampling frequency ΩT = 2Ω m that must be used to fully recover g a (t ) from its sampled version • The frequency 2Ω m is called the Nyquist rate 27

27 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain

28

• Oversampling - The sampling frequency is higher than the Nyquist rate • Undersampling - The sampling frequency is lower than the Nyquist rate • Critical sampling - The sampling frequency is equal to the Nyquist rate • Note: A pure sinusoid may not be recoverable from its critically sampled version 28 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • In digital telephony, a 3.4 kHz signal bandwidth is acceptable for telephone conversation • Here, a sampling rate of 8 kHz, which is greater than twice the signal bandwidth, is used

29

29 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • In high-quality analog music signal processing, a bandwidth of 20 kHz has been determined to preserve the fidelity • Hence, in compact disc (CD) music systems, a sampling rate of 44.1 kHz, which is slightly higher than twice the signal bandwidth, is used 30

30 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain

31

• Example - Consider the three continuoustime sinusoidal signals: g1 (t ) = cos(6πt ) g 2 (t ) = cos(14πt ) g3 (t ) = cos(26πt ) • Their corresponding CTFTs are: G1 ( jΩ) = π[δ(Ω − 6π) + δ(Ω + 6π)] G2 ( jΩ) = π[δ(Ω − 14π) + δ(Ω + 14π)] G3 ( jΩ) = π[δ(Ω − 26π) + δ(Ω + 26π)]

31 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • These three transforms are plotted below

32

32 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain

33

• These continuous-time signals sampled at a rate of T = 0.1 sec, i.e., with a sampling frequency ΩT = 20π rad/sec • The sampling process generates the continuous-time impulse trains, g1 p (t ) , g 2 p (t ) , and g3 p (t ) • Their corresponding CTFTs are given by Glp ( jΩ) = 10∑∞ k = −∞ Gl ( j (Ω − kΩT ) ), 1 ≤ l ≤ 3

33 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Plots of the 3 CTFTs are shown below

34

34 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain

35

• These figures also indicate by dotted lines the frequency response of an ideal lowpass filter with a cutoff at Ωc = ΩT / 2 = 10π and a gain T = 0.1 • The CTFTs of the lowpass filter output are also shown in these three figures • In the case of g1 (t ), the sampling rate satisfies the Nyquist condition, hence no aliasing 35 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Moreover, the reconstructed output is precisely the original continuous-time signal • In the other two cases, the sampling rate does not satisfy the Nyquist condition, resulting in aliasing and the filter outputs are all equal to cos(6πt) 36

36 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Note: In the figure below, the impulse appearing at Ω = 6π in the positive frequency passband of the filter results from the aliasing of the impulse in G2 ( jΩ) at Ω = −14π

37

• Likewise, the impulse appearing at Ω = 6π in the positive frequency passband of the filter results from the aliasing of the impulse in G3 ( jΩ) at Ω = 26π 37 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • We now derive the relation between the DTFT of g[n] and the CTFT of g p (t ) • To this end we compare ∞ j ω G (e ) = ∑n = −∞ g[n] e − jωn with ∞ − jΩnT G p ( jΩ) = ∑n = −∞ g a ( nT ) e

and make use of g[n] = g a (nT ), − ∞ < n < ∞

38

38 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Observation: We have G ( e jω ) = G p ( j Ω ) Ω =ω / T or, equivalently, G p ( j Ω ) = G ( e jω ) ω=ΩT • From the above observation and

G p ( jΩ ) = 1 T

39



∑ Ga ( j (Ω − kΩT ) )

k = −∞

39 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain we arrive at the desired result given by jω



G (e ) = T1 ∑ Ga ( jΩ − jkΩT ) k = −∞ ∞

Ω =ω / T

= 1 ∑ Ga ( j ω − jkΩT ) T T k = −∞ ∞

= 1 ∑ Ga ( j ω − j 2 π k ) T T T k = −∞

40

40 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • The relation derived on the previous slide can be alternately expressed as G (e jΩT ) = T1 ∑∞ k = −∞ Ga ( jΩ − jkΩT ) • From G ( e jω ) = G p ( j Ω ) Ω =ω / T or from G p ( j Ω ) = G ( e jω ) ω=ΩT

41

it follows that G (e jω ) is obtained from Gp ( jΩ) by applying the mapping Ω = ω T

41 Copyright © 2001, S. K. Mitra

Effect of Sampling in the Frequency Domain • Now, the CTFT Gp ( jΩ) is a periodic function of Ω with a period ΩT = 2π / T • Because of the mapping, the DTFT G (e jω ) is a periodic function of ω with a period 2π

42

42 Copyright © 2001, S. K. Mitra

Recovery of the Analog Signal • We now derive the expression for the output g^ a (t ) of the ideal lowpass reconstruction filter H r ( jΩ) as a function of the samples g[n] • The impulse response h r (t ) of the lowpass reconstruction filter is obtained by taking the inverse DTFT of H r ( jΩ): T , Ω ≤ Ωc  H r ( jΩ) =   0, Ω > Ωc 43

43 Copyright © 2001, S. K. Mitra

Recovery of the Analog Signal • Thus, the impulse response is given by h r (t ) =

1 ∞ H ( jΩ) e jΩt dΩ = T Ω c e jΩt dΩ 2 π ∫−∞ r 2 π ∫−Ω c

sin(Ωct ) = , −∞ ≤t ≤∞ ΩT t / 2 • The input to the lowpass filter is the impulse train gp(t ) : g p (t ) = ∑ 44

∞ n = −∞ g[ n] δ(t − nT )

44 Copyright © 2001, S. K. Mitra

Recovery of the Analog Signal • Therefore, the output g^ a (t ) of the ideal lowpass filter is given by: g a (t ) = hr (t ) * g p (t ) = ^

45



∑ g[n]hr (t − nT )

n = −∞

• Substituting hr (t ) = sin(Ωct ) /(ΩT t / 2) in the above and assuming for simplicity Ωc = ΩT / 2 = π / T , we get ∞ sin[ π(t − nT ) / T ] ^ g a (t ) = ∑ g[n] 45 π ( t − nT ) / T Copyright © 2001, S. K. Mitra n = −∞

Recovery of the Analog Signal • The ideal bandlimited interpolation process is illustrated below

46

46 Copyright © 2001, S. K. Mitra

Recovery of the Analog Signal • It can be shown that when Ωc = ΩT / 2 in sin( Ωct ) hr (t ) = ΩT t / 2

h r(0) = 1 and h r(nT ) = 0 for n ≠ 0 • As a result, from sin[ π(t − nT ) / T ] ∞ ^ g a (t ) = ∑n = −∞ g[n] π(t − nT ) / T we observe g a (rT ) = g[r ] = g a (rT ) 47

for all integer values of r in the range −∞ < r 0 • Such a signal is usually referred to as the bandpass signal • To prevent aliasing a bandpass signal can of course be sampled at a rate greater than twice the highest frequency, i.e. by ensuring ΩT ≥ 2Ω H

55 Copyright © 2001, S. K. Mitra

Sampling of Bandpass Signals • However, due to the bandpass spectrum of the continuous-time signal, the spectrum of the discrete-time signal obtained by sampling will have spectral gaps with no signal components present in these gaps • Moreover, if Ω H is very large, the sampling rate also has to be very large which may not be practical in some situations 56

56 Copyright © 2001, S. K. Mitra

Sampling of Bandpass Signals • A more practical approach is to use undersampling • Let ∆Ω = Ω H − Ω L define the bandwidth of the bandpass signal • Assume first that the highest frequency Ω H contained in the signal is an integer multiple of the bandwidth, i.e., Ω H = M (∆Ω) 57

57 Copyright © 2001, S. K. Mitra

Sampling of Bandpass Signals • We choose the sampling frequency ΩT to satisfy the condition 2Ω H ΩT = 2(∆Ω) = M which is smaller than 2Ω H , the Nyquist rate • Substitute the above expression for ΩT in G p ( jΩ ) = 1 T

58



∑ Ga ( j(Ω − k ΩT ))

k = −∞

58 Copyright © 2001, S. K. Mitra

Sampling of Bandpass Signals • This leads to ( ) G p ( jΩ ) = 1 ∑ ∞ G j Ω − j 2 k ( ∆Ω ) a k = −∞ T

• As before, G p( jΩ) consists of a sum of Ga ( jΩ) and replicas of Ga ( jΩ) shifted by integer multiples of twice the bandwidth ∆Ω and scaled by 1/T • The amount of shift for each value of k ensures that there will be no overlap between all shifted replicas no aliasing 59

59 Copyright © 2001, S. K. Mitra

Sampling of Bandpass Signals • Figure below illustrate the idea behind Ga ( jΩ)

− ΩH − ΩL

0

ΩL

ΩH

ΩL

ΩH



G p ( jΩ )

− ΩH − ΩL

60

0



60 Copyright © 2001, S. K. Mitra

Sampling of Bandpass Signals

61

• As can be seen, g a (t ) can be recovered from g p (t ) by passing it through an ideal bandpass filter with a passband given by Ω L ≤ Ω ≤ Ω H and a gain of T • Note: Any of the replicas in the lower frequency bands can be retained by passing g p (t ) through bandpass filters with passbands Ω L − k (∆Ω) ≤ Ω ≤ Ω H − k (∆Ω) , 1 ≤ k ≤ M − 1 providing a translation to lower frequency ranges 61 Copyright © 2001, S. K. Mitra