Learn the fundamentals of digital signal processing theory and discover the myriad ways DSP makes everyday life more productive and fun.

Loading...

Do curso por École Polytechnique Fédérale de Lausanne

Processamento Digital de Sinais

286 classificações

Learn the fundamentals of digital signal processing theory and discover the myriad ways DSP makes everyday life more productive and fun.

Na lição

Module 4: Part 2 Filter Design

- Paolo PrandoniLecturer

School of Computer and Communication Science - Martin VetterliProfessor

School of Computer and Communication Sciences

So you remember an ideal filter is not realizable in practice because the impulse

response is a two-sided infinite support sequence.

So we're going to try to approximate it by starting from the ideal impulse response

and by manipulating this response into something that we can actually deal with.

In the next examples, we will concentrate on the design of a low pass filter, but

certainly, the same techniques can be applied to any type of ideal filter.

So the first idea is the following.

We pick a cut off frequency, omega c.

We compute the ideal impulse response for the lowpass, analytically.

We truncate h[n] to a finite support, hat h[n].

This hat h[n] defines an FIR filter that we can use.

For the time being, we don't worry about causality, so we preserve the symmetry

around zero of the impulse response and we approximate the ideal filter

with an FIR of length to 2N + 1 center around zero.

And so, here hat h[n] is equal to omega c over Pi times the sinc of omega c over Pi

for n less or equal to capital N in magnitude and zero everywhere else.

A justification of this method, is the fact that if we compute the mean square

error between the original filter and the approximation.

We have that the norm of the error int he frequency domain,

is the integral from minus pi to pi of the frequency response of the ideal

filter minus the frequency response of the approximated filter squared.

This equal to the norm squared of the difference between the two frequency

responses.

And thanks to Parseval's theorem, this is also the norm squared

of the difference between the impulse responses in the time domain.

And so we can write that, the mean square error,

as simply the sum from n that goes to minus infinity to plus infinity

of the difference between the two impulse responses squared.

The impulse response of the ideal low pass is a sink and

you remember, it decays monotomically as 1/n.

So the mean square error is clearly minimized if we pick values for

hat h[n] from an interval that is symmetric around zero,

because in this way we're actually killing in that summation the largest terms.

So we have seen why impulse truncation might be a good idea but

it's time to look at why it might not be such a good idea after all.

And to appreciate that,

we have to look at the frequency response of the approximate filter.

So here in this block, we show the frequency response of an ideal low-pass

filter, where we choose omega c equal to pi over 2.

And superimpose we're going to show the frequency response of the approximate

filter for increasing values of capital M.

So we start with M = 9 which is not really a very long filter and

we see the approximation is not particularly good.

So we increase the number of downs of the filter.

And as we add more and more points to the impulse response,

we see that the characteristic in red approaches the characteristic in green.

But it looks as though the maximum error near the transition point for

the frequency response never really goes down

in spite of the number of points that we used for the approximation.

We can try and push Number of points even higher.

And we see that even for 300 points, the maximum error around

omega c is always of the same amplitude.

We can prove mathematically that the maximum error around the cutoff frequency

is about 9% of the height of the jump, regardless of the number of points.

This is a standard result in approximation theory known under the name of

Gibbs phenomenon.

It always happens when we try to approximate a discontinues function.

O Coursera proporciona acesso universal à melhor educação do mundo fazendo parcerias com as melhores universidades e organizações para oferecer cursos on-line.