Community
cancel
Showing results for
Search instead for
Did you mean:
Honored Contributor I
920 Views

## FIR Filter Explanation

I have a, hopefully straightforward, question that may aid in my understanding of filtering, and DSP in general.

Consider a system which instantiates an Alter FIR function.

It is fed with an input stream from an Analog to Digital converter.

The input is constrained to be a sine wave of 16 KHz.

The A2D is clocked at 7.8 MHz and presents a new value on each clock cycle.

The FIR is designed to pass frequencies from 10 KHz to 100 KHz and reject

others.

The FIR output is fed into a DAC and observed.

Should I expect to see the sine wave? I do not, hence the question...

My DSP knowledge is old and rusty, but do I need to transform this in any way, or do I feed this time domain signal directly into the FIR?

Also, in creating the FIR, The MegaFunction Wizard askes for certain parameters. The sampling rate is one of them along with the cutoff frequencies. Just to be clear, am I right in using the 7.8 MHz value as the sampling frequency, even though it appears to be wildly oversampled?

Thanks
2 Replies
Honored Contributor I
48 Views

What are you seeing?

From my experience oversampling by this much would make very hard work of the FIR. The best approach would be to decimate the input signal down to something like 4-20times the Fsig, then filter.

What does the frequency plot of the FIR look like, you must require 100s of taps for this spec....?
Honored Contributor I
48 Views

you say you dont see the sinewave. I would expect to see at least some periodic signal of the same frequency. If not, then I would try the following:

A)Check your adc is actually supplying data and you DAC is showing them! So maybe make a pass through of the adc data through a register, directly to the dac.

B)modify your wildly oversampled FIR bandpass filter to a simple lowpasss filter of say some MHz cutoff. Your adc signal must come through then.

Note that the FIR filter has some flow control pins. Obviously you need to set them correctly.

Another thing which can cause troubles is the scaling (gain) in the filter.