DSP21375 FIR output a wrong results ,some elements are incorrect
hello all :
My test is use dsp21375 to generate a 1khz signal at Sample rate 96khz (A array named "input" ,which have 192 elements);
When i use FIR (use visual dsp ++5.5 lib ) function to test the input ,and it output a wrong results .
The fir have 80 taps,pass band 10khz and stop band 15khz ,signal degradation :80db.
Test input line plot:
FIR test output line plot:
The No.0 to 39 elements incorrect,and the No.152 to 191 elements are missing!
The FIR fuction returns a "state" array,what can i do somthing to avoid error whith it?
Software :
#define TAPS 80
#define fs 96000
#define pi 3.14159
float input[fir_SAMPLES];// FIR INPUT
float output[fir_SAMPLES];//OUTPUT
float dm state[TAPS+1];
const pm float coeffs[TAPS]=
{
-0.00142993104524,-0.003289811986829,-0.005282332460651, -0.0075069448623,
-0.00833784587848,-0.007776107140672,-0.005016122768101,-0.001099967770155,
0.003213643962488, 0.006016725367764, 0.006414789515753, 0.003780666676801,
-0.0007747690201561,-0.005593084934047,-0.008292796716591,-0.007474471569354,
-0.002894142730604, 0.00370558678562, 0.009576439183326, 0.01170483457889,
0.008546757383277, 0.000697116076388,-0.008783990634843, -0.01564147328494,
-0.01604979055559,-0.008671667639916, 0.004414367121836, 0.01793968257963,
0.02542079739782, 0.0218443329146, 0.006360386319139, -0.01649993681243,
-0.03756126656446, -0.04588317097792, -0.03271438997146, 0.004775757393522,
0.06159175162126, 0.1256310834033, 0.181053268937, 0.2131620859593,
0.2131620859593, 0.181053268937, 0.1256310834033, 0.06159175162126,
0.004775757393522, -0.03271438997146, -0.04588317097792, -0.03756126656446,
-0.01649993681243, 0.006360386319139, 0.0218443329146, 0.02542079739782,
0.01793968257963, 0.004414367121836,-0.008671667639916, -0.01604979055559,
-0.01564147328494,-0.008783990634843, 0.000697116076388, 0.008546757383277,
0.01170483457889, 0.009576439183326, 0.00370558678562,-0.002894142730604,
-0.007474471569354,-0.008292796716591,-0.005593084934047,-0.0007747690201561,
0.003780666676801, 0.006414789515753, 0.006016725367764, 0.003213643962488,
-0.001099967770155,-0.005016122768101,-0.007776107140672, -0.00833784587848,
-0.0075069448623,-0.005282332460651,-0.003289811986829, -0.00142993104524
};
for (i = 0; i < TAPS+1; i++) state[i] = 0;
// 1Khz 192 elements
for(i=0;i<fir_SAMPLES;i++)
{
*(input+i) =0.5*sinf(2*pi*1000*(i)/fs);
}
// FIR TEST Process No. 0 to 191 elements
fir (input, output, coeffs, state, fir_SAMPLES, TAPS);
Hi,
I am not very clear with your statement:
The No.0 to 39 elements incorrect,and the No.152 to 191 elements are missing!
Could you please clarify why do you say that? Do you have any standard (e.g. MATLAB) output to compare the result with the expected output? Does the MATLAB generate correct output with the same set of coefficients and input data?
Thanks,
Mitesh
This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.
Thank you,
EZ Admin
Please log in to reply.

