04-07-2016 09:18 AM
Hi,
I need to apply a 50Hz filter to a DAQ signal acquisition (just noise for the testing).
When I apply the filter, the resulting signal has huge oscillations in the first part of the acquired signal (as you see in "Filter output.png"), after those oscillations the signal becomes filtered as it should.
I tried to change the sampling rate, the acquisition rate of the signal, and all other parameters, but I can't get rid of these oscillations.
What am I missing?
In "Diagram.png" you see the diagram of the filter.
The signal is acquired at 10k rate and comprises 30k points.
I have some experience with Labview, but I never used its filters.
Thanks for the help
Solved! Go to Solution.
04-07-2016 09:40 AM
04-07-2016 09:48 AM
Thank GerdW
What do you mean by 2Hz band?
The original signal is pretty much similar to the last part of the filtered signal, only with higher amplitude of the noise.
There is no band in the original signal, it's flat.
Also, I I changed the order to higher values but the large oscillations at the beginning were there as well.
Regards
Alastor
04-07-2016 10:07 AM
The resolution on your image is a little low to be sure but it looks like you have a significant offset in the data. An offset can drive the transient response of the filter. With a narrow bandwidth filter that can produce an oscillatory response.
With your noise input you get very little energy in the filter stop band so it can be hard to see the effect. When I simulate your signal with offset the stop band is almost impossible to detect. The noise in each bin is about 60 dB below the offset and the stopband attenuation is about the same. Without the offset the stopband is detectable (visually on a graph) about one fourth of the time. With 300000 samples it is almost always visible with or without the offset. See the image below.
This is the spectrum of random noise with offset 5 times amplitude and 300000 samples.
Generally the narrower the frequency response of a filter, the stronger the transient response.
Lynn
04-07-2016 10:18 AM
Yes there is a small offset in my data.
So this could be the reason of the long transient response time I see in the filtered signal?
In such a case I would just need to substract a constant offset from the data in order to bring it around zero, right?
Thanks johnsold
Alastor
04-07-2016 12:37 PM
Alastor,
An offset can certainly be part of the problem. I usually subtract the Mean of the data set when I need to remove an offset. If there is drift in the baseline (meaning that the offset changes continuously), then more sophisticated methods may be required.
Lynn
04-12-2016 06:52 AM
Thans Johnsold,
by eliminating the offset and enlarging slightly the frequency range I could get an acceptable signal.
Michele