EECS 451 LECTURE NOTES BASIC SYSTEM PROPERTIES What: Input x[n] → |SYSTEM| → y[n] output. Why: Design the system to filter input x[n]. DEF: A system is LINEAR if these two properties hold: 1. Scaling: If x[n] → |SYS| → y[n], then ax[n] → |SYS| → ay[n] for: any constant a. NOT true if a varies with time (i.e., a[n]).

2. Superposition: If x1[n] → |SYS| → y1[n] and x2[n] → |SYS| → y2[n],

Then: (ax1[n]+ bx2[n]) → |SYS| → (ay1[n]+ by2[n]) for: any constants a, b. NOT true if a or b vary with time (i.e., a[n], b[n]). EX: y[n]=3x[n−2]; y[n]= x[n+1]−nx[n]+2x[n−1]; y[n] = sin(n)x[n]. NOT: y[n]= x2[n]; y[n] = sin(x[n]); y[n]= |x[n]|; y[n]= x[n]/x[n − 1]. NOT: y[n]= x[n] + 1 (try it). This is called an affine system. HOW: If any nonlinear function of x[n], not linear. Nonlinear of just n OK. DEF: A system is TIME-INVARIANT if this property holds: If x[n] → |SYS| → y[n], then x[n − N] → |SYS| → y[n − N] for: any integer time delay N. NOT true if N varies with time (e.g., N(n)). EX: y[n]=3x[n − 2]; y[n] = sin(x[n]); y[n]= x[n]/x[n − 1]. NOT: y[n]= nx[n]; y[n]= x[n2]; y[n]= x[2n]; y[n]= x[−n]. HOW: If n appears anywhere other than in x[n], not time-invariant. Else OK. DEF: A system is CAUSAL if it has this form for some function F (·): y[n]= F (x[n], x[n − 1], x[n − 2] . . .) (present and past input only). Note: Physical systems must be causal. But DSP filters need not be causal! DEF: A system is MEMORYLESS if y[n]= F (x[n]) (present input only). DEF: A system is (BIBO) STABLE iff: Let x[n] → |SYSTEM| → y[n]. If |x[n]|

1. y[n]= h[n] ∗ x[n]= x[n] ∗ h[n]= i h[i]x[n − i]= h[n − i]x[i]. 2. h[n], x[n] both causal (h[n]=0 forPn< 0 and x[n]=0P for n< 0) → y[n]= n h[i]x[n − i]= n h[n − i]x[i] also causal. Pi=0 Pi=0 3. Suppose h[n] 6=0 only for 0 ≤ n ≤ L (h[n] has length L + 1). Suppose x[n] 6=0 only for 0 ≤ n ≤ M (x[n] has length M + 1). Then y[n] 6=0 only for 0 ≤ n ≤ L + M (y[n] has length L + M + 1). Note: Length[y[n]]=Length[h[n]]+Length[x[n]]-1. Note: y[0] = h[0]x[0]; y[L + M]= h[L]x[M]; x[n] ∗ δ[n − D]= x[n − D].

4. x[n] → |h1[n]| → |h2[n]| → y[n] (cascade connection)

Equivalent to: x[n] → |h1[n] ∗ h2[n]| → y[n].

→|h1[n]|→ 5. x[n] → ր ց → y[n] (parallel connection) ց →|h2[n]|→ ր L Equivalent to: x[n] → |h1[n]+ h2[n]| → y[n].

