This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS: not able to understand the how convoultion happening ...

Other Parts Discussed in Thread: TMS320C6416

Tool/software: Code Composer Studio

x[0]=input_sample(); //input newest sample giving by DSK6416

yn = 0; //initialize filter's output

for (i = 0; i< N; i++)

yn += (h[i] * x[i]); //y(n) += h(i)* x(n-i)

for (i = N-1; i > 0; i--) //starting @ end of buffer

x[i] = x[i-1];

am not getting how convlutoin happening here...

y(n)=h(0)x(n)+h(1)x(n-1)+h(2)x(n-2)+........+h(N-1)x(n-(N-1))

but in the code yn is accumulating like yn=yn+h[i]*x[i]

yn=yn+h(0)*x(0)

yn=yn+h(1)*x(1)

yn=yn+h(2)*x(2)

.

.

.

yn=yn+h(30)*x(30)

for loop ends here

x[n]=x[n-1];

i am running this program on DSK6416

what are the initial value in x[n] if i am using TMS320C6416,filter coefficients are derived from MATLAB,Each time new sample is giving By Using TMS320C6416

  • Ijjada,

    What code are you referring to here. Is this TI provided software or something that you are developing. 

    Please check the visual representation of the convolution that is provided here:

    https://en.wikipedia.org/wiki/Convolution

    This is exactly what the operation performs where xn is the input signal which can be some data from ADC or some sensor that needs to be filtered. and hn is the filter coefficients.

    For C6416, we provide a DSPLIB function for FIR filtering that you can refer for implementing this filtering using convolution.

    http://www.ti.com/tool/SPRC265

    We provide natural C as well as optimized implementation for user reference with a unit test on how to populate the input and filter coefficients. 

    Regards,

    Rahul