Dear to all forum,
I have a some problems with implentation of an IIR filter via SDK DSP library.
I started a new project with these :
1) Motorola MC56F8357EVM board
2) CodeWarrior 5.5.1v
3) Processor expert v 2.93 for Motorola 56800 family.
So I generated a simple sinusoid at 50Hz with 8000 Hz of sample frequency and then I filtered it but sometime the filter doesn't not work well.
I extract the following IIR filter from help docs of processor expert.
/* The order of coefficients : a2,a1/2,b0,b1,b2 for each biquad
Note that |b0|,|b1| and |b2| ahould all be lesser than 1.
Test Case Filter Specifications:
Passband edge: 1000Hz
StopBand Edge: 2000Hz
Maximum Ripple in PassBand: 1db
Attenuation in Stopband : 30db
Sampling Frequnecy: 8000Hz
const Frac16 IIR_Coef_F1 =
FRAC16(-0.1310), /* a2*/
FRAC16(0.27805), /* a1/2*/
FRAC16(0.1808), /* b0*/
FRAC16(0.2133), /* b1*/
FRAC16(0.1808) , /* b2*/
FRAC16(-0.6107), /* a2*/
FRAC16(0.4944), /* a1/2*/
FRAC16(0.3892), /* b0*/
FRAC16(-0.1566), /* b1*/
FRAC16(0.3892) /* b2*/
The first problem is: How I can generated these coefficient? I tried with QEDESign Lite sw but the results doesn't macth? Why?
The second problem is when I set the sinusoid amplitude to 1 value. Infact the filter output is something strange not so close to be considered a sinuosid.
Are there some problem with use of Frac16? Some saturation problem are possible?
This problem disappear if I set the amplitude sin to 0.5 or less.
The third problem is the following. When I generated a sinusoid outide the passband filter (for example 1500Hz) the output isn't close to zero value. So the filter doesn' t kill the sin.
I attached the entire project generated vith processor expert. It is in zip format
Thank in advance for any help you will give to me!
Please It's very urgent.
Mer Mec Spa