MA: y[n]= b0x[n]+ b1x[n − 1] + . . . + bqx[n − q] (Moving Average) Huh? Present output=weighted average of q most recent inputs. Note: Equivalent to y[n]= b[n] ∗ x[n] where b[k]= bk, 0 ≤ k ≤ q. FIR: ⇔ h[n] has finite duration. EX: Any MA system is also an FIR system, and vice-versa. IIR: Infinite Impulse Response ⇔ h[n] not finite duration. EX: h[n]= anu[n]= an for n ≥ 0 and |a| < 1 is stable and IIR. EECS 451 LECTURE NOTES RECURSIVE COMPUTATION OF IMPULSE RESPONSE 1 Goal: Compute impulse response h[n] of system y[n] − 2 y[n − 1]=3x[n]. 1 Sol’n: Compute recursively h[n] − 2 h[n − 1]=3δ[n]=0if n> 0. 1 1 n=0: h[0] − 2 h[−1]=3δ[0] → h[0] − 2 (0) = 3(1) → h[0] = 3. 1 1 3 n=1: h[1] − 2 h[0] = 3δ[1] → h[1] − 2 (3) = 3(0) → h[0] = 2 . 1 1 3 3 n=2: h[2] − 2 h[1] = 3δ[2] → h[2] − 2 ( 2 ) = 3(0) → h[0] = 4 . 1 1 3 3 n=3: h[3] − 2 h[2] = 3δ[3] → h[3] − 2 ( 4 ) = 3(0) → h[0] = 8 . 1 n 1 n h[n]=3( 2 ) u[n]=3( 2 ) for n ≥ 0. Geometric signal. BIBO (BOUNDED INPUT→BOUNDED OUTPUT) STABILITY Goal: Determine whether an LTI system is BIBO stable from its h[n]. EX #1: h[n]= {2, 3, −4}→ |h[n]| = |2| + |3| + |− 4| =9 < ∞→ BIBO . P stable 1 n 1 n 1 BIBO EX #2: h[n] = (− 2 ) u[n] → |h[n]| = |− 2 | = 1−0.5 < ∞→ stable . n P P (−1) 1 EX #3: h[n]= n+1 u[n] → |h[n]| = n+1 u[n] →∞→ NOT BIBO stable. n P Pn Note: (−1) u[n] = log 2 but | (−1) |u[n]= 1 u[n] →∞ P n+1 P n+1 P n+1 so absolute summability vs. summability matters for BIBO stability! CONVOLUTION OF TWO FINITE SIGNALS Goal: Compute {1, 2, 3}∗{4, 5, 6, 7} = {4, 13, 28, 34, 32, 21}. y[0] = h[0]x[0] = (1)(4) = 04. y[1] = h[1]x[0] + h[0]x[1] = (2)(4) + (1)(5) = 13. y[2] = h[2]x[0] + h[1]x[1] + h[0]x[2] = (3)(4) + (2)(5) + (1)(6) = 28. y[3] = h[2]x[1] + h[1]x[2] + h[0]x[3] = (3)(5) + (2)(6) + (1)(7) = 34. y[4] = h[2]x[2] + h[1]x[3] = (3)(6) + (2)(7) = 32. y[5] = h[2]x[3] = (3)(7) = 21. Note: Length y[n]=Length h[n]+Length x[n] − 1=3+4 − 1=6. CONVOLUTION OF FINITE AND INFINITE SIGNALS 1 n 1 n−2 Goal: Compute {2, −1, 3}∗ ( 2 ) u[n]=2δ[n]+3( 2 ) u[n − 2]. 1 n 1 n Sol’n: {2, −1, 3}∗ ( 2 ) u[n]=(2δ[n] − 1δ[n − 1]+3δ[n − 2]) ∗ ( 2 ) u[n]= 1 n 1 n−1 1 n−2 1 n−2 2( 2 ) u[n]−1( 2 ) u[n−1]+3( 2 ) u[n−2]=2δ[n]+3( 2 ) u[n−2]. 1 n 1 n Note: {2, −1}∗ ( 2 ) u[n]=2δ[n]. So x[n] → |( 2 ) u[n]| → |{2, −1}| → 2x[n]. EECS 451 DIFFERENCE EQUATIONS

MA: y(n)= b0x(n)+ b1x(n − 1) + . . . + bqx(n − q) (Moving Average) Huh? Present output=weighted average of q most recent inputs. Note: Equivalent to y(n)= b(n) ∗ x(n) where b(k)= bk, 0 ≤ k ≤ q. Why? So why bother? Because now can have initial conditions.

AR: y(n)+ a1y(n − 1) + . . . + apy(n − p)= x(n) (AutoRegression) Huh? Present output=weighted sum of p most recent outputs. Note: Compute y(n) recursively from its p most recent values. p q ARMA: a y(n − i) = b x(n − i) (Combine AR and MA→ARMA). X i X i i=0 i=0

AUTOREGRESSIVE| {z } MOVING| {z AVERAGE} PROPERTIES OF DIFFERENCE EQUATIONS 1. Clearly represent LTI system. Now allow initial conditions. 2. MA model⇔FIR (Finite Impulse Response) filter: For MA model, h(n) has finite length q + 1. 3. AR model⇔IIR (Infinite Impulse Response) filter: For AR model, h(n) does not have finite length. But can implement using finite set of coefficients ai. 4. Analogous to differential equation in continuous time: dp dp−1 dq dq−1  dtp + a1 dtp−1 + . . . + ap y(t)=  dtq + b1 dtq−1 + . . . + bq x(t). Note: Coefficients ai and bi are not directly analogous here. Note: Time-invariant in both cases since coefficients indpt of time. 5. SKIP Section 2.4.3 in text: 1-sided z-transform is much easier. READ Section 2.5 in text: signal flow graph implementations. DIFFERENCE EQUATIONS VS. h(n) Advantages of Difference Equations: 1. Analogous to differential equation in continuous time. Often can write them down from model of physical system. 2. Can incorporate nonzero initial conditions. 3. AR model may be much more efficient implementation of system. Disadvantages of Difference Equations: 1. There may not be a difference equation description of system! 1 Example: h(n)= n ,n> 0 has no difference equation model. Recall: h(t)= δ(t − 1) (delay) has no differential equation model. 2. May only want output y(N) for single time N (e.g., end of year). Then convolution y(N)= h(i)x(N − i) more efficient computation. P