(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

So I've been tasked with designing and band pass filter for my signals class. We're given the specifications that it needs to go from 200-5000Hz, and we need to use a kaiser window as the window function.

2. Relevant equations

There are 2 parameters, beta and N, given by these equations here:

where attenuation is the error d given by ATT = -20log_10 (d).

Imulse response of an ideal band pass filter is given by:

where BW is the bandwidth (4800Hz) and the Fs is the sampling frequency (44.1kHz) Fc1 is the lower cutoff frequency, 200Hz.

3. The attempt at a solution

So I've been at this one all weekend and I really feel like I'm doing nothing wrong. I picked an arbitrary error 0.01, which gives me and attenuation of 40dB, beta of 3.395321052 and an N of 493. I plug all these things into MATLAB and create a window function using the kaiser() function (The N used in the kaiser function is 2*N+1 to match the lengths). I then create an ideal filter by using a for loop on the equation with k = -N:N so it's centered on the origin. Afterwards I've multiplied the 2 functions together, making sure to use the element wise multiplication. At this point I think I'm should have my filter. I then convoluted it with the audio file I'm supposed to filter and it doesn't work. I'm at a loss here and I'm hoping someone could go over my code and tell my if I'm making a dumb move. The ProjectData file is just the audio file. I'm not allowed to use the kaiserord() function or the fir1() function, although I did just for fun and it worked fine so I know there's nothing wrong with my chosen attenuation.

Here is my script:

Thanks in advanced for any help guys and I apologize for the wordy attempt, I just wanted to make sure I covered all my bases here.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Problems designing an FIR band pass filter on MATLAB?

Have something to add?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**