MAS6: Sigals, Systems & Iformatio for Media Techology Problem Set 5 DUE: November 3, 3 Istructors: V. Michael Bove, Jr. ad Rosalid Picard T.A. Jim McBride Problem : Uit-step ad ruig average (DSP First 5.5) SOLUTION : (a) (b).5 (a) Plot of u[].5 -.5-4 -3 - - 3 4 5 6.5 (b) Plot of x[]=(.5) u[].5 -.5-4 -3 - - 3 4 5 6 Figure : Uit Step ad Expoetial Decay (c) y[] = 4 3 (.5) k u[ k] k= -5-4 -3 - - 3 4 5 6 7 8 9 3 7 5 5 5 5 5 5 5 y[] 4 8 6 3 64 8 56 5 4 48 5 496 PS 5-
(d) y[] = L k=max{, L} a k = amax{, L} a L( a) The max operator simply meas that we take the argumet of largest value. So i this case, it is either or L, whichever is larger (which will deped o the values of ad L). Problem : Covolutio For each of the followig sets of sigals, compute their covolutio () graphically by had, () with MATLAB (you may use the cov fuctio), ad (3) by expressig the sigals i terms of δ[] ad computig the covolutio sum. I matlab, plot your results with stem, but be sure to fix the -axis appropriately (use stem(,y) where is a vector of the appropriate rage). (a) (b) For each of the followig of sigals, compute their covolutio with x[] = cos(π( 6 )) usig matlab (you may use the cov fuctio). Use stem to plot your result over the rage [:99], assumig the siusoid exists for all time. Compare each covolutio with x[]. (c) h[] = δ[] δ[ ] (d) h[] = δ[] δ[ ] PS 5-
SOLUTION : For the graphically by had portios of this problem, I iteded for you to break dow the x[] ito separate scaled ad shifted impulses, covolve them separately, ad the sum the results. Some people iterpreted this to mea to solve the covolutio by had i tabular form (which really amouts to the same thig), which I also accepted. (a) The graphical solutio is demostrated i the figure below. Obviously, the matlab solutio is idetical to the fial summatio. - δ[] - - - 3 4 - δ[-] - - - 3 4 - δ[] * h[] - - - 3 4 - δ[-] * h[] - - - 3 4 - δ[-] - - - 3 4 x[] = δ[] δ[-] δ[-] - δ[-] * h[] - - - 3 4 - - - - - 3 4 - - - 3 4 Figure : Poitwise Covolutio for (a) y[] = δ[]*h[] δ[-]*h[] δ[-]*h[] Here is the solutio expressed i tabular form, this time breakig dow h[] ito separate scaled ad shifted impulses: PS 5-3
- - 3 4 x[] h[] - h[]x[ ] h[]x[ ] - - - x[] h[] - - Below is the covolutio sum performed by expressig the sigals i terms of δ[]: x[] = δ[x] δ[ ] δ[ ] h[] = δ[x] δ[ ] y[] = x[k]h[ k] = x[]h[] = ()() = y[] = y[] = y[3] = k= x[k]h[ k] = x[]h[] x[]h[] = ()( ) ()() = k= x[k]h[ k] = x[]h[] x[]h[] x[]h[] = ()() ()( ) ()() = k= x[k]h[3 k] = x[]h[3] x[]h[] x[]h[] = ()() ()() ()( ) = k= y[] = δ[] δ[ ] δ[ ] δ[ 3] (b) Agai, the graphical solutio is demostrated i the figure below. The solutio expressed i tabular form: - - 3 4 5 x[] h[] - h[]x[ ] h[]x[ ] - - - - h[]x[ ] x[] h[] PS 5-4
δ[] - - - - 3 4 5 δ[] - - - - 3 4 5 δ[-] - - - - 3 4 5 δ[-] - - - - 3 4 5 x[] = δ[] δ[] δ[-] δ[-] - - - - 3 4 5 δ[] * h[] - - - - 3 4 5 δ[] * h[] - - - - 3 4 5 δ[-] * h[] - - - - 3 4 5 δ[-] * h[] - - - - 3 4 5 y[] = δ[]*h[] δ[]*h[] δ[-]*h[] δ[-]*h[] - - - - 3 4 5 Figure 3: Poitwise Covolutio for (b) The covolutio sum is achieved mathematically as follows: x[] = δ[ ] δ[] δ[ ] δ[ ] h[] = δ[] δ[ ] δ[ ] y[ ] = x[k]h[ k] = x[ ]h[] = ()() = y[] = y[] = k= k= k= x[k]h[ k] = x[ ]h[] x[]h[] = ()( ) ()() = x[k]h[ k] = x[ ]h[] x[]h[] x[]h[] = ()() ()( ) ()() = y[] = x[]h[] x[]h[] x[]h[] = ()() ()( ) ()() = y[3] = x[]h[] x[]h[] = ()() ()( ) = y[4] = x[]h[] = ()() = y[] = δ[ ] δ[ ] δ[ ] δ[ 4] PS 5-5
(c) x[] * (.5δ[].5δ[-]).5 -.5-3 4 5 6 7 8 9 (d) x[] * (δ[] - δ[-]).5 -.5-3 4 5 6 7 8 9 Figure 4: (c) A Low Pass Filter (d) A High Pass Filter (c) (d) The filter i part (c) is a averagig (low-pass) filter. Sice x[] is of fairly low frequecy, the sigal does t chage much. I part (d), the filter is a differece (geerally high-pass) filter, which does affect the amplitude substatially. Problem 3: Time-domai respose of FIR filters (DSP First 5.6) (a) From the give plot, we get: b b b b 3 b 4 3 7 3 9 5 (b) But sice y[] = M b k x[ k] k= = 3x[] 3x[ ] 3x[ ] x[] = We see that x[] = x[ ]. Therefore: {, for eve, for odd y[] = 6x[] 3x[ ] { 3, for eve = 6, for odd PS 5-6
Problem 4: LTI Systems Cosider the itercoectio of LTI systems as show below. h[] x[] h[] h3[] h4[] - y[] (a) Express the overall impulse respose, h[], i terms of h [], h [], h 3 [] ad h 4 []. (b) Determie h[] whe SOLUTION : h [] = {, 4, } h [] = h 3 [] = ( )u[] h 4 [] = δ[ ] (a) The combied impulse respose of a cascade of two LTI systems is simply the covolutio of the two impulse resposes. The impulse respose of a additio (or subtractio) of two LTI systems is simply the sum (or differece) of the two impulse resposes. Thus, for the overall system impulse respose, we obtai: h[] = h [] {h [] (h 3 [] h 4 [])} PS 5-7
(b) Proceedig i steps, we get: h 3 [] h 4 [] = (( )u[]) δ[ ] = δ[k ]( k )u[ k] (oly ozero whe k = ) k= = ( )u[ ] h 5 [] h [] (h 3 [] h 4 []) = ( )u[] ( )u[ ], > =, =, > h[] = h [] h 5 [] = h 5[] 4 h 5[] h 5[], <, = = 5 4, =, = 5, > Problem 5: Block Diagrams (DSP First 5.9) SOLUTION : x[] Uit x[-] Uit x[-] Uit x[-3] Uit x[-4] 3 4 y[] x[] 4 3 Uit Uit Uit Uit y[] Figure 5: System Diagram i Direct Form (above) ad Trasposed Direct Form (below) PS 5-8
Problem 6: MAS.5 Additioal Problem It is possible to determie the impulse respose for a LTI system usig a system of equatios, give eough iformatio about the system. For example, if we kow that the system is FIR ad has o delay ad that y[] = if x[] = δ[], the y[] = ax[] y[] = ax[] = a a = Usig systems of equatios, compute the impulse respose give the followig system descriptios ad iput-output pairs (a) FIR ad sigle delay, x[] = δ[], y[] =, y[] = (b) FIR ad double delay, x[] = δ[], y[] = 3, y[] = 4, y[] = 3/ (c) FIR ad double delay, x[] = 4δ[] δ[ ], y[] =, y[] =, y[] = (d) Calculate y[3] for each of the precedig systems. SOLUTION : (a) Sice the iput x[] is a impulse, we could simply get the impulse respose h[] by ispectio. But just to show the math we ll do this oe the log way: y[] = ax[] bx[ ] y[] = ax[] bx[ ] = a() b() a = y[] = x[] bx[] = () b() b = y[] = x[] x[ ] h[] = δ[] δ[ ] (b) This oe also has a impulse iput, so this time we ca simply obtai the impulse respose by ispectio: h[] = 3δ[] 4δ[ ] 3 δ[ ] PS 5-9
(c) Sice the iput is ot just a impulse, we actually have to perform a decovolutio usig a system of equatios to get our aswer. x[] = 4δ[] δ[ ] 4, = =, =, otherwise y[] = ax[] bx[ ] cx[ ] y[] = ax[] bx[ ] cx[ ] = a(4) b() c() a = y[] = ax[] bx[] cx[ ] = () b(4) c() b = 3 8 y[] = ax[] bx[] cx[] = () 3 () c(4) 8 c = 3 y[] = x[] 3 x[ ] x[ ] 8 3 h[] = δ[] 3 δ[ ] δ[ ] 8 3 (d) Usig the coefficiets above, it is simple to calculate y[3]: y[3] = x[3] x[] = () () = y[3] = 3x[3] 4x[] 3 x[] = 3() 4() 3 () = y[3] = x[3] 3 x[] 8 3 x[] = () 3 () () = 8 3 3 (a) (b) (c) PS 5-