fir filter design - stanford university · introduction to fir filter design lsignal processing...

8
Lecture 12 Outline: FIR Filter Design l Announcements: l Midterm announcements next week: MT on May 11 in class l Review of Last Lecture l Introduction to FIR Filter Design l Impulse Response Matching l Frequency Response Matching l Causal Design and Group Delay

Upload: ngokhue

Post on 15-Jul-2018

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: FIR Filter Design - Stanford University · Introduction to FIR Filter Design lSignal processing today done digitally lCheaper, more reliable, more energy-efficient, smaller lDiscrete

Lecture 12 Outline: FIR Filter Design

l Announcements:l Midterm announcements next week: MT on May 11 in class

l Review of Last Lecture

l Introduction to FIR Filter Design

l Impulse Response Matching

l Frequency Response Matching

l Causal Design and Group Delay

Page 2: FIR Filter Design - Stanford University · Introduction to FIR Filter Design lSignal processing today done digitally lCheaper, more reliable, more energy-efficient, smaller lDiscrete

Review of Last Lecturel ASK/PSK Demodulation (need coherent detection)

l Decision device determines which of R0 or R1 that R(nTb) is closest tol For ASK, R0=0, R1=A, For PSK, R0=-A, R1=Al Noise immunity DN is half the distance between R0 and R1

l Bit errors occur when noise exceeds this immunity

s(t) ´

cos(wct+f)

ò ×bT

b

dtT 0

)(2

nTb

Decision Device

“1” or “0” r(nTb)

R0

R1

a0

r(nTb)

r(nTb)+N

Integrator (LPF)

DN

n(t)

Page 3: FIR Filter Design - Stanford University · Introduction to FIR Filter Design lSignal processing today done digitally lCheaper, more reliable, more energy-efficient, smaller lDiscrete

Review ContinuedQuadrature Digital Modulation: MQAM

l Sends different bit streams on the sine and cosine carriersl Baseband modulated signals often has L>2 levels, with L=2l

l More levels for the same TX power leads to smaller noise immunity and hence higher error probability

l Has M=L2 possible values for (m1(kTs), m2(kTs))®log2M bits per symbol time Ts, Data rate is log2M/Ts bps; called MQAM modulation

l 10 Gbps WiFi has 1024-QAM (10 bits/10-9 secs), L=32 levels

10 11 00 01

t

mi(t)

m1(t)cos(wct)+m2(t)sin(wct)+

n(t)

X

-90o

cos(wct)

sin(wct)

X

ò ×bT

b

dtT 0

)(2

ò ×bT

b

dtT 0

)(2

Decision Device

“1” or “0”

R0

R1

a0

rI(nTb)+NI

Decision Device

“1” or “0”

R0

R1

a0

rQ(nTb)+NQ

A

-A

A/3

-A/3

Ts

Data rate: log2M bits/TsTs is called the symbol time

Page 4: FIR Filter Design - Stanford University · Introduction to FIR Filter Design lSignal processing today done digitally lCheaper, more reliable, more energy-efficient, smaller lDiscrete

Introduction to FIR Filter Design

l Signal processing today done digitallyl Cheaper, more reliable, more energy-efficient, smaller

l Discrete time filters in practice must have a finite impulse response: h[n]=0, |n|>M/2l Otherwise processing takes infinite time

l FIR filter design typically entails approximating an ideal (IIR) filter with an FIR filterl Ideal filters include low-pass, bandpass, high-passl Might also use to approximate continuous-time filter

l We focus on two approximation methodsl Impulse response and filter response matchingl Both lead to the same filter design

Page 5: FIR Filter Design - Stanford University · Introduction to FIR Filter Design lSignal processing today done digitally lCheaper, more reliable, more energy-efficient, smaller lDiscrete

Impulse Response Matchingl Given a desired (noncausal, IIR) filter response hd[n]

l Objective: Find FIR approximation ha[n]: ha[n]=0 for |n|>M/2 to minimize error of time impulse response

l By inspection, optimal (noncausal) approximation is

[ ] ( )W« jdd eHnh

[ ] [ ] [ ] [ ] [ ] 2/||,0][since,

2

2

2

22 Mnnhnhnhnhnhnh aMn

dMn

adn

ad >=+-=-= ååå>£

¥

-¥=

eDoesn’t depend on ha[n]

[ ] [ ]îíì

=2/02/

MnMnnh

nh da

Exhibits Gibbs phenomenonfrom sharp time-windowing

W

( )Wja eH

p- p0

Page 6: FIR Filter Design - Stanford University · Introduction to FIR Filter Design lSignal processing today done digitally lCheaper, more reliable, more energy-efficient, smaller lDiscrete

Frequency Response Matchingl Given a desired frequency response Hd(ejW)

l Objective: Find FIR approximation ha[n]: ha[n]=0 for |n|>M/2 that minimizes error of freq. response

l Set and

l By Parseval’s identity:l Time-domain error and frequency-domain error equall Optimal filter same as in impulse response matching

( ) ( )ò-

WW W-=p

pp

e deHeH ja

jd

2

21

[ ] ( )òå-

-¥=

W=p

ppdeXnx j

n

22

21

[ ] [ ] [ ]nhnhnx ad -= ( ) ( ) ( )WWW -= ja

jd

j eHeHeXand

[ ] [ ]îíì

=2/02/

MnMnnh

nh da 2/||)(

21][ MndeHnh j

da £W= W

-òp

pp

Page 7: FIR Filter Design - Stanford University · Introduction to FIR Filter Design lSignal processing today done digitally lCheaper, more reliable, more energy-efficient, smaller lDiscrete

Causal Design and Group Delayl Can make ha[n] causal by adding delay of M/2l Leads to causal FIR filter design

l If ÐHa(ejW) constant, ÐH(ejW) linear in W with slope -.5Ml Most filter implementations do not have linear

phase, corresponding to a constant delay for all W. l Group delay defined as

l Constant for linear phase filtersl Piecewise constant for piecewise linear phase filtersl Nonconstant group delay introduces phase distortion

relative to an ideal filter

[ ] úûù

êëé -=

2Mnhnh a ( ) [ ] W-

=

W å= jnM

n

j enheH0

( ) ( )WW-W = ja

Mjj eHeeH 2

)( WÐW¶¶

- jeH

Page 8: FIR Filter Design - Stanford University · Introduction to FIR Filter Design lSignal processing today done digitally lCheaper, more reliable, more energy-efficient, smaller lDiscrete

Main Points

l FIR filter design entails approximating an ideal discrete or continuous filter with a discrete filter of finite duration

l Impulse response and frequency response matching minimizes time/frequency domain error; have same noncausal designl Optimal filter has M+1 of original discrete-time impulse response valuesl Sharp windowing causes “Gibbs” phenomenon (wiggles)

l Make design causal via a delayl Practical implementation can introduce phase distortion via group delay

l Use windowing to mitigate Gibbs phenomenon (Mon lecture)