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.

About DSPLib

Hi,

I am using DSPLib filtering functions but I am confused. 

On datasheet sprueb8b.pdf, the pseudo code is given for filtering. The index "j" is increasing. But in convolution equation(see wiki page for FIR filter), the index is decreasing. Can you explain why the change of index is opposite to the convolution equation?

Burhan.  

  • Pseudo code is not real code, it is just intended to give you an idea how the real code will operate. The real optimized code may be difficult to read and understand, so we offer pseudo code to help you understand what the real code may be doing.

    If you need a more specific answer, you will need to give us more detail like function name, page number and Wiki URL. But I think this is all you were needing to hear, am I right?

     

    If this answers your question, please click  Verify Answer  on this post; if not, please reply back with more information to help us answer your question.

  • If it's incrementing then you would need to store the coefficient vector in reverse order.  Often we deal with symmetric FIR filters where it doesn't matter.

  • Brad Griffis said:

    If it's incrementing then you would need to store the coefficient vector in reverse order.  Often we deal with symmetric FIR filters where it doesn't matter.

    Yes. You're right, if coeffcients aren't symmetric the coefficient vector must be stored in reverse order. I see it when think in hardware. But in this case, the first calculated value is the Nth output sample. Nth output sample is stored in first output buffer. Thus the function just calculates outputs for desired inputs. It is like filling the taps with history data. Since the first N-1 inputs are history data and Nth is the first input data, the Nth output is putted to the first in original output.

    If I initially give N-1 zeros to the input, the first N output buffer should have meanings. But the first N output buffers are zero. Why?

    It is a bit complicated to me, I hope I understand it truely.

    N is the number of filter coefficients, X is the number of output samples.

    Burhan.