How to set up custom Filter Coefficients for IIR-Accelerator of the ADSP-SC584
I using the ADZS-SC584-EZLITE with Cross Core Embedded Studio. With the EZ-Board there were some Example-Projects and one of them is IIR_Filter_Response to test the Filter Accelerator.
In this Project there is a mixed Signal (1 kHz and 8 kHz) and this Signal gets fitered with a Low-pass-Filter with a cutoff frequency of 4 kHz. The resulting Output-Signal is only the 1 kHz Signal.
To test own Filter-Coefficients I calculated a IIR-Butterworth-Filter with the same cut of Frequency and the following Parameters:
I´m not sure how to set up the Project to implement the calculated values. Will the #define BIQUAD reamin at 6 or do I have to change it.
Do I have just to multiply the scale-value of each section with each coefficient of a section (scale-value 1 with each of section 1, and so on).
And after that just write them down like the Filter-coefficents of the original Project like:
coefficient 1,
coefficient 2,
...
coefficient n-1,
coefficient n
(newline)
I have tried this already but the Output doesn´t looked like I expected. I used the same setup like in the original Project. I only changed the File with the Filter Coefficients (coeff6.dat).
Is there maybe a way to automatically generate a File in this Format with the Filter-Coefficients in MATLAB?
What did I wrong and how to do it right
Hello,
Regarding "I´m not sure how to set up the Project to implement the calculated values. Will the #define BIQUAD reamin at 6 or do I have to change it."
>> Please note that the Biquad value is based on the order of the filter. You can modify the Biquad value as per the order of filter you want to use.
Regarding "Do I have just to multiply the scale-value of each section with each coefficient of a section (scale-value 1 with each of section 1, and so on)."
>> Please refer the Matlab script(iir.m) available in the below Ezone thread. It can be used to generate data for input, coefficients, expected output buffers.
ez.analog.com/.../adsp-sc58x-2158x-iir-accelerator-example-code
Regarding "Is there maybe a way to automatically generate a File in this Format with the Filter-Coefficients in MATLAB?"
>> Please refer the "Coefficient Memory Storage"(Page No: 52–5 (3386 / 3973)) in the ADSP-SC58x HRM manual. This section contains the information about how to store the coefficients for each biquad in the order. This link for HRM manual is given below.
www.analog.com/.../SC58x-2158x-hrm.pdf
Also please refer the Matlab script available in the Ezone thread mentioned above.
Regards,
Processor Application Support.
I noticed another Issue with the Filter-Coefficients calculated with the MATLAB-Script. I calculated a Lowpassfilter with 4000 Hz cutoff-frequency and fs = 96000 Hz. I used the sin-functions with my calculated Coefficients.
InputChan1[t] = (sin(2*pi*1000 * t/fs))+sin(2*pi*8000 * t/fs))
The Outputwaveform was good but the value were not between 1 and -1 it was over +-1000000.
What is the Issue here?
Hello ,
Apologies for the delay. Were you able to get going. Let me know if you are still facing any issues.
Regards,
Lalitha.S
Please log in to reply.
