cancel
Showing results for
Did you mean:
Observer
406 Views
Registered: ‎10-10-2018

## FIR filter without Matlab

Hi

I am using the FIR Complier (7.2) in Vivado 2017.2 to reduce the sample rate and improve SNR on an incoming signal, this will be acomplished using an FIR filter and decimation.  The incoming sample rate is 500Ksps and the frequency of intrest is up to 32Khz, using a decimation factor 15 will give me a recovered frequency of 33.3Khz, am i right so far?

I have entered these inputs into FIR complier which has a coefficent vector already populated.  Does this mean that those coefficents will give me the filter response i need to obtain my frequency after FIR and decimation? (see below)

Also if the decimator "Filter Type" is selected will there be no need for an additional drecimator?

Steve

3 Replies
Highlighted
Scholar
385 Views
Registered: ‎06-21-2017

## Re: FIR filter without Matlab

The Nyquist (or Nyquist-Shannon) sampling theorum says that you need to sample at least twice the bandwidth of your signal.  If you are interested in a signal that ranges from DC to 32KHz, you need to sample at least at 64ksps.  Realistically, you should sample at least 2.5 to three times your bandwidth for good performance.  You won't be able to design your decimation filters if you cut it too close.

If your signal of interest is at 32KHz, but is narrow band, it is possible to sample slower and the signal of interest will alias to a usable place in the remaining spectrum.  If you want to try this, read a book on digital signal processing.  It is too much to cover here.

The filter shown in the screenshot is a (not very good) half band filter.  It filters out signals above Fs/4.  It might be appropriate for a decimate by 2 filter, but you really should design a filter with more attenuation in your stop band.  If it was me, I would probably just decimate by 4 using two cascaded decimate by two filters.  This will give a reasonable sample rate and leave a lot of transition band for the filters so you won't need too many taps.

Highlighted
Observer
376 Views
Registered: ‎10-10-2018

## Re: FIR filter without Matlab

Thanks for your response, unfortunately my signal is not narrowband so i cannot take advantage of the undersampling that you suggested.

I will redesign a better filter using Matlab, i just wondered if this was any good as you pointed out it may be suitable for a decimate by 2.

You also mentioned that it filters signals above Fs/4. looking at the graph the -3db point of the normalised frequency looks around 0.4 which would be 2Fs/5, so with this setup and my current input sample rate of 500Ksps the filter will pass DC - 200Khz and be decimated by 2, is this right?

Thanks

Steve

Highlighted
Observer
359 Views
Registered: ‎10-10-2018

## Re: FIR filter without Matlab

Ignore my last point about the frequency cut-off, i just realised the graph show normalised frequency in Pi rads/sample, which puts the Fs at 2*Pi and Nyquist at Pi. The cut-off is indeed Fs/4.