Simple example of FIR filter

Discussion created by BrettG on Mar 24, 2011
Latest reply on Feb 20, 2013 by leonxp

I received a question about how to implement an FIR filter. Here's a very simple example.


NOTE: Most images are taken from Wikipedia's article on FIR filters:


Here's what an FIR filter architecture looks like. The bn values are the multipliers for each filter tap.

ScreenHunter_01 Mar. 24 14.53.jpg

Here's an example of a moving average filter, which uses three taps, each of which has a coefficient of 1/3.

ScreenHunter_02 Mar. 24 14.53.jpg

The expected frequency response is shown here. The derivation can be found on Wikipedia's article.

ScreenHunter_03 Mar. 24 14.53.jpg

I implemented a simple stereo FIR in SigmaStudio. I included the Stimulus and Probe cells so we could see the frequency response.

ScreenHunter_07 Mar. 24 14.59.jpg

In the Table Editor, I entered in 0.33333 for each coefficient. It's probably better to use as many decimal places as possible for the best precision, but this is just a basic example.

ScreenHunter_05 Mar. 24 14.53.jpg

By clicking the Probe and Stimulus windows, we can see that the frequency response matches the theoretical response.

ScreenHunter_06 Mar. 24 14.54.jpg


SigmaStudio does not have its own FIR coefficient generation tool, but if you generate coefficients in another piece of software, just enter them directly into the Table Editor in SigmaStudio to realize that filter on the SigmaDSP hardware.