From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

transient response in filter

Hi,

  I am implimenting a couple of low pass 4th order butterworth filters within Labview and have noticed a transient response at the beginning of the filtered data.

 

The filter is set as a low pass with a cutoff of 100Hz.  The input signal is a 10KHz pure sine wave from an external source captured through a DAQ sampling at 33KHz.

The transient response is visible at all frequencies above the cut off.

 

This sort of makes sense to me as the filter would be seeing the signal as having a DC component near the beginning of the sampled data.

 

What I want to know is, other than ignoring the first 2000 samples is there another work around for this? 

 

I have attached the vi that is doing the signalling and a screen shot of the data just incase I have missed something obvious.

Download All
0 Kudos
Message 1 of 7
(7,437 Views)

You can minimize the the effect, but for measurement purposes I would recommend to capture more points.

Minimizing can be done by removing the offset and for a sine: start with a zero crossing and mirror 2000 points or number of points needed and cut them away after filtering.   

 

If you just want to get rid of the pure sine signal: Try the tonedetection vi and use the residual output. Just depends on what you actually are looking for.

Maybe a closer look in the frequency domain?

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 7
(7,432 Views)

Hi Henrik

  The pure sine signal is just a test signal, in the real world the data will be from a load cell or accelerometer, there will be 5 seconds worth of data, and the area of interest should only ever occur after 20k points, so in reality I don't think it's an issue. 

 

I'm just curious if this is a known problem with a software implimentation of a butterworth filter.

0 Kudos
Message 3 of 7
(7,427 Views)

yes, it's a known behaviour of filters....  IIR filter like the butterworth usually have a longer lead in than FIR filter. ...

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 7
(7,419 Views)

As Henrik said, all filters have a transient response.  Filters with narrow bandwidths or sharp cutoffs tend to have stronger transient responses.

 

If you need to look at the beginning of the data set, you might try acquiring some pre-trigger data to allow the transient to settle druing that time.  Data sets with abrupt transistions in amplitude or frequency may trigger transient repsonses of their own, so it may be useful to generate some known test signals to determine the response of your filter. While, in principle, it is possible to analyze the response of a filter to a specific signal mathematically, it may be impractical in real situations.

 

Lynn

0 Kudos
Message 5 of 7
(7,410 Views)

Thanks Lynn.  As I explained above we aren't looking at the beginning of the data, I just needed an explanation for the transient response.

 

We will be performing 'real' tests with these filters before they are put into use, but they are in actual fact just going to be replacing electronic filters that are in the signal path before the DAQ.

0 Kudos
Message 6 of 7
(7,378 Views)

with impact test you can have quite high frequencies.... so make shure your samplerate is high enougth to capture the signal correctly.

If you have fold back low frequency content due to subsampling, no digital filter will help you 😉

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 7
(7,373 Views)