Abstract

Finite Impulse Response (FIR) filters can be designed to be linear phase, causal, and they are guaranteed to be stable. These advantages result in their wide adoption in audio processing, communications, image processing, and pattern recognition, among other applications. Some common design methods of FIR filters include windowing, multiband with transition bands, constrained least squares, frequency-sampling, arbitrary response, and raised cosine. Yet, despite the ubiquity of FIR filters, no open-source implementation of the frequency-sampling method of FIR design in the popular C# language is available.This paper presents open-source FIR filter design code that implements the frequency-sampling method in C#, and verifies its operation. This well-known filter design method takes a set of frequencies and the desired filter’s amplitude at each, and then interpolates these points to create the same number of frequency/amplitude pairs as the desired FIR filter order, using equally-spaced frequencies spanning ω=0 to π rad/s. The inverse Discrete Fourier Transform is applied to this data to create a time-domain response, and then this is windowed to create the impulse response of the system that implements the desired filter. Performance testing compared paired filters in MATLAB and C# that were each designed to mimic several audiograms. Each audiogram specified desired attenuations from -80 dB to 6 dB at eight logarithmically spaced frequencies from 250 Hz to 8 kHz, and these were realized with the design of a 1000 tap FIR filter.In all cases, the C#-computed filter’s frequency domain performance matched the one designed by MATLAB essentially perfectly, to within two orders of magnitude of the precision of the double data type, suggesting that the open-source FIR filter design method we describe is successful.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call