EEL5: Discrete-Time Sigals ad Systems. Itroductio I this set of otes, we begi our mathematical treatmet of discrete-time s. As show i Figure, a discrete-time operates or trasforms some iput sequece x [ ] to produce a output sequece y [ ]. Examples of such s iclude audio filters ad feedback cotrol s. Ulike the off-lie filterig example i the previous set of otes, these s produce a output i real-time (o-lie as iput is fed ito the. I their most geeral form, discrete-time s produce a output y [ ] at time idex that is a fuctio of previous output values, as well as past, curret ad future values of the iput: y [ ] fy ( [ ],, y [ N], x [ + ],, x [ + ], x [ ], x [ ],, x [ ], N, > 0. ( Below, we first classify discrete-time s by three importat properties: ( causality, (2 time-ivariace ad ( liearity. We the defie a importat class of discrete-time s amely, Liear, Time-Ivariat (LTI s. Next, we defie the cocept of the uit-impulse respose of a, ad classify LTI s ito Fiite Impulse Respose (FIR ad Ifiite Impulse Respose (IIR s. Fially, we itroduce the discrete-time covolutio operatio, ad show that a discrete-time is completely characterized by its uitimpulse respose. 2. Importat characterizatios A. Causality Defiitio: A is said to be causal if ad oly if its output depeds oly o previous values of the output ad curret ad/or previous values of the iput. If a is ot causal, it is said to be ocausal. Examples: Cosider the below: y [ ] -- ( x [ ] + x [ + ] + x [ + 2] The i equatio (2 is ocausal because the output y [ ] depeds o future values of the iput x [ ]. For example, the output at 0 is depedet o the iput for { 02,, }. I Figure 2, we plot a sample output sequece correspodig to a sample iput sequece for (2. Note that for this ocausal, the output precedes the iput. To compute the value of y [ ] for ay specific for the plotted iput sequece, we simply apply equatio (2 above. For example, y[ ] is give by, y[ ] -- ( x[ ] + x[ 0] + x[ ] -- ( 0+ 2+ 4 2. ( Now, cosider a secod below: y [ ] -- ( x [ ] + x [ ] + x [ 2] x [ ] y [ ] discrete-time (DT Figure The i equatio (4 is causal because the output y [ ] depeds oly o preset ad past values of the iput x [ ]. For example, the output at 0 is depedet o the iput for { 0,, 2}. I Figure, we plot a sample output sequece correspodig to a sample iput sequece for (4. Note that for this causal, the output follows the iput. To compute the value of y [ ] for ay specific for the plotted iput sequece, we simply apply equatio (4 above. For example, y[ 2] is give by, (2 (4 - -
EEL5: Discrete-Time Sigals ad Systems 6 5 4 Nocausal x [ ] y [ ] 2 0 6 5 4-4 -2 0 2 4 6 8 0 Figure 2 Causal x [ ] y [ ] 2 0-4 -2 0 2 4 6 8 0 Figure y[ 2] -- ( x[ 2] + x[ ] + x[ 0] -- ( 6+ 4+ 2 4. (5 I geeral, the class of causal discrete-time s is give by, y [ ] fy ( [ ],, y [ N], x [ ], x [ ],, x [ ], N, > 0. (6 B. Time ivariace Defiitio: A is said to be time-ivariat if ad oly if, x [ ] y [ ] implies x [ 0 ] y [ 0 ]. (7 That is, if a produces output y [ ] for iput x [ ], a time-ivariat will produce the timedelayed output y [ 0 ] for the time-delayed iput x [ 0 ]. If a is ot time-ivariat, it is said to be time-variat. Aother way to look at time-ivariace is depicted i Figure 4 below. A time-ivariat will produce the same output regardless of whether a time delay precedes or follows the. I Figure 4, that meas that for a time-ivariat, w [ ] y [ 0 ]. (8 Examples: Cosider the below: y [ ] x [ ] 2 The i equatio (9 is time-ivariat. We will show this by applyig the procedure depicted i Figure 4. First, we follow the top path i the diagram: (9-2 -
EEL5: Discrete-Time Sigals ad Systems time delay x [ 0 ] w [ ] x [ ] y [ ] time delay y [ 0 ] Figure 4 w [ ] x [ 0 ] 2 (0 Note that we simply replaced x [ ] with x [ 0 ] i equatio (9 to produce w [ ]. Next, we follow the bottom path i the diagram: y [ 0 ] x [ 0 ] 2 ( Note that i this case, we first compute y [ ] [equatio (9] ad the replace with 0. Sice (0 ad ( are equivalet, (9 is time-ivariat. Next, cosider the below: y [ ] x[ ] (2 Let us agai compute w [ ] ad y [ 0 ]: w [ ] x[ 0 ] y [ 0 ] ( 0 x [ 0 ] ( (4 To geerate w [ ], we substituted x [ 0 ] for x [ ] i equatio (2; to geerate y [ 0 ] we substituted 0 for. Note that sice w [ ] ad y [ 0 ] produce differet results, (2 is time-variat. Next, cosider the below: y [ ] x[ ] (5 Let us agai compute w [ ] ad y [ 0 ]: w [ ] x[ 0 ] y [ 0 ] x[ ( 0 ] x[ + 0 ] (6 (7 To geerate w [ ], we substituted x[ 0 ] for x[ ] i equatio (5; to geerate y [ 0 ] we substituted 0 for. Note that sice w [ ] ad y [ 0 ] produce differet results, (5 is time-variat. Fially, cosider the below: y [ ] b k x [ Let us agai compute w [ ] ad y [ 0 ]: w [ ] b k x [ 0 (8 (9 - -
EEL5: Discrete-Time Sigals ad Systems y [ 0 ] b k x [ 0 To geerate w [ ], we substituted x [ 0 for x [ i equatio (8; to geerate y [ 0 ] we substituted 0 for. Note that sice w [ ] ad y [ 0 ] produce the same outcome, (8 is timeivariat. The table below summarizes the above results ad gives two more examples. (20 y [ ] x [ ] 2 y [ ] x[ ] y [ ] x[ ] y [ ] b k x [ y [ ] cos( x [ ] x [ ] y [ ] 2 x [ ] time ivariat? yes o o yes yes o C. Liearity Defiitio: A is said to be liear if ad oly if, x [ ] y [ ] ad x 2 [ ] y 2 [ ] implies αx [ ] + βx 2 [ ] αy [ ] + βy 2 [ ] (2 for arbitrary scalars α ad β. That is, if a produces output y [ ] for iput x [ ], ad output y 2 [ ] for iput x 2 [ ], a liear will produce the output αy [ ] + βy 2 [ ] for the iput αx [ ] + βx 2 [ ]. If a is ot liear, it is said to be oliear. Aother way to look at liearity is depicted i Figure 5 below. A liear will produce the same output regardless of whether the iputs or outputs are summed ad scaled. I Figure 5, that meas that for a liear, w [ ] y [ ]. (22 Examples: Below, we first cosider the same s as we did for time ivariace ad the show two additioal examples. First, let us cosider: y [ ] x [ ] 2 The i equatio (2 is oliear. We will show this by applyig the procedure depicted i Figure 5. First, we apply the top diagram i Figure 5: y [ ] x [ ] 2, y 2 [ ] x 2 [ ] 2 (24 (2 w [ ] αy [ ] + βy 2 [ ] αx [ ] 2 + βx 2 [ ] 2 (25 Next, we follow the bottom diagram i Figure 5: x [ ] αx [ ] + βx 2 [ ] y [ ] x [ ] 2 ( αx [ ] + βx 2 [ ] 2 α 2 x [ ] 2 + 2αβx [ ]x 2 [ ] + βx 2 [ ] 2 (26 (27 Sice the results i equatios (25 ad (27 are differet, (2 is oliear. - 4 -
EEL5: Discrete-Time Sigals ad Systems x [ ] y [ ] α x 2 [ ] y 2 [ ] β w [ ] α x [ ] β x [ ] y [ ] x 2 [ ] Figure 5 Next, cosider the below: y [ ] x[ ] (28 Let us follow the same procedures as i the previous example: y [ ] x [ ], y 2 [ ] x 2 [ ] (29 w [ ] αy [ ] + βy 2 [ ] αx [ ] + βx 2 [ ] (0 Next: x [ ] αx [ ] + βx 2 [ ] y [ ] x[ ] ( αx [ ] + βx 2 [ ] αx [ ] + βx 2 [ ] ( (2 Sice the results i equatios (0 ad (2 are the same, (28 is liear. Next, cosider the below: y [ ] x[ ] ( Let us follow the same procedures as i the previous example: y [ ] x [ ], y 2 [ ] x 2 [ ] (4 w [ ] αy [ ] + βy 2 [ ] αx [ ] + βx 2 [ ] (5 Next: x [ ] αx [ ] + βx 2 [ ] y [ ] x[ ] αx [ ] + βx 2 [ ] (6 (7 Sice the results i equatios (5 ad (7 are the same, ( is liear. - 5 -
EEL5: Discrete-Time Sigals ad Systems Next, cosider the below: y [ ] b k x [ Let us follow the same procedures as i the previous example: (8 y [ ] b k x [, y 2 [ ] b k x 2 [ (9 w [ ] αy [ ] + βy 2 [ ] α b k x [ k ] + β b k x 2 [ b k ( αx [ + βx 2 [ Next: x [ ] αx [ ] + βx 2 [ ] y [ ] b k ( αx [ + βx 2 [ Sice the results i equatios (40 ad (42 are the same, (8 is liear. (40 (4 (42 Below, we cosider two additioal s. First, let us cosider: y [ ] 2x[ ] + ( 2 x [ ] + x[ 5] Agai, we follow the same procedure as before: y [ ] 2x [ ] + ( 2 x [ ] + x [ 5] y 2 [ ] 2x 2 [ ] + ( 2 x 2 [ ] + x 2 [ 5] w [ ] αy [ ] + βy 2 [ ] α( 2x [ ] + ( 2 x [ ] + x [ 5] + β( 2x 2 [ ] + ( 2 x 2 [ ] + x 2 [ 5] (4 (44 (45 (46 Next: x [ ] αx [ ] + βx 2 [ ] y [ ] 2x[ ] + ( 2 x [ ] + x[ 5] 2( αx [ ] + βx 2 [ ] + ( 2 ( αx [ ] + βx 2 [ ] + ( αx [ 5] + βx 2 [ 5] α( 2x [ ] + ( 2 x [ ] + x [ 5] + β( 2x 2 [ ] + ( 2 x 2 [ ] + x 2 [ 5] (47 (48 Sice the results i equatios (46 ad (48 are the same, (4 is liear. Fially, we cosider the below: y [ ] x[ ] + Agai, we follow the same procedure as before: y [ ] x [ ] + (49 (50-6 -
EEL5: Discrete-Time Sigals ad Systems y 2 [ ] x 2 [ ] + w [ ] αy [ ] + βy 2 [ ] α( x [ ] + + β( x 2 [ ] + αx [ ] + βx 2 [ ] +( α+ β (5 (52 Next: x [ ] αx [ ] + βx 2 [ ] y [ ] x[ ] + ( αx [ ] + βx 2 [ ] + αx [ ] + βx 2 [ ] + (5 (54 Sice the results i equatios (52 ad (54 are differet, (49 is oliear. Note that i this case, although the looks liear, the costat term makes the oliear. The table below summarizes the above examples. liear? y [ ] x [ ] 2 y [ ] x[ ] y [ ] x[ ] y [ ] b k x [ y [ ] 2x[ ] + ( 2 x [ ] + x[ 5] y [ ] x[ ] + o yes yes yes yes o. Liear, Time-Ivariat s The class of causal discrete-time Liear, Time-Ivariat (LTI s ca be described by the followig differece equatio: N y [ ] a l y l + b k x [ l for costat coefficiets a l ad b k. I this course, we will cofie our study to LTI s. There are at least two importat reasos for this. First, LTI s led themselves to aalysis that more geeral s do ot. We will see a extremely importat case of this i the ext sectio, where we will characterize a LTI etirely by its impulse respose; this same aalysis is ot possible, i geeral, for more geeral discrete-time s. Secod, all discrete-time s ca be approximated as LTI s over short time costats. Nevertheless, it is importat to realize that may s i real life may ot be, strictly speakig, LTI s, but ca oly be approximated as such. (55-7 -
EEL5: Discrete-Time Sigals ad Systems 4. Impulse respose ad discrete-time covolutio A. Impulse respose The uit impulse respose of a is defied as the output h [ ] of a i respose to a uit impulse δ[ ], where, δ[ ] 0 0 0 (56 is plotted i Figure 6 below. δ[ ] δ[ ] h [ ] discrete-time (DT Figure 6 Note that for causal s, h [ ] 0, < 0. (57 That is, a causal is at rest prior to the arrival of a impulse at 0. B. Classificatio of LTI s by impulse respose Previously, we have classified causal discrete-time LTI s ito two broad categories: ( o-recursive ad (2 recursive. Recall that o-recursive s are give by the followig differece equatio: y [ ] b k x [. (58 Note that o-recursive s do ot refer to previous values of the output, while recursive s, N y [ ] a l y l + b k x [ l are ot oly a fuctio of the iput to the, but previous outputs as well. Give our defiitio of the uit-impulse respose h [ ] above, we will ow label these two categories of LTI s by their impulse respose characteristics. No-recursive s i (58 are also kow as Fiite Impulse Respose (FIR s, while recursive s i (59 are also kow as Ifiite Impulse Respose (IIR s. These ames idicate that o-recursive s have a impulse respose that is fiite i legth, while recursive s have a impulse respose that is ifiite i legth. Let us cosider oe specific example of each type of. I Figure 7, we plot the impulse resposes of the followig two s: (59 y [ ] --x[ ] + --x[ ] + --x[ 2] (FIR example (60 y [ ] ( 9 0y [ ] + x [ ] (IIR example. (6-8 -
EEL5: Discrete-Time Sigals ad Systems 0.8 0.6 FIR example δ[ ] h [ ] 0.8 0.6 IIR example δ[ ] h [ ] 0.4 0.4 0.2 0.2 0-5 0 5 0 5 20 Note that the FIR s impulse respose h [ ] is limited i time, while the IIR s impulse respose h [ ] oly goes to zero as ; that is the IIR s impulse respose is ifiite i legth. C. Discrete-time covolutio Figure 7 A truly remarkable fact that applies to LTI s is that such s ca be completely characterized by their impulse respose. That is, oce we kow h [ ] for a give, we ca compute the output y [ ] for that for ay iput sequece x [ ]. This extremely importat fact follows from the fact that we ca express ay iput sequece x [ ] as the sum of weighted ad time-shifted impulse fuctios: x [ ] xk [ ]δ[ k For example, the discrete-time sigal x [ ] i Figure 8 below ca be writte as: 0-5 0 5 0 5 20 x [ ] δ[ + ] + 2δ[ ] + 2δ[ ] δ[ 2]. (6 δ[ ] (62 2 2 Figure 8 Now, let us assume that the respose of a LTI to a uit impulse δ[ ] is give by h [ ]: δ[ ] h [ ] By time-ivariace of a LTI, we kow that: δ[ h [. (65 That is, a time-shifted impulse δ[ at the iput will result i a time-shifted impulse respose h [. By liearity of a LTI, we kow that: xk [ ]δ[ xk [ ]h [ That is, a weighted, time-shifted impulse results i a weighted, time-shifted impulse respose. Fially, the sum of weighted, time-shifted impulses results i the sum of weighted, time-shifted impulse resposes: (64 (66-9 -
EEL5: Discrete-Time Sigals ad Systems k xk [ ]δ[ k xk [ ]h [ (67 Hece, the output y [ ] correspodig to a iput x [ ] for a LTI ca be writte as: x [ ] xk [ ]δ[ k y [ ] xk [ ]h [ k (68 (69 Equatio (69 represets the discrete-time covolutio of the iput sequece x [ ] with the impulse respose h [ ]. Note that the discrete-time covolutio is etirely defied by the impulse respose of the ad the iput sequece to the. The cocept of discrete-time covolutio is so importat that we have a special otatio for it: y [ ] x [ ] * h[ ] (70 where the * operator deotes the covolutio of x [ ] ad h [ ]. Note that equatio (70 is short-had otatio for equatio (69. 5. Importat covolutio properties I this sectio, we list ad prove some of the importat properties of the covolutio operator. A. Commutative property For ay two discrete-time sequeces x [ ] ad y [ ], the commutative property holds: x [ ] * y[ ] y [ ] * x[ ] (7 Proof: x [ ] * y[ ] xk [ ]y [ k y [ ] * x[ ] yk [ ]x [ k (72 (7 I equatio (7, let us make the substitutio k l ad sum over the ew variable l y [ ] * x[ ] y [ l]xl [] l l xl []y [ l] (74 Chagig the idex i equatio (74 from l back to k : y [ ] * x[ ] xk [ ]y [ k x [ ] * y[ ] (75 ad hece the proof is complete.. Note that here we use x [ ] ad y [ ] to deote ay discrete-time sequeces, ot ecessarily a iput ad output sequece, respectively. - 0 -
EEL5: Discrete-Time Sigals ad Systems B. Associative property For ay three discrete-time sequeces x [ ], y [ ] ad z [ ], the associative property holds: ( x [ ] * y[ ] * z[ ] x [ ] * ( y [ ] * z[ ] Proof: ( x [ ] * y[ ] * z[ ] xk [ ]yl [ z [ l] l k x [ ] * ( y [ ] * z[ ] xl [] yk [ ]z [ l l k I equatio (78, let us make the substitutio q l+ k ad sum over the ew variable q : x [ ] * ( y [ ] * z[ ] xl [] yq [ l]z [ q] l q xl []yq [ l]z [ q] l q xl []yq [ l]z [ q] Chagig the idices i equatio (79 from q to l, ad from l to k : q l xl []yq [ l] z [ q] q l (76 (77 (78 (79 x [ ] * ( y [ ] * z[ ] xk [ ]yl [ z [ l] l k ad hece the proof is complete. C. ultiple s ( x [ ] * y[ ] * z[ ] (80 Here we cosider the impulse respose of two LTI s coected i series, as depicted i Figure 9 below: LTI # LTI #2 x [ ] h [ ] w [ ] h 2 [ ] y [ ] Figure 9 Note that the two LTI s are assumed to have the impulse resposes h [ ] ad h 2 [ ], respectively. Usig the associative property of the covolutio operator, w [ ] x [ ] * h [ ] (8 y [ ] w [ ] * h 2 [ ] ( x [ ] * h [ ] * h 2 [ ] x [ ] * ( h [ ] * h 2 [ ] (82 Lettig, h [ ] h [ ] * h 2 [ ], (8 - -
EEL5: Discrete-Time Sigals ad Systems we ca express the output y [ ] as, y [ ] x [ ] * h[ ]. (84 Thus, the impulse respose of two LTI s coected i series is give by the covolutio of the idividual impulse resposes. D. Covolutio with a impulse For ay discrete-time sequece x [ ], the followig property holds: x [ ] * δ[ 0 ] x [ 0 ] (85 Proof: x [ ] * δ[ 0 ] xk [ ]δ[ 0 k Note that δ[ 0 is ozero oly for k 0. Therefore, we ca rewrite equatio (86 as: x [ ] * δ[ 0 ] x [ 0 ] (86 (87 ad hece the proof is complete. 6. Simple covolutio example Below we show two approaches to computig the covolutio sum for the sample iput sequece x [ ] ad fiite impulse respose fuctio h [ ] plotted i Figure 0 below. 6 5 4 x [ ] 2 h [ ] 2 0 0-4 -2 0 2 4 6 8 0 - Figure 0-4 -2 0 2 4 6 8 0 A. Approach # I this first approach, we use equatio (69 to compute the output y [ ]: y [ ] xk [ ]h [ k Let us deote [,, 2, ] as the covolutio mask (vector, cosistig of the ozero terms of the impulse respose. I order to compute y [ ], we first reverse the order of the covolutio mask to give the vector [ 2,,, ]. We the slide this reversed covolutio mask alog the iput sequece x [ ] ad take the dot product of the reversed covolutio mask ad that part of the iput sequece x [ ] overlappig the reversed covolutio mask. This process is illustrated i Table for { 0,,, 78, }.Note that the dot product of two vectors a ad b is give by, (88 a [ a, a 2,, a l ] (89-2 -
EEL5: Discrete-Time Sigals ad Systems k xk [ ] -4 - -2-0 2 4 5 6 7 8 0 0 0 0 2 4 6 4 2 0 0 0 0 0 h[ 0 2 - y[ 0] [ 0002,,, ] [ 2,,, ] 6 h[ 2 - y[ ] [ 0024,,, ] [ 2,,, ] 0 2 h[ 2 2 - y[ 2] [ 0246,,, ] [ 2,,, ] 8 h[ 2 - y[ ] 6 a 4 h[ 4 y[ 4] 8 b 2-5 h[ 5 y[ 5] [ 6420,,, ] [ 2,,, ] 2 2-6 h[ 6 y[ 6] [ 4200,,, ] [ 2,,, ] 8 2-7 h[ 7 y[ 7] [ 2000,,, ] [ 2,,, ] 2 2-8 h[ 8 y[ 8] [ 0000,,, ] [ 2,,, ] 0 2 - a. Dot product terms ot show for space reasos ([ 2464,,, ] [ 2,,, ]. b. Dot product terms ot show for space reasos ([ 4642,,, ] [ 2,,, ]. Table b [ b, b 2,, b l ] (90 a b [ a, a 2,, a l ] [ b, b 2,, b l ] l k a k b k (9 Figure below plots the covolutio of x [ ] ad h [ ] from Figure 0 above. 20 x [ ] * h[ ] 5 0 5 0-4 -2 0 2 4 6 8 0 Figure B. Approach #2 I the secod approach, we use the commutative property of covolutio to express the covolutio sum as follows: y [ ] h [ ] * x[ ] hk [ ]x [ k (92 - -
EEL5: Discrete-Time Sigals ad Systems Table 2 below illustrates how we ca use equatio (92 to compute the covolutio sum. We first write dow x [ ] ad h [ ]. The, we multiply each ozero elemet of hk [ ] by x [ ], ad shift the resultig vectors to the right by k spaces. For example, correspods to a zero shift, while k 2 correspods to a shift of two time uits to the right. Fially, to compute y [ ], we add the resultig colums. Note that this procedure results i exactly the same result as the previous approach. x [ ] h [ ] h[ 0]x [ 0] h[ ]x [ ] h[ 2]x [ 2] h[ ]x [ ] y [ ] 0 2 4 5 6 7 8 2 4 6 4 2-2 6 2 8 2 6-2 -4-6 -4-2 4 8 2 8 4 2 4 6 4 2 6 0 8 6 8 2 8 2 0 7. Coclusio Table 2 I this set of otes, we first itroduced importat properties of discrete-time s, icludig causality, timeivariace ad liearity. We the defied the class of Liear, Time-Ivariat (LTI s, ad showed how the impulse respose completely characterized such s through the discrete-time covolutio operator. Next, we showed importat properties of the covolutio operator, such as the commutative ad associative properties, ad illustrated two approaches for computig the covolutio sum by had for fiite-impulse respose s. - 4 -