Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of...

16
Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington

Transcript of Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of...

Page 1: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

Phase Response of FIR Filters

Victor M. Tseng

Department of Bioengineering, University of Washington

Page 2: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

Briefing of Presentation

Theory behind FIR phase response Example Problem Application

Page 3: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

TheoryFIR Filters can have linear phase

This happens when the impulse response is symmetric.

The proof deserves mention. This is why we usually use symmetric time

windows like the Chebyshev, Triangle, and Rectangle.

Page 4: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

Proof of the TheoremThe second derivative of the phase against frequency must be 0. We’ve got to solve

the differential equation with :

We can expand this into the real and imaginary components separately:

How can we solve this?

02

2

f

0

1

1

1

1arctan

2

2

2222

2

2

2

ffffff

0Im

ReRe

ImIm

Im

12...

ImRe

ImRe

ReIm

ReIm

Im

1ImRe

ReIm

Im

1

ImRe1

ImRe1

3

2

2

2

2

2222

f

XX

f

XX

df

X

X

f

XX

f

X

f

X

f

XX

f

X

f

X

fXf

XX

f

XX

XXX

XX

XX

Im

Re

Page 5: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

Finish the Proof Remember

If we have an impulse response, such that

Then the equation can be solved. In other words, if the coefficients of the FIR filter are symmetric

in the time domain, then the phase response will be linear.

How can we describe this line? We use Group Delay

i

Nhi

Nh

2

1

2

1

N

n

N

i N

nfifxihX

0 0

2cosRe

N

n

N

i N

nfifxihX

0 0

2sinIm

Page 6: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

TheoryGroup Delay

Group delay is the amount of phase that is added to the preceding frequency’s phase.

Since it is linear over the passband, we only need to know .

for a Q order filter.

The phase at a certain frequency is

1f

sf

Q

fG

2

1

N

Gmfm

2

Page 7: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

By the way How did they derive G?

Remember the shift theorem:

The axis of symmetry is

So the phase shift is

2

1N

nsymmetry

)(' 2

12 zHezHezHzzH

fNjfnjn symmetrysymmetry

Page 8: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

TheoryMore on Group Delay

The delay is only dependent on the sampling frequency and the order of the filter.

Applies to a whole variety of shapes! Let’s look at an example, so we can see

how it works out.

Page 9: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

ExamplePhase response of a Chebyshev Window

Problem: What does the phase response of a 64 order Chebyshev window with 50 dB sidelobe attenuation look like?

Page 10: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

ExamplePhase response of a Chebyshev Window

The Bode Plot

Page 11: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

ExamplePhase response of a Chebyshev Window

The Phase Plot, Wrapped

Page 12: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

ExamplePhase response of a Chebyshev Window

Which discontinuities can we keep, and which ones are wrapped?

This depends on the relative sign of the real and imaginary components.

If the CW angle is greater than 180º (-Re and +Im), then it will we wrapped around 360º.

So we look at the sign of the components and subtract 360º wherever we see this case.

Page 13: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

ExamplePhase response of a Chebyshev Window

Sign of Re (smooth) and Im (dotted)

Page 14: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

ApplicationsMicroscopy

In phase contrast microscopy, we want 25% phase shift of diffracted light.

The diffracted light passes through a ring in the phase plate which slows rays down by 50% wavelength.

We want linear behavior as a function of angle.

This optimizes contrast.

Page 15: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

ApplicationPedals

Guitar effects:

The phaser applies a low-frequency oscillation to the phase.

Notable uses of the phaser in rock music:

Nirvana, “Smells Like Teen Spirit”, Solo

The Eagles, “Life in the Fast Lane”

Ashlee Simpson, “Boyfriend”

Page 16: Phase Response of FIR Filters Victor M. Tseng Department of Bioengineering, University of Washington.

[Except from Animal Planet]: Well, that’s not exactly what I had in mind.