Chapter 2: Solution Dicrete Time Proceing of Continuou Time Signal Sampling à 2.. : Conider a inuoidal ignal and let u ample it at a frequency F 2kHz. xt 3co000t 0. a) Determine and expreion for the ampled equence xn xnt and determine it Dicrete Time Fourier Tranform X DTFTxn; b) Determine XF FTxt; c) Recompute X from the XF and verify that you obtain the ame expreion a in a). Solution: a) xn xt tnt 3co0.5n 0.. Equivalently, uing complex exponential, Therefore it DTFT become xn.5e j0. e j0.5n.5e j0. e j0.5n X DTFTxn 3e j0. 2 3ej0. with b) Since FTe j2f 0t F F 0 then 2
2 Solution_Chapter2[].nb for all F. XF.5e j0. F 500.5e j0. F 500 c) Recall that X DTFTxn and XF FTxt are related a X F XF kf FF 2 k with F the ampling frequency. In thi cae there i no aliaing, ince all frequencie are contained within F 2 khz. Therefore, in the interval we can write X F XF FF 2 with F 2000Hz. Subtitute for XF from part b) to obtain X 2000.5e j0. 2000 2 500.5ej0. 2000 2 Now recall the property of the "delta" function: for any contant a 0, Therefore we can write ame a in b). at a t a X 3e j0. 2 3ej0. 2 500 à 2.2. Repeat when the continuou time ignal i xt 3co3000t Solution Following the ame tep: a) xn 3co.5n. Notice that now we have aliaing, ince F 0 500Hz F 2 000Hz. Therefore, a hown in the figure below, there i an aliaing at F F 0 2000 500Hz 500Hz. Therefore after ampling we have the ame ignal a in., and everything follow.
Solution_Chapter2[].nb 3 X (F).5.5 F(kHz) F X ( F ) kf k F.5 0.5 0. 5 2.0.5 F.0 2 F(kHz) à 2.3. For each XF FTxt hown, determine X DTFTxn, where xn xnt i the ampled equence. The Sampling frequency F i given for each cae. a) XF F 000, F 3000Hz; b) XF F 500 F 500, F 200Hz c) XF 3rect 000 F, F 2000Hz; d) XF 3rect 000 F, F 000Hz; e) XF rect F3000 Solution 000 For all thee problem ue the relation F3000 rect 000, F 3000Hz; X F k X F 2 kf a) X 3000 k 3000 2 000 k3000 2 2 k 3 k2;
4 Solution_Chapter2[].nb 200 b) X 200 k 2 500 k200 200 2 2 0 k2 0 k2 k 0 2 500 200.2; 500 k200 c) X 20003 rect 20002 k 000 k 2000 000 6000 below. X () rect k2 k hown 2 2 2 2 d) X 0003 rect 0002 k 000 k 000 000 3000 X () rect k2 k 2 hown below 2 2 e) X 3000 rect 300023000 k k rect k2 23 000 k 3000 000 300023000 rect 3000 rect 3 3 2 3 3k rect 2 3 3k hown below. 6000 k 6000 X () 000 k 3000 000 2 2 2 6 6 2
Solution_Chapter2[].nb 5 à 2.4. In the ytem hown, let the equence be yn 2co0.3n 4 and the ampling frequency be F 4kHz. Alo let the low pa filter be ideal, with bandwidth F 2. y[n] ZOH (t) LPF y(t) F a) Determine an expreion for SF FTt. Alo ketch the frequency pectrum (magnitude only) within the frequency range F F F ; b) Determine the output ignal yt. Solution. From what we have een, recall that From Y 2 and then 2 k SF e jff F inc F F Y 2FF e j4 0.3 k2 e j4 0.3 k2 we obtain k e j4 2 F F Y 2FF 0.3 k2 e j4 2 F F 2 F 2 e j4 F 600 k4000 k e j4 2 F 600 k4000 F 0.3 k2 SF F T e j600k40004000 inc 600k4000 k 4000 e j4 F 600 k4000 T e j600k40004000 inc 600k4000 4000 e j4 2 F F 600 k4000 where we ued the fact that the ZOH ha frequency repone T e jff incf F.
6 Solution_Chapter2[].nb Thi can be implified to SF k 3 ej 20 inc 3 k 20 kej4 F 600 k4000 k 3 ej 20 inc 3 20 kej4 F 600 k4000 In the interval F 4000 F F 4000 we have only term correponding to k, 0,. The reader can verify that all other frequencie are outide thi interval. Therefore, for 4000 F 4000 we have hown below. SF 0.7e j2.827 F 3400 0.9634e j0. F 600 0.9634e j0. F 600 0.7e j2.827 F 3400 S( F) 5.6 3.4 0.6 3. 4 5. 6 F(kHz) b) Since the Low Pa Filter top all the frequencie above F 2 the output ignal yt ha only the frequencie at F 600Hz, and therefore yt IFT0.9634e j0. F 600 0.9634e j0. F 600 2 0.9634 co200t 0. à 2.5. We want to digitize and tore a ignal on a CD, and then recontruct it at a later time. Let the ignal xtbe xt 2co500t 3in000t co500t
Solution_Chapter2[].nb 7 x (t) x[n] x[n] ZOH LPF F F and let the ampling frequency be F 2000Hz. a) Determine the continuou time ignal yt after the recontruction. b) Notice that yt i not exactly equal xt. How could we recontruct the ignal xt exactly from it ample xn? Solution a) Recall the formula, in abence of aliaing, YF e jff inc F F XF with F 2000Hz being the ampling frequency. In thi cae there i no aliaing, ince the maximum frequency i 750Hz maller than F 2 000Hz. Therefore, each inuoid at frequency F ha magnitude and phae caled by the above expreion. Define GF e j F 2000 in F 2000 F 2000 which yield G250 0.9745e j0.392, G500 0.9003e j0.785, G750 0.784e j.78 Finally, apply to each inuoid to obtain. yt 20.9745co500t 0.392 30.9003in000t 0.785 0.784co500t.78 b) In order to compenate for the ditortion we can deign a filter with frequency repone GF, when F 2 F F 2.The magnitude would be a follow
8 Solution_Chapter2[].nb à 2.6. In the ytem hown below, determine the output ignal yt for each of the following input ignal xt. Aume the ampling frequency F 5kHz and the Low Pa Filter (LPF) to be ideal with bandwidth F 2: x(t) x[n] ZOH LPF y(t) F F a) xt e j2000t ; b) xt co2000t 0.5; c) xt 2co5000t; d) xt 2in5000t; e) xt co2000t 0. co5500t. Solution Recall the frequency repone, in cae of no aliaing, i with 2500 F 2500. Then: ÅÅÅÅÅÅÅÅ j p ÅÅÅÅÅ F 5000 Sin ÅÅÅÅÅÅÅÅ p F 5000 ÅÅÅÅ p F ÅÅÅÅÅÅÅÅ 5000 ÅÅÅÅ GF = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ a) G000 0.935e j0.628 and then yt 0.935e j2000t0.628 b) Uing the ame number for 000Hz we obtain yt 0.935co2000 t 0.5 0.628 c) G2500 0.637e j.5708, therefore yt 20.637co5000t.5708 d) ame: yt 20.637in5000t.5708
Solution_Chapter2[].nb 9 e) the term co2 2750 t ha aliaing, ince it ha a frequency above 2500Hz. From the figure, the aliaed frequency i X (F) X ( F F ) 2.75 2.75 2.75 5 2.25 X ( F F ) F(kHz) F aliaed 5.00 2.75 2.25kHz. Therefore it i a if the input ignal were xt co2000t 0. co4500t. Thi yield G000 0.935e j0.628 and G2250 0.699e j0.393, and finally yt 0.935co2000t 0.0.628 0.699co4500t.4372 à 2.7. Suppoe in the DAC we want to ue a linear interpolation between ample, a hown in the figure below. We can call thi recontructor a Firt Order Hold, ince the equation of a line i a polynomial of degree one. y[n] y[n] FOH y(t) y(t) n F T a) Show that yt xngt nt, with gt a triangular pule a hown below; n
0 Solution_Chapter2[].nb g(t) T T t b) Determine an expreion for YF FTyt in term of Y DTFTyn and GF FTgt; c) In the figure below, let yn 2co0.8n, the ampling frequency F 0kHz and the filter be ideal with bandwidth F 2. Determine the output ignal yt. y[n] FOH LPF y(t) F Solution a) From the interpolation yt xngt nt and the definition of the interpolating n function gt we can ee that yt i a equence of traight line. In particular if we look at any interval nt t n T it i eay to ee that only two term in the ummation are nonzero, a yt xngt nt xn gt n T, for nt t n T Thi i hown in the figure below. Since gt 0 we can ee that the line ha to go through the two point xn and xn, and it yield the deired linear interpolation.
Solution_Chapter2[].nb x[ n] g( t nt ) y(t) x [ n ] g( t ( n ) T ) nt ( n )T t b) Taking the Fourier Tranform we obtain Interpolation by Firt Order Hold (FOH) YF FTyt xngfe j2fnt n GFX 2FF where GF FTgt. Uing the Fourier Tranform table, or the fact that (eay to verify) gt T rect T t rect t we determine GF T inc F F 2, ince FTrect T t T inc F F. à 2.8. T In the ytem below, let the ampling frequency be F 0kHz and the digital filter have difference equation yn 0.25xn xn xn 2 xn 3 Both analog filter (Antialiaing and Recontruction) are ideal Low Pa Filter (LPF) with bandwidth F 2. ADC xt () xn [ ] yn [ ] H( z) LPF DAC ZOH LPF y( anti-aliaing filter T clock T T recontruction filter
2 Solution_Chapter2[].nb a) Sketch the frequency repone H of the digital filter (magnitude only); b) Sketch the overall frequency repone YFXF of the filter, in the analog domain (again magnitude only); c) Let the input ignal be Determine the output ignal yt. xt 3co6000t 0. 2co2000t Solution. a) The tranfer function of the filter i Hz 0.25 z z 2 z 3 0.25 z4 z, where we applied the geometric um. Therefore the frequency repone i H Hz ze j whoe magnitude i hown below. 0.25 ej4 e j 0.25 e j.5 in2 in 2 b) Recall that the overall frequency repone i given by YF XF In our cae F 0kHz, and therefore we obtain H 2FF e jff inc F F YF XF.4.2 0.8 0.6 0.4 0.2 4000 2000 2000 4000 F
Solution_Chapter2[].nb 3 c) The input ignal ha two frequencie: F 3kHz F 2, and F 2 6kHz F 2, with F 0kHz the ampling frequency. Therefore the antialiing filter i going to top the econd frequency, and the overall output i going to be yt 30.56 co6000 t 0.0. 0.467745 co6000 t 0.62832 ince, at F 3kHz, YFXF 0.56e j0.. Quantization Error à 2.9 In the ytem below, let the ignal xn be affected by ome random error en a hown. The error i white, zero mean, with variance e 2.0. Determine the variance of the error n after the filter for each of the following filter Hz: x[n] e[n] H (z) y[n] e[n] H (z) [n] x[n] H (z) y[n]
4 Solution_Chapter2[].nb a) Hz an ideal Low Pa Filter with bandwidth 4; z b) Hz z0.5 ; c) yn n n n 2 n 3, with n xn en; 4 d) H e, for. Solution. Recall the two relationhip in the frequency and time domain: 2 2 H 2 d e 2 hn 2 2 e a) 2 2 H 2 d e 2 2 d e 2 4 e 2 ; 4 b) the impule repone in thi cae i hn 0.5 n un therefore 4 2 hn 2 2 e 0.5 2n 2 e 0 0.25 e 2 4 3 e 2 c) in thi cae n 4 en en en 2 en 3. Therefore the impule repone i and therefore d) 2 2 hn n n n 2 n 3 4 2 3 n0 4 2 2 e 4 6 e 2 e w d e 2 0.3045 2 e 4 e 2 à 2.0. A continuou time ignal xt ha a bandwidth F B 0kHz and it i ampled at F 22kHz, uing 8bit/ample. The ignal i properly caled o that xn 28 for all n. a) Determine your bet etimate of the variance of the quantization error e 2 ; b) We want to increae the ampling rate by 6 time. How many bit per ample you would ue in order to maintain the ame level of quantization error?
Solution_Chapter2[].nb 5 Solution a) Since the ignal i uch that 28 xn 28 it ha a range V MAX 256. If we digitize it with Q 8 bit. we have 2 8 256 level of quantization. Therefore each level ha a range V MAX 2 Q 256 256. Therefore the variance of the noie i e 2 2 if we aume uniform ditribution. b) If we increae the ampling rate a F 2 6 F, the number of bit required for the ame quantization error become Q 2 Q 2 log 2 F F 2 8 2 4 6 bit ample