EE3054 Signals and Systems DTFT, Filter Design, Inverse Systems

Yao Wang Polytechnic University Discrete Time ω ∞  Recall − ω H (e j ˆ ) = h[n]e j ˆ n  h[n] <-> H(e^jw) = H(z)|z=e^jw ∑ n=0  Can be applied to any discrete ω time signal ∞  x[n] <-> X(e^jw) = X(z)|z=e^jw − ω X (e j ˆ ) = ∑ x[n]e j ˆ n  More generally can be applied to n=0 signals starting before 0 ω ∞ j ˆ = − jωˆ n  When x[n] has infinite duration, X (e ) ∑ x[n]e converge only when n=−∞  \sum |x[n]| < \infty  x[n] has finite energy

EE3054, S08 Yao Wang, Polytechnic University 2 Properties of DTFT

 Periodic with period =2 \pi  Only need to show in the range of (-pi,pi)  x[n] real -> X(e^-jw)=X*(e^jw)  Magnitude of X is symmetric  Phase is antisymmetric  Delay property  x[n-n0] <-> e^-jwn0 X(e^jw)   x[n]*y[n] <-> X(e^jw) Y(e^jw)

EE3054, S08 Yao Wang, Polytechnic University 3 Example

 x[n]=a^n u[n]  Special case x[n]=u[n]

EE3054, S08 Yao Wang, Polytechnic University 4 Example

 x[n]=rectangular pulse

 1, n <= M x[n] =  = u[n + M ]− u[n − M −1] 0,otherwise ω jωˆ sin()ˆ(M +1 2) X (e ) = () sin ωˆ / 2

EE3054, S08 Yao Wang, Polytechnic University 5 Example πδ ω jwˆ n j ˆ π x[n] =e 0 ⇔ X (e ) = 2 (πwˆ − wˆ ), wˆ < , wˆ < δ 0 0 π = ()⇔ jωˆ = − (+δ + ) x[n] cos wˆ 0n X (e ) (wˆ wˆ 0 ) (wˆ wˆ 0 )

EE3054, S08 Yao Wang, Polytechnic University 6 Inverse DTFT

 If x[n] has finite duration: Forward transform (DTFT) ω identify from coefficients ∞ − associated with z^-n in X (e j ˆ ) = ∑ x[n]e j ˆ n X(z) or with e^{-jwn} ω n=−∞ from X(e^jw) Inverse transform (IDTFT)  What if not? π  IDTFT 1 x[n] = ∫ X ()e jwˆ e jwˆ ndwˆ  Proof difficult, after we 2π learn FT and FT of − π sampled signals

EE3054, S08 Yao Wang, Polytechnic University 7 What does DTFT X(e^jw) represent?

Inverse transformπ (IDTFT) π ∞ 1 1 ∆ ∆ x[n] = X ()e jwˆ e jwˆ ndwˆ ≈ X ()e jk wˆ e jk wˆ n∆wˆ ∫ π ∑ 2 2 =−∞ − π k x[n] can be considered as a sum of many sinusoid = ∆ with frequencies wˆ k k wˆ . ˆ X ()e jwk is the amplitude of the sinusoid with frequency wˆ . () k ˆ X e jwk shows the frequency distribution of x[n]! (spectrum)

EE3054, S08 Yao Wang, Polytechnic University 8 Filter design

 The desired frequency response (low-pass,high- pass,etc, and cutoff freq.) is determined by the underlying application  Ideal freq. response with sharp cutoff is not realizable  Must be modified to have non-zero transition band and variations (ripples in pass band and stop band).  Show figure.

EE3054, S08 Yao Wang, Polytechnic University 9 Filter Design Specification (Desired Freq Response)

EE3054, S08 Yao Wang, Polytechnic University 10 FIR or IIR?

 FIR: can have linear phase, always stable  Weighted average (positive coeff.): low pass  Difference of neighboring samples: high pass  IIR: can realize similar freq. resp. (equal in transition bandwidth and ripple) with lower order

