- Home
- :
- General Purpose Microcontrollers
- :
- Kinetis Microcontrollers Knowledge Base
- :
- Biquad Filter View - A IIR Biquad Filter Design & ...

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Article History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content

No ratings

Biquad Filter View - A IIR Biquad Filter Design & Visualization Tool

This tool is based upon the Audio BiQuad Cookbook Here:

http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt

Very useful for configuring the FRDM-JAM and the MonkeyJam software!

You need a machine with the .net 4.0 Framework (or greater) Installed (Windows 7 or Greater). If you have issues go here:

Download Microsoft .NET Framework 4 (Standalone Installer) from Official Microsoft Download Center

Please report any problems in the comments section

**Original Attachment has been moved to: BiQuadFilterView---1.0.0.zip**

Comments

02-10-2015
01:49 AM

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-10-2015
01:49 AM

Hello Eli!

Thanks for this and other wonderful contributions to the community!

I am trying to implement CMSIS - Biquad Cascade IIR Filters Using Direct Form I Structure in my code and I am trying to calculate the coefficients using your tool. In the "http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt" file, the equation is as follows:

y[n] = (b0/a0)*x[n] + (b1/a0)*x[n-1] + (b2/a0)*x[n-2] - (a1/a0)*y[n-1] - (a2/a0)*y[n-2]

However, in the BiQuadFilterView program of yours, in the info area, I can see that the equation is as follows:

y[n] = b[0]*x[n] + b[1]*x[n-1] + b[2]*x[n-2] - a[1]*x[n-1] - a[1]*y[n-2]

In the Keil CMSIS documentation, the equation is as follows:

y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2]

Notice the difference in between -a[1]*x[n-1] - a[1]*y[n-2] and + a1 * y[n-1] + a2 * y[n-2].

Is this a typo or the BiQuadFilterView uses a different algorithm?

02-10-2015
06:03 AM

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-10-2015
06:03 AM

Hello Abdullah.

Sorry for the confusion. Here are some pointers.

1.)

Equations 1 and 2 are really the same equation. my b[0] is just b[0]/a[0] in the 1st equation. I keep the coefficients normalized to the a0 coefficient from the start.

You can get the source of the program here:

ehughes/BiquadFilterView · GitHub

the file eDSP.cs has a function called "DesignBiquad" that shows how I get from one to the other.

2.) Good observation on the keil implementation. If you go through their documentation

http://www.keil.com/pack/doc/CMSIS/DSP/html/group___biquad_cascade_d_f1__32x64.html

They mention that they use a different sign convention for a1 and a2. If you use BiQuadFilterView, you will need to flip the sign.

3.) Check out this project:

Freescale Hack It Together (H.I.T.) Project Initiative - Get Excited!

I didn't use the CMSIS implementation as it is optimized for block processing and I wanted per sample processing. You can find an IIR implementation that implements some functions that compute fixed point coefficients for the biquad in C.

Good Luck!

04-20-2016
01:37 PM

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-20-2016
01:37 PM

Hi Eli,

How do you scale the coefficients in the tool to -.99999 to +1 for Q15 format?

Many of the coefficients such as b[1] and a[1] are -1.99999 which is not Q15 compatible.

a[0] is always 1.

Can I simply define a[0] =2 and then scale the coefficients by 1/2?

Also, the dbGain setting seems to have no effect on the coefficients.

Thanks,

Brad

Version history