Lecture02 LTI Time-Domain Representations

download Lecture02 LTI Time-Domain Representations

If you can't read please download the document

Transcript of Lecture02 LTI Time-Domain Representations

Signals and Systems_Simon Haykin & Barry Van Veen1Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.12.1 Introduction IntroductionObjectives:1. Impulse responses of LTI systems2. Linear constant-coefficients differential or difference equations of LTI systems3. Block diagram representations of LTI systems4. State-variable descriptions for LTI systems2.22.2 Convolution Sum Convolution Sum1.1. An arbitrary signal is expressed as a weighted superposition ofAn arbitrary signal is expressed as a weighted superposition of shifted shiftedimpulses. impulses.Discrete-time signal x[n]:| | | | | | | | 0 xn n x n o o =| | | | | | | | xn n k xk n k o o = | | | | | | | | | | | | | || | | | | | | |2 2 1 1 01 1 2 2xn x n x n x nx n x no o oo o= + + + + ++ + +

Fig. 2.1 Fig. 2.1x[n] = entire signal; x[k] = specific value of the signal x[n] at time k.Signals and Systems_Simon Haykin & Barry Van Veen2Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER| | | | { } | | | |kyn Hxn H xk n k o= = = ` )Figure 2.1(p. 99) Figure 2.1(p. 99)Graphical example illustrating the representation of a signal x[n] as a weighted sum of time-shifted impulses.| | | | | |kxn xk n k o== (2.1)2. Impulse response of LTI system H:LTI system LTI systemH HInput x[n] Output y[n]Output:| | | | | | { }kyn Hxk n k o== ky[n] x[k]H{ [n k]} o== (2.2) LinearityLinearitySignals and Systems_Simon Haykin & Barry Van Veen3Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER+ The system output is a weighted sum of the response of the system to time-shifted impulses.For time-invariant system:o = H{ [n k]} h[n k]h[n] = H{o[n]} impulse response of the LTI system H (2.3) ky[n] x[k]h[n k]== (2.4) 3. Convolution sum:| | | | | | | |kxn hn xkhn k=- = Convolution process: Fig. 2.2 Fig. 2.2.Figure 2.2a (p. 100) Figure 2.2a (p. 100) Illustration of the convolution sum. (a) LTI system with impulse response h[n] and input x[n].Signals and Systems_Simon Haykin & Barry Van Veen4Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.2b(p. 101)(b) The decomposition of the input x[n] into a weighted sum of time-shiftedimpulses results in an output y[n]given by a weighted sum of time-shiftedimpulseresponses.d oSignals and Systems_Simon Haykin & Barry Van Veen5Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER+ The output associated with the kth input is expressed as:{ } o = H x[k] [n k] x[k]h[n k]| | | | | |kyn xkhn k== Example 2.1 Example 2.1 Multipath Communication Channel: Direct Evaluation of the Convolution SumConsider the discrete-time LTI system model representing a two-path propagation channel described in Section 1.10. If the strength of the indirect path is a = , then| | | | | |112yn xn xn = + Letting x[n] = o [n], we find that the impulse response is| |1, 01, 120, otherwisenhn n= = =Signals and Systems_Simon Haykin & Barry Van Veen6Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERDetermine the output of this system in response to the input| |2, 04, 12, 20, otherwisennxnn= == =< Sol.>1. Input: | | | | | | | | 2 4 1 2 2 xn n n n o o o = + Input = 0 for n < 0 and n > 02. Sinceo [n k]time-shifted impulse input h [n k]time-shifted impulse response output3. Output:| | | | | | | | 2 4 1 2 2 yn hn hn hn = + | |0, 02, 05, 10, 21, 30, 4nnnynnnn< = === =>Signals and Systems_Simon Haykin & Barry Van Veen7Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.32.3 Convolution Sum Evaluation Procedure Convolution Sum Evaluation Procedure1. Convolution sum:| | | | | |kyn xkhn k== 2. Define the intermediate signal:n[k] x[k]h[n k] e = (2.5) k = independent variablen is treated as a constant by writing n as a subscript on w.h [n k] = h [ (k n)] is a reflected (because of k) and time-shifted (by n) version of h [k].3. Sincenky[n] [k] e==(2.6) The time shift n determines the time at which we evaluate the output of the system.Example 2.2 Example 2.2 Convolution Sum Evaluation by using Intermediate SignalConsider a system with impulse response | | | |34nhn un| |= |\ .Use Eq. (2.6) to determine the output of the system at time n = 5, n = 5, and n = 10 when the input is x [n] = u [n].Signals and Systems_Simon Haykin & Barry Van Veen8Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER< Sol.> Fig. 2.3 Fig. 2.3 depicts x[k] superimposed on the reflected and time-shifted impulse response h[n k].1. h [n k]:| |3,40, otherwisen kk nhn k| |s | =\ .| |50 w k=| |553, 0 540, otherwisekkw k| |s s |=\ .2. Intermediate signal wn[k]:For n = 5:Eq. (2.6)For n =5:y[ 5] = 0Eq. (2.6) | |550354kky=| |= |\ .For n = 10:| |10103, 0 1040, otherwisekkw k| |s s |=\ .Eq. (2.6)| |1110 10 1010 100 0413 3 4 3 3104 4 4 3 4133.831k kk ky= =| | || | | | | | | | \ .= = = ||||| | \ \ \ \ . . . . |\ .= | |65 550413 4 3 35 3.2884 4 3 413kky=| | || | | | | | \ .= = = |||| | \ . \ . \ . |\ .Signals and Systems_Simon Haykin & Barry Van Veen9Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.3(p. 103) Evaluation of Eq. (2.6) in Example 2.2.(a) The input signal x[k]above the reflected and time-shifted impulse response h[n k], depicted as a function of k. (b) The product signal w5[k] used to evaluate y [5].(c) The product signal w5[k]used to evaluate y[5].(d) The product signal w10[k] used to evaluate y[10].Signals and Systems_Simon Haykin & Barry Van Veen10Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER| |3, 040, otherwisen knk nw k| |s s |=\ .Procedure 2.1: Procedure 2.1: Reflect and Shift Convolution Sum Evaluation Reflect and Shift Convolution Sum Evaluation1. Graph both x[k] and h[n k] as a function of the independent variable k. Todetermine h[n k] , first reflect h[k] about k = 0 to obtain h[ k]. Then shift by n.2. Begin with n large and negative. That is, shift h[ k] to the far left on the timeaxis.3. Write the mathematical representation for the intermediate signal wn[k].4. Increase the shift n (i.e., move h[n k] toward the right) until the mathematicalrepresentation for wn[k] changes. The value of n at which the change occursdefines the end of the current interval and the beginning of a new interval.5. Let n be in the new interval. Repeat step 3 and 4 until all intervals of timesshifts and the corresponding mathematical representations for wn[k] areidentified. This usually implies increasing n to a very large positive number.6. For each interval of time shifts, sum all the values of the corresponding wn[k]to obtain y[n] on that interval.Signals and Systems_Simon Haykin & Barry Van Veen11Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.3 Example 2.3 Moving-Average System: Reflect-and-shift Convolution SumEvaluationThe output y[n] of the four-point moving-average system is related to the input x[n] according to the formula| | | |3014 kyn xn k== The impulse response h[n] of this system is obtained by letting x[n] = o[n], which yields| | | | | | ( )144hn un un = Fig. 2.4 (a). Fig. 2.4 (a).Determine the output of the system when the input is the rectangular pulse defined as | | | | | | 10 xn un un = Fig. 2.4 (b). Fig. 2.4 (b).< Sol.> 1. Refer to Fig. 2.4 Fig. 2.4.2. 1st interval: wn[k] = 0| |01/ 4, 00, otherwisekw k= =Five intervals !1st interval: n < 02nd interval: 0 n 3 3rd interval: 3 < n 94th interval: 9 < n 125th interval: n > 12For n = 0:3. 2nd interval:Fig. 2.4 (c). Fig. 2.4 (c).Signals and Systems_Simon Haykin & Barry Van Veen12Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.4(p. 106)Evaluation of the convolution sum for Example 2.3. (a) The system impulse response h[n].(b) The input signal x[n].(c) The input above the reflected and time-shifted impulse response h[n k],depicted as a function of k.(d) The product signal wn[k] for the interval of shifts 0 s n s 3.(e) The product signal wn[k] for the interval of shifts 3 < n s 9.(f) The product signal wn[k] for the interval of shifts 9 < n s 12.(g) The output y[n].Signals and Systems_Simon Haykin & Barry Van Veen13Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFor n = 1:| |11/ 4, 0,10, otherwisekw k= =For general case: n > 0:| |1/ 4, 00, otherwisenk nw ks s =4. 3rdinterval: 3 < n 9| |1/ 4, 3 90, otherwisenn kw k s s =Fig. 2.4 (d). Fig. 2.4 (d).5. 4th interval: 9 < n 12Fig. 2.4 (e). Fig. 2.4 (e).| |1/ 4, 30, otherwisenn k nw k s s =Fig. 2.4 (f). Fig. 2.4 (f).6. 5thinterval: n > 12 wn[k] = 07. Output:The output of the system on each interval n is obtained by summing the values of the corresponding wn[k] according to Eq. (2.6).( ) 1Nk Mc c N M== +1) For n < 0 and n > 12: y[n] = 0.2) For 0 n 3:| |011/ 44nknyn=+= =3) For 3 < n 9:| | ( ) ( )311/ 4 3 1 14nk nyn n n= = = + =4) For 9 < n 12:| | ( ) ( )931 131/ 4 9 3 14 4k nnyn n= = = + =Fig. 2.4 (g) Fig. 2.4 (g)Signals and Systems_Simon Haykin & Barry Van Veen14Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.4 Example 2.4 First-order Recursive System: Reflect-and-shift Convolution SumEvaluationThe input-output relationship for the first-order recursive system is given by| | | | | | 1 yn yn xn p =Let the input be given by | | | | 4nxn b un = +We use convolution to find the output of this system, assuming that b = p and that the system is causal.< Sol.>1. Impulse response: | | | | | | 1 hn hn n p o = +(2.7)Since the system is causal, we have h[n] = 0 for n < 0. For n = 0, 1, 2, , we find that h[0] = 1, h[1] = p, h[2] = p2, , or| | | |nhn un p =2. Graph of x[k] and h[n k]: Fig. 2.5 (a). Fig. 2.5 (a).| |, 40, otherwisekb kxk s=| |,0, otherwisen kk nhn kp s =and3. Intervals of time shifts: 1st interval: n < 4; 2nd interval:n > 4Signals and Systems_Simon Haykin & Barry Van Veen15Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.5a&b(p. 109) Evaluation of the convolution sum for Example 2.4. (a) The input signal x[k] depicted above the reflected and time-shifted impulse response h[n k]. (b) The product signal wn[k] for 4 s n.Signals and Systems_Simon Haykin & Barry Van Veen16Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERAssuming that p = 0.9 and b = 0.8.4. For n < 4: wn[k] = 0.5. For n > 4:| |, 40, otherwisek n knb k nw kp s s=Fig. 2.5 (b). Fig. 2.5 (b).6. Output:1) For n < 4: y[n] = 0.2) For n > 4:| |4nk n kkyn b p==| |4knnkbyn pp=| |=| \ .Let m = k + 4, then| |4 44 40 0m mn nn nm mb bynbpp pp p+ += =| | | | | |= = | | |\ . \ \ . . Next, we apply the formula for summing a geometric series of n + 5 terms to obtain| |545 5411nn nnbbyn bbb bp p pppp++ +| || | | | | \ .= =|| \ .\ .Combining the solutions for each interval of time shifts gives the system output:| |5 540, 4, 4n nnynbb nbpp+ +< = | | s| \ . Fig. 2.5 (c). Fig. 2.5 (c).Signals and Systems_Simon Haykin & Barry Van Veen17Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.5c(p. 110)(c) The output y[n] assuming that p = 0.9 and b = 0.8.Signals and Systems_Simon Haykin & Barry Van Veen18Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.5 Example 2.5 Investment ComputationThe first-order recursive system is used to describe the value of an investment earning compound interest at a fixed rate of r % per period if we set p = 1 + (r/100). Let y[n] be the value of the investment at the start of period n. If there are no deposits or withdrawals, then the value at time n is expressed in terms of the value at the previous time as y[n] = py[n 1]. Now, suppose x[n] is the amount deposited (x[n] > 0) or withdrawn (x[n] < 0) at the start of period n. In this case, the value of the amount is expressed by the first-order recursive equation| | | | | | 1 yn yn xn p = +We use convolution to find the value of an investment earning 8 % per year if $1000 is deposited at the start of each year for 10 years and then $1500 is withdrawn at the start each year for 7 years.< Sol.>1. Prediction: Account balance to grow for the first 10 year, and to decreaseduring next 7 years, and afterwards to continue growing.2. By using the reflect-and-shift convolution sum evaluation procedure, we canevaluate y[n] = x[n] - h[n], where x[n] is depicted in Fig. 2.6 Fig. 2.6 and h[n] = pnu[n]is as shown in Example 2.4 with p = 1.08.Signals and Systems_Simon Haykin & Barry Van Veen19Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.6(p. 111)Cash flow into an investment.Deposits of $1000 are made at the start of each of the first 10 years, while withdrawals of $1500 are made at the start of each of the second 10 years.3. Graphs of x[k] and h[n k]: Fig. 2.7(a). Fig. 2.7(a).4. Intervals of time shifts:1st interval: n < 02nd interval: 0 n 9 3rd interval: 10 n 164th interval: 17 n5. Mathematical representations for wn[k] and y[n]:1) For n < 0: wn[k] = 0 and y[n] = 0Signals and Systems_Simon Haykin & Barry Van Veen20Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.7a-d(p. 111)Evaluation of the convolution sum for Example 2.5.(a) The input signal x[k] depicted above the reflected and time-shifted impulse response h(n k). (b The product signal wn[k] for 0 sn s 9.(c) The product signal wn[k] for 10 s ns 16. (d) The product signal wn[k] for 17 sn.Signals and Systems_Simon Haykin & Barry Van Veen21Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2) For 0 n 9:| |( ) 10001.08 , 00, otherwisen knk nw ks s =Fig. 2.7 (b). Fig. 2.7 (b).| | ( ) ( )0 0110001.08 1000 1.081.08kn nn k nk kyn= =| |= = |\ . | | ( ) ( )( )11111.081000 1.08 12,500 1.08 1111.08nn nyn++| | |\ .= = Apply the formula for summing a geometric series3) For 10 n 16:| |( )( )1000 1.08 , 0 91500 1.08 , 100, otherwisen kn knkw k k ns s= s sFig. 2.7 (c). Fig. 2.7 (c).Signals and Systems_Simon Haykin & Barry Van Veen22Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER| | ( ) ( )90 01000 1.08 1500 1.08nn k n kk kyn = == ( ) ( ) ==|.|

\| |.|

\|=901001008 . 1108 . 1 150008 . 1108 . 1 1000knmmnknm = k 10Apply the formula for summing a geometric series| | ( ) ( )|||||.|

\||.|

\||||||.|

\||.|

\|=08 . 11108 . 11108 . 1 150008 . 11108 . 11108 . 1 100091010 nn nn y( ) ( )( )97246.89 1.08 18,750 1.08 1 , 10 16n nn= s s4) For 17 n :| |( )( )10001.08 , 0 915001.08 , 10 160, otherwisen kn knkw k ks s= s sFig. 2.7 (d). Fig. 2.7 (d).Signals and Systems_Simon Haykin & Barry Van Veen23Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER| | ( ) ( )9 160 1010001.08 15001.08n k n kk kyn = == | | ( )( )( )( )( )10 79 16 1.08 1 1.08 110001.08 15001.081.08 1 1.08 13,340.171.08 , 17n nnynn = = s6. Fig. 2,7(e) Fig. 2,7(e) depicts y[n], the value ofthe investment at the start of eachperiod, by combining the results foreach of the four intervals.Figure 2.7e(p. 113)(e) The output y[n] representing the value of the investment immediately after the deposit or withdrawal at the start of year n.Signals and Systems_Simon Haykin & Barry Van Veen24Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.42.4 The Convolution Integral The Convolution Integral1.1. A continuous A continuous- -time signal can be expressed as a weighted superposition oftime signal can be expressed as a weighted superposition of time time- -shifted impulses. shifted impulses.-x(t) x( ) (t - )d t o t t=l(2.10) The sifting property of the impulse !2. Impulse response of LTI system H:LTI system LTI systemH HInput x(t) Output y(t)Output:( ) ( ) { } ( ) ( ){ }y t Hxt H x t d t o t t= = l-y(t) x( )H{ (t - )}d t o t t=l(2.10) Linearity property3. h(t) = H{o (t)} impulse response of the LTI system HIf the system is also time invariant, thenH{ (t - )} h(t - ) o t t = (2.11) A time-shifted impulse generates a time-shifted impulse response outputFig. 2.9. Fig. 2.9.-y(t) x( )h(t )d t t t= l(2.12) Signals and Systems_Simon Haykin & Barry Van Veen25Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER+ Convolution integral:( ) ( ) ( ) ( ) xt ht x ht d t t t- = l2.52.5 Convolution Integral Evaluation Procedure Convolution Integral Evaluation Procedure1. Convolution integral:-y(t) x( )h(t )d t t t= l(2.13) 2. Define the intermediate signal:( ) ( ) ( )tw x ht t t t = t = independent variable, t = constanth (t t) = h ( (t t)) is a reflected and shifted (by t) version of h(t).3. Output:t t=l t-y(t) w ( )d (2.14) The time shift t determines the time at which we evaluate the output of the system.Signals and Systems_Simon Haykin & Barry Van Veen26Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERProcedure 2.2: Procedure 2.2: Reflect and Shift Convolution Integral Evaluation Reflect and Shift Convolution Integral Evaluation1. Graph both x(t) and h(t t) as a function of the independent variable t . Toobtain h(t t), reflect h(t) about t = 0 to obtain h( t ) and then h( t ) shift by t.2. Begin with the shift t large and negative. That is, shift h( t ) to the far left onthe time axis.3. Write the mathematical representation for the intermediate signal wt(t).4. Increase the shift t (i.e., move h(t t) toward the right) until the mathematicalrepresentation for wt(t) changes. The value of t at which the change occursdefines the end of the current set and the beginning of a new set.5. Let t be in the new set. Repeat step 3 and 4 until all sets of shifts t and thecorresponding mathematical representations for wt(t) are identified. Thisusually implies increasing t to a very large positive number.6. For each sets of shifts t, integrate wt(t) from t = to t = to obtain y(t).Example 2.6 Example 2.6 Reflect-and-shift Convolution EvaluationGiven( ) ( ) ( ) 1 3 xt ut ut = ( ) ( ) ( ) 2 ht ut ut = and as depicted in Fig. 2 Fig. 2- -10 10, Evaluate the convolution integral y(t) = x(t) - h(t).Signals and Systems_Simon Haykin & Barry Van Veen27Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.10(p. 117)Input signal and LTI system impulse response for Example 2.6.< Sol.>1. Graph of x(t) and h(t t): Fig. 2.11 (a). Fig. 2.11 (a).2. Intervals of time shifts: Four intervals Four intervals1st interval: t < 12nd interval: 1 t < 3 3rd interval: 3 t < 54th interval: 5 t3. First interval of time shifts: t < 1( )1, 10, otherwisettwtt< < =Fig. 2.11 (b). Fig. 2.11 (b).4. Second interval of time shifts: 1 t < 3wt(t) = 0Signals and Systems_Simon Haykin & Barry Van Veen28Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.11(p. 118)Evaluation of the convolution integral for Example 2.6.(a) The input x(t)depicted above the reflected and time-shifted impulse response.(b) The product signal wt(t)for 1 s t < 3.(c) The product signal wt(t) for 3 s t < 5.(d) The system output y(t).t t t tSignals and Systems_Simon Haykin & Barry Van Veen29Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER5. Third interval: 3 t < 5( )1, 2 30, otherwisettwtt < < =Fig. 2.11 (c). Fig. 2.11 (c).6. Fourth interval: 5 t wt(t) = 07. Convolution integral: 1) For t < 1 and t > 5: y(t) = 02) For second interval 1 t < 3, y(t) = t 13) For third interval 3 t < 5, y(t) = 3 (t 2)( )0, 11, 1 35 , 3 50, 5tt ty tt tt< s 1. Graph of x(t) and h(t t): Fig. 2.13 (a). Fig. 2.13 (a).2. Intervals of time shifts: Three intervals Three intervals1st interval: t < 02nd interval: 0 t < 2 3rd interval: 2 tRC circuit is LTI system, so y(t) = x(t) - h(t).( )1, 0 20, otherwisextt< < =and3. First interval of time shifts: t < 04. Second interval of time shifts: 0 t < 2wt(t) = 0For t > 0, ( )( ), 00, otherwisette twttt < < =Fig. 2.13 (b). Fig. 2.13 (b).5. Third interval: 2 t( )( ), 0 20, otherwisettewttt < < =Fig. 2.13 (c). Fig. 2.13 (c).( )( )( )( ),0, otherwisette tht e uttttt t < = =Signals and Systems_Simon Haykin & Barry Van Veen31Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.13(p. 120)Evaluation of the convolution integral for Example 2.7.(a) The input x(t) superimposed over the reflected and time-shifted impulse response h(t t), depicted as a function of t.(b) The product signal wt(t) for 0st < 2.(c) The product signal wt(t) for t > 2.(d) The system output y(t).t t t tSignals and Systems_Simon Haykin & Barry Van Veen32Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER6. Convolution integral: 1) For t < 0: y(t) = 02) For second interval 0 t < 2:3) For third interval 2 t:( )( )( )0 01t tt t ty t e d e e et tt = = = l( )( )( )( )2 220 01t t ty t e d e e e et tt = = = l( )( )20, 01 , 0 21 , 2ttty t e te e tFig. 2.13 (d). Fig. 2.13 (d).Example 2.8 Example 2.8 Another Reflect-and-Shift Convolution EvaluationSuppose that the input x(t) and impulse response h(t) of an LTI system are, respectively, given by ( ) ( ) ( ) ( ) 1 1 3 xt t ut ut = and ( ) ( ) ( ) 1 2 2 ht ut ut = + Find the output of the system.Signals and Systems_Simon Haykin & Barry Van Veen33Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER< Sol.>1. Graph of x(t) and h(t t): Fig. 2.14 (a). Fig. 2.14 (a).2. Intervals of time shifts: Five intervals Five intervals1st interval: t < 02nd interval: 0 t < 2 3rd interval: 2 t < 34th interval: 3 t < 55th interval: t > 53. First interval of time shifts: t < 0wt(t) = 04. Second interval of time shifts: 0 t < 2( )1, 1 10, otherwisettwt tt < < + =Fig. 2.14 (b). Fig. 2.14 (b).5. Third interval of time shifts: 2 t < 3( )1, 1 30, otherwisetwt tt < < =Fig. 2.14 (c). Fig. 2.14 (c).6. Fourth interval of time shifts: 3 t < 5Signals and Systems_Simon Haykin & Barry Van Veen34Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.14(p. 121)Evaluation of the convolution integral for Example 2.8. (a) The input x(t) superimposed on the reflected and time-shifted impulse response h(t t), depicted as a function of t. (b) The product signal wt(t) for 0 s t < 2. (c) The product signal wt(t) for 2 s t < 3. (d) The product signal wt(t) for 3 s t < 5. (e) The product signal wt(t) for t > 5.The system output y(t).t t t tSignals and Systems_Simon Haykin & Barry Van Veen35Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER( )( ) 1 , 1 22 3 1,0, otherwisettw tt tt t t < < = < < Fig. 2.14 (d). Fig. 2.14 (d).7. Fifth interval of time shifts: t > 5( )( ) 1 , 1 30, otherwisetwt tt < < =Fig. 2.14 (e). Fig. 2.14 (e).8. Convolution integral: 1) For t < 0: y(t) = 02) For second interval 0 t < 2:( ) ( )2 2111112 2tt ty t dtt t t++ | |= = =| \ .l3) For third interval 2 t < 3: y(t) = 24) For third interval 3 t < 5:5) For third interval t > 5: y(t) = 2( ) ( ) ( )2 321 21 1 6 7tty t d d t t t t t t= + = + l lSignals and Systems_Simon Haykin & Barry Van Veen36Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER( )220, 0, 0 222, 2 36 7, 3 52, 5ttty ttt t tt< s < =s < + s < >Fig. 2.14 (f). Fig. 2.14 (f).Example 2.9 Example 2.9 Radar range Measurement: Propagation ModelWe identify an LTI system describing the propagation of the pulse. Let the transmitted RF pulse be given by( )( )0sin , 00, otherwisect t Txte s s =as shown in Fig. 2.16 (a). Fig. 2.16 (a).Suppose we transmit an impulse from the radar to determine the impulse response of the round-trip propagation to the target. The impulse is delay in time and attenuated in amplitude, which results in the impulse response h(t) = ao(t ), where a represents the attenuation factor and the round-trip time delay. Use the convolution of x(t) with h(t) to verify this result.Signals and Systems_Simon Haykin & Barry Van Veen37Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER< Sol.>1. Find h(t t):Reflecting h(t) = a o (t ) about t = 0 gives h( t) = ao(t + ), since the impulse has even symmetry.2. Shift the independent variable t by t to obtain h(t t ) = a o (t (t )). 3. Substitute this equation for h(t t) into the convolution integral of Eq. (2.12),and use the shifting property of the impulse to obtain the received signal as( ) ( ) ( ) ( ) ( ) r t x a t d axt t o t t = = lFigure 2.16(p. 124)Radar range measurement. (a) Transmitted RF pulse. (b) The received echo is an attenuated and delayed version of the transmitted pulse. Signals and Systems_Simon Haykin & Barry Van Veen38Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.10 Example 2.10 Radar range Measurement (continued): The Matched FilterIn Ex. 2.9, the received signal is contaminated with noise (e.g., the thermal noise, discussed in section 1.9) and may weak. For these reasons, the time delay is determined by passing the received signal through an LTI system commonly referred to as a matched filter. An important property of this system is that it optimally discriminates against certain types of noise in the received waveform. The impulse response of the matched filter is a reflected, or time-reversed, version of the transmitted signal x(t). That is, hm(t) = x( t), so ( )( )0sin , 00, otherwisecmt T th te s s =As shown in Fig. 2.17 (a). Fig. 2.17 (a). The terminology matched filter refers to the fact that the impulse response of the radar receiver is matched to the transmitted signal.To estimate the time delay from the matched filter output, we evaluate the convolution ( ) ( ) ( )my t r t h t = -< Sol.>1. Intermediate signal: ( ) ( ) ( )t mw r h t t t t = Signals and Systems_Simon Haykin & Barry Van Veen39Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.17a(p. 125)(a) Impulse response of the matched filter for processing the received signal.Figure 2.17b(p. 126)(b) The received signal r(t)superimposed on the reflected and time-shifted matched filter impulse response hm(t t),depicted as functions of t. (c) Matched filter output x(t).t t t tSignals and Systems_Simon Haykin & Barry Van Veen40Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2. The received signal r(t) and the reflected, time-shifted impulse response hm(t t) are shown in Fig. 2.17(b). Fig. 2.17(b).( )( ) ( ) ( ) ( )0sin sin ,0, otherwisec cta w w t t Twt t tt < < +=+ hm(t) = reflected version of x(t) hm(t t) = x(t t)3. Intervals of time shifts: Three intervals Three intervals1st interval: t < T02nd interval: T0< t 3rd interval: < t + T04th interval: t > + T04. First interval of time shifts: t < T0wt(t) = 0 and y(t) = 05. Second interval of time shifts: T0< t ( ) ( ) ( ) ( ) ( ) ( ) ( )0/ 2cos / 2cos 2t Tc cy t a w t a w t d t t+= + l( ) ( ) ( )| | ( ) ( ) ( )02 sin 4 / cos 2 /0T tc c ct w a T t w a+ + + = t e Signals and Systems_Simon Haykin & Barry Van Veen41Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )0 0( ) / 2cos / 4 sin 2 sinc c c cy t a w t t T a w t T w t e = + + 6. 3rd interval of time shifts: < t + T0( ) ( )0sin ( ) sin ( ) ,( )0, otherwisec cta t twe t e t t t < < + T=( ) ( )0( ) [( / 2)cos ( ) ( / 2)cos (2 ) ]c cty t a t a t de e t t+T= + l( )| | ( )00( / 2) cos ( ) ( / 4 ) sin (2 )c c c ta t t a te e e t +T= + T + ( )| | ( ) ( )0( / 2) cos ( ) ( / 4 ) sin ( 2 ) sin ( )c c c ca t t a t t e e e t e = + T + + 7. 4th interval of time shifts: t > + T0wt(t) = 0 and y(t) = 08. The output of matched filter:| | ( )| | ( )0 00 0( / 2) ( )cos ( ) ,( ) ( / 2) )cos ( ) ,0, otherwisecca t t ty t a t t t e e T T < s= + T < < + TSignals and Systems_Simon Haykin & Barry Van Veen42Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.62.6 Interconnection of LTI Systems Interconnection of LTI Systems2.6.12.6.1 Parallel Connection of LTI Systems Parallel Connection of LTI Systems1. Two LTI systems: Fig. 2.18(a). Fig. 2.18(a).Figure 2.18(p. 128)Interconnection of two LTI systems. (a) Parallel connection of two systems. (b) Equivalent system.2. Output:1 21 2( ) ( ) ( )( ) ( ) ( ) ( )y t y t y tx t h t x t h t= += - + -1 2( ) ( ) ( ) ( ) ( ) y t x h t d x h t d t t t t t t = + l l{ }1 2( ) ( ) ( ) ( )( ) ( ) ( ) ( )y t x h t h t dx h t d x t h tt t t tt t t= + = = -llwhere h(t) = h1(t) + h2(t)Fig. 2.18(b) Fig. 2.18(b)Signals and Systems_Simon Haykin & Barry Van Veen43Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER+ Distributive property for Continuous-time case:1 2 1 2x(t) h (t) x(t) h (t) x(t) {h (t) h (t)} - + - = - + (2.15) + Distributive property for Discrete-time case:1 2 1 2x[n] h [n] x[n] h [n] x[n] {h [n] h [n]} - + - = - + (2.16) 2.6.22.6.2 Cascade Connection of LTI Systems Cascade Connection of LTI Systems1. Two LTI systems: Fig. 2.19(a). Fig. 2.19(a).Figure 2.19(p. 128)Interconnection of two LTI systems. (a) Cascade connection of two systems. (b) Equivalent system. (c) Equivalent system: Interchange system order.Signals and Systems_Simon Haykin & Barry Van Veen44Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2. The output is expressed in terms of z(t) as2y(t) z(t) h (t) = -(2.17) 2-y(t) z( )h (t )d t t t= l(2.18) Since z(t) is the output of the first system, so it can be expressed as1 1-z( ) x( ) h ( ) x( )h ( )d t t t v t v v= - = l(2.19) Substituting Eq. (2.19) for z(t) into Eq. (2.18) gives1 2( ) ( ) ( ) ( ) y t x v h v h t dvd t t t = l l1 2-y(t) x( ) h ( )h (t )d d v n v n n v = l l(2.20) Change of variablen = t vDefine h(t) = h1(t) - h2(t), then1 2( ) ( ) ( ) h t v h h t v d n n n = l-y(t) x( )h(t )d x(t) h(t) v v v= = -l(2.21) 3. Associative property for continuous-time case:Fig. 2.19(b). Fig. 2.19(b).Signals and Systems_Simon Haykin & Barry Van Veen45Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER1 2 1 2{x(t) h (t)} h (t) x(t) {h (t) h (t)} - - = - -(2.22) 4. Commutative property:Write h(t) = h1(t) - h2(t) as the integral1 2( ) ( ) ( ) h t h h t d t t t= l1 2 2 1-h(t) h (t )h ( )d h (t) h (t) v v v= = -l(2.23) Change of variablev = t tFig. 2.19(c). Fig. 2.19(c).Interchanging the order of the LTI systems in the cascade without affecting the result:{ } { }1 2 2 1( ) ( ) ( ) ( ) ( ) ( ) , x t h t h t x t h t h t - - = - -Commutative property for continuous-time case:1 2 2 1h (t) h (t) h (t) h (t) - = -(2.24) 5. Associative property for discrete-time case:1 2 1 2{x[n] h [n]} h [n] x[n] {h [n] h [n]} - - = - -(2.25) Commutative property for discrete-time case:1 2 2 1h [n] h [n] h [n] h [n] - = - (2.26) Signals and Systems_Simon Haykin & Barry Van Veen46Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.11 Example 2.11 Equivalent System to Four Interconnected SystemsConsider the interconnection of four LTI systems, as depicted in Fig. 2.20 Fig. 2.20. The impulse responses of the systems are1[ ] [ ], hn u n =2[ ] [ 2] [ ], h n u n u n = + 3[ ] [ 2], h n n o = 4[ ] [ ].nh n u n o = andFind the impulse response h[n] of the overall system.< Sol.>1. Parallel combination of h1[n] and h2[n]:h12[n] = h1[n] + h2[n] Fig. 2.21 (a). Fig. 2.21 (a).Figure 2.20 Figure 2.20(p. 131) (p. 131)Interconnection of systems for Example 2.11. Signals and Systems_Simon Haykin & Barry Van Veen47Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.21(p. 131)(a) Reduction of parallel combination of LTI systems in upper branch of Fig. 2.20. (b) Reduction of cascade of systems in upper branch of Fig. 2.21(a).(c) Reduction of parallel combination of systems in Fig. 2.21(b) to obtain an equivalentsystem for Fig. 2.20.Signals and Systems_Simon Haykin & Barry Van Veen48Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2. h12[n]is in series with h3[n]: h123[n] = h12[n] - h3[n]h123[n] = (h1[n] + h2[n]) - h3[n] Fig. 2.21 (b).3. h123[n]is in parallel with h4[n]: h[n] = h123[n] h4[n]1 2 3 4[ ] ( [ ] [ ]) [ ] [ ], h n hn h n h n h n = + - Fig. 2.21 (c).Thus, substitute the specified forms of h1[n] and h2[n] to obtain12[ ] [ ] [ 2] [ ][ 2]h n u n u n u nu n= + + = +Convolving h12[n] with h3[n] gives123[ ] [ 2] [ 2][ ]h n u n nu no = + - ={ }[ ] 1 [ ].nh n u n o = + + Table 2.1 summarizes the interconnection properties presented in Table 2.1 summarizes the interconnection properties presented in this section. this section.Signals and Systems_Simon Haykin & Barry Van Veen49Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.72.7 Relation Between LTI System Properties and the Relation Between LTI System Properties and theImpulse Response Impulse Response2.7.12.7.1 Memoryless Memoryless LTI Systems LTI Systems1. The output of a discrete-time LTI system:[ ] [ ] [ ] [ ] [ ]ky n h n x n h kx n k== - = y[n] h[ 2]x[n 2] h[ 1]x[n 1] h[0]x[n] h[1]x[n 1] h[2]x[n 2] = + + + + + + + +(2.27) Signals and Systems_Simon Haykin & Barry Van Veen50Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2. To be memoryless, y[n] must depend only on x[n] and therefore cannotdepend on x[n k] for k = 0.A discrete-time LTI system is memoryless if and only if[ ] [ ] h k c k o = c is an arbitrary constant+ Continuous-time system:1. Output:( ) ( ) ( ) , y t h x t d t t t= l2. A continuous-time LTI system is memoryless if and only if( ) ( ) h c t o t = c is an arbitrary constant2.7.22.7.2 Causal LTI Systems Causal LTI Systems+ Discrete-time system:The output of a causal LTI system depends only on past or present values of the input.1. Convolution sum:[ ] [ 2] [ 2] [ 1] [ 1] [0] [ ][1] [ 1] [2] [ 2] .y n h x n h x n h x nh x n h x n= + + + + ++ + +

Signals and Systems_Simon Haykin & Barry Van Veen51Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2. For a discrete-time causal causal LTI system,[ ] 0 for 0 h k k = 0.3. Stability: Checking whether the impulse response is absolutely summable?Signals and Systems_Simon Haykin & Barry Van Veen54Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER0 0[ ]kkk k kh k p p = = == = < if and only if 'p' < 1Special case:A system can be unstable even though the impulse response has a finite value.1. Ideal integrator:ty(t) x( )d t t=l(2.29) Input: x(t) = o(t), then the output is y(t) = h(t) = u(t).h(t) is not absolutely integrableIdeal integrator is not stable!2. Ideal accumulator:[ ] [ ]nky n x k==Impulse response: h[n] = u[n]h[n] is not absolutely summableIdeal accumulator is not stable!Signals and Systems_Simon Haykin & Barry Van Veen55Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.7.42.7.4 Invertible Systems andInvertible Systems and Deconvolution DeconvolutionA system is invertible if the input to the system can be recovered from the output except for a constant scale factor.1. h(t) = impulse response of LTI system, 2. hinv(t) = impulse response of LTI inverse systemFig. 2.24. Fig. 2.24.Figure 2.24(p. 137)Cascade of LTI system with impulse response h(t) and inverse system with impulse response h-1(t).3. The process of recovering x(t) from h(t) - x(t) is termed deconvolution.4. An inverse system performs deconvolution.in( ) ( ( ) ( )) ( ).vx t h t h t x t - - =( ) ( ) ( )invh t h t t o - = (2.30) Continuous-time case5. Discrete-time case:invh[n] h [n] [n] o - = (2.31) Signals and Systems_Simon Haykin & Barry Van Veen56Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.13 Example 2.13 Multipath Communication Channels: Compensation by means ofan Inverse SystemConsider designing a discrete-time inverse system to eliminate the distortion associated with multipath propagation in a data transmission problem. Assume that a discrete-time model for a two-path communication channel is[ ] [ ] [ 1]. y n x n ax n = + Find a causal inverse system that recovers x[n] from y[n]. Check whether this inverse system is stable.< Sol.>1. Impulse response:1, 0[ ] , 10, otherwisenh n a n= = =2. The inverse system hinv[n] must satisfy h[n] - hinv[n] = o[n]. [ ] [ 1] [ ].inv invh n ah n n o + = (2.32) 1) For n < 0, we must have hinv[n] = 0 in order to obtain a causalinversesystemSignals and Systems_Simon Haykin & Barry Van Veen57Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2) For n = 0, o[n] = 1, and eq. (2.32) implies that[ ] [ 1] 0,inv invh n ah n + =(2.33) 3. Since hinv[0] = 1, Eq. (2.33) implies that hinv[1] = a, hinv[2] = a2, hinv[3] = a3, and so on.The inverse system has the impulse response[ ] ( ) [ ]inv nh n a u n = inv invh [n] ah [n 1] = 4. To check for stability, we determine whether hinv[n] is absolutely summable,which will be the case if [ ]kinvk kh k a = == is finite.+ + ForFor ' 'a a' ' < 1, the system is stable. < 1, the system is stable.Table 2.2 summarizes the relation between LTI system properties andimpulse response characteristics.Signals and Systems_Simon Haykin & Barry Van Veen58Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.82.8 Step Response Step Response1. The step response is defined as the output due to a unit step input signal.2. Discrete-time LTI system:Let h[n] = impulse response and s[n] = step response.[ ] [ ]* [ ] [ ][ ].ks n h n u n h k u n k== = 3. Since u[n k] = 0 for k > n and u[n k] = 1 for k n, we haveSignals and Systems_Simon Haykin & Barry Van Veen59Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER[ ] [ ].nks n h k==The step response is the running sum of the impulse response.+ Continuous-time LTI system:ts(t) h( )d t t=l(2.34) The step response s(t) is the running integral of the impulse response h(t).Express the impulse response in terms of the step response as[ ] [ ] [ 1] h n s n s n = ( ) ( )dh t s tdt=The impulse response of the RC circuit depicted in Fig. 2.12 Fig. 2.12 isandExample 2.14 Example 2.14 RC Circuit: Step Response1( ) ( )tRCh t e u tRC=Find the step response of the circuit.< Sol.>Figure 2.12(p. 119)RC circuitsystem with the voltage source x(t) as input and the voltage measured across the capacitor y(t),as output.Signals and Systems_Simon Haykin & Barry Van Veen60Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER1. Step response:1( ) ( ) .tRCs t e u dRCtt t=l0, 0( )1( ) 0tRCts te u d tRCtt t< =>l00, 0( )100, 01 , 0tRCtRCts te d tRCte ttt< =>< = >lFig. 2.25 Fig. 2.25Figure 2.25(p. 140)RC circuit step response for RC = 1 s.Signals and Systems_Simon Haykin & Barry Van Veen61Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.92.9 Differential and Difference Equation Representations ofDifferential and Difference Equation Representations of LTI LTI Systems Systems1. Linear constant-coefficient differential equation:k k N Mk k k kk 0 k 0d da y(t) b x(t)dt dt= == (2.35) Input = x(t), output = y(t)2. Linear constant-coefficient difference equation:N Mk kk 0 k 0a y[n k] b x[n k]= = = (2.36) Input = x[n], output = y[n]+ The order of the differential or difference equation is (N, M), representing thenumber of energy storage devices in the system.Ex. RLC circuit depicted in Fig. 2.26 Fig. 2.26.2. KVL Eq.:1. Input = voltage source x(t), output = loop current( ) ( ) ( ) ( )1tdRyt L yt y d xtdt Ct t+ + =lOften, N > M, and the order is described using only N.Signals and Systems_Simon Haykin & Barry Van Veen62Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.26(p. 141)Example of an RLC circuit described by a differential equation.( ) ( ) ( ) ( )221 d d dy t R y t L y t xtC dt dt dt+ + = N = 2Ex.Accelerator modeled in Section 1.10:( ) ( ) ( ) ( )222nnd dyt yt yt xtQdt dtee + + =where y(t) = the position of the proof mass, x(t) = external acceleration.N = 2Signals and Systems_Simon Haykin & Barry Van Veen63Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTEREx. Second-order difference equation:1y[n] y[n 1] y[n 2] x[n] 2x[n 1]4+ + = + (2.37)N = 2+ Difference equations are easily rearranged to obtain recursive formulas forcomputing the current output of the system from the input signal and thepast outputs.Ex. Eq. (2.36) can be rewritten as| | | | | |0 1 0 01 1M Nk kk kyn b xn k ayn ka a= == Ex. Consider computing y[n] for n > 0 from x[n] for the second-order differenceequation (2.37).< Sol.>1. Eq. (2.37) can be rewritten as= + 1y[n] x[n] 2x[n 1] y[n 1] y[n 2]4(2.38) 2. Computing y[n] for n > 0:Signals and Systems_Simon Haykin & Barry Van Veen64Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER1y[0] x[0] 2x[ 1] y[ 1] y[ 2]4= + (2.39) 1y[1] x[1] 2x[0] y[0] y[ 1]4= + (2.40) | | | | | | | | | |12 2 2 1 1 04y x x y y = + | | | | | | | | | |13 3 2 2 2 14y x x y y = + + Initial conditions: y[ 1] and y[ 2].The initial conditions for Nth-order difference equation are the N values| | | | | | , 1 ,..., 1 , y N y N y + The initial conditions for Nth-order differential equation are the N values( ) ( ) ( ) ( )2 10 , 2 10 00, , ...,Nt Nt ttd d dyt yt yt ytdt dt dt= = = = Signals and Systems_Simon Haykin & Barry Van Veen65Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.15 Example 2.15 Recursive Evaluation of a Difference EquationFind the first two output values y[0] and y[1] for the system described by Eq. (2.38), assuming that the input is x[n] = (1/2)nu[n] and the initial conditions are y[ 1] = 1 and y[ 2] = 2.< Sol.>1. Substitute the appropriate values into Eq. (2.39) to obtain| | ( )1 10 1 2 0 1 24 2y = + =2. Substitute for y[0] in Eq. (2.40) to find| | ( )1 1 1 31 2 1 1 12 2 4 4y = + =Example 2.16 Example 2.16 Evaluation of a Difference Equation by means of a ComputerA system is described y the difference equation| | | | | | | | | | | | 1.143 1 0.4128 2 0.0675 0.1349 1 0.675 2 yn yn yn xn xn xn + = + + Write a recursive formula that computes the present output from the past outputs and the current inputs. Use a computer to determine the step responseSignals and Systems_Simon Haykin & Barry Van Veen66Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERof the system, the system output when the input is zero and the initial conditions are y[ 1] = 1 and y[ 2] = 2, and the output in response to the sinusoidal inputs x1[n] = cos(tn/10), x2[n] = cos(tn/5), and x3[n] = cos(7tn/10), assuming zero initial conditions. Last, find the output of the system if the input is the weekly closing price of Intel stock depicted in Fig. 2.27 Fig. 2.27, assuming zero initial conditions.< Sol.>1. Recursive formula for y[n]:| | | | | | | | | | | | 1.143 1 0.4128 2 0.0675 0.1349 1 0.675 2 yn yn yn xn xn xn = + + + 2. Step response: Fig. 2.28 (a). Fig. 2.28 (a).3. Zero input response: Fig. 2.28 (b). Fig. 2.28 (b).4. The outputs due to the sinusoidal inputs x1[n], x2[n],and x3[n]: Fig. 2.28 (c), Fig. 2.28 (c),(d), and (e). (d), and (e).5. Fig. 2.28(f) Fig. 2.28(f) shows the system output for the Intel stock price unit.A comparison of peaks in Figs. 2.27 Figs. 2.27 and 2.28 (f) 2.28 (f) Slightly delay! Slightly delay!Signals and Systems_Simon Haykin & Barry Van Veen67Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.27(p. 144)Weeklyclosing price of Intel stock.Signals and Systems_Simon Haykin & Barry Van Veen68Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFig. 2.28 (a). Fig. 2.28 (a).Signals and Systems_Simon Haykin & Barry Van Veen69Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFig. 2.28 (b). Fig. 2.28 (b).Signals and Systems_Simon Haykin & Barry Van Veen70Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFig. 2.28 (d). Fig. 2.28 (d).Fig. 2.28 (c). Fig. 2.28 (c).Signals and Systems_Simon Haykin & Barry Van Veen71Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.28a(p. 145)Illustration of the solution to Example 2.16. (a) Step response of system. (b) Output due to nonzero initial conditions with zero input. (c) Output due to x1[n] = cos (1/10tn).(d) Output due to x2[n] = cos (1/5tn).(e) Output due to x3[n] = cos(7/10tn).Fig. 2.28 (e). Fig. 2.28 (e).Signals and Systems_Simon Haykin & Barry Van Veen72Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.28f(p. 146)Outputassociatedwith the weeklyclosing price of Intel stock. Signals and Systems_Simon Haykin & Barry Van Veen73Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.102.10 Solving Differential and Difference Equations Solving Differential and Difference EquationsComplete solution: y = y(h)+ y(p)y(h)= homogeneous solution,y(p) = particular solution2.10.12.10.1 The Homogeneous Solution The Homogeneous Solution+ Continuous-time case:1. Homogeneous differential equation:( )( )00k Nhk kkda y tdt==2. Homogeneous solution:iNr t (h)ii 0y (t) c e==(2.41) 3. Characteristic eq.: Nkkk 0a r 0==(2.42) + Discrete-time case:1. Homogeneous differential equation:2. Homogeneous solution:( )| |00Nhkkay n k= =N(h) ni ii 1y [n] cr==(2.43) 3. Characteristic eq.: NN kkk 0a r 0== (2.44) Coefficients ciis determined by I.C.Coefficients ciis determined by I.C.Signals and Systems_Simon Haykin & Barry Van Veen74Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER+ If a root rjis repeated p times in characteristic eqs., the correspondingsolutions are1, , ...,j j jr r r t t p te te t e1, , ...,n n p nj j jr nr n rContinuous-time case:Discrete-time case:Example 2.17 Example 2.17 RC Circuit: Homogeneous SolutionThe RC circuit depicted in Fig. 2.30 Fig. 2.30 is described by the differential equation( ) ( ) ( )dyt RC yt xtdt+ =Determine the homogeneous solution of this equation.< Sol.>1. Homogeneous Eq.:( ) ( ) 0dyt RC ytdt+ =2. Homo. Sol.: ( )( )11Vh r ty t c e =3. Characteristic eq.:11 0 RCr + = r1= 1/RC4. Homogeneous solution:( )( )1VthRCy t c e=Figure 2.30(p. 148)RC circuit.Signals and Systems_Simon Haykin & Barry Van Veen75Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.18 Example 2.18 First-Order Recursive System: Homogeneous SolutionFind the homogeneous solution for the first-order recursive system described by the difference equation| | | | | | 1 yn yn xn p =< Sol.>1. Homogeneous Eq.: | | | | 1 0 yn yn p =2. Homo. Sol.:( )| |11h ny n c r =3. Characteristic eq.:10 r p = r1= p4. Homogeneous solution:( )| |1h ny n c p =2.10.22.10.2 The Particular Solution The Particular SolutionA particular solution is usually obtained by assuming an output of the same general form as the input.Table 2.3 Table 2.3Signals and Systems_Simon Haykin & Barry Van Veen76Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.19 Example 2.19 First-Order Recursive System (Continued): Particular SolutionFind a particular solution for the first-order recursive system described by the difference equation| | | | | | 1 yn yn xn p =if the input is x[n] = (1/2)n.< Sol.>1. Particular solution form:( )( )12[ ]nppy n c =2. Substituting y(p)[n] and x[n] into the given difference Eq.:Signals and Systems_Simon Haykin & Barry Van Veen77Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER( ) ( ) ( )11 1 12 2 2n n np pc c p =pc (1 2 ) 1 p =(2.45) Both sides of above eq. are multiplied by (1/2) n3. Particular solution:( )| |1 11 2 2npy np| |= |\ .Example 2.20 Example 2.20 RC Circuit (continued): Particular SolutionConsider the RC circuit of Example 2.17 Example 2.17 and depicted in Fig. 2.30 Fig. 2.30. Find a particular solution for this system with an input x(t) = cos(e0t).Figure 2.30(p. 148)RC circuit.< Sol.>1. Differential equation: ( ) ( ) ( )dyt RC yt xtdt+ =2. Particular solution form:( )1 2( ) cos( ) sin( )py t c t c t e e = +3. Substituting y(p)(t) and x(t) = cos(e0t) into the given differential Eq.:Signals and Systems_Simon Haykin & Barry Van Veen78Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER1 2 0 1 0 0 2 0 0cos( ) sin( ) sin( ) cos( ) cos( ) c t c t RC c t RC c t t e e e e e e e + + =1 0 21 c RC c e + =0 1 20 RC c c e + =4. Coefficients c1and c2:( )1 2011cRCe=+ ( )02 201RCcRCee=+and5. Particular solution:( )( )( )( )( )( )00 0 2 20 01cos sin V1 1pRCy t t tRC RCee ee e= ++ +2.10.32.10.3 The Complete Solution The Complete SolutionComplete solution: y = y(h)+ y(p)y(h)= homogeneous solution,y(p) = particular solutionThe procedure for finding complete solution of differential or difference equations is summarized as follows:Signals and Systems_Simon Haykin & Barry Van Veen79Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERProcedure 2.3: Procedure 2.3: Solving a Differential or Difference equation1. Find the form of the homogeneous solution y(h)from the roots of the characteristic equation.2. Find a particular solution y(p)by assuming that it is of the same form as theinput, yet is independent of all terms in the homogeneous solution.3. Determine the coefficients in the homogeneous solution so that the completesolution y = y(h)+ y(p)satisfies the initial conditions. Note that the initial translation is needed in some cases. Note that the initial translation is needed in some cases.Example 2.21 Example 2.21 First-Order Recursive System (Continued): Complete SolutionFind the complete solution for the first-order recursive system described by the difference equation1y[n] y[n 1] x[n]4 = (2.46) if the input is x[n] = (1/2)nu[n] and the initial condition is y[ 1] = 8.< Sol.>1. Homogeneous sol.:( )| |( )114nhy n c =Signals and Systems_Simon Haykin & Barry Van Veen80Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2. Particular solution:( )| |122npy n| |= |\ .3. Complete solution:n n11 1y[n] 2( ) c ( )2 4= + (2.47) 4. Coefficient c1determined by I.C.:I.C.: | | | | | | 0 0 1 4 1 y x y = + | | | | 0 0 (1 4) 8 3 y x = + =We substitute y[0] = 3 into Eq. (2.47), yielding0 011 13 22 4c| | | |= + ||\ . \ .c1= 15. Final solution:| |1 122 4n nyn| | | |= + ||\ . \ .for n > 0Example 2.22 Example 2.22 RC Circuit (continued): Complete ResponseFind the complete response of the RC circuit depicted in Fig. 2.30 Fig. 2.30 to an input x(t) = cos(t)u(t) V, assuming normalized values R = 1 O and C = 1 F and assuming that the initial voltage across the capacitor is y(0) = 2 V.Signals and Systems_Simon Haykin & Barry Van Veen81Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER< Sol.>1. Homogeneous sol.: ( )( ) VthRCy t ce=2. Particular solution:( )( )( )( )( )( )2 21cos sin V1 1pRCy t t tRC RC= ++ +4. Coefficient c1determined by I.C.:3. Complete solution:( )1 1cos sin V2 2ty t ce t t= + +e0= 1R = 1 O, C = 1 Fy(0 y(0 ) = y(0 ) = y(0+ +) )01 1 12 cos 0 sin 02 2 2ce c+ + += + + = + c = 3/25. Final solution:( )3 1 1cos sin V2 2 2ty t e t t= + +Signals and Systems_Simon Haykin & Barry Van Veen82Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.23 Example 2.23 Financial Computations: Loan RepaymentThe following difference equation describes the balance of a loan if x[n] < 0 represents the principal and interest paymentmade at the beginning of each period and y[n] is the balance after the principal and interest payment is credited. As before, if r % is the interest rate per period, then p = 1 + r/100.| | | | | | 1 yn yn xn p = +Use the complete response of the first-order difference equation to find the payment required to pay off a $20,000 loan in 10 periods. Assume equal payments and a 10% interest rate.< Sol.>1. We have p = 1.1 and y[ 1] = 20,000, and we assume that x[n] = b is the payment each period.2. The first payment is made when n = 0. The loan balance is to be zero after 10payments, thus we seek the payment b for which y[9] = 0.3. Homogeneous sol.:( )| | ( ) 1.1n hhy n c =4. Particular solution:Signals and Systems_Simon Haykin & Barry Van Veen83Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER( )| |ppy n c =Substituting y(p)[n] = cpand x[n] = b into the difference equation y[n] 1.1y[n 1] = x[n], we obtain10pc b = 3. Complete solution:= >nhy[n] c (1.1) 10b,n 0 (2.48) 4. Coefficient chdetermined by I.C.:I.C.: | | | | | | 0 1.1 1 0 22, 000 y y x b = + = +( )022,000 1.1 10hb c b + = 22,000 11hc b = +| | ( )( ) 22, 000 11 1.1 10nyn b b = + 5. Payment b: By setting y[9] = 0, we have ( )( )90 22, 000 11 1.1 10 b b = + ( )( )9922, 000 1.13, 254.9111 1.1 10b= = Fig. 2.31. Fig. 2.31.Signals and Systems_Simon Haykin & Barry Van Veen84Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.31(p. 155)Balance on a $20,000 loan for Example 2.23.Assuming 10% interest per period, the loan is paid off with 10 payments of $3,254.91.Signals and Systems_Simon Haykin & Barry Van Veen85Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.112.11 Characteristics of Systems Described by Differential Characteristics of Systems Described by Differentialand Difference Equations and Difference EquationsComplete solution: y = y(n)+ y(f)y(n)= natural response,y(f) = forced response2.11.12.11.1 The Natural Response The Natural ResponseExample 2.24 Example 2.24 RC Circuit (continued): Natural ResponseFind the natural response of the this system, assuming that y(0) = 2 V, R = 1 Oand C = 1 F.The system In Example 2.17 is described by the differential equation( ) ( ) ( )dy t RC y t xtdt+ =< Sol.>1. Homogeneous sol.:( )( )1Vh ty t c e=2. I.C.: y(0) = 2 Vy(n)(0) = 2 V c1= 23. Natural Response: ( )( ) 2 Vn ty t e=Signals and Systems_Simon Haykin & Barry Van Veen86Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.25 Example 2.25 First-Order Recursive System (Continued): Natural ResponseThe system in Example 2.21 Example 2.21 is described by the difference equation| | | | | |114yn yn xn =Find the natural response of this system.< Sol.>1. Homogeneous sol.:( )| |114nhy n c| |= |\ .2. I.C.:y[ 1] = 811184c| |= |\ .c1= 23. Natural Response:( )| |12 , 14nny n n| |= > |\ .2.11.22.11.2 The Forced Response The Forced ResponseThe forced response is the system output due to the input signal assuming zero initial conditions.The forced response is valid only for t > 0 or n > 0Signals and Systems_Simon Haykin & Barry Van Veen87Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER+ The at-rest conditions for a discrete-time system, y[ N] = 0, , y[ 1] = 0,must be translated forward to times n = 0, 1, , N 1 before solving for theundetermined coefficients, such as when one is determining the completesolution.Example 2.26 Example 2.26 First-Order Recursive System (Continued): Forced ResponseThe system in Example 2.21 Example 2.21 is described by the difference equation| | | | | |114yn yn xn =Find the forced response of this system if the input is x[n] = (1/2)nu[n].< Sol.>1. Complete solution:2. I.C.: Translate the at-rest condition y[ 1] to time n = 0| | | | | |10 0 14y x y = + | |11 12 , 02 4n nyn c n| | | |= + > ||\ \ . .y[0] = 1 + (1/4) 0 =13. Finding c1:0 011 11 22 4c| | | |= + ||\ \ . .c1= 1Signals and Systems_Simon Haykin & Barry Van Veen88Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER4. Forced response:( )| |1 12 , 02 4n nfy n n| | | |= > ||\ \ . .Example 2.27 Example 2.27 RC Circuit (continued): Forced ResponseFind the forced response of the this system, assuming that x(t) = cos(t)u(t) V, R= 1 O and C = 1 F.The system In Example 2.17 is described by the differential equation( ) ( ) ( )dy t RC y t xtdt+ =< Sol.>1. Complete solution: ( )1 1cos sin V2 2ty t ce t t= + +From Example 2.222. I.C.:y(0) = y(0+) = 0 c = 1/23. Forced response:( )( )1 1 1cos sin V2 2 2f ty t e t t= + +Signals and Systems_Simon Haykin & Barry Van Veen89Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.11.32.11.3 The Impulse Response The Impulse Response+ Relation between step response and impulse response1. Continuous-time case:( ) ( )dh t s tdt=2. Discrete-time case:| | [ ] [ 1] hn s n s n = 2.11.42.11.4 Linearity and Time Invariance Linearity and Time InvarianceInput Forced responsex1y1(f)x2y2(f)o x1 + x2oy1(f)+ y2 (f)+ Forced responseLinearityInitial Cond. Natural responseI1y1(n)I2y2(n)o I1 + I2oy1(n)+ y2 (n)+ Natural responseLinearity+ The complete response of an LTI system is not not time invariant.Response due to initial condition will not shift witha time shift of the input.2.11.52.11.5 Roots of the Characteristic Equation Roots of the Characteristic EquationSignals and Systems_Simon Haykin & Barry Van Veen90Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER+ Roots of characteristic equationForced response, natural response, stability, and response time. BIBO Stable: BIBO Stable:1. Discrete-time case: boundednir 1, for allir i ni(or t > ti), we can determine the output for all times n > ni(or t > ti).2.13.12.13.1 The State The State- -Variable Description Variable Description1. Direct form II of a second-order LTI system: Fig. 2.39. Fig. 2.39.2. Choose state variables: q1[n] and q2[n].3. State equation:1 1 1 2 2q [n 1] a q [n] a q [n] x[n] + = +(2.57) 2 1q [n 1] q [n] + =(2.58) 4. Output equation:1 1 1 2 2 2y[n] (b a )q [n] (b a )q [n] x[n] = + +(2.59) 1 1 1 22 2q [n 1] q [n] a a 1x[n]q [n 1] q [n] 1 0 0+ = + + (2.60) = + +1 1 2 2 1 1 2 2y[n] x[n] a q [n] a q [n] b q [n] b q [n],5. Matrix Form of state equation:Signals and Systems_Simon Haykin & Barry Van Veen97Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.39(p. 167)Direct form II representation of a second-order discrete-time LTI system depicting state variables q1[n] and q2[n].Signals and Systems_Simon Haykin & Barry Van Veen98Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER6. Matrix form of output equation:11 1 2 22q [n]y[n] [b a b a ] [1]x[n]q [n] = + (2.61) Define state vector as the column vector = 12q [n][n]q [n]qWe can rewrite Eqs. (2.60) and (2.61) as[n 1] [n] x[n] + = + q Aq b (2.62) y[n] [n] Dx[n] = + cq(2.63) where matrix A, vectors b and c, and scalar D are given by1 21 0Aa a | |=| \ .10b = | |1 1 2 2c b a b a = 1 D =Example 2.28 Example 2.28 State-Variable Description of a Second-Order SystemFind the state-variable description corresponding to the system depicted in Fig. 2.40 Fig. 2.40 by choosing the state variable to be the outputs of the unit delays.< Sol.>Signals and Systems_Simon Haykin & Barry Van Veen99Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.40(p. 169)Block diagram of LTI system for Example 2.28.1. State equation:| | | | | |1 1 11 q n q n xn o o + = +| | | | | | | |2 1 2 21 q n q n q n xn o + = + +Signals and Systems_Simon Haykin & Barry Van Veen100Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2. Output equation:| | | | | |1 1 2 2yn q n q n n n = +3. Define state vector as| || || |12qq nnq n = In standard form of dynamic equation:+ = + [n 1] [n] x[n] q Aq b= + y[n] [n] Dx[n] cq (2.63) (2.62) 0Ao = 12boo = | |1 2c n n = | | 2 D =+ State-variable description for continuous-time systems:d(t) (t) x(t)dt= + q Aq b (2.64) y(t) (t) Dx(t) = + cq(2.65) Signals and Systems_Simon Haykin & Barry Van Veen101Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERExample 2.29 Example 2.29 State-Variable Description of an Electrical CircuitConsider the electrical circuit depicted in Fig. 2.42 Fig. 2.42. Derive a state-variable description of this system if the input is the applied voltage x(t) and the output is the current y(t) through the resistor.< Sol.>Figure 2.42(p. 171)Circuit diagram of LTI system for Example 2.29. 1. State variables: The voltage acrosseach capacitor. 2. KVL Eq. for the loop involving x(t), R1, and C1:( ) ( ) ( )1 1xt y t R q t = +11 11 1y(t) q (t) x(t)R R= +(2.66) Output equation3. KVL Eq. for the loop involving C1, R2, and C2:( )1 22 2( ) ( ) q t R i t q t = +Signals and Systems_Simon Haykin & Barry Van Veen102Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2 1 22 21 1i (t) q (t) q (t)R R= (2.67) 4. The current i2(t) through R2:( )2 2 2( )di t C q tdt= ( )2 1 22 2 2 21 1( ) ( )dq t q t q tdt C R C R= (2.68) Use Eq. (2.67) to eliminate i2(t)5. KCL Eq. between R1and R2:( ) ( ) ( )1 2y t i t i t = +Current through C1= i1(t) where( ) ( )1 1 1di t C q tdt=( )1 1 21 1 2 2 1 2 1 11 1 1 1( ) ( ) ( )dq t q t q t x tdt C R C R C R C R| |= + + +| \ .(2.69) Eqs. (2.66), (2.68), and (2.69) = State-Variable Description.= +d(t) (t) x(t)dtq Aq b (2.64) = + y(t) (t) Dx(t) cq (2.65) Signals and Systems_Simon Haykin & Barry Van Veen103Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER1 1 1 2 1 22 2 2 21 1 1,1 1AC R C R C RC R C R| | +| \ . = 1 110b C R = 110, cR = 11DR=andExample 2.30 Example 2.30 State-Variable Description from a Block DiagramDetermine the state-variable description corresponding to the block diagram in Fig. 2.44 Fig. 2.44. The choice of the state variables is indicated on the diagram.Figure 2.44(p. 172)Block diagram of LTI system for Example 2.30.l l< Sol.>Signals and Systems_Simon Haykin & Barry Van Veen104Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER1. State equation:( ) ( ) ( ) ( )1 1 22dq t q t q t xtdt= +( ) ( )2 1dq t q tdt=2. Output equation:( ) ( ) ( )1 23 y t q t q t = +3. State-variable description:2 1,1 0A= 1,0b = | | 3 1 , c = | | 0 D =2.13.22.13.2 Transformations of The State Transformations of The StateThe transformation is accomplished by defining a new set of state variables that are a weighted sum of the original ones.The input-output characteristic of the system is not changed.1. Original state-variable description:q Aq bx = + (2.70) cq y Dx = +(2.71) 2. Transformation: q = TqT = state-transformation matrixq = T1qSignals and Systems_Simon Haykin & Barry Van Veen105Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER3. New state-variable description:. q TAq Tbx ' = + 1) State equation:q Tq ' =1. q TATq Tbx' ' = + q = T1q2) Output equation:1. cTq y Dx= +3) If we set 1 1, , , and A TAT b Tb c cT D D ' ' ' ' = = = =then q Aq b x ' ' ' = + and c q y D x ' ' = +Ex. Consider Example 2.30 Example 2.30 again. Let us define new states2 1 1 2( ) ( ) and ( ) ( ) q t q t q t q t ' ' = =Find the state-variable description.< Sol.>1. State equation:1 1 2 2 2 1( ) 2 ( ) ( ) ( ) ( ) 2 ( ) ( ) ( )old description New descriptiond dq t q t q t x t q t q t q t x tdt dt' ' ' = + = + Signals and Systems_Simon Haykin & Barry Van Veen106Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2 1 1 2( ) ( ) ( ) ( )Old description New descriptiond dq t q t q t q tdt dt' ' = = 1 2 2 13 ( ) ( ) 3 ( ) ( )Old description New descriptiony q t q t y q t q t ' ' = + = + 2. Output equation:3. State-variable description:0 1,1 2A ' = 0,1b ' = | | 1 3 , c' = | | 0 . D' =Example 2.31 Example 2.31 Transforming The StateA discrete-time system has the state-variable description1 41A ,4 1 10= 2,4b = | |11 1 ,2c = 2. D = and Find the state-variable description A', b', c', D' corresponding to the new states 1 11 1 2 2 2[ ] [ ] [ ] q n q n q n ' = +1 12 1 2 2 2[ ] [ ] [ ] q n q n q n ' = +< Sol.>1. Transformation: q' = Tq, whereand1 11.1 1 2T= Signals and Systems_Simon Haykin & Barry Van Veen107Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER11 1.1 1T= 2. New state-variable description:123100,0A' = 1,3b ' = | | 0 1 , c' = 2. D' = and + This choice for T results in A' being a diagonal matrix and thus separates the state update into the two decoupled first-order difference equations| | | | | |1 1112q n q n xn + = + | | | | | |2 231 310q n q n xn + = + and 2.142.14 Exploring Concepts with MATLAB Exploring Concepts with MATLAB+ Two limitations: 1. MATLAB is not easily used in the continuous-time case. 2. Finite memory or storage capacity and nonzero computation times.+ Both the MATLAB Signal Processing Toolbox and Control System Toolbox are use in this section.Signals and Systems_Simon Haykin & Barry Van Veen108Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.14.12.14.1 Convolution Convolution1. MATLAB command: y = conv(x, h)x and h are signal vectors.2. The number of elements in y is given by the sum of the number of elements inx and h, minus one.< pf.>1) Elements in vector x: from time n = kxto n = lx2) Elements in vector h: from time n = khto n = lh3) Elements in vector y: from time n = ky= kx+ khto n = ly=lx+ ly4) The length of x[n] and h[n] are Lx= lx kx+ 1 and Lh= lh kh+15) The length of y[n] is Ly= Lx+ Lh 1 Ex. Repeat Example 2.1Impulse and Input : From time n = kh= kx= 0 to n = lh= 1 and n = lx=2Convolution sum: From time n = ky= kx+ kh= 0 to n = ly= lx+ lh= 3 The length of convolution sum: Ly= ly ky+ 1 = 4MATLAB Program:>> h = [1, 0.5];>> x = [2, 4, -2];>> y = conv(x,h)y =2 5 0-1Signals and Systems_Simon Haykin & Barry Van Veen109Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERRepeat Example 2.3Given| | ( ) | | | | ( )1 4 4 hn un un = | | | | | | 10 . xn un un = andImpulse response InputFind the convolution sum x[n] - h[n].< Sol.>1. In this case, kh= 0, lh= 3, kx= 0 and lx= 92. y starts at time n = ky = 0, ends at time n = ly=12, and has length Ly= 13.3. Generation for vector h with MATLAB:>> h = 0.25*ones(1, 4);>> x = ones(1, 10);4. Output and its plot:>> n = 0:12;>> y = conv(x, h);>> stem(n, y); xlabel('n'); ylabel('y[n]')Fig. 2.45. Fig. 2.45.Signals and Systems_Simon Haykin & Barry Van Veen110Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERFigure 2.45(p. 177)Convolution sum computed using MATLAB.Signals and Systems_Simon Haykin & Barry Van Veen111Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.14.22.14.2 The Step Response The Step Response1. Step response = the output of a system in response to a step input2. In general, step response is infinite in duration.3.We can evaluate the first p values of the step response using the convfunction if h[n] = 0 for n < khby convolving the first p values of h[n] with afinite-duration step of length p.1) Vector h = the first p nonzero values of the impulse response.2) Define step: u = ones(1, p).3) convolution: s = conv(u, h).Ex. Repeat Problem 2.12Determine the first 50 values of the step response of the system with impulse response given by| | ( ) | |nhn un p =with p = 0.9, by using MATLAB program.< Sol.>1. MATLAB Commands:Signals and Systems_Simon Haykin & Barry Van Veen112Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER>> h = (-0.9).^[0:49];>> u = ones(1, 50);>> s = conv(u, h);>> stem([0:49], s(1:50))2. Step response: Fig. 2.47. Fig. 2.47.Figure 2.47(p. 178)Step response computed using MATLAB.2.14.32.14.3 Simulating Difference equations Simulating Difference equations1. Difference equation:= = = N Mk kk 0 k 0a y[n k] b x[n k](2.36) Command: Command:filterSignals and Systems_Simon Haykin & Barry Van Veen113Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2. Procedure:1) Define vectors a = [a0, a1, , aN] and b =[b0, b1, , bM] representing thecoefficients of Eq. (2.36).2) Input vector: x3) y = filter(b, a, x) results in a vector y representing the output of the system for zero initial conditions.4) y = filter(b, a, x, zi) results in a vector y representing the output of the system for nonzero initial conditions zi.+ The initial conditions used by filter are not the past values of the output.+ Command zi = filtic(b, a, yi), where yi is a vector containing the initial conditions in the order[y[1], y[2], , y[N]], generates the initialconditions obtained from the knowledge of the past outputs.Ex. Repeat Example 2.16The system of interest is described by the difference equation| | | | | | | | | | | | 1.143 1 0.4128 2 0.0675 0.1349 1 0.675 2 y n y n y n x n x n x n + = + + (2.73) Determine the output in response to zero input and initial condition y[1] = 1 and y[2] = 2.< Sol.>Signals and Systems_Simon Haykin & Barry Van Veen114Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER1. MATLAB Program:>> a = [1, -1.143, 0.4128]; b = [0.0675, 0.1349, 0.675];>> x = zeros(1, 50);>> zi = filtic(b, a, [1, 2]);>> y = filter(b, a, x, zi);>> stem(y)2. Output: Fig. 2.28(b). Fig. 2.28(b).0 10 20 30 40 50-0.2-0.100.10.20.30.40.53. System response to aninput consisting of theIntel stock price data Intc:>> load Intc;>> filtintc = filter(b, a, Intc);+ We have assume that theIntel stock price data arein the file Intc.mat.+ The command [h, t] = impz(b, a, n) evaluates n values of the impulse responseof a system described by a different equation.Signals and Systems_Simon Haykin & Barry Van Veen115Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2.14.42.14.4 State State- -Variable Descriptions Variable Descriptions+ MATLAB command: ss1. Input MATLAB arrays: a, b, c, d Representing the matices A,b,c, and D.2. Command: sys = ss(a, b, c, d, -1) produces an LTI object sys that representsthe discrete-time system in state-variable form.Continuous-time case: sys = ss(a, b, c, d)No 1+ System manipulation:1. sys = sys1 + sys2 Parallel combination of sys1 and sys2.2. sys = sys1 - sys2 Cascade combination of sys1 and sys2.+ MATLAB command: lsim1. Command form: y = lsim(sys, x)2. Output = y, input = x.+ MATLAB command: impulse2. This command places the first N values of the impulse response in h.1. Command form: h = impulse(sys, N)+ MATLAB routine: ss2ss Perform the state transformation1. Command form: sysT = ss2ss(sys, T), where T = Transformation matrixSignals and Systems_Simon Haykin & Barry Van Veen116Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTEREx. Repeat Example 2.31.1. Original state-variable description:1 41,4 1 10A= 2,4b = | |11 1 ,2c = 2, D = and 2. State-transformation matrix:1 11.1 1 2T= 3. MATLAB Program:>> a = [-0.1, 0.4; 0.4, -0.1]; b = [2; 4];>> c = [0.5, 0.5]; d = 2;>> sys = ss(a, b, c, d, -1);% define the state-space object sys>> T = 0.5*[-1, 1; 1, 1];>> sysT = ss2ss(sys, T)4. Result:Signals and Systems_Simon Haykin & Barry Van Veen117Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTERa = x1x2x1-0.5 0x2 0 0.3b = u1x1 1x2 3c = x1x2y1 0 1d = u1y1 2Sampling time: unspecifiedDiscrete-time model.Ex. Verify that the two systems represented by sys and sysT have identicalinput-output characteristic by comparing their impulse responses .< Sol.>1. MATLAB Program: >> h = impulse(sys, 10); hT = impulse(sysT, 10);>> subplot(2, 1, 1)>> stem([0:9], h)>> title ('Original System Impulse Response');>> xlabel('Time'); ylabel('Amplitude')>> subplot(2, 1, 2)>> stem([0:9], hT)>> title('Transformed System Impulse Response');>> xlabel('Time'); ylabel('Amplitude')Signals and Systems_Simon Haykin & Barry Van Veen118Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER2. Simulation results:Fig. 2.48. Fig. 2.48.0 2 4 6 8 100123Original Sys tem Impulse ResponseTimeAmplitude0 2 4 6 8 100123Transformed System Impulse ResponseTimeAmplitudeFigure 2.48(p. 181)Impulse responses associated with the original and transformed state-variabledescriptions computer using MATLAB.+ We may verify thatthe original andtransformed systemshave the (numerically)identical impulse response by computingthe error, err = h hT.Signals and Systems_Simon Haykin & Barry Van Veen119Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER0 2 4 6 8 10-6-5-4-3-2-101 x 10-17TimeAmplitude errPlot for err = hPlot for err = h hT hTSignals and Systems_Simon Haykin & Barry Van Veen120Time Time- -Domain Representations of LTI Systems Domain Representations of LTI SystemsCHAPTER