EE3054, S08 Yao Wang, Polytechnic University 11 Ideal Low Pass Filter

 Show desired freq. response  Ideal low pass <-> in time! (Show using IDTFT)

EE3054, S08 Yao Wang, Polytechnic University 12 Truncated Sinc Filter (FIR)

 Truncated sinc function <-> non-ideal low pass  Much better than averaging filter of same length! (Show using MATLAB)

EE3054, S08 Yao Wang, Polytechnic University 13 FIR filter design

 Given the desired response and the order of filter, can determine the coefficients by minimizing the difference between the desired response and the resulting one  Least square  Mini-max (resulting in equal ripple) -> Parks-McClellen algorithm  MATLAB implementation:  B = FIR1(N,Wn,'high')  B = FIR2(N,F,A)  B=FIRLS(N,F,A): linear phase (symmetric), least square  B=FIRPM(N,F,A): lienar phase, equal ripple

EE3054, S08 Yao Wang, Polytechnic University 14 IIR Filter

 Butterworth filters  Maximally flat in pass and stop band  [B,A] = BUTTER(N,Wn,’low’)  Chebychev filters  Equal ripple in stop (or pass) band, flat in pass (or stop) band  [B,A] = CHEBY1(N,R,Wn,'high')  Elliptic filters  Equal ripple in both pass and stop band  [B,A] = ELLIP(N,Rp,Rs,Wn,'stop')

EE3054, S08 Yao Wang, Polytechnic University 15 Inverse system

 Example: telephone system, echo problem  Model: y[n]=x[n]+A x[n-n0]  Equalizer: obtain x[n] from y[n] (inverse)  How?

EE3054, S08 Yao Wang, Polytechnic University 16 Using Z-domain analysis

 Y(z)= H(z) X(z)  X(z)=Y(z)/H(z)  Let W(z)= Y(z)*G(z)  With G(z)=1/H(z), then W(z)=X(z)  Previous example:  H(z)=1+A z^-n0  G(z)= 1/(1+A z^ -n0)  Implementation with difference equation  w[n]= - A w[n-n0] + y[n]  Draw block diagram of general inverse system

EE3054, S08 Yao Wang, Polytechnic University 17 Block diagram of general inverse system

EE3054, S08 Yao Wang, Polytechnic University 18 Any problem with previous design?

 Is the inverse system G(z) stable?  If all the poles of G(z) (zeros of H(z) are inside unit circle

For a system to be stable, all its poles must be inside unit circle For a system to have stable inverse, all its zeros must be also be inside unit circle

 For the previous example, this requires |A|<1

EE3054, S08 Yao Wang, Polytechnic University 19 Stable Inverse Systems

 When the inverse system is not stable, there are non-causal versions which are stable  See Selesnick’s notes on stable inverse systems  Optional reading only

EE3054, S08 Yao Wang, Polytechnic University 20 Other applications

 Debluring of video captured while camera/objects in motion  Equalization of received signals in a cell phone, which are sum of signals going through multiple paths with different delays (multipath fading)  Etc.

EE3054, S08 Yao Wang, Polytechnic University 21 Summary

 DTFT and IDTFT  X(e^jw) represents the energy of x[n] in freq. w  Computation and properties  Filter design  Freq. response spec: cutoff freq. transition band, ripples  FIR vs. IIR  Matlab functions  Inverse systems:  Determine original signal from an altered one due to communication or other processing  G(z)=1/H(z)  Conditions for stable inverse READING ASSIGNMENTS

 This Lecture:  DTFT: Chapter 12-3.5  Filter design:  Oppenheim and Wilsky, Signals and Systems, Chap 6.  Also see Lab6 note  Inverse systems:  Selesnick’s note on inverse systems: http:eeweb.poly.edu/~yao/EE3054/AddLabNotes.pdf  Finding stable but non-causal inverse is not required.