Basic FIR Filter Design- calculating filter coeffecients

Status
Not open for further replies.

BriWel

Newbie level 2
Joined
Jun 3, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,297
Basic FIR Filter Design

If I want to design a 2nd Order FIR filter which blocks out a particular frequency, how would I got about calculating the filter coeffecients?

Say for example, if the sampling frequency was 300 Hz and I wanted to filter out a disturbance at 75 Hz using a filter of the form:
n = a(0)x + a(1)x(n - 1) + a(2)x(n - 2)

How would I calculate the filter coeffecients?

From looking at the other topics on the forum I realise this is probably very simple in comparison, but I'm really struggling!

Thanks in advance for any help
 

Basic FIR Filter Design

Generally I don't think, that a precise filter characteristics can be achieved with a 3-tap FIR filter. However, a(0)=a(2)=0.5, a(1)=0 creates a notch filter at 75 Hz, as far as I see.
 

Re: Basic FIR Filter Design

Thanks FvM.

How did you work that out? I've had a go myself and heres what happened

w0 = (2*pi)* (f0/fs) = pi/2

I then calculatde the zeros of the filter from the definition of w

z1 = exp^(i*(pi/2))[
z2 = exp^(-i*(pi/2))
where i = sqrt(-1)

The transfer function of the filter is therefore;

z^2H(z) = (z - exp^(i*(pi/2))[ )(z - exp^(-i*(pi/2)) )

When expanded and simplified this gives

H(z) = z^2 + 1, so the filter function

y = x + x(n - 2),
giving
a(0) = 1
a(1) = 0
a(2) = 1

cheers, Brian
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…