You are on page 1of 53
Chapter 3 Solutions Tel. (8) Be = (8)? +2(2)? +2(0)" = 5)? + 202)? + 200)? = (3)? + 266)? + 2(9}? = 252 (2)? + 2(4)? = 40 1A age =) pay? +20) +97) = 22 Pom wip Dwi? = § aay 207 +8] <5 ©) read pay 20) +207] =5 @ gas foes") = 10P and Next ord - mS erm Monte zy = Dieirfon = Diente Interchanging the order of summation yields ‘The summation within square brackets is No when r= m and 0 otherwise. Hence Peo > D,Dt = Ss DP = fd 31-4. (e) ln] = 08") = 3 {0.8" uf] +08" an} + 5 {0.8" ula] — 08° %al-nl} eo =i a Yo 8)" ea x 6 = 5g 28 (b) To find the energy of the even component z,[n}, we observe that, both terms 0.8"u{n] and 0.8°"u[—n} are nonzero at n = 0. Hence, the two terms are not disjoint, and the energy Ez, is not the suin of the energies of the two terms. For this reason, we rearrange _{n] as n+ 3 {0.8m — 1} 40.8" — a} [All the above three terms are disjoint, Hence B., is the sum of energies of the ‘three terms. ‘Thus, Be, 1} oeor ed Ye oa" ‘The energy of oa] is pat [Zoos Four] Henee Ex, + Bx, 80+ 0.80 = 2.78 = By (6) Lot us first consider a causal signal 2[n], which can be expressed as =a} -2{-n}uf-n — 1)} eh sled component fn] is 86 3.15. (a) ) Le Be, = 3) lolol? Hence tee + Be, = 2°|0)+ 5 |a{nll? = Bs Similarly, we can show that this result applies to anticausal signals also. ‘A general signal is made up of causal and anticausal components, which are disjoint, Hence the energy of a signal is the suin of energies of the causal and ‘anticausal components. Moreover the energy of each causal and anticausal com- ponent is equal to the sum of the respective even and odd components. Also the ‘sum of the even components of the causal and anticausal signal equals the even component of z{n]. Same is true of odd components. Hence, it follows that the energy of 2[n] is the surn of energies of even and odd components of =n} ‘As socn in Prob 3.1-4, the even and odd component of a causal [7] are ln] = 210)5n] + 5 (2b Y + afenjul-n— 1) + 5 (ofan ~ 1] = 2{n)ul=n ~ 1) zl aT If 2{0] = 0, then B= FL Pe + i te 5B. nl? = 5 lnl? = 058. Similarly, we can show that Bs, Tf 2[0] #0, then it is clear that Ey By, +250) 4 Pe, Observe that x[0]6[n] is disjoint with z,[n]- Hence, the product 2[0}6{n}zeln} is zero. Moreover, un — 1] and u|-n— 1} is disjoint. Hence the eross-product termns involving product uf — Yjul-n 1] are zero, Hence vets = 1 5 ‘The two terms within the curly brackets are equal. Hence ¥ aelnle Using similar argument, we can show that this result holds for anticausal signal. A general signal is mace up of causal and anticausal components, which are disjoint, Hence it follows that 7 42:1. (a) The energy of s[-n] is Ei given by A= x (2{-nJ? Setting n= —m, we obtain B= Sebo? = 3 el = Be (b) The energy By of 2fa ~ m] is given by B= SS fehomit= 3 bel = 8 (c) The energy Es of x[m —n} is given by y= 3 lobm =n? = Ss loll? = D> bel? = Be (a) The energy By of zh] is gven by Bu= SS [Kalu = 12 SS fal = KB 3.2 Because | - 2[nll? = |z[nJP, it follows that the power of ~ For parts b, ed and ¢, using the arguments in Prob. 3.2-1, we show Power of xf Power of ain Power of ex{n] Power of a{m—n] = Pe ‘This shows the time-shift or time-inversion operation does not affect the power of a signal, Same is the case with sign change. Multiplication of a signal by a constant ¢ cases fold increase in power. 3.25, Figure $3.23 shows all the signals. 3.244, Figure $3.2-4 shows all the signals. limy so slg Dw)" = 1 jen 34 ima oe ange w= Ly Dp (I) = 05 @ Pe Dy (Hu = 05 © Mo=% Pom EDHcostine ay? = 3 [(4) 40+ (4) + (8) 40+ (4)']- os 3.9-2. (a) ‘Trivial 88 Figure $3.28 LLG), . Figure $3.24 the result follows. O and m= 1, the result follows. 0 for even n and ufn] + (~1)"uln} = 0 for odd n, the result (b) Because sin = (6) Because n(n — (@) Because 5 follows (0) Because cos 32 = 0 for odd nm and fp] + (-1)" = 0 for even n, the result follows. 33-3. Figure $2.3-3 shows all the signals. 334, (a) x[n] = (+3) (ul +3] ~ unl) + (-n +8) (ulr] ~ uf 4)) (b) xfp} = na (ufn] ~ uf = 49) + (-n +6) (ul — 4] = wl — 71) (©) efx] = n(uln +3) —ulr— a) (@) 2[o] = -2n (uf + 2] — uf) + 2n (uf) ~ ula 3) Jn all four cases, zn} may be represented by several other (slightly different) expres- sions. For instance, in case (a), we may also use z{n| = (n-+3) (ufr + 3] ~ ulm — 1) + (Gn+3)(upu—1] ln — 4)). Moreover because ain] = 0 at n = £3, ulm +3] and ufn ~4] may be replaced with u(n +2} and un ~ 3), respectively. Similar observations apply to other cases also. 33-5. (a) €-®8" = (0.6065)" 89 - 4 >) tLe fest me LL aths TL" aS aE (AD oy 3 a “he, n> 3 Ta 3756784 Figure $3.3-3 N= 123495673 (b) 625" = (1.6487)", © e (a) om Figure §3.3-5 shows locations of \ and + in each case. By plotting these signals, we observe that when > 1 (Ain RHP), the signal grows exponentially, When 7 <1 (A in LHD), the signal decays exponentially. When [2] = 1 (om imaginary axis), the signal amplitude is constant (a) wy (a) at a | 2 | a x ¥ a noe P eee e| os (Ve487 =r fe “1 {° 33-6, (a) OHI (eters (0) Om = (ee (6) elvis = (e (@) ebm = (e fe) e488 = (eye = (2) in — jsin $m) et)" eT" = e*|oos En — jsin En] (9 ot 337. ale) = J (alo) + 2f-nl} + 3feln) = 2f-n)) (even) ele) fod ul} = 2 ufo] + ul-nf) + 2 ufo} ~ fn} oe 90 (b) ru = Zu) ~ nul) + Hout + mula) — eee (6) sin (48) is an odd function. 1t has no even component. (a) cos (#2) is an even function. It has no odd component. Figure $3.3-7 shows the even and odd components for the four cases. (a> 2 roted oe Mr 25; a ae pe wold ttl: wa faa © Uxant-e tty i era avi Figure 833-7 34-1. Because y[n] = yin — 1] + x[n}, ln — yln — 1) = xf] Realigation of this equation is shown in Figure $3.4-1. rel, yf ox Figure 83.4.1 34-2, ‘The net growth rate of the native population is 3.3. 1.3 = 2% per year. Assuming the immigrants enter at a uniform rate throughout the year, their birth and death rate will be (3.3/2)% and (1.3/2)%, respectively of the immigrants at the end of the year. ‘The population pin] at the beginning of the Ath year is pln — 1] plus the net increase in the native population plus afr ~ 1}, the immigrants entering during (n~ 1)st year 9 plus the net increase in the immigrant population for the year (n ~ 1) 33-13 33-13. ala} = pln 31 pin a) teint 4 oy = L02p{n— 1] + 1.014 — 1] itn 1] “ ln} — 1.02p{n — 1] = 1.014 — 1] pln 1] ~1.02pfrq] = 1.0tefr) 343. (a) ln) = 2ln) + afr — 1+ 2fn— 2] +2103] +n — 4) (b) Refer to Figure $3.4-3b. intate LD refeesents unit delay Figure $3.43 34-4, The input 2 {r], which has @ constant value of unity for all n 2 0. Also uln - yin — 1] = Pulp). Hence the difference between two successive output vahies is always constant of value T. Clearly y{n) must be a ramp with a possible constant component. Thus ln] = (nT + ula To find the value of unknown constant c, we let n= 0 and obtain vl =e Bat from the input equetion fn] ~ yln ~ 1] = Tufn], we find y[d} = T [remember that al} = 0). Hence vind = (+ 1)Tufn] = nT for 70 44-5, ‘The differential equation is fy dy - Fo ta G + ante) = 210 ‘We use the notation yfn| to represent y(n), 2fn] to represent 2(nT),--- ete. and assume that T is sinall enough so that the assumption T+ 0 may be mnade. We have ult) = wlnl dy eke a ? a oy , Se ee 92 B46. 347, 3.4.8. vuln] — 2y[n— 1] + yin — 2} TF Hence, the given differential equation ean be approximated by the following differential equstion Aayln] + Aayin ~ 1] + Asvin — 2) = Bata) Substituting approximate difference expressions in the differential equation yields T?xfn) = 2yln = 1] + vln ~ 2) + aT Evin) ~ vl — AI} + ao yh or (14a 7 + aoT®) yl] ~ @ + axT)ye ~ 3) + ¥fn — 2) = 7 ‘The node equation at the kth mode is iy biz bis = 0, or vfn+ i) la] ln ak ‘Therefore a(vln— 3} + vf + 1} ~ 2ofn) ~ vn] = 0 fmt (242) om +ehe-a1=0 that is ofa 2) — (2+ 2) afe-+11-+ up} =o {) True; all finite power signals have infinite energy, and therefore eannct be energy signals. Energy signals and power signals are mutually exclusive. (b) False; a signal with infinite energy need not be a power signal. For example, the signal z{n] = 2"uln] has infinite energy and infinite power. Thus, itis neither an energy signal nor a power signal (c) True; the system is causal. Even though the input is scaled by (n-+1), the current output only depends on the current input. Another way to sce this is to rewrite the expression as yf] = nz[n] + an (@) False; the sysiem is not causal. ‘The current output depends om a foture input ‘value. To help see this, substitute n’ = n—1 to yield yln'] = 2{n' +1}; the output, at time n’ requires the future input value at time n+ 1 (©) False; signal [n] with energy E does not guarantee that signal zlan} has energy jf) Although this statement is true for continuous-time signals, is not true for discrete-time signals. Remember, the discrete operation 2{an] results in a loss of information and thus a likely loss in energy. Por example, consider z{n] = dln — 1), which has energy E = 1. ‘The signal ylo] = 2[2n) = 0 has zero energy, not B/2= 1/2. Notice, yife] = ~Sfn) +-5ln—1}+24{n—2]. Furthermore, ea{n] = 2i[r—1]-2rfe—-2). Since the system is LT, uoln] = viln ~ 1] ~ 2uifn— 2h MATLAB is used to plot the result. 93 >> yl = imline(?~( -0)+(nes1)+24(n=2)?); n= (2:8); >> xlabel(’n’); ylabel(’y_2[n]’); , I Figure 3.4.8: Plot of ysfa] = ln — 1} - 2u:[n — 2} 34-8. Using the sifting property, this system operation is rewritten as yb 0.5 (z[n] + 2(-n)). (a) This system extracts the even portion of the input (b) Yes, the system is BIBO stable. If the input is bounded, then the output is neces- sarily bounded. That is, if feln]| < Mz < oo, then [yfnll = [0.5 (x(n + 2{—nl) |< 0.5 (l2fn|i + la{-nl)) < Me < 00. (c) Yes, the system is linear. Let yy|n] = 0.5(¢y[n] + 2u[-n]) and yolm) 0.5(22{n} + za[-n]). Applying axy[n] + baln] to the system yields yfn} 0.5 (cxry[n] + brain] + (axy{—n] + ba2[—n})) = 0.5a(z4[n} +23 [—n})+0.5b(z2h 2{-n)) = ays[n) + buele, (a) No, the system is not memoryless. For example, at time n = 1 the output {i} = 0.5(z{1} + 2[-1]) depends on # past value of the input, 2[-1]. (6) No, the system is not causal. For example, at time n= —1 the output yf—1] = 0.5(z[-1] + z[1]) depends on a future value of the input, 1] (f) No, the system is not timeinvariant. For example, let the input be 2y[n] = ‘ufn-+10}—uln—11}, Since this input is already even, the output is just the input, in(r) = #[n]. Shifting by a non-zero integer N, the signal ra{n] = ry[n — N] is not even, and the output is y(n] 4 m[n — N] = yn — NJ. Thus, the system cannot be time-invariant 3.4.10. It is convenient to substitute n! 1-1 and rewrite the system expression as yf! an! ~ Ai/ate (a) No, the system is not BIBO stable. Input values of zero can result in unbounded outputs. For example, at n’ = 0 the bounded input z[n'] = din] yields an ‘unbounded output y[l] = 1/0 = oo. (b) No, the system is not memoryless, The current output relies on a past input. For example, at n! = 0, the output yin] requires both the current input z[n’) and a stored past input xf! ~ I} 3411. 342, 3413 3414 (6) Yes, the system is causal. The current output y[n'] does not depend on any future value of the input. ‘The operation y(t) = 2(24) isa one-to-one mapping, where no information is lost. Any ‘one-to-one mapping is invertible. In this ease, 2() i recovered by taking y(t/2). Since every other sample of z[n} is removed in the operation yfn] = [2n, one half of z\n] is lost and the process is not invertible. Thought of another way, tlie operation ‘yln} = 2[2n] is not a one-to-one mapping; many different signals z[n] map to the same signal yl], which makes inversion impossible. Notice that _yiln] is obtained by multiplying fn] by the repeating sequence {sin($n + 1)} = {...,0.5403, —0.8415, ~0.5403, 08415,...}. In this particular case, 2{n] is recovered by simply multiplying yfn] by the inverse repeating sequence {aan} = {..., 1.8508, ~1.1884, ~1.8508, 1.1884...) Im the case second, however, yefn] is obtained by multiplying 2{n] by the repeating sequence {sin(#(n + 1))} = {..+,0,—1,0,1,-..}- Sinee the sequence includes 2eros, information is lost and the original sequence cannot be recovered. Using the definition ofthe ramp function, the system expression is reweitten as yf} = n(n). (a) No, the system is not BIBO stable. For example, if the input is e unit step 2{n] = ‘uf, then the output is ramp fimetion yin] = rfp}, which grows unbouncled with time. (b) Yes, the system is linear. Let an[n] = rety{njufn] and yafn] = nzalnlufn). Ap- plying ax[n} + bra[n} to the system yields yln] = n (axfn] + bea{n)) ule] = ‘anzy{n}uln) + brizabeluln| = aysln] + buat (6) Yes, the system is memoryless. The current output only depends on the current input multiplied by a known (time-varying) scale factor. (a) Yes, the system is causal. All memoryless systems are causal, The output does not depend on future values of the input or output, (6) No, the systern is not time-invariant. For example, applying 2 [n] = é{n} yields the output yaln] = néfnjuln) = 0. Applying xain] = dfn ~ 2] yields the output alr] = nbn — Iufn} = Bln — 1. Note, z2{n] = ziln ~ 1] but yon] # vale — 3} Shifting the input does not. produce a corresponding shift in the output. {a) Position measurements zn] are in meters, The difference <[n] ~ 2[n ~ 1} is the change in position, in meters, per frame of film. Since the camera operates at 60 frames per second, dimensional analysis requires k = 5° (b) Since ufo] = {zln} - z[n ~ 2)) is an estimate of the velocity v(t) = x(t), it is sensible to use an] = k(ofn] — vfn — 1]) as an estimate of the acceleration a Combing tines a = (d(en] = xn — 3) — A(x - in 2))) oF 2 (x{n] ~ 2x — 1] + fv — 2}) = 8000 (fn) — 22fn— I] +2[n —2)) ‘This estimate of acceleration has two primary advantages. First, it is simple to calculate. Second, it is a causal, stable, LIT system and therefore enjoys the properties of such systems. ‘There are several shortcomings of the estimate as well. Of particular significance, the estimate ajn} lags the actual acceleration a(t). One way to see this is that the estimate aln] depends only on current and past values. A more balanced esti- nate of at) isa shifted version aa{n} = aln+t] = K? (xfn + 1) ~ 2x{n] + 2{n ~ 1). While this may fix the problem of lag, the new system is no longer causal, Both cases estimate derivatives using first-order differences; there are more sophisti- cated (and more complex) methods to more accurately estimate derivatives. By substituting 4[n] for 2{n], the impulse response is ‘ln] = R2 Bln] ~ 2m — 1] + 5m — 2}) 3.415. There are many ways to solve this problem. For this solution, let dln] designate the distance from the student's destination, which alternates between home and the exarn location, just before the student changes his mind. Por ever-valued m the destination is home, and for odd-valued n the destination is tho exam location. Just before changing direction, the student ise distance of dn] miles from his destina- tion. Turning around, his next destination is therefore a distance of 2—dln] miles. The student travels one-balf of this distance, which leaves 214 mites remaining, Thus, a difference equation description of this problem is dja + 1] = 2-1 = 1 —0.5d[n] = ‘ufn] ~ 0.5d{n]. Rearranging and shifting by one yields an} + 0.5dfn— 1) = uf — 1} For this description, df] = 0. This auxiliary condition simply states that before the student first decides to go to the exam, he is at home. 35-1. (a) ula ] = 0.590} a) Setting m = 1 and substituting y[~I] = 10, yields ‘y{0] = 0.5(20) =5 Setting n = 0, and substituting y{0) = 5, yields ult] = 05(5) = 25 Setting n = 1 in (1), and substituting yfl] = 2.5, yields yf2} = 0.5(2.5) = 1.25 (e) pln +1] = 2yln) + afm +3) @) Setting n = 1, and substituting yl-1] = 0, 2{0] =1, yields vio] = 041 Setting n= 0, and substituting yl0] = 1, z(t] = 4, yields 1.632 vol= 20) +424 Setting m= 1 in (1), and substituting yll] = 2+, 2[2] = 3, yields 3.399 vials 20-2443 96 35-2, 354, 35-5, ule] = 0.6y/n —1] + 0.16) ~ 2} Setting n= 0, and substituting y[-1] = -26, yl-2] = 0, yields -ylQ) = 0.6(—25) +0.16(0) = ~15 Setting n= 1, and substituting y~1] = 0, v{0] = —15, yields ull] = 0.6(—15) + 0.16(—25) = -13 Setting n= 2, and substituting y[l] = -13, y{0] = 15, yields yf2} = 0.6(—-13) + 0.16(-15) = -102 ‘This equation can be expressed as 1 yin +2] =~ Fyfe +3} vin] tafe +2) Setting n= —2, and substituting y[-1] = yl-2] = 0, 2{0] = 100, yields Lig 2 -g(0) — 7g (0) + 100 = 100 WO = =} Setting n = ~1, and substituting y{—1} = 0, y{0) = 100, x{1] = 100, yields vill = 1 1 (100) ~ $5 (0) + 100-= 75 Setting n = 0, and substituting y{0] = 100, y[t] = 75, 2{2] = 100, yields yal = 05) — 200) +100 = 18 yl +2] = ~Bye +1} ~ 2ufn + af 4 2] 4 Bale + 1) + 320] Setting n yields 2, and substituting yf] = 3, yl-2] = 2, 2[-Il = 2f-2) = 0, 210] = 3, 12 ¥(0] Setting m = —1, and substituting y(0] = —12, v{-1] yields 3(3) 2(2) +1 + 3(0) +-3(0) = 3,z(-1] x0} = 1, x3] fl] = -3(-12) - 28) +3 +30) +30) Proceeding along same lines, we obtain yj2] = -8(86) — 2(-12) +9+ 33) +3(1) = —2yln — 1] — yn — 2] + 2a 7 Setting n = 0, and substituting y{—3] = 2, v{-2] = 3, z{0] = 1, 2{-1] =0, yields {0} = -2(2)-3 +20) -0= Setting m= 1, and substituting yf0] = -5, yl-1] = 2, x10] = 1, 2{1] = 4, yields v= 268) =) 42) =a rr Setting n = 2, and substituting ull] = 7.667, vfo] = ~5, 2[1] = $, 212] vie] = -2(7.667) — 5.445, 1 ) +25) 5 364 (8? +3B+2)y[n] =0 ‘The characteristic equation is 7? +3y-+2= (7+ 1)(y+2) =0. Therefore vuln] = ex(-1)" + co(—2)" Setting n = —1 and —2 and substituting initial conditions yields ner Ber | wae to 14-2)" 220 362 (BE? + 2B + Nyln] = 0 ‘The characteristic equation is 9? + 2y-+1= (+1?) yin = (cr + eak)(—1)" Setting n= —1 and ~2 and substituting initial conditions yields ate, a= bee ann? aio] = = 2ny(—1)" 268 (E* - 2E + 2)yf ‘The characteristic equation is y? — 27 +2 = (y-1-Jl)(y— 1+ 71) =0. The roots are Lb jl = V2e""4, ln) = v2)" cost Fm +0) Setting n= —1 and ~2 and substituting initial conditions yields 1 = ~peos(-F +0) va Solution of these two simultancous equations yields: coos csind =0 ube] = 2(79)" cos Fn) 3.6-4, The equation can be expressed in terms of advance operation notation as The B® yln] = (boB™ + BN-! + -- bby) ate characteristic equation is Hence, all the NV characteristic roots are zero. ‘Therefore, the zero-input component is, zero and the total response in given by the zero-state component. 36-5. (a) (b) (©) By definition, any element in the Fibonacci sequence is the sumn of the previous two. Thus, fn] = ffm — 1] + flr — 2]. Written in standard form, this yields ln] = fle = 1) - fin — 2 ‘This is a somewhat unusual system in the fact that it has no input. In the lingo of signals and systems, f(r] is a zero-input response that is completely driven by ‘the auxiliary conditions. ‘The characteristic equation is 4? —y~1= 0. This yields two characteristic roots: 145 2 ” 1618 and 9 = = 2 Since one characteristic root is in the right-half plane, the system is not stable. To determine a particular Fibonacci number, it is convenient to determine a closed form expression for Jn]. Since ffn] is a zero-input. response, it has form Slo] = evr? + exp. ‘The auxiliary equations yield /(] vn term and Ji2| = 1 = cxrterif. Solving yields e = 5 = a EE 0 T28 © Sanaa = ve. = 0.7236. MATLAB is used to solve for the requested values of fn}. >> ganmat ~ (L+sqrt(S))/2; gamma? = (1-eqrt(5)/25 >> ef = ~gamna2/(goamaleganma2+(gamna2-renmai)); >> e2 = ganmal/(gammalganna2=(ganma2-gansal)) ; >> £80 = cl+gannai“50+c?+gamma2“60 450 = 7.7787e+009 >> £1000 = citgannat”1000%c2+ganna2™1000 43000 = 2. 68640208 = 7.7787(10°) 99 3.66. 3.67. ara. and (1000) = 2.6864(10) Y5=1 (14v5)"" | vo41 (1-v5)"" 2 we a v(n +2) —2.50(n-+1) +0(n) =0 ‘The auxiliary conditions are v(0) = 100, v1) (E7258 + Veln] =0 ‘The characteristic equation is 9? ~ 2.57 +1 = (y~05)(y~2) =0. fn) = €4(0.5)" +.60(2)" Setting n =O and NV, and substituting o(0) = 100, v(N) = 0, yields ate 0 = the €1(05)" + 62(2)" } eae & 100 aw easyn — .5)"(a)" FERRO OEY] me ON Since we are looking for the zero-input response, the term V3r{n— 8] is irrele and the equation becomes ao[n] + wola ~ 1] +0.25yp[n— 2] = 0. ‘The characteristic equation for this second-order system is 7 +7 +0.25 ‘This yields a repeated root: st-7 = —0.5, and the zero-inpnt response has form yoln] = 61(~0.5)" + ean(~0.5)” ‘The pair of equations yo[—1] = 1 = —2cy + 2ep and yoll] = 1 = —e,/2 — c2/2 are solved using MATLAB, D> = 2 2y-1/2 -1/2)\ 1) © = 71.2500 -0.7500 ‘Thus, solr] = -1.25(0.5)" — 0.75n(0.5)". OO) (E+ 2)ubn] = ato} ‘The characteristic equation ie 7 +2 = 0. The characteristic root is 2. Also ‘Therefore fel = Bota] + e(—2" a) We need one value of h{n] to determine ¢. This is determined by iterative solution of (E+ 2)Alp| = ata} nln + 1) + 2hh at 200 Setting n = —1, and substituting h{-1] = 5[-1] = 0, yields Alo] = 0 Setting n= 0 in Eq. (1) and using h{0] = 0 yiekis 1 O=fte = c=-5 ‘Therefore (b) The characteristic root is ~2, bs = 0, a; = 2. Therefore e(-2)" (@) ‘We need one value of Afr] to determine e. This is done by solving iteratively hb Do + 1] + 2h{n] = de + 1} Setting n = = 1, yields 1, and substituting A{—1] = 0, [0] nfo) = 1 Setting n = 0 in Eq, (2) and using Alo] = 0 yields and 2)" fn} 3.7-2. Characteristic equation is 77 6y+9= (7-3)? =0. Also az ih , ba = 0. Therefore = (ce: + can)3"ufn] a We need two values of hf to determine cy and cp. This is found from iterative solution of (57 6E + 9)Aln] = B6{n} Abe -+ 2] — hin + 1} + 9h[n = fn + 1} @ Also A[-1] = h{-2] = 6{-1] = 0 and 6[0] = 1. Setting n = ~2 in (2) yields ‘lo — 6(0) + 9(0) = hol 0 Setting n= —1 in (2) yields Alt} —6(0) +90) =1 => Rf] Setting n= 0 and 1 in Eq. (1) and substituting h{0] = 0, Aft] = 1 yields {28a ten P= 101 3.73, an n(8)"ln} (E* ~ 6B + 25)yln) = (26 — 4B )xh ‘The characteristic roots are Se", by = 0, Therefore Ab = €{6)" c0s(0.923 + 6)uln] a ‘We need two values of hn] to determine ¢ and @. ‘This is done by solving iteratively ‘| — 6am ~ 1] + 25h fr — 2} = 26(n] — 44(n — 1] @ Setting n = 0 yields ‘nlo] — 6(0) + 25(0) = 200) -4(0) => Alo] =2 Setting n= 1 in (2) yields AG] ~ 6(2) +25(0) = 20) -4 => a=8 Setting = 0, 1 in (1) and substituting Ao} = 2, A{l] = 8 yields cos cos(0.923 + 6) = 3.01Tecosé ~ 3.987esind Solution of these two equations yields c= 2061 0 = -0.2Atrad and ln] = 2.061(5)" eos(0.923n — 0.244)ufn] @) ln] = box|n) + brzfn — 1] +--+ owe{n — N] Letting afr] = 6{a] and yin = fn] yields Al] = bod ln} + by6[n — 1] +--+ by dfn — N] (b) From the result in part (a), we can immediately write A{n] for this ease as lr] = B8fn] ~ 56[n— 1} - 26|n— 3] vir] = (-2)"un— eeu tay = ay unser ufa—m 1] 302 38.2. Howover, uf ~ 1] = 0 for m < Land uln—m-+1] = 0 form > n+1, Hence the summation limits may be restricted for 1 z{m|o[n—m — a) fat 8n—m— Bk] = 1 for m = nk and is zero for all other values of m, Hence the right-side sum is given by z[n — #2 Pun Lue my Because an — m] = 1 for all 0 y#1 sao ‘We multiply the result. with ulm] because the convolution is zero for n < 0. ua] + ufn] = J wfnjuln — my} Over the range 0 0, In this case (n~ m-+1) > 0 for m > n+1. ‘Therefore u[-(n =m +1)] = 0 for m n+1. Also ulm] =1 for m > n-+1 (Tor positive n). Hence cn} = 93 y@y- for n=O and inal > hil When n < -1, ~(n~m +1) > 0 for m > 0. Hence ‘m > 0 and zero otherwise. Hence (n= m4 1) = 1 for et (2) Boe met and tae an ‘Therefore ae =a ul-(@+3)) el > bal 38-10. The characteristic rot is ~2, Therefore vvoln] = ¢(-2)" Setting n= —1 and substituting y{-1] = 10, yields ‘Therefore ola] =-20(-2)" nd0 For this system hn), the unit impulse response is found in Prob. 3.7-1b to be A 2)" ul) ‘The zero-state response is uln] = e-"ufn] + (—2)" ‘This is found by using the convolution Table to be vol = 5st — (ayy eden Vn) = seeps + 2(-2)" tnd i = 2e = = [FRO Gr} ‘Total Response = yp(nj + yln} 107 = 20a tent ayaa Feit (86+ 20)(-2)" + 2") 38m. (@) ate] = Pula « (0.5)"afn] = PERO iy Bat ase (b) fn] = 2° ufn] = 2-82" goed From the result in part (a), it follows that 1 Dignes yn Jigme _ 0.5)" 22am — 05)" Jule = Apart - (05)} vin] = () "ula — 2] = 4(2-ufa ~ 2) Note that 2(°-2u{n— 2] is the same as the input 2%u(n] in part (a) delayed by 2 units. ‘Therefore from the shift property of the convolution, its response will be the same as in part (a) delayed by 2 units. The input here is 4{2(°-)u[n ~ 2}. Therefore oy =e? oor tin ape S05) = 3.8:12, For fn} = uln} vue] = ul] — 2uln — a} ‘The highest order difference is one. Hence, this isa first-order system. ‘This is a nonrecursive system, whose output at any instant depends only on the input, Initial conditions are irrelevant for the finding the response. 3.8-13. (a) Figure $38-13a represents the system in Figure P3.8-13 in a more convenient fashion. A parallel connection requires the individual impulse responses to be added, and a series connection requires the individual impulse responses to be convolved. Thus, the overall impulse response is given by Pale) hale + Caf «sn + alo) + hal (b) First, we shall simplify expressions for hy[n| and ha{n} by using the facts that ue] = af) ~ Sfo| and (0.9)! = gy (0.9)" and (0.5)"! = bg (0.5)". Now afr} = 0.9") ~ 280.99" (ufo| ~ dt) = Zo.9r el + Zot 108 {hit [rr ate) tof ea ye} Figure $3.8-13a: Interconnection of dis Similarly, $2 (05)" (ula — srl) = ~0.8(0.5)"uf + 1.85) Recall that xn] + dfn] = x{n] and dfn] Slr] = dfn]. Hence alr] osu faba] # hala) = 2(09)"uln}+(-0.8)(05)"ulr] =08(8 0.5)" ufe + 1.8(4)(0.9)"uf) + dt 16 eo o) ubol ~ $(0.5)7%ufn) + 2(0.9)" fn) + to} ‘Thus the cascade of the two systems is an identity system. 38-14. (a) From Eq. (3.70b), for a causal system ato} = 9 Mh Let k=n =m. The limits of summation change from m =n to m=0. ata} = > n= in In summation, we can sum ftom either direction, Hence She ot (b) When the system is noncausal, ate) Let k= n—m, In this case, when & Hence 00, m = 00 and when k = n,m = 0. SY Alam) = x hf — mi} of Loo 3.8-15. The equation describing this situation is [see Ea. (3.90)} (EB - a)yln] +r=101 Ex\n ‘The initial condition y{~1] = 0. Hence there is only zero-state component. The input is 500u{n} — 15005|n — 4} because at n = 4, instead of depositing the usual $500, she ‘withdravs $1000. To find hla, we solve iteratively (E~ ahi] = Bstn) " ‘+ A — ahfn} = fn +1] Setting n = ~1 and substituting A{-1] = 0, 6[0] = 1, yields fo} = 1 Also, the characteristic root is a and by = 0. Therefore fn] = ea" uf Setting n = 0 and substituting (0) 1 yields 1 ‘Therefore Hn) = (a)"ufr) = 2.01)" ‘The (zero-state) response is yin] = 1.01)" ale} + 2f} = (LO1)"ufn] + {500u{n] ~ 15006[n — 4]} 500(1.01)"u[n] + u[n] — 1500(3.01)"~*uln — 4] 500 1 4, = BE te.01y = auto) - 19000.01)"-Fufn ~ 4) = 50000{(1.01)" — aura] ~ 1500(2.01)"~4ufr ~ 4] 3.8.16. ‘This problem is identical to the savings account problem with negative initial deposit. (loan). If Af is the initial loan, then y{0] = —M. If yla] is the loan balance, then [see Ea. (390)) yin + 1} — ay) in +1) (B~ a)uln] = Bain) ‘The characteristic root is a, and the impulse response for this system is found in Prob. 38:15 to be Hn o*uln ‘This problem can be solved in two ways First method: We may consider the loan of M dollars as an a negative input ~ M6 ‘The monthly payment of P starting at n = 1 also is an input. ‘Thus the total input is fn] = -M8{n] + Puln—1) with zero initial conditions, Because uln] = é{n] +uln— 1}, wwe can express the input ina more convenient form as zn] = —(M + P)5{n] + Puln. no ‘The loan balance (response) yf] is vie] = Nin) +2i) Pula + (=U + P)6te| + Pall) = -(M + Paula) + Pa" ufn + uln] = 00+ Petula + [ES +] ao) = —Ma"ufn] =P le - eo {(-1 +» [222] an Ao aerate tr ne thin pr lr po th A 21a hae -Ma" +P Second method: In this approach, the initial condition is y[0] = -M, and the input is 2[n] = Pufn— 1] because the monthly payment of P starts at n= 1. ‘The characteristic root is a, and ‘The zero-input response is von] = ea"ufn] Setting n = 0, and substituting yo[0) = —M, yields c= —M and pln] = ~ Ma u(r} ‘The zero-state response yln] is afr] = hfn] + 2{n] = ifn] * Par — 1] = Po®ufr] » nfm — 1] Here we use shift property of convolution. If we let afr] = auf) « ula) ‘The shift property yields suf — 1} = 2fe — a= ‘The total balance is yoln] + vfn] vole +n = —atarain + P| m 3.8.17. 3818 38:19 For n> 1, up ~1)= 1. Therefore Loon balance =—Mat + P(@—"] moa which confirms the result obtained by the first method. From here on the procedure is identical to that of the first method. ‘We use the result in Prob, 38-16. In this problem r = 0.015, a= 1.015, P = 500, M = 10000. Therefore soo = yoooo 1:02)" (0.015) 800 = 10000 Tansy (1015)® = 1.42857 Nin(1.015) = 1n(1.42867) _ (as2857) w= BGae ~ 2086 Hence N = 23 payments are needed. ‘The residual balance (remainder) at the 23rd payment is (1.015) ~ O15 {28} = -10000(1.015) + 500 =-4n2 (a) The two strips corresponding to u{n] and un] (after inversion) are shown in the Figure $3.8-18a for no shift (n = 0) and for one shift (n = 1). We see that if fn] = un] + uln} then cfo)=1, cli] =2, 2=3, efB]=4, eldl=5, ofs]= Hence ulp] + ula} = (+ Dun) 1 te strips for the two functions ula) — ufr ~m} and ufn} are shown in Figure 3.8-18b. The upper strip corresponding to ulm] — w{n-— m] has first 1n slots with value 1 and all the remaining slots have value 0. The lower (inverted) strip corresponding to ulm] has all slot values of 1. From this figure it follows. that vem — 1 Hence (n+ A)ue] = (m= rn + Tul =m) From Figure $3 8-19 we observe that unl 0 O4142434445=15 yl =0 k26 1 1424844+5=15 2 243+4+5=14 vr|=15 <0 3 B+4¢5=12 4 4¢5-9 55 60 n2 (@ Ot mat matt ae ved {]4]---]t]ojo- Talay) Spos-1 ]a[---]iJoJo-- [et Tey ayo (© Figure $3.8.18 3.8-20. From Figure $3.8-20, we observe the following values for y(n} ayn 2 ot) Sx5+5x5=50 4 Ox0F5x 5x440=20 HI? 0x045% 5x30 213 0x04+5x 3x2+0=10 4 ox045x 5x140=5 215 ox040x 5x 040-0 416 0 417 0 39 ox0+ox0=0 418 0 410 0x045x Observe that vin]=0 5<|nf <9 and Inf 215 38-21. (a) From Figure $3821, we observe the following values of yn} nO 41 42 43 44 45 46 47 nf>7 vol 76 5 4 3 2 1 0 0 (b) The answer is identical to that of (a). This is becanse when we lay the tapes :2[m| and g|~m) together, the situation is identical to that in (a) 113 ofl NO Pte mao Loj=I5 \ lof [2/3 415: epetefede [ite $Li]=15 5) teppei n> Bte1yet5 Figure $3.8-19 -10 ° 4 4 BOT Ps DEPP ERR ERB PEGE dlololololotslofololaie| atalo}o|s|o|o] doll Neo, YINE 50 38-22. (a) Alo} = Ali] + Alo] — hla} 12-8=4 A] + All] + A(0] => Ala} = 2 AB] + AL2] + ta] + AO] > fs] = 2 ij] + A{3] + 2] + Af] + Alo] =e Ala] = S] + Ald] + {3} + A) + HEI] 4 AO] —-f5) = 0.25 (b) 00 a) 10 10 2a 21 oyfa 1 f=Hoy= 1 of] 7 f=] 3 o 21] | 43/9 19 Hence the input sequence is: (1, 1/3, 1/9, ---) 38-23. Using the sifting Qy3y"uln| property, the zero-input response is rewritten as yp[n} = 2ufn) + (a) Since the system is second-order, it has two characteristic roots. Both roots appear in the zero-inpuut response, and are easily identified as 7) = Land 2 = 1/3 ns 38-24 () fa) (e) Figure $3.8-21 Let ay = 1 (standard form), 80 7? 4ayy+a2 = (7~1)(7~ 1/3) = 24/37 + 1/9 Thus, day = 1a, = 4/3, and a9 = 1/3. To produce a strong response, the input should be close to a natural mode. Since the system has two bounded modes, any linear combination of these modes will produce a strong response. That is, a strong response is generated in response to n] = (ex 7} +6278) uln} = (er + e2(1/3)") where cr and c» are arbitrary constants (except cx = ¢ = 0) ‘A causal, bounded, and infinite duration input is conveniently chosen in the form {n| = vuln), where [7] < 1. To produce a weak response, the input should be far from the system's natural modes. In the complex plane, the farthest point from the modes y= 1 and 72 = 1/3 with [y| <1 is 7 = —1. Thus, a selatively ‘weak response is generated in response to in] = ex(-1)"ulr), where ¢ is an arbitrary non-zero constant MATLAB is used to plot hs[n] and hala p> m= [10:10]; bd = (ne=-2)~(ne=2) 5 >> a2 = n.8((a>e-4)-(>=4)); >> eubplot (211); stem(a,b1,’k); axis([-10 10 -8 5]; >> xlabel('n’); ylabel ht fa] 7); >> subplot (212); stem(n,h2,°k?); axis({-10 10-8 51); >> xlabel(?n’); ylabel(n_2{n)"); For systems connected in parallel, the total impulse response is just the sum of the individual impulse responses ag] = ha fo + ll MATLAB easily computes pl] >» >> n= [0:10]; a1 = (ne h2 = n.#((q>=-A)~(n>=4)); bp = n1+h2; stea(n,ip,’k*); axis({-10 40-5 5}); mlabel(n’); ylabel hpi] ’); Bde {Se Figure $3.8-24a: Plot of hfr] and alr] 2)=(new2) ; Byres Figure $3.8-24b: Plot of pln} For systems connected in series, the total impulse response is just the convolution, of the individual impulse responses MATLAB easily computes hyp > > ston(n,he,?" xlabel(m’); ylabel’h_s[a]"); alr] = hf] + hale [10:10]; hd = (n==-2)~(ne=2) ; an. #((9=-4)~(n>=4)) 5 [-20:20]; hs = conv(hi,b2); axis({-10 10-8 8]); 16 Figure $3.8-24e: Plot of A,[n]- 38.25. (a) (22 be bet 1)? = 204 208 Bet 4 del + Ge? 422 + 1, MATLAB fs used to compute the convolution (1113] + [1111]. >> conv(f 11 11,224 11 ans 1234324 Notice, the coefficients of the polynomial expansion are the same as the terms from the convolution. (b) tis possible to expand the product of two polynomial expressions by convolving the coellicients from each ordered polynomial expression. Repeated convolution can be used to expand the product of more than two polynomial expressions. Care must be used to include all coefficient terms, including zeros, {rom the highest power to the lowest, and coefficients need to be ordered in a consistent (6) (24 = 22-8 + 82} = (7 convolution to compute (= 22? + 92-2)2)2, First, use MATLAB and = 22-8 4 32°22 >> venp = conv( [1 -2 3], {1 -2 9195 Convolution is used to square this intermediate result and obtain (2~#~ 22-8 + 224 >> conv(temp, temp) ans © 1-8 36 -108 214 312 324-216 81 Recognizing that the highest power of 2~ is in the result must be 16, the expansion 21827 43627 — 1042 42142? 31: 84 32427! 2162-8 +81 (a) First, use convolution to expand (2° + 224 +32? +5) >> temp = conv(l1 2030 51,120.30 51); Convolution is ogain used to multiply the resulting polynomiat by (13 ~ 527®-+ 2-4), Ttis important to order the coe in descending powers of z to be compatible with the frst result. ut >> conv(temp, [13 0 -§ 0 13) fans = 13 $2 47 58 137 104 321 -44 257 10 204 0 -95 0 25 Recognizing that the highest power of z in the result must be 10, the expansion 13210-45229 447284582" 4137294 1042"4-9212*—Ade9 425727 +1024 201-952-724 252 48.26. (a) Actually, only a first-order difference equation is necesary to describe thie ey tem. On refill m, the amount of sugar yln] is equal to the amount added ={n} plus whatever was stil in the mug. Since Joe drinks 2/3 of his cup of coffee Before each rel, one-third of the sugar from the previous cup remains. Thus, abo] = al = 1/3 + a[n. Thus, Gy = =1/3,42 = 0; = 1,0) =0, and b= 0. Tn standard form, the difference equation is wufn] ~ ln 1/3 (b) Since Joe adds two teaspoons of sugar each time he fills his eup, {©) The total solution to a difference equation is the sum of the zero-input response ‘and the zero-state response. Since Joe starts with a clean mug, yj] = 0 and the zero-input response is necessarily zero, yp[n] = 0. Thus, the total solution is just the zezo-state solution. ‘To obtain tie zero-state solution, the impulse response f[n] is needed. In this case, hla] = 325 +dolnlule, where goln] = c7". To determine ¢, input z[n] = dln} into the original difference equation to yield fn} ~ fe[n ~ 11/3 = fn}. Since h{n] is causal, Af0] — A{-1)/3 = ho} = 60] = 1 = Gold}ulo] = c. Thus, h{n] = 3-"uln ‘The zero-state solution is zn] + fn] = (Shag 213)-") ein] = 2 fn] = G-3-*)aln} Thus, vin} = (8-3-*)al (a) aul = fig, 6-8") #8 ‘That is, after many cups of coffee, Joe's mug reaches a steady-state of three teaspoons of sugar. ‘One way to make Joe's coffee remain a constant for all non-negative n is begin at the steady-state value of thee and then add two teaspoons of sugar at each refill. That is, + 4fn ‘The added 5{n} “jump starts” the sugar content of the first cup to the steady-state value. If Joe desires a steady value of two teaspoons, which is two-thirds the original steady-state value, the input is simply scaled by 2/3. That is, the steady level 18 achieved using the input ln] = 3.8.27. (a) The choracteristic equation is zy + 0.5 = 0. Thus, the characteristic root of the system is 7 = 0.5. The impulse response has form hln} = 2 6[n] + ey"uln] = c(y0.5)"ujn. ‘To determine c, evaluate the original difference’ équation according to sh{0] + 0.5h[—1] = rh(0 5, Thus, h(0] = 95 =. Taken together, Ale) = 95(50.5)" (b) First, compute the zerorinput response yo(t) = 6(0.5)". To find c use the initial condition yo{1] = 9 = ¢(0.5)-' Thus, ¢ = 720.5 = -0.5 and yoln] = =0.5(90.5)". The zero-state response is fla) + x[n] = (952257) ul - 5). ‘Adding the zero-input and zero-state responses yields the total response for n 2 0, 1 (90.5)"-* _ Tes) ve-8 36(705)*) vuln] ~0.5(90.5)" + ( 3.8:28. (a) MATLAB is used to sketch the function fn] = n(ula— 2] ~ ufn+ 2)) p> n= [5:5]; B= m9 ((ad"2)-(n>=-2)); >> stea(nyh,’k?); axis([-5 5 -2.5 2.81); >> xlabel(?n?); ylabel n{n) "9; Figure $3.8-28a: Plot of h(n] n(ufn = 2] = fn +2). (b) Using Figure $3.8-288, write hjn} = 26in + 2] + é{n + 1} ~ dfn ~ 2}. A difference equation representation immediately follows from this form, ula) = 2xfn +2} + 2{n +3] 1}. 38-29. See I.M-3 ng 38-30, 3.941 For this solution, consider the signals z{n} = 6[n} fn] + Sf ~ 1) = 1,1]. In this ease, z[n) (uf = z[n) fe =] = BA), ve) = zn] = 2} (a) Not equivalent. By counter-example, (z{n} + yfn))zln] = [1] # [1,-2) = he) (uln] « 2{n)). (b) Not equivalent. By counter-example, (x{ny(nl) * (elnfz(nl) = f1,-2,1) ¢ L, -2] = afr] (yfn] + efx) (©) Not equivalent. By counter-example, (xfnJyfnl) ¥ 2fn} = [10,1] (1,—2] = {n| (ula + 2In)). (a) True. None of the above expressions is equivalent to x{n] (vfn] + 2(x)) (E+ 2)y{n] = Ez|n] ‘The characteristic equation is-y +20, and the characteristic root is -2. Therefore ua(t) = B(-2)" 1 For a{n] = =r with p= em vole] = Hen) vin) = Baye tie™ neo Setting m= 0, and substituting y[0] = 1 yields 1 de TBrayy Baa and : ule) = sa ylee(—2)" +e] D0 fe) + 2m 1] = afn — a} ” We solve this equation iteratively to obtain yf0]. Setting n = 0, and substituting 1] =0, z{-1] = 0, we get vio] +2(0)=0 => yloj=0 ‘The system equation can be expressed as (E+ 2)ylnd] = afr) ‘The characteristic root is ~2. ‘Therefore abn) = B(-2)" For 2{n} = e~P uf] = %ufn] with r =e, elm] = H[rh 120 3.9.3, ‘Therefore e Beat Setting n= 0 and substituting yo] = 0 yields vlnl = Bay" + e ~e OeBe Sa S and tn) ater Fem] do (B +3E + 2)yin| = (2? + 3B +3)2{n] ‘The characteristic equation is 7? +37 +2 = (4 1ly +2) =0. Therefore Yala = Bi(—1)" + Ba(—2)" For x[nj = 3" 3)? +368) +3... BP +38) +2 ste] = Ha" = = (Go ‘The total response 4 (2A gn we] = BI)" + BA-2" (S)3" on 20 (a) Setting n =, 1, and substituting yo] = 1, y[l] = 3, yields 1=B, + B+ 35 -B)- 2+ Bf vin =~F-I + 2-2)" 4 2a" no (b) We solve system equation iteratively to find yi0] and y(t]. We are given y[-1} = u{-2] = 1. System equation is la +2] + 3yfn + 1} + 2y{n] = xfn +2] + 3cfn +1] + 32fn) Setting n= ~2, we obtain yl0] +302) + 2(1) = (3) +3(0) +300) => yfo} = —4 Setting n= —1, we obtain afl] + 3{~4} +201) = (3)' +3(3) +30) yf] = 16 Also 2 abn] = By(-1)" + Ba(-2)" + Fearn >0 Setting n= 1, 2, and substituting y[0] = —4, y(t] = 16, yields -4 = +m e = -B,-24 7g seas 11 jyn 2% -aym 4 2g Zep Fers+ Fer 20 304 PtmtiaOryr=o ‘The roots are =1 repeated twice. valn] = (By + Ben)(-1)” Also the system equation is (E® + 204 yfn] = (26 - Eafe} and xfo] =)" ‘Therefore 1 1 voln| = gn 20 ‘The total espouse Yn) = (B+ Ban" Lay" ado Sotting n = 0, 1, and substituting y{0] = 2, yfl} = ~18, yields 2 = &-2 B= 8 “ys voto ho hh = 3 38 By ays — Lays ule] = Ge + GD" ~ FO) neo 3.95. (a) ub] = Oe Hence vin+ Ij yla]=n4d Hence, the required solution for ya] isthe solution of the above difference equa- tion. To find the initial condition, we know that y[0] = We can rewrite the difference equation as (E-1yfn] =n+1 Hence the natural response is un) = BO" = B From Table 3.2, we find the forced response form as velr] = e0-ban However, cy is inadmissible because itis also the characteristic mode, Hence, we assume volt] = en + can? 122 Substitution of this expression in the difference equation yields vob +3] ~ vsln] er( +1) +ea(n +1)? — eqn — on? = 41 Equating coefficients of similar power yields ately ogo) ie } Stasa=% Hence oy nfo vio] = Ba A Setting m= 0 and using the initial condition [0] ~ 0 yields o=B Hence vie] nett) Ve= aa (b) ulel= oe fn +1) — fn] = (n + 1)* ‘The natural response is ueln] = B ‘The initial condition is y[0] = °,_44* = 0. The forced response , as seen from ‘Table 3.2, is rela] = exn + cgn? esr? + cant Substitution yg[n] in the difference equation yields ex(n41) 4 e2(2 +1)? +e5(n-4 1) Fe4(n-4 1)*—eyn~egn® —eyn® ~ eqn Equating coefficients of similar powers on two sides yields atetea toa) a0 2p + Beg + dg a4 12 iA Hence Also y[n] = 0. This yields B = 0, and ye Salata tna tnt Yin) = SOP = Fat Fe a at 123 396. 397 ln] = So he* ‘Therefore fn +1) — ufo] = (ne ‘The natural response (or characteristic root 7 ~ 1) is ueln] = B ‘The forced response, as seen from Table 3.2, is = (co-Fean)e™ wb Substitution of ya|n] is the difference equation yields (co-beyn + ex)" — (9 + ex)" = (n+ 1) Equating the coefficients of similar powers on both sides yields Hence Moreover y[0] =0. Hence o=8- Hence worl al oF a vn) P= 74040 = (y-0.2)(7 ~ 08) ‘The roots are 0.2 and 0.8. nln] = B,(0.2)" + B,(0.8)" Because the input is a mode ln] = en(0.2)" But va{n] satisfies the system equation, that is, yal +2] yoin + 1] + 0.26ygfn} = 2{n +1] and ln. + 2)(0.2)"*? ~ ef + 1)(0.2)"*" + 0.16en(0.2)" = (0.2)"*2 124 3.98 ‘This yields ~0.12e(0.2)" = 0.2(0.2)" ‘Therefore and ~Fa(o2y" voln] ule B02)" + B,(08)"~Fa(02" nm Z0 Setting n= 0, 1, and substituting initial conditions yO] = By + By hn Pose, 5} , ull] = 2, yields vin) = -Beoayr+ esr -fo2r nz0 vin +2] yln +1] + 0.16yln] +1] Wo solve this equation iteratively for 2 410] and yll}. Remember also that 2 yields os( 32 + 5), vl~ =O for n <0. Setting n = ~2 in the equation yi] -0+0.16(0)=0 => yigj=o Setting n= —1 in the equation yields ult] -0+0.16(0) = => vfl]=05 ‘Therefore y[0] =0 and p[l] = 0.5. For the input zf = cos + #). veln] = ccos + 5 +8) But volr satisties eh system equation, that i, weln +2] ~ ygln + I] + 0.16yp{n] = 2[n + 1) vost 5 (n+2}+F +All —coosls(n-+1) +5 +4)4+-0.10c 00s na E49) = cool Font) +5) moves T 7 +H) +esin( + 5 +6)-+ 01Gc cos 4 F +4) = con( Ent 5 + 2) 1s06ceos(F 4 Fe ~ 2.27) = cos 4242) Therefore 1.3060=1 = ¢=0.765 125 3.104 3.102. 84 = ~2.4drad "Therefore 0.705 cos + 5 — 2.44) 0. 765 008( — 1.398) B,(0.2)" + B,(0.8)" +0. 765 c00( ~ 1.393) Selting n= 0, 1, and substituting yl0] = 0, yi] = 05, yields By + Ba + 0.1354 05 = ond, caabe rors |= Assume that a system exists that violates (9.61), and yet produces bounded output, for every bounded input, ‘The system response at n= fy is ub] = 5 ening — Consider a bounded input 2{n) such that 1 if hm] >o aiv—ml={ yi ico Tn this case. Alpin ~ oa} fae and a ale] = 0 tall = 00 ‘This violates the assumption. @) Roots are 0.2 and —0.8. Both ate inside the unit circle. The system is BIBO stable and asymptotically stable. (b) Peay 2= (74 Aly +1) Roots are 1 and ~2. One root outside the unit citele and the other is on the Unit circle. The system is BIBO unstable and asymptotically unstable () eg O-POt5) Roots are 1 (repeated twice) and -0.5. Repeated root on unit circle. The system 126 is BIBO unstable and asymptotically unstable, (d) P+ 27 40.98 = (7 + 0.8)(y + 1.2) Roots are -0.8 and ~1.2. One root (~1.2) is outside the the un system is BIBO unstable and asymptotically unstable. circle. The © PH Y= 2 (7405-4 91.5)(7 405-915) Roots are -0.5+ 1.5. Both roots outside the unit circle. ‘The system is BIBO unstable and asymptotically unstable. © (F-10741) = @ 4 Y-Nly+3-s) Roots are 41, jl. All the roots are simple and on unit circle. The systean is BIBO unstable and marginally stable. 3.10-3. The system 5; is asymptotically (and BIBO) unstable. The system S2 is BIBO and asymptotically stable. If we cascade the two systems, the impulse response of the composite system is ‘fr] = 2a (6fn] ~ 26fn.— 3]) = 2%u] ~ 2(2)"—Faf— 1 ‘The composite system is BIBO stable. However, the system 5; will burn (or saturate) ‘out because its output contains the signal of the form 2”, 3.10-4, (a) To be unstable, a causal mode must have magnitude greater than one. That is, tat least one characteristic root must be outside the unit citele. By this criteria, Systems C, D, and H are unstable. (b) To be real, the characteristic modes need to be either real or in complex-conjugate pairs. By this criteria, Systems A, B, C, F, H, and I are real (c) Oscillatory modes inchide sinusoids, decaying sinusoids, or exponentially growing sinusoids. Unless the characteristic roots are all real and positive, the eorrespond- ing natural mode(s) will exhibit oscillatory behavior. By this eriteria, Systems A, B, C, D, B, F, G, and H have oscillatory natural modes. (q) To have a mode that decays at a rate of 2~", at least one characteristic root needs to lie on the circle of radius one-half centered at the origin, By this criteria, Systems A, C, B, and Ihave at least one mode that decays by 2-" (€) For a second-order system with two finite roots to only have one mode, one characteristic root needs to be located at the origin. By this criteria, Systems E, G, and I have only one mode. 17 3.10.5. Notice, te system response ean be written more simply as hi (2)" ule, () Yes, the system is stable since the impulse response function is absolutely summable. That is, 2, 5a; = 3/2 < 00. Sin} +(4)" wnt] = wooo Fall = Sono (5) ‘Yes, the system is causal since A[n] = 0 for n <0. (b) MATLAB is used to plot x{n]. >> m= [-5:5]; x = (n>=3)-(n>=-3); >> sten(ayx,7k'); axie(L-8 § -1.2 4.21); >> xlabel(’n’); ylabel(’x{n]’); mn Figure $3.10.5b: Plot of | uf — 3) — ufn +3} {c) The zero-state response is computed as yln] = involves several regions. For (n < ~3), yln) =. For (-3 2), o BE)" ‘Combining yields + hin]. This convelution S(fay* = (1/3) OR = (1/3)" Shana 3 = 0 ne-3 oh x9 gen cg ~BEay-n nee MATLAB is used to plot the result. >> n= (10:10); 92 y = (B.-C(m43))~3) /2. + (a>=-B)e(neD)) >> y # y#(-3.~ (on) #728/54) #2); >> stem(n,y,’?); axie([-10 10 -2 .6]); >> xlabel('n’); ylabel(’y[n}’); 310-6. (a) No, the system is not causal since hn] #0 for (n <0), 128 Figure $3.10-5e: Plot of ylo| = {n] + Af] (>) Dell = DEG = ER ae (HM = Dah 0s + Toren 05" = Dt wo 2" + Deo 5" = Se + SEE YS tet = Since h{n] is absolutely summable, the system is BIBO stable. = limy co ate DAN y Guln — 5} = (©) Pe = liye at DI Tiny soo gpbgy ATE Mime seo ZATIN ~ 5 +1) = my soo BABE = 8. Since power is finite, energy must be infiite Ey = coand P, fn] + bn] = De = AL Thus, yfl0] = Seco hf a[10 — oo O5I3u[10~ 5 — k] = Det. 324) + DF 9 300.54) = 3S + 3439 = 8.01. Thus, 285 vo = 3.M-1. ‘To accommodate upsampling, the inline function needs to be modified so that it assigns 1a zero for non-integer inputs. >> £ = inline(? (ne=fix(n)) .4exp(-n/5).#cos(pitn/S) .+(n>=0)?,"2?); ‘The added term (a==fix(n)) is one if'n is an integer and zero if m is not an integer. ‘The modified function is easy to test. >> n= (10:10); stom(n,f(9/2),%k?); >> ylabel ?f[n/2]"); label (’n’); axis({-10.5 10.5 -0.5 1.11); As hoped, £ {n/2) inserts a zero between every sample of f{al, which corresponds to the desired upsample by two operation. 129) Figure $3.M-1: Plot of f(n/2} 3.M-2. There are many ways to solve this problem. For this solution, let din} designate the distance from the student's destination, which alternates between home and the exam location, just before the student changes his mind. For even-valued n the destination is home, and for odd-valued n the destination is the exam location (2) Just before changing direction, the student is a distance of an} miles from his destination. Tuning around, his next destination is therefore a distance of 2~ dfn) miles. The student travels one-half of this distance, which leaves 2=2l¢l mites remaining. Thus, a difference equation description of this problem is djn +1 2d} — 0 5d{n] = ula] ~0-5n), Rearranging and shifting by one yields din) +0.5d{n ~ 1] in — 2] For this description, d{o] = 0. This auxiliary condition simply states that before the student first decides to go to the exam, he is at home. () MATLAB is used to iteratively simulate the difference equation, >> n= [0:20]; d= zeros(size(n)); >> for index = find(n>0), a(index) = 1-0.54d(index-1); end; & as (© 1.0000 0.5000 0.7500 0.6250 0.6875 0.6563 0.6719 0.6641 0.6680 0.6660 0.5570 0.6665 0.6667 0.6856 0.6667 0.6667 0.6667 0.6667 0.6567 0.6667 As time increases, the remaining distance to the destination (alternating home and exam) reaches a steady-state value of two-thirds of a mile. That is, /3 Jinn al Changing the problem so that the student travels two-thirds the remaining ¢ tance each time changes the result. In this case, the difference equation is ae} + Sein — 3] = Ban) >> n = [0:20]; d = zeros(size(n)); >> for index = find(a>0), d(index) = (2-d(index-1))/3; ends & @= 00.6667 0.4944 0.5185 0.4938 0.5021 0.4993 0.5002 (0.4999 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 06000 0.5000 0.5000 0.6000 0.5000 130 3M-3. In this case, the steady-state remaining distance is limy eo d[n] = 1/2. (©) The closed forin, or total, solution is the sum of the zero-input and zero-state responses. Since the anxiliary condition is d{0] = 0, the zero-input response is just zero, To compute the zerostate response, write the difference equation as ala] + 0.5¢n] = ulm 1} = {n}, where the “input” [n) is just a shifted unit step. In this way, Aln] = (~1/2)"ufn}. The final solution is dfn] = ffl «zn (SEK-0.5)4) ula — 1) = $22 af — 1). Thus, 2 dh (1 (-0.5)") uf 4) 3 MATLAB is used to evaluate dfn} >> n= [0:20]; d = 2/34(1-(-0.5)."n).*(m>0) as © 1.0000 0.5000 0.7500 0.6250 0.6875 0.6563 0.6719 0.6641 0.6680 0.6660 0.6670 0.6665 0.6667 0.6666 0.6667 0.6667 0.6667 0.6667 0.6867 0.6667 ‘These results are identical to the iterative solution, which provides good evidence that the solution is correct, (2) Given repfk] = DSL alnlyln — k], substituting m = n+ & yields roy{h] Diane v-milef ra) = yf=n] + 2fn). Thos, Teylk] = 2[n] « yl-n], Similarly, ry5[&} = yln] «7 a{-n). Thus, In general, 2h] + yl-n] # vf roulbl # rel It is true, however, that rey{h] = ry> nx = [0:20]; x = (ax>=5)-(ax>=10 >> ny = [-20:10]; y = (ay<=-18)-(ny >> (ray, kd = crosscore(x,y,nx,ny) >> subplot (221); stea(nx,x,?k")} >> xlabel(n’); ylabel(’x(a}’); axis(f0 20 -1.1 1.10); >> subplot (222); sten(ny,y,’k?); >> xlabel('n!); ylabel (*yla]’); axis({-20 10 -1.2 1.1}; >> subplot (212); stem(k,rxy,*"); 10) +(nye=2) ; 131 3M-4 (a) (b) >> label °K’); ylabel'r_{xy} 08] "); Figure $3.M.3(b)i: Plots of, ih ule ond reylR]. ‘The largest magnitude of rey[k is five and occurs al k = 19. Signal zn] has ‘unit pulse of width five starting at n = 5. Signal yln] has a similar feature: ‘negative unit pulse of width five starting at n = 14, ‘These two similar features are separated by a shift k = 5 —(—14) = 19. Since these are the most similar features between the two signals it seems very sensible that the autocorrelation function has a large, negative value at shift k = 19 function [y] = £iltermax(x,m) 4% function [y] = £iltermax(x,H) M= Length(s); x= x); x= (zeresW-4.L)ixl; y = zeros(M,1); for Bee, yl) ~ sax(x((a:w+(¥-1)])); end >> n= [0:48]; x = cos(pien/5)+(ne=30)~( >> yt = #ilvorwax(s,4); >> y2 = filtermaxGx,8) ; >> yB = filtermax(x, 12); >> subplot (221); stem(n,x,’k'); axis([0 44 -2.1 2.11); >> label Cn’); ylabel (x{n] "2; >> eubplot(222); stem(n,yi,’k*); axis([0 44 -2.1 2.11); >> xlabel('n’); ylabel Cyn} for Naa?) >> subplot (223); sten(n,y2, 7k’); axis([0 44 -2.1 2.11); >> xlabel('n’); ylabel y fn} for N=8!) >> subplot(224); stem(n,y3,"K"); axis({0 44 -2.1 2.13); >> xlabel('n"); ylabel yn] for N=12") ‘The plots ore consistent with the expected behavior of a mnax filter. The output, which is always greater than or equal to the input, emphasizes large input values Larger values of IV cause particular maximum values to persist longer. ‘The max filter is very sensitive to large, positive outliers, such as that caused by the added din — 30). Also notice that the max filter is an FIR filter. Thus, a sinusoidal input reaches steady-state in after N — 1 samples. Furthermore, since a sinusoidal input does 35); 3M6. 0) (a) Figure S3.M-4b: Plots for N-point max filters. not result in a sinusoidal output, the max filter cannot be a IT system (the max filter is TI but not linear) function [y] = filtermin(s,1) % function [y] = filtermin(x,™) M = LengehOd; x m= ick, ye) = min(x(fa:meQ-1)))); end (2); x = [zeros(ii-1,1);x]; y = zeros(M,1); for >> n= (0:44); x = cos(pi+n/5)+(n: >> yt = filvermin(x,4) >> y2 = filtermin(x,8); >> y3 = filvermia(e, 12); >> subplot(221); stem(n,x, 7k"); axis({0 44 -2.1 2.41); >> xdabel'n’); “ylabel Cxtal ); >> subplot(222); stom(n,yt, %k?); axie([0 44 -2.1 2.1]; >> xlabel('n'); ylabel Cylal for Kes") >> subplot(223); stem(n,y2,"k"); axis([0 44 -2.1 2.11); >> xlabel'n’); ylabel Cyla) for N=8*) >> subplot(224); stem(a,y3, 7k’); axis((0 44 -2.1 2.105 >> xlabel('n'); ylabel Cy [a] for W=12*) ‘The plots are consistent with the expected behavior of a min filter. The output, which is always less than or equal to the input, emphasizes highly negative input values. Larger values of NW’ cause particular minimum values to persist longer. ‘The min filter is very sensitive to large, negative outliers, such as that caused by the added —5{n ~ 35). Also notice that the min filter is an FIR filter. ‘Thus, a sinusoidal input reaches steady-state in afler N — 1 samples. Furthermore, since a sinusoidal input does not result in a simusoidal output, the min filter cannot be a LT! system (the min filter is TY but not linear) function [y] = filtermedian(x,N) % function [y] = filterwedian(x,N) 133 (b) Figure $3.M-Sb: Plots for N-point min filters. Ms Lengeh(x); x = x(:); x = (Zeres(N-1,1);x]; y = ceros(H,1); for mean, y(e) = nedian(x(Cnsme(l-1)1)) 5 end >> m= [0:44]; x = cos(pirn/5)+(n==30)~( > yt = filtermedian(x,4); >> y2 = filtermedian(e.8); >> y3 = £\ltermedian(x,12)5 >> Bubplot (221); stem(n,x, 7%? >> xlabel('n'); ylabel («fal 5 >> subplot (222); sten(n,y1,"k*); axis((0 44 -2.4 2.1194 >> slabel'n'); ylabel(y[a} for N=4") >> subplot (223); sten(n,y2,’k?); axis((0 44 -2.1 2.1195 >> xlabel('n?); ylabel Cyfn) for 1-8") >> subplot (224); sten(n,y3, 7k’); axie([0 44 -2.1 2.1195 >> xlabel('n'); ylabel y(n] for N12") axis((0 44 -2.1 2.1095 Figure $3.M-Gb: Plots for N-point median filters. ‘The plots are consistent with the expected behavior of a median filter. ‘The 134 3.M-7. ‘output magnitude tends to be smaller than the input magnitude. Unlike the max or min filters, the median filter is not sonsitive to outliers in the input data. Also notice that the median filter is an FIR filter. Thus, a sinusoidal input reaches steady-state in after N’— 1 samples. Furthermore, sinee a sinusoidal input does not result in a sinusoidal output, the median filter cannot be a LTI system (the median filter is TT but not linear (a) Replacing A{n] with y[n] and 4{n] with z[n] yields the desired difference equation, v= (0 - lal) {nH 1) (b) To make the system causal, Aln} must be right-shifted by at least (W — 1). Since the system is time-inveriant, shifting ifn] causes the output to be delayed (shifted) by the same (/V ~ 1) amount. (o) function [a,b] = intorpfitter(t) ‘dunction [a,b] = interpfilter (ti) a= 1; b= conv(onss(t,1) jones (ti,1))/Ns (@) >> n= (0:93; x = costmd; >> N= 10; mup = [O:MeLengeh(n)-1); >> aup = [xjzeros(-1,lengen(x))}; up + xup(:)5 >> [a,b] = interpfilterd); >> y © filter(b,a,xup); >> subplot (311) jaten(n,x, 7%); >> xlabel('n?); ylabel xEa)")5 >> sunplot (312) ,sten(mup,xup, °K"): >> xlabel(?'n?);ylabel x up) [a] "); >> subplot (313) ,stem(mup,y,7%)); >> mlabel('n’); ylabel yn") Figure $3.M-7d: Plots for N = 10 interpolation filter. Indeed, the filter produces the desired linear interpolation of the up-sampled input. 'As expected from a causal inaplementation of the interpolation filter, an (= 1) delay is visible in the output, 135 3.M-8, (a) First, rewrite the impulse response as. fn) PING dln - &]. Replacing Ain] with yln} and 6] Sed difference e (uln] — uln — N}) AV with afm] yields the de- aln— 4) (b) function (a,b) = filtormac % function [a,b] = filtorma(w) 15 b = onestH,1)/ (6) >> m= (0:44); x = con(pitn/s)+(r >> N= 4; [a,b] = filterma(n); >> yt = filter(b,ay0; >> N= 8; [a,b) = filterma(d; >> y2 = filter (o,a,0); >> W= 12; [a,b] = filterma™); >> y3= filter (b.a,0); >> subplot (221); stem(n,x,"k'); axis({0 44 -2.1 2.11); >> xlabel('n?); ydabel xa] ” >> subplot (222); stem(n,y1, 7k"); axio([0 44 ~2.1 2.1195 >> xlabel(’n’); ylabel y(n] for N=4"); >> subplot (223); stem(n,y2,K); axis((0 44 -2.1 2.1995 >> xlabel('n!); ylebel yf] for N-8"); >> subplot (224); stem(n,y3,’K"); axis([0 44 -2.4 2.1095 >> xlabel(n?); ylabel yn] for N=12"); Figure 83.M-8e: Plots for N-point moving average filters, ‘Phe plots are consistent with the expected behavior of a moving average filter. ‘The output is a low-pass version of the input. Larger values of N average over a wider window; thus, larger N’ results in greater attenuation of the input sinusoid, Large outliers have high frequency content and are significantly attenuated, Also notice that the moving average filter is an FIR filter. ‘Thus, a sinusoidal input reaches steady-state in after V ~ 1 samples. This particular filter is » LTT filter, so a sinusoidal input will result in a steady-state sinusoidal output. 136 (@) The total impulse response of a cascade of two N-point moving average filters is Aegseadelm) = (2E=g=H) «(ui=sle=l) = (Sf 6.N-2) (ufa] — nfm — N+ (SESE wry 8?) (ule = N] = l= 2 1) = RF Gale] — ul = NY + 2N5H= (ulm — N]— ula —(2N —1)]). That is, heaccadel” is @ triangle-shaped function with width 2N — 1 and maximum height 1/N. ‘The impulse response of a causal linear interpolation filter is Mininterp!™l TMT (1 [$]) n—(W-1)—2). This function is identical to hreascadel™ except that it has @ maximum height of 1. Thus, the cascade of moving average filters is a factor 1/N different than the linear interpolation filter. Nh ‘cascadel"| = ininterpl")- MATLAB is used to implement a linear interpolation filter using a cascade of ‘two moving average filters. b> m= [0:8]; x = coatmd; N= [o:Nedength(n)=11 ; >> xup = [xjzeros(i-1, Length ())]; sup = xup(:); >> [a,b] = félterma(i); >> y © Nefilter(b,a,filter(b,a,xup)); >> gubplot(3i1) ,stom(n,x,7%"); >> xlabel('n’); ylabel xtal "95; >> subplot (312) ,steaCaup,xup, "ID >> label ('n’); ylabel xp) [0] "); >> subplot (313) ,stem(aup,y,"?); >> label ?n’); ylabelCylal); axis tights 0; mup Figure $3.M-8d: Linear interpolation using cascaded moving average filters. Figure $3.M-8d demonstzates that linear interpolation is possible using a cascade of two moving average filters. As expected, a delay of N—1 is visible in the output, 137

You might also like