How to remove group delay for CMSIS DSP FIR low pass filter function?

Hello All,

 

I'am using  TI MCU TM4C129x  and code composer IDE.

I've integrated the CMSIS DSP library inside my code and I'am able to apply the low pass filter using arm_fir_f32() function.

My input signal is the Varying frequency Sine wave from a function generator and my LPF cutoff frequency is 30 Hz with  No. of taps = 29

My MCU ADC is driven by DMA in ping pong mechanism.

My issue is that my filter output is getting plotted with a group delay of 14 samples. Becuase of which i'am not getting a continuous output sine wave .

I want to remove that delay form my output . Anybody having any solutions for it?

  • Any low pass filter is going to create a delay.
  • Hello Danno5060,

    Thanks for replying to my Post. So for real time data filtering what Filter do you suggest??

    And, if there is a delay , then How can I ignore that delay? I've read that it can be removed in MATLAB but how to do it in C language?
  • I've applied what I'll call "smoothing" algorithms to buffered data as well as on simulated systems that don't delay the signal.

    However, this requires not only the samples before the time in question, but the samples that are going to occur after the time of the current sample.

    With buffered data, there's the buffer delay. With simulated systems, there's the fact that reality doesn't always have to happen. For most real time systems, this won't work. You don't have the sample data from what's going to happen in the future, only the samples from the past to put through your filter. That's what creates the delay for all low pass filters.

    There are many things I don't know about your specific system that could possibly be re-thought. (Why use a function generator, then process the data through a computer, when you can use the computer itself to generate your functions? If you're comparing two channels worth of data, can you buffer the other channel by your delay time so that both channels line up in time at the end? I'm sure you have answers to these questions and more for your system. In the end, it's your system and not mine.)
  • Hello Danno,

    your statement below helped me solve my issue!!

    " If you're comparing two channels worth of data, can you buffer the other channel by your delay time so that both channels line up in time at the end?"

    I shifted the input(last samples) & output (first samples) by the group delay and Got the original sinewave !!

    Thanks