- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi,

In my application I will need implement high order (4), IIR, Butterworth, Low Pass filter, with cutoff frequency (-3dB) of ~1Hz and stop band of ~10Hz, with attenuation of -80dB. The input signal is sampled at rate of ~50ksps (32bits/sample). The problem is that I need to select the right FPGA (Cyclone V) according to the filter resources. I haven't purchase yet the DSP builder (It takes time…) and the Simulink HDL coder but I can't delay the FPGA selection (will implemented on a costume board). How can I estimate the resources to the IIR filter on those circumstances? I tried thought MATLAB filter editor and even managed to create some kind of VHDL code but I don’t have the relationship to ALTERA hardware (the "FPGA automation" tab is shut). Thanks a lot, IdanLink Copied

6 Replies

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sounds like you haven't built your design yet. Here's some statistics for you: A 1998 tap FIR filter, applied to 24-bit input samples, using 24-bit taps, will (roughly) require four multiplies, 12 altsyncram's, 206 dff's, and 2148 lcell's and some I/O buffers. This is based upon a quick Yosys run.

A quick check of my favorite FIR generation script suggests that a 21 tap FIR, quantized to 24 bits, will meet your criteria with a (rough) 130dB stop band. Overdesigned? Perhaps. What's missing in this discussion are such components as you might need to get your ADC input, to drive a DAC on the back end, and any components you might need to debug your design. Somehow I don't think the filter you just described will be the limiting factor in your design. Dan- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

I wonder why people are answering about FIR although the original post is asking for IIR. It should be also clear that a 2k taps FIR can't achieve the required fs/fc ratio, see previous thread http://www.alteraforum.com/forum/showthread.php?t=57301

80 dB stop band attenuation at 10*fc refers to a 4th order butterworth filter, two cascaded 2nd order blocks. As already mentioned in your previous thread, you need 27 extra fractional bits, refers to about 60 bit register width for 32 bit precision. A well considered design can process both 2nd order blocks sequentially using RAM based registers and coefficients. That's particularly interesting if you want to implement multiple filters. A test compile of a similar filter with parameters adjusted to your requirements uses 40 of 46 available DSP blocks of an EP4CE10, a few registers, about 1k LEs and some RAM. As also previously mentioned, the resource utilization can be reduced by switching to a modified implementation of the second order block, using two first order filters and an additional feedback.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

@FvM,

Thank you, and good catch. I had thought the stopband cutoff was 10kHz, not 10Hz, and so my numbers were all off. You could still do this with a nice polyphase technique and probably less than 8 multiplies or so, but that would be a more difficult filter for a beginner to build. Dan- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

A cutoff f 1/50k is possible with large fir or small iir but a transition band of -80dB at 10/50000 is just not realistic for fir or iir.

This requirement is too drastic for such a slow system. The likely best solution is multi stage decimation as suggested by FvM at some point in a previous related thread. I will keep the band 1 ~ 10 Hz at 0dB (passband) during decimation then at the end say reaching Fs of 1000 (instead of 50000) will start final chop sharp at 1Hz down to 10Hz using Butterworth for the sake of the thread.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page