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/TMS320F28377S: TMS320F28377S

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

How to implement moving average filter. Why is it preferred over low pass filter. How will its bode plot be.

  • Shyam,

    - How to implement moving average filter.

    You could implement a moving average filter using an FIR with all coefficients at 1/N, where N is your filter length. You could easily code it youself in C, or for a floating-point device like this, use the FIR filter in the FPU DSP library in C2000Ware at:
    C:\ti\c2000\C2000Ware_1_00_04_00\libraries\dsp\FPU\c28

    - Why is it preferred over low pass filter.
    It's popular for two reasons:
    1. It's simple to understand and use, and
    2. It has good transient response, for example if you want a noise filter with good step response.

    - How will its bode plot be.
    Its' frequency performance is poor: you get poor roll off and stop band attenuation. For an N-tap filter, the frequency magnitude is

    |H(f)| = (1/N) * sin(pi * f * N) / (N * sin(pi * f)

    It looks a bit like |sinc(x)| for x>0. You can find more information in any book on digital filtering.

    Regards,

    Richard