[hpsdr] FIR filtering and HPSDR

Erik Anderson erikba at odysseus.anderson.name
Wed Sep 3 00:08:25 PDT 2014


Thank you all for the responses, this does help.

>From some Wikipedia lookups, I think "Windowed-Sinc" is what I've been
reading about, although it doesn't use those terms (It instead talks about
sin(x)/x and tuned Kaiser/Chebyshev parameters)

When it comes to FFT-based filters, I'm guessing the tap count is pretty
close to the size of your FFT window.  Although I'm also not certain what
is preventing you from just ignoring filter rules and doing a "set all
frequencies outside of this band to zero and iFFT the results" (I'm quickly
learning that any abrupt changes in DSP likely have some smearing results
so this is likely not done for very good reasons)

I'd still like to know about how many taps people end up using when doing
convolution, mostly to know whether there's any value in adapting the
16-tap pure-register SSE implementation I found.

That polyphase filter is definitely interesting.  I dug through the SVN
repo and found a 976-tap decimate-by-8 (along with associated source) but
not either of the ones you were describing.  I doubt I could implement
anything like this on a general purpose CPU with the kind of parallelism
you use, but the video card might be another matter.

I will probably be looking more closely at polyphase filters after this as
I'm starting to suspect decimation will be coming up fairly soon.

Thank you for your attention on this :-)

Erik KM2G


On Tue, Sep 2, 2014 at 7:58 PM, Warren C. Pratt <warren at wpratt.com> wrote:

>  Hi Eric,
>
> As far as real-world examples, there are several in the wdsp library which
> is included with the PowerSDR source code.  Depending upon the
> requirements, some of these filters were implemented with time-domain
> convolution (tap-weights multiplied by sample values and summed) and others
> were implemented with the FFT-multipliers-IFFT technique.  The two
> techniques are mathematically equivalent; however, as Tom pointed out, the
> FFT approach is much more computationally efficient for larger filters.
> Examples of filters within wdsp include:
>
> * Complex bandpass filters (FFT approach - designed on the fly as
> requirements change using the Windowed-Sinc design approach)
> * Audio equalizers (FFT approach)
> * Automatic Notch Filter (TD Convolution - Adaptive Filter, tap weights
> are adjusted on the fly at each sample)
> * Noise Reduction (TD Convolution - Adaptive Filter, tap weights are
> adjusted on the fly)
> * Resamplers (TD Convolution implemented with a polyphase approach)
> * Adjustable sub-sample delays (TD Convolution, polyphase approach)
> * perhaps others that don't come to mind at the moment.
>
> If you need pointers to specific files for any of these, let me know.
>
> With regard to the number of taps, it really depends upon several factors,
> including the sample rate.  For example, for a bandpass filter, at 192K
> sample rate, my taste for selectivity leads me to at least 4097
> coefficients.
>
> One other design/analysis program of potential interest is ScopeFIR.  I
> think there is a free trial.  For filters within the SDR, often the filters
> must be designed on the fly.  So, one has to write the software for that
> and include it within the SDR console program.  However, the separate
> design programs are interesting to learn and explore the possibilities and
> to design filters that can be static.  For the "static" filters, the design
> can often be more optimized than for the filters designed on the fly.
>
> 73,
> Warren  NR0V
>


On Tue, Sep 2, 2014 at 7:07 PM, Phil Harman <phil at pharman.org> wrote:

> Hi Erik,
>
> I use Matlab to do the FIR simulation and designs for the FPGA code.
>
> The current DSP path on receive is  CICs followed by cascaded Polyphase
> FIRs, one decimating by 2 and the other by 4.
>
> The design parameters are as follows:
>
> For decimate by 2 - 512 tap, 0.01dB ripple, 110dB ultimate rejection.
> For decimate by 4 - 1024 tap, 0.01dB ripple, 110dB ultimate rejection.
>
> You will find the filter coefficients in the *.mif files under \<project
> name>\Source\Polyphase under SVN.
>
> If you would like the coefficients as a straight coefficient file rather
> than in Polyphase format then please drop me an email.
>
> See also fir2r2.v and fir4r4.v for a description as to how the filters are
> implemented. In order to meet the timing at the highest sampling rate the
> first filter is actually two filters (odd and even coefficients) operating
> in parallel.
>
> The very low ripple is a requirement of PureSignal.
>
> 73 Phil...VK6PH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openhpsdr.org/pipermail/hpsdr-openhpsdr.org/attachments/20140903/1085660b/attachment-0003.htm>


More information about the Hpsdr mailing list