1.4.SAMPLING OF SINUSOIDS 19 When we develop DFT algorithms,we will see that the aliased Fourier series coef- ficients for the above type of problem can be obtained by performing a DFT,provided that the periodic analog signal remains a periodic discrete-time signal after sampling. This requires that the sampling frequency fs be an integral multiple of the fundamen- tal harmonic of the given signal,that is,fs Nf1.In such a case,the aliased coefficients can be obtained by an N-point DFT of the first N time samples x(nT),n =0,1,...,N-1 of the analog signal.See Section 9.7. Example 1.4.7:A sound wave has the form: x(t)=2Acos(10mt)+2Bcos(30mt) +2C cos(50mt)+2D cos(60mrt)+2E cos(90mt)+2F cos(125mt) where t is in milliseconds.What is the frequency content of this signal?Which parts of it are audible and why? This signal is prefiltered by an analog prefilter H(f).Then,the output y(t)of the pre- filter is sampled at a rate of 40 kHz and immediately reconstructed by an ideal analog reconstructor,resulting into the final analog output ya(t),as shown below: x(t) y(t) y(nT) y(t) prefilter 40 kHz analog analog H价 analog sampler digital reconstructor analog Determine the output signals y(t)and ya(t)in the following cases: (a)When there is no prefilter,that is,H(f)=1 for all f. (b)When H(f)is the ideal prefilter with cutoff fs/2 20 kHz. (c)When H(f)is a practical prefilter with specifications as shown below: H(f) Analog Prefilter (0dB) 60 dB/octave (-60dB) 0 20 40 60 80 kHz That is,it has a flat passband over the 20 kHz audio range and drops monotonically at a rate of 60 dB per octave beyond 20 kHz.Thus,at 40 kHz,which is an octave away,the filter's response will be down by 60 dB. For the purposes of this problem,the filter's phase response may be ignored in deter mining the output y(t).Does this filter help in removing the aliased components? What happens if the filter's attenuation rate is reduced to 30 dB/octave? Solution:The six terms of x(t)have frequencies:
1.4. SAMPLING OF SINUSOIDS 19 When we develop DFT algorithms, we will see that the aliased Fourier series coef- ficients for the above type of problem can be obtained by performing a DFT, provided that the periodic analog signal remains a periodic discrete-time signal after sampling. This requires that the sampling frequency fs be an integral multiple of the fundamental harmonic of the given signal, that is, fs = Nf1. In such a case, the aliased coefficients can be obtained by an N-point DFT of the first N time samples x(nT), n = 0, 1,...,N−1 of the analog signal. See Section 9.7. Example 1.4.7: A sound wave has the form: x(t) = 2A cos(10πt)+2Bcos(30πt) + 2C cos(50πt)+2D cos(60πt)+2E cos(90πt)+2F cos(125πt) where t is in milliseconds. What is the frequency content of this signal? Which parts of it are audible and why? This signal is prefiltered by an analog prefilter H(f ). Then, the output y(t) of the pre- filter is sampled at a rate of 40 kHz and immediately reconstructed by an ideal analog reconstructor, resulting into the final analog output ya(t), as shown below: prefilter H(f) 40 kHz sampler analog reconstructor x(t) y(t) ya y(nT) (t) analog analog analog digital Determine the output signals y(t) and ya(t) in the following cases: (a) When there is no prefilter, that is, H(f )= 1 for all f . (b) When H(f ) is the ideal prefilter with cutoff fs/2 = 20 kHz. (c) When H(f ) is a practical prefilter with specifications as shown below: 20 40 60 60 dB/octave (-60 dB) (0 dB) Analog Prefilter 80 kHz f H(f) 0 1 That is, it has a flat passband over the 20 kHz audio range and drops monotonically at a rate of 60 dB per octave beyond 20 kHz. Thus, at 40 kHz, which is an octave away, the filter’s response will be down by 60 dB. For the purposes of this problem, the filter’s phase response may be ignored in determining the output y(t). Does this filter help in removing the aliased components? What happens if the filter’s attenuation rate is reduced to 30 dB/octave? Solution: The six terms of x(t) have frequencies:
20 1.SAMPLING AND RECONSTRUCTION fA =5 kHz fc =25 kHz fE =45 kHz f8 =15 kHz fD =30 kHz fF 62.5 kHz Only fA and fe are audible;the rest are inaudible.Our ears filter out all frequencies beyond 20 kHz,and we hear x(t)as though it were the signal: x1(t)=2Acos(10mt)+2B cos(30mt) Each term of x(t)is represented in the frequency domain by two peaks at positive and negative frequencies,for example,the A-term has spectrum: 2A cos(2Tfat)=A e2mifat Ae-2mifat -A6(f-fA)+A6(f+fa) Therefore,the spectrum of the input x(t)will be as shown below: ideal prefilter F E DC B A A BC D E F -70-60-50-40-30-20-10010203040506070kHz The sampling process will replicate each of these peaks at multiples of fs=40 kHz.The four terms C,D,E,F lie outside the [-20,20]kHz Nyquist interval and therefore will be aliased with the following frequencies inside the interval: fc=25 fc.a fcmod (fs)=fc-fs=25-40=-15 fD=30 fD.a fD mod (fs)=fD-fs=30-40=-10 fE =45 fE.a fE mod (fs)=fg-fs =45-40=5 fF=62.5→fr,a=frmod(fs)=fr-2fs=62.5-2×40=-17.5 In case (a),if we do not use any prefilter at all,we will have y(t)=x(t)and the recon- structed signal will be: ya (t)=2A cos(10mt)+2Bcos(30mt) +2C cos(-2T15t)+2D cos(-2m10t) +2Ecos(2π5t)+2Fcos(-2π17.5t) =2(A+E)cos(10mt)+2(B+C)cos(30Tt) +2Dcos(20πt)+2Fcos(35πt)
20 1. SAMPLING AND RECONSTRUCTION fA = 5 kHz fB = 15 kHz fC = 25 kHz fD = 30 kHz fE = 45 kHz fF = 62.5 kHz Only fA and fB are audible; the rest are inaudible. Our ears filter out all frequencies beyond 20 kHz, and we hear x(t) as though it were the signal: x1(t)= 2A cos(10πt)+2Bcos(30πt) Each term of x(t) is represented in the frequency domain by two peaks at positive and negative frequencies, for example, the A-term has spectrum: 2A cos(2πfAt)= A e2πjfAt + A e−2πjfAt −→ A δ(f − fA)+A δ(f + fA) Therefore, the spectrum of the input x(t) will be as shown below: -70 -50 kHz -60 -40 60 -30 10 -20 30 50 70 -10 40 20 Nyquist interval ideal prefilter F B E D C EF B D A C A f 0 The sampling process will replicate each of these peaks at multiples of fs = 40 kHz. The four terms C, D, E, F lie outside the [−20, 20] kHz Nyquist interval and therefore will be aliased with the following frequencies inside the interval: fC = 25 ⇒ fC, a = fC mod (fs)= fC − fs = 25 − 40 = −15 fD = 30 ⇒ fD, a = fD mod (fs)= fD − fs = 30 − 40 = −10 fE = 45 ⇒ fE, a = fE mod (fs)= fE − fs = 45 − 40 = 5 fF = 62.5 ⇒ fF, a = fF mod (fs)= fF − 2fs = 62.5 − 2 × 40 = −17.5 In case (a), if we do not use any prefilter at all, we will have y(t)= x(t) and the reconstructed signal will be: ya(t) = 2A cos(10πt)+2Bcos(30πt) + 2C cos(−2π15t)+2D cos(−2π10t) + 2E cos(2π5t)+2F cos(−2π17.5t) = 2(A + E)cos(10πt)+2(B + C)cos(30πt) + 2D cos(20πt)+2F cos(35πt)
1.4.SAMPLING OF SINUSOIDS 21 where we replaced each out-of-band frequency with its aliased self,for example, 2Ccos(2πfct)-2Ccos(2πfc,at) The relative amplitudes of the 5 and 15 kHz audible components have changed and,in addition,two new audible components at 10 and 17.5 kHz have been introduced.Thus, ya(t)will sound very different from x(t). In case (b),if an ideal prefilter with cutoff fs/2 20 kHz is used,then its output will be the same as the audible part of x(t),that is,y(t)=x1(t).The filter's effect on the input spectrum is to remove completely all components beyond the 20 kHz Nyquist frequency, as shown below: ideal prefilter A A B F E CDEF -70-60-50-40-30-20-10010203040506070kHz -Nyquist interval Because the prefilter's output contains no frequencies beyond the Nyquist frequency,there will be no aliasing and after reconstruction the output would sound the same as the input, ya(t)=y(t)=x1(t). In case (c),if the practical prefilter H(f)is used,then its output y(t)will be: y(t)=2AH(fA)cos(10mt)+2BH(fg)|cos(30mt) +2CIH(fc)Icos(50πt)+2DIH(fD)川cos(60πt) (1.4.7 +2EH(fE)|cos(90mt)+2FH(fF)|cos(125mt) This follows from the steady-state sinusoidal response of a filter applied to the individual sinusoidal terms of x(t),for example,the effect of H(f)on A is: 2A cos(2TfAt)2AIH(fA)I cos(2mfAt+0(fA)) where in Eq.(1.4.7)we ignored the phase response 0(fA)=arg H(fA).The basic conclu- sions of this example are not affected by this simplification. Note that Eq.(1.4.7)applies also to cases (a)and (b).In case (a),we can replace: H (fA)I=H(fB)I=H(fc)I=H (fD)I=H (fE)I=H(fE)I=1 and in case (b): H(fA)=H(fB)I=1,IH(fc)=H(fD)=H(fE)=IH(fF)I=0
1.4. SAMPLING OF SINUSOIDS 21 where we replaced each out-of-band frequency with its aliased self, for example, 2C cos(2πfCt)→ 2C cos(2πfC,at) The relative amplitudes of the 5 and 15 kHz audible components have changed and, in addition, two new audible components at 10 and 17.5 kHz have been introduced. Thus, ya(t) will sound very different from x(t). In case (b), if an ideal prefilter with cutoff fs/2 = 20 kHz is used, then its output will be the same as the audible part of x(t), that is, y(t)= x1(t). The filter’s effect on the input spectrum is to remove completely all components beyond the 20 kHz Nyquist frequency, as shown below: -70 -50 kHz -60 -40 60 -30 10 -20 30 50 70 -10 40 20 Nyquist interval ideal prefilter A A F E C EF C B B D D f 0 Because the prefilter’s output contains no frequencies beyond the Nyquist frequency, there will be no aliasing and after reconstruction the output would sound the same as the input, ya(t)= y(t)= x1(t). In case (c), if the practical prefilter H(f ) is used, then its output y(t) will be: y(t) = 2A|H(fA)| cos(10πt)+2B|H(fB)| cos(30πt) + 2C|H(fC)| cos(50πt)+2D|H(fD)| cos(60πt) + 2E|H(fE)| cos(90πt)+2F|H(fF)| cos(125πt) (1.4.7) This follows from the steady-state sinusoidal response of a filter applied to the individual sinusoidal terms of x(t), for example, the effect of H(f ) on A is: 2A cos(2πfAt) H −→ 2A|H(fA)| cos 2πfAt + θ(fA) where in Eq. (1.4.7) we ignored the phase response θ(fA)= arg H(fA). The basic conclusions of this example are not affected by this simplification. Note that Eq. (1.4.7) applies also to cases (a) and (b). In case (a), we can replace: |H(fA)|=|H(fB)|=|H(fC)|=|H(fD)|=|H(fE)|=|H(fF)| = 1 and in case (b): |H(fA)|=|H(fB)| = 1, |H(fC)|=|H(fD)|=|H(fE)|=|H(fF)| = 0
22 1.SAMPLING AND RECONSTRUCTION In case (c),because fa and fe are in the filter's passband,we still have H(fA)川=IH(fB)l=1 To determine H(fc)I,IH(fD)1,H(fE)I,IH(fr)I,we must find how many octavest away the frequencies fc,fD,fE,fr are from the fs/2 =20 kHz edge of the passband.These are given by: log2 fc fs/2 =0.322 log2 fD 30 fs/2 =log2 20 =0.585 fE fs/2 =l0g2 45 20 =1.170 log2 62.5 =10g220 =1.644 fs/2 and therefore,the corresponding filter attenuations will be: at fc: 60 dB/octave x 0.322 octaves 19.3 dB at fD: 60 dB/octave x 0.585 octaves 35.1 dB at fE: 60 dB/octave x 1.170 octaves 70.1 dB at fr: 60 dB/octave x 1.644 octaves =98.6 dB By definition,an amount of A dB attenuation corresponds to reducing H(f)I by a factor 10-A/20.For example,the relative drop of H(f)with respect to the edge of the passband H(fs/2)|is A dB if: IH()I 1Hf/2=10-A/20 Assuming that the passband has 0 dB normalization,H(fs/2)=1,we find the following values for the filter responses: Hfel=10-93/20=号 1 IHfo1=10-35./20= 57 IH(fE)l=10-70.1/20= 1 3234 1H(fF)川=10-98.6/20= 1 85114 It follows from Eq.(1.4.7)that the output y(t)of the prefilter will be: tThe number of octaves is the number of powers of two,that is,if f2=2Vfv=log2 (f2/f1)
22 1. SAMPLING AND RECONSTRUCTION In case (c), because fA and fB are in the filter’s passband, we still have |H(fA)|=|H(fB)| = 1 To determine |H(fC)|,|H(fD)|,|H(fE)|,|H(fF)|, we must find how many octaves† away the frequencies fC, fD, fE, fF are from the fs/2 = 20 kHz edge of the passband. These are given by: log2 fC fs/2 = log2 25 20 = 0.322 log2 fD fs/2 = log2 30 20 = 0.585 log2 fE fs/2 = log2 45 20 = 1.170 log2 fF fs/2 = log2 62.5 20 = 1.644 and therefore, the corresponding filter attenuations will be: at fC: 60 dB/octave × 0.322 octaves = 19.3 dB at fD: 60 dB/octave × 0.585 octaves = 35.1 dB at fE: 60 dB/octave × 1.170 octaves = 70.1 dB at fF: 60 dB/octave × 1.644 octaves = 98.6 dB By definition, an amount of A dB attenuation corresponds to reducing |H(f )| by a factor 10−A/20. For example, the relative drop of |H(f )| with respect to the edge of the passband |H(fs/2)| is A dB if: |H(f )| |H(fs/2)| = 10−A/20 Assuming that the passband has 0 dB normalization, |H(fs/2)| = 1, we find the following values for the filter responses: |H(fC)| = 10−19.3/20 = 1 9 |H(fD)| = 10−35.1/20 = 1 57 |H(fE)| = 10−70.1/20 = 1 3234 |H(fF)| = 10−98.6/20 = 1 85114 It follows from Eq. (1.4.7) that the output y(t) of the prefilter will be: †The number of octaves is the number of powers of two, that is, if f2 = 2νf1 ⇒ ν = log2(f2/f1)
1.4.SAMPLING OF SINUSOIDS 23 y(t)=2Acos(10πt)+2Bcos(30πt) 2C os(50mt)+ 2D cos(60πt) 7 (1.4.8) 2E 2F +3234cos(90mt)+g54cos(125mt) Its spectrum is shown below: (-19dB) (-35dB) (-70dB) E (-98dB) f -70-60-50-40-30-20-10010203040506070kHz inervar Notice how the inaudible out-of-band components have been attenuated by the prefilter, so that when they get aliased back into the Nyquist interval because of sampling,their distorting effect will be much less.The wrapping of frequencies into the Nyquist interval is the same as in case(a).Therefore,after sampling and reconstruction we will get: .)=2(a+3磊)osa0mt+2(B+写 E c0s(30πt) 9 2D 2F + cos(20mt)+ 7 85114c0s(35mt) Now,all aliased components have been reduced in magnitude.The component closest to the Nyquist frequency,namely fc,causes the most distortion because it does not get attenuated much by the filter. We will see in Section 1.5.3 that the prefilter's rate of attenuation in dB/octave is related to the filter's order N by o 6N so that o 60 dB/octave corresponds to 60 6N or N 10.Therefore,the given filter is already a fairly complex analog filter.Decreasing the filter's complexity to o 30 dB/octave,corresponding to filter order N =5,would reduce all the attenuations by half,that is, at fc:30 dB/octave x 0.322 octaves =9.7 dB at fp:30 dB/octave x 0.585 octaves 17.6 dB at fe:30 dB/octave x 1.170 octaves 35.1 dB at fF:30 dB/octave x 1.644 octaves =49.3 dB and,in absolute units:
1.4. SAMPLING OF SINUSOIDS 23 y(t) = 2A cos(10πt)+2Bcos(30πt) + 2C 9 cos(50πt)+ 2D 57 cos(60πt) + 2E 3234 cos(90πt)+ 2F 85114 cos(125πt) (1.4.8) Its spectrum is shown below: -70 -50 kHz -60 -40 60 -30 10 -20 30 50 70 -10 40 20 Nyquist interval A A C C E F E F B B D D f 0 (-19 dB) (-35 dB) (-70 dB) (-98 dB) Notice how the inaudible out-of-band components have been attenuated by the prefilter, so that when they get aliased back into the Nyquist interval because of sampling, their distorting effect will be much less. The wrapping of frequencies into the Nyquist interval is the same as in case (a). Therefore, after sampling and reconstruction we will get: ya(t) = 2 A + E 3234 cos(10πt)+2 B + C 9 cos(30πt) + 2D 57 cos(20πt)+ 2F 85114 cos(35πt) Now, all aliased components have been reduced in magnitude. The component closest to the Nyquist frequency, namely fC, causes the most distortion because it does not get attenuated much by the filter. We will see in Section 1.5.3 that the prefilter’s rate of attenuation in dB/octave is related to the filter’s order N by α = 6N so that α = 60 dB/octave corresponds to 60 = 6N or N = 10. Therefore, the given filter is already a fairly complex analog filter. Decreasing the filter’s complexity to α = 30 dB/octave, corresponding to filter order N = 5, would reduce all the attenuations by half, that is, at fC: 30 dB/octave × 0.322 octaves = 9.7 dB at fD: 30 dB/octave × 0.585 octaves = 17.6 dB at fE: 30 dB/octave × 1.170 octaves = 35.1 dB at fF: 30 dB/octave × 1.644 octaves = 49.3 dB and, in absolute units: