14 1.SAMPLING AND RECONSTRUCTION f3a=f3mod(fs)=1mod(1.5)=1-1.5=-0.5kHz f4a=f4mod(fs)=1.5mod(1.5)=1.5-1.5=0kHz The aliased signal xa(t)is obtained from x(t)by replacing f1,f2,f3,f4 by fia,f2a,f3a,faa. Thus,the signal x(t)=4cos(2πft)+3cos(2πf2t)+2cos(2πf3t)+cos(2πf:t) will be aliased with Xa(t)=4cos(2πf1at)+3cos(2πf2at)+2cos(2πf3at)+cos(2πf4at) =4+3cos(πt)+2cos(-πt)+cos(0) =5+5cos(πt) The signals x(t)and xa(t)are shown below.Note that they agree only at their sampled values,that is,xa(nT)=x(nT).The aliased signal xa(t)is smoother,that is,it has lower frequency content than x(t)because its spectrum lies entirely within the Nyquist interval, as shown below: T 2T 3T 4T 5T 6T 7T 8T 9T The form of xa(t)can also be derived in the frequency domain by replicating the spectrum of x(t)at intervals of fs=1.5 kHz,and then extracting whatever part of the spectrum lies within the Nyquist interval.The following figure shows this procedure. ideal reconstructor 3/2 3/2 2/2 2/2 2/2 2/2 1/2 1/2 1/2 -1.5 -1 -0.75 -0.5 0 0.50.75 1 1.5 kHz Nyquist Interval Each spectral line of x(t)is replicated in the fashion of Fig.1.3.2.The two spectral lines of strength 1/2 at f=+1.5 kHz replicate onto f=0 and the amplitudes add up to give a total amplitude of (4+1/2+1/2)=5.Similarly,the two spectral lines of strength 2/2 at
14 1. SAMPLING AND RECONSTRUCTION f3a = f3 mod(fs)= 1 mod(1.5)= 1 − 1.5 = −0.5 kHz f4a = f4 mod(fs)= 1.5 mod(1.5)= 1.5 − 1.5 = 0 kHz The aliased signal xa(t) is obtained from x(t) by replacing f1, f2, f3, f4 by f1a, f2a, f3a, f4a. Thus, the signal x(t)= 4 cos(2πf1t)+3 cos(2πf2t)+2 cos(2πf3t)+ cos(2πf4t) will be aliased with xa(t) = 4 cos(2πf1at)+3 cos(2πf2at)+2 cos(2πf3at)+ cos(2πf4at) = 4 + 3 cos(πt)+2 cos(−πt)+ cos(0) = 5 + 5 cos(πt) The signals x(t) and xa(t) are shown below. Note that they agree only at their sampled values, that is, xa(nT)= x(nT). The aliased signal xa(t) is smoother, that is, it has lower frequency content than x(t) because its spectrum lies entirely within the Nyquist interval, as shown below: 2T 3T 4T 5T 6T 7T 8T 9T t 0 T x(t) xa(t) The form of xa(t) can also be derived in the frequency domain by replicating the spectrum of x(t) at intervals of fs = 1.5 kHz, and then extracting whatever part of the spectrum lies within the Nyquist interval. The following figure shows this procedure. 0 1/2 1/2 1/2 1/2 2/2 2/2 2/2 2/2 3/2 3/2 4 0.5 1 1.5 kHz f -1.5 -1 -0.5 -0.75 0.75 Nyquist Interval ideal reconstructor Each spectral line of x(t) is replicated in the fashion of Fig. 1.3.2. The two spectral lines of strength 1/2 at f4 = ±1.5 kHz replicate onto f = 0 and the amplitudes add up to give a total amplitude of (4 + 1/2 + 1/2)= 5. Similarly, the two spectral lines of strength 2/2 at
1.4.SAMPLING OF SINUSOIDS 15 f3 =+1 kHz replicate onto f=0.5 kHz and the amplitudes add to give (3/2+2/2)=2.5 at f =+0.5 kHz.Thus,the ideal reconstructor will extract f=0 of strength 5 and f2=+0.5 of equal strengths 2.5,which recombine to give: 5+2.5e2mj0.5t+2.5e-2mf0.5t=5+5cos(πt) This example shows how aliasing can distort irreversibly the amplitudes of the original frequency components within the Nyquist interval. Example 1.4.5:The signal x(t)=sin(rt)+4sin(3πt)cos(2πt) where t is in msec,is sampled at a rate of 3 kHz.Determine the signal xa(t)aliased with x(t).Then,determine two other signals x(t)and x2(t)that are aliased with the same xa (t),that is,such that xi(nT)=x2(nT)=xa(nT). Solution:To determine the frequency content of x(t),we must express it as a sum of sinusoids. Using the trigonometric identity 2 sin a cosb sin(a +b)+sin(a -b),we find: x(t)=sin(πt)+2[sin(3πt+2πt)+sin(3πt-2πt)l=3sin(πt)+2sin(5πt) Thus,the frequencies present in x(t)are f=0.5 kHz and f2=2.5 kHz.The first already lies in the Nyquist interval [-1.5,1,5]kHz so that fia=f1.The second lies outside and can be reduced mod fs to give f2a f2 mod(fs)=2.5 mod(3)=2.5-3=-0.5.Thus,the given signal will“appear”as: Xa(t)=3 sin(2Tfiat)+2 sin(2Tf2at) =3sin(πt)+2sin(-πt)=3sin(πt)-2sin(πt) sin(mrt) To find two other signals that are aliased with xa(t),we may shift the original frequencies f1,f2 by multiples of fs.For example, x(t)=3 sin(7mrt)+2 sin(5Trt) x2(t)=3 sin(13mt)+2sin(11mrt) where we replaced (f1,f2}by (f1+fs,f2}={3.5,2.5}for x1(t),and by (f1+2fs,f2+fs}= {6.5,5.5}forx2(t). ▣ Example 1.4.6:Consider a periodic square wave with period To 1 sec,defined within its basic period0st≤lby 1,for0<t<0.5 x(t)= -1,for0.5<t<1 0, fort=0,0.5,1 where t is in seconds.The square wave is sampled at rate fs and the resulting samples are reconstructed by an ideal reconstructor as in Fig.1.4.2.Determine the signal xa(t)that will appear at the output of the reconstructor for the two cases fs 4 Hz and fs =8 Hz Verify that xa(t)and x(t)agree at the sampling times t nT
1.4. SAMPLING OF SINUSOIDS 15 f3 = ±1 kHz replicate onto f = ∓0.5 kHz and the amplitudes add to give (3/2+2/2)= 2.5 at f = ±0.5 kHz. Thus, the ideal reconstructor will extract f1 = 0 of strength 5 and f2 = ±0.5 of equal strengths 2.5, which recombine to give: 5 + 2.5e2πj0.5t + 2.5e−2πj0.5t = 5 + 5 cos(πt) This example shows how aliasing can distort irreversibly the amplitudes of the original frequency components within the Nyquist interval. Example 1.4.5: The signal x(t)= sin(πt)+4 sin(3πt)cos(2πt) where t is in msec, is sampled at a rate of 3 kHz. Determine the signal xa(t) aliased with x(t). Then, determine two other signals x1(t) and x2(t) that are aliased with the same xa(t), that is, such that x1(nT)= x2(nT)= xa(nT). Solution: To determine the frequency content of x(t), we must express it as a sum of sinusoids. Using the trigonometric identity 2 sin a cos b = sin(a + b)+ sin(a − b), we find: x(t)= sin(πt)+2 sin(3πt + 2πt)+ sin(3πt − 2πt) = 3 sin(πt)+2 sin(5πt) Thus, the frequencies present in x(t) are f1 = 0.5 kHz and f2 = 2.5 kHz. The first already lies in the Nyquist interval [−1.5, 1, 5] kHz so that f1a = f1. The second lies outside and can be reduced mod fs to give f2a = f2 mod(fs)= 2.5 mod(3)= 2.5 − 3 = −0.5. Thus, the given signal will “appear” as: xa(t) = 3 sin(2πf1at)+2 sin(2πf2at) = 3 sin(πt)+2 sin(−πt)= 3 sin(πt)−2 sin(πt) = sin(πt) To find two other signals that are aliased with xa(t), we may shift the original frequencies f1, f2 by multiples of fs. For example, x1(t) = 3 sin(7πt)+2 sin(5πt) x2(t) = 3 sin(13πt)+2 sin(11πt) where we replaced {f1, f2} by {f1 +fs, f2}={3.5, 2.5} for x1(t), and by {f1 +2fs, f2 +fs} = {6.5, 5.5} for x2(t). Example 1.4.6: Consider a periodic square wave with period T0 = 1 sec, defined within its basic period 0 ≤ t ≤ 1 by x(t)= ⎧ ⎪⎨ ⎪⎩ 1, for 0 <t< 0.5 −1, for 0.5 <t< 1 0, for t = 0, 0.5, 1 1 -1 0 0.5 1 t where t is in seconds. The square wave is sampled at rate fs and the resulting samples are reconstructed by an ideal reconstructor as in Fig. 1.4.2. Determine the signal xa(t) that will appear at the output of the reconstructor for the two cases fs = 4 Hz and fs = 8 Hz. Verify that xa(t) and x(t) agree at the sampling times t = nT
16 1.SAMPLING AND RECONSTRUCTION Solution:The Fourier series expansion of the square wave contains odd harmonics at frequen- cies fm =m/To=m Hz,m=1,3,5,7,....It is given by x(t)=∑bm sin(2Tmt)= m=1.3,5 (1.4.4) =b1sin(2Tt)+b3sin(6πt)+b5sin(10rt)+··· where bm =4/(rm),m =1,3,5,....Because of the presence of an infinite number of harmonics,the square wave is not bandlimited and,thus,cannot be sampled properly at any rate.For the rate fs=4 Hz,only the fi=1 harmonic lies within the Nyquist interval [-2,2]Hz.For the rate fs =8 Hz,only f 1 and f3 3 Hz lie in [-4,4]Hz.The following table shows the true frequencies and the corresponding aliased frequencies in the two cases: fs f 1 35 79111315 4 Hz fmod(4) 1-11-11-11-1 8 Hz fmod(8) 13-3-113-3-1·· Note the repeated patterns of aliased frequencies in the two cases.If a harmonic is aliased with +f=+1,then the corresponding term in Eq.(1.4.4)will appear (at the output of the reconstructor)as sin(±2πft)=±sin(2πt).And,if it is aliased with±f3=±3,the term will appear as sin(±2πf3t)=±sin(6πt).Thus,forf=4,the aliased signal will be xa(t)=b1sin(2πt)-b3sin(2πt)+bs sin(2rπt)-b,sin(2rt)+··· =(b1-b3+b5-b,+bg-b11+·)sin(2Tπt) =Asin(2πt) where A--中森中 (1.4.5) k=0 Similarly,for fs=8,grouping together the 1 and 3 Hz terms,we find the aliased signal xa(t)=(b1-b,+bg-b15+·)sin(2πt)+ +(b3-b5+b11-b13+···)sin(6πt) =Bsin(2πt)+Csin(6πt) where a-2-2-7] k=0 (1.4.6) c-含at-e-a[+5威l k=0
16 1. SAMPLING AND RECONSTRUCTION Solution: The Fourier series expansion of the square wave contains odd harmonics at frequencies fm = m/T0 = m Hz, m = 1, 3, 5, 7,... . It is given by x(t) = m=1,3,5,... bm sin(2πmt)= = b1 sin(2πt)+b3 sin(6πt)+b5 sin(10πt)+··· (1.4.4) where bm = 4/(πm), m = 1, 3, 5,... . Because of the presence of an infinite number of harmonics, the square wave is not bandlimited and, thus, cannot be sampled properly at any rate. For the rate fs = 4 Hz, only the f1 = 1 harmonic lies within the Nyquist interval [−2, 2] Hz. For the rate fs = 8 Hz, only f1 = 1 and f3 = 3 Hz lie in [−4, 4] Hz. The following table shows the true frequencies and the corresponding aliased frequencies in the two cases: fs f 1 3 5 7 9 11 13 15 ··· 4 Hz f mod(4) 1 −1 1 −1 1 −1 1 −1 ··· 8 Hz f mod(8) 1 3 −3 −11 3 −3 −1 ··· Note the repeated patterns of aliased frequencies in the two cases. If a harmonic is aliased with ±f1 = ±1, then the corresponding term in Eq. (1.4.4) will appear (at the output of the reconstructor) as sin(±2πf1t)= ± sin(2πt). And, if it is aliased with ±f3 = ±3, the term will appear as sin(±2πf3t)= ± sin(6πt). Thus, for fs = 4, the aliased signal will be xa(t) = b1 sin(2πt)−b3 sin(2πt)+b5 sin(2πt)−b7 sin(2πt)+··· = (b1 − b3 + b5 − b7 + b9 − b11 +··· )sin(2πt) = A sin(2πt) where A = ∞ k=0 b1+4k − b3+4k = 4 π ∞ k=0 1 1 + 4k − 1 3 + 4k (1.4.5) Similarly, for fs = 8, grouping together the 1 and 3 Hz terms, we find the aliased signal xa(t) = (b1 − b7 + b9 − b15 +··· )sin(2πt)+ + (b3 − b5 + b11 − b13 +··· )sin(6πt) = Bsin(2πt)+C sin(6πt) where B = ∞ k=0 b1+8k − b7+8k = 4 π ∞ k=0 1 1 + 8k − 1 7 + 8k C = ∞ k=0 b3+8k − b5+8k = 4 π ∞ k=0 1 3 + 8k − 1 5 + 8k (1.4.6)
1.4.SAMPLING OF SINUSOIDS 17 There are two ways to determine the aliased coefficients A,B,C.One is to demand that the sampled signals xa(nT)and x(nT)agree.For example,in the first case we have T =1/fs =1/4,and therefore,xa(nT)=A sin(2n/4)=Asin(n/2).The condition xa(nT)=x(nT)evaluated at n 1 implies A=1.The following figure shows x(t),xa(t), and their samples: 0 1/4 1/2 Similarly,in the second case we have T=1/fs=1/8,resulting in the sampled aliased signal xa(nT)=B sin(Trn/4)+C sin(3Trn/4).Demanding the condition xa(nT)=x(nT) at n 1,2 gives the two equations Bsin(π/4)+Csin(3π/4)=1 B+C=2 B sin(/2)+Csin(3m/2)=1 B-C=1 which can be solved to give B =(v2+1)/2 and C=(v2-1)/2.The following figure shows x(t),xa(t),and their samples: 1/8 2 The second way of determining A,B,C is by evaluating the infinite sums of Egs.(1.4.5) and (1.4.6).All three are special cases of the more general sum: b(m,M)= 1 Lm+Mk-M-m+Mk k=0 with M>m>0.It can be computed as follows.Write 1 1 m+M派-M-m+M= [(e-mx-e-(4-mx)e-Mkx dx then,interchange summation and integration and use the geometric series sum(for x>0) 1 k=0 1-e-Mx to get
1.4. SAMPLING OF SINUSOIDS 17 There are two ways to determine the aliased coefficients A, B, C. One is to demand that the sampled signals xa(nT) and x(nT) agree. For example, in the first case we have T = 1/fs = 1/4, and therefore, xa(nT)= A sin(2πn/4)= A sin(πn/2). The condition xa(nT)= x(nT) evaluated at n = 1 implies A = 1. The following figure shows x(t), xa(t), and their samples: t 0 1/4 1/2 1 Similarly, in the second case we have T = 1/fs = 1/8, resulting in the sampled aliased signal xa(nT)= Bsin(πn/4)+C sin(3πn/4). Demanding the condition xa(nT)= x(nT) at n = 1, 2 gives the two equations Bsin(π/4)+C sin(3π/4)= 1 Bsin(π/2)+C sin(3π/2)= 1 ⇒ B + C = √ 2 B − C = 1 which can be solved to give B = ( √ 2 + 1)/2 and C = ( √ 2 − 1)/2. The following figure shows x(t), xa(t), and their samples: t 0 1/8 1/2 1 The second way of determining A, B, C is by evaluating the infinite sums of Eqs. (1.4.5) and (1.4.6). All three are special cases of the more general sum: b(m, M)≡ 4 π ∞ k=0 1 m + Mk − 1 M − m + Mk with M>m> 0. It can be computed as follows. Write 1 m + Mk − 1 M − m + Mk = ∞ 0 e−mx − e−(M−m)x e−Mkx dx then, interchange summation and integration and use the geometric series sum (for x > 0) ∞ k=0 e−Mkx = 1 1 − e−Mx to get
18 1.SAMPLING AND RECONSTRUCTION 4 b(m,M)= e-mx-e--mx dx J0 1-e-Mx Looking this integral up in a table of integrals [301,we find: 4 (mπ b(m,M)=M cot(M) The desired coefficients A,B,C are then A=b1,4=co(受=1 B=b1,8=2co(g)=2+1 2 c=b3,8-o受)-1 1 2 The above results generalize to any sampling rate fs=M Hz,where M is a multiple of 4. For example,if fs=12,we obtain xa(t)=b(1,12)sin(2πt)+b(3,12)sin(6πt)+b(5,12)sin(10πt) and more generally Xa(t)= ∑ b(m,M)sin(2Trmt) m=1,3.,(M/2)-1 The coefficients b(m,M)tend to the original Fourier series coefficients b in the continuous time limit,Mo.Indeed,using the approximation cot(x)1/x,valid for small x,we obtain the limit 4 1 4 mb(m,M=府·Tm/M=Tm =bm The table below shows the successive improvement of the values of the aliased harmonic coefficients as the sampling rate increases: coefficients 4H2 8 Hz 12 Hz 16 Hz 1 1.207 1.244 1.257 1.273 D3 0.207 0.333 0.374 0.424 0.089 0.167 0.255 0.050 0.182 In this example,the sampling rates of 4 and 8 Hz,and any multiple of 4,were chosen so that all the harmonics outside the Nyquist intervals got aliased onto harmonics within the intervals.For other values of fs,such as fs =13 Hz,it is possible for the aliased harmonics to fall on non-harmonic frequencies within the Nyquist interval;thus,changing not only the relative balance of the Nyquist interval harmonics,but also the frequency values
18 1. SAMPLING AND RECONSTRUCTION b(m, M)= 4 π ∞ 0 e−mx − e−(M−m)x 1 − e−Mx dx Looking this integral up in a table of integrals [30], we find: b(m, M)= 4 M cotmπ M The desired coefficients A, B, C are then: A = b(1, 4)= cot π 4 = 1 B = b(1, 8)= 1 2 cot π 8 = √ 2 + 1 2 C = b(3, 8)= 1 2 cot 3π 8 = √ 2 − 1 2 The above results generalize to any sampling rate fs = M Hz, where M is a multiple of 4. For example, if fs = 12, we obtain xa(t)= b(1, 12)sin(2πt)+b(3, 12)sin(6πt)+b(5, 12)sin(10πt) and more generally xa(t)= m=1,3,...,(M/2)−1 b(m, M)sin(2πmt) The coefficients b(m, M) tend to the original Fourier series coefficients bm in the continuoustime limit, M → ∞. Indeed, using the approximation cot(x)≈ 1/x, valid for small x, we obtain the limit lim M→∞ b(m, M)= 4 M · 1 πm/M = 4 πm = bm The table below shows the successive improvement of the values of the aliased harmonic coefficients as the sampling rate increases: coefficients 4 Hz 8 Hz 12 Hz 16 Hz ∞ b1 1 1.207 1.244 1.257 1.273 b3 – 0.207 0.333 0.374 0.424 b5 – – 0.089 0.167 0.255 b7 – – – 0.050 0.182 In this example, the sampling rates of 4 and 8 Hz, and any multiple of 4, were chosen so that all the harmonics outside the Nyquist intervals got aliased onto harmonics within the intervals. For other values of fs, such as fs = 13 Hz, it is possible for the aliased harmonics to fall on non-harmonic frequencies within the Nyquist interval; thus, changing not only the relative balance of the Nyquist interval harmonics, but also the frequency values.