Hi everyone,
some time ago i had some trouble with the sc_dsp module.
i calculated the low pass filter biquad coeffs with octaves butter function.
octave shows a correct plot, but when i implement it in xmos, somethings going wrong.
the scratched red line is the result of the xmos implementation, while the blue line shows the octave plot.
does anyone have an idea where i have to look?
regards
Ck
strange dsp filter results
-
- Active Member
- Posts: 63
- Joined: Sat Oct 15, 2011 8:53 pm
strange dsp filter results
You do not have the required permissions to view the files attached to this post.
-
- XCore Expert
- Posts: 956
- Joined: Fri Dec 11, 2009 3:53 am
- Location: Sweden, Eskilstuna
What happens if you run the filter with the test signal and then put zeros to the filterinput. Does the filter output decline to zero, or does it cont. to output a signal with a large output-power?
Have you checked that you have the correct little/big endian. If you are using a CODEC you might need to use bitrev().
Test with b0=2^23, a0=2^24 , b1=b2=a1=a2=0, and check if the output is -6 dB.
Have you checked that you have the correct little/big endian. If you are using a CODEC you might need to use bitrev().
Test with b0=2^23, a0=2^24 , b1=b2=a1=a2=0, and check if the output is -6 dB.
-
- Respected Member
- Posts: 283
- Joined: Fri Mar 19, 2010 4:49 am
The butter function in octave works fine for me to generate coefficients. Newer and older versions work equally. Your problem is probably not that.
I am not familiar with the sc_dsp module, so can't help there. It uses 24 bit coeffecients, and not 32?
I am not familiar with the sc_dsp module, so can't help there. It uses 24 bit coeffecients, and not 32?
-
- Active Member
- Posts: 63
- Joined: Sat Oct 15, 2011 8:53 pm
hi lilltroll,
bitrev was not the solution. i already tried that.
today i will try the -6dB approach that you proposed, but i have only access to my xmos devs via ssh. so i will post the test results tonight...
i had tested it with pink noise and the gpio bypasses the filter, witch works fine.
Thanks and regards
Ck
bitrev was not the solution. i already tried that.
today i will try the -6dB approach that you proposed, but i have only access to my xmos devs via ssh. so i will post the test results tonight...
i had tested it with pink noise and the gpio bypasses the filter, witch works fine.
Thanks and regards
Ck
-
- Active Member
- Posts: 63
- Joined: Sat Oct 15, 2011 8:53 pm
Hi,
I now have my stuff running with the coeffs:
and i measure the attached response lpf_butter.png.
with your proposed test i have the response shown in test_coeffs.png
the red linbe is the bypassed signal
i also tried bitrev again, but it didnt make any difference.
I now have my stuff running with the coeffs:
Code: Select all
#define BANKS 1
#define DBS 1
#define FRACTIONALBITS 24
Code: Select all
{712, 1424, 712, -33243885, 16469521},
with your proposed test i have the response shown in test_coeffs.png
the red linbe is the bypassed signal
Code: Select all
{8388608, 0,0,0,0},
You do not have the required permissions to view the files attached to this post.