Home > Mobile >  How to get ride of transient response in FIR bandpass filter of real-time signal?
How to get ride of transient response in FIR bandpass filter of real-time signal?

Time:09-17

I am trying to teach myself digital filter design for a club project. I need to sample analog data and use a bandpass filter to pass 20-40kHz. I used MATLAB to generate the taps for the FIR filter and implemented a filter in C using those coefficients. For now, I am working with a array of sample data just to get my filter up and running, but eventually this will be streamed data from the ADC.

Right now in both MATLAB and my code, the filtered data has a transient response at the beginning of the output sample data. Since I am new to the digital filter domain, I have two questions:

What is the reason behind this transient rise? Is there any way to comb through the data in a different way to get rid of this transient for real-time analysis?

I need to measure the time difference between a ping hitting two different hydrophones, so the beginning of my filtered data is extremely important.

Here is a snippet of my response: (the input is a 40kHz sine wave of amplitude 1)Filtered Sample Data

With analog filtering I don't think this would be too much of a problem, but if I am doing this same procedure with a buffer array of real-time data, every iteration of the output data will keep having this transient.

CodePudding user response:

The only way to get rid of the transient response from a FIR filter is to gather more data before and/or after the signal of interest (depending on the symmetry and width of the FIR filter kernel).

  • Related