Posts

Showing posts from February, 2019

CMSIS Biquad Cascade IIR Filter + Iowa Hills IIR Filter Design

Image
You are looking at CMSIS IIR Filters ( https://www.keil.com/pack/doc/CMSIS/DSP/html/group__BiquadCascadeDF1.html ), and don't know how to use it? Don't worry, this example will clearly help you. The first thing that you need to know is that Biquad Cascade DF1 use this transfer function to do filtering. y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] - a1 * y[n-1] - a2 * y[n-2] It is hard to understand how this does filtering, especially if you looking at it in the time domain. In short this transfer function use current input(x[n]), and two last input(x[n-1], x[n-2]) and output (y[n-1], y[n-2]). Each new input function calculates new output and stores all the values. That is all that this filter does. The hardest part is to calculate coefficients b0, b1, b2, a1, a2, that is where Iowa Hills IIR  Filter Design jumps in. In this example, I'll do the band-pass filter for 1 Hz. In the image below you can see, what I selected at Iowa Hills IIR  Filter Design. N