02-15-2016 10:40 PM
How can I rid a measured signal of baseline drift? Ideally I would like to do this in real-time, but for now post processing is sufficient. The signal is coming from a sensor and is at 1 hz. I have attached a graph of the sensor output (on vertical axis) against time (horizontal axis). The graph shows baseline drifting upwards. The data between individual peaks should all be close to zero.
I have read that a high-pass filter could be used, but a simple attempt did not produce anything meaningful.
I am using LV 2014 SP1 Professional Development System.
02-15-2016 11:03 PM
02-16-2016 01:51 AM
Hi Gurdas,
is this some kind of acceleration sensor? Or anything else working with "dynamic" signals (in contrast to "static" ones)?
You could implement an algorithm that detects those "close to zero" ranges and does a zero offset correction regularly…
02-16-2016 02:21 AM
I agree with Dennis. It seems a connection problem.
About the high pass filter you used, which cut frequency did you choose?
02-16-2016 08:12 AM
drifts can have many sources...
bias currents , temperature .....
and since the thread starter didn't tell us what he is measuring ...
But he has to make shure not to leave the input range 😉
here are two ways to play with
green is a simulated wfrm
red ignores values greater 2, integrate the rest with a factor and subtract it.
white subtract the result of a medianfilter with a length greater than twice the pulse length.
02-16-2016 08:46 AM
Thank you for the prompt response. Here's some more information.
But before that, can we just look at the problem as presented? I mean, what if I just want to fix the drifting baseline for THIS already acquired data and I do not know anything about its source. So, simply consider the data as numbers where we have to pull down the baseline. Makes sense or am I going off the deep end here 🙂
More information
The data is from measurement of a pollutant. No NI DAQ hardware is involved, though the control software is in LabVIEW. The measurement equipment is mated to a tablet running the LV code and acquisition is over bluetooth. The sensors are connected as differential. The DAQ hardware OEM has provided LV channel creation, timing, start, read, and stop VIs for acquisition.
This is not an accelermeter or any kind of dynamic signal.
Timing VI config
rate: 100
samples per channel: 100
sample mode: continuous
Read VI config
number of samples per channel: 100 (I average the 100 samples to report one sample per second).
GerdW: We did a zero calibration at the start of the acquisition and it was subtracted. I have considered the option of finding the new zero between each of those peaks and subtrating it from that section and the peak. But that would mean manually finding the new zero and subtracting, right?
AC_85: I tried the 'Equi-Ripple HighPass.vi' with defaults.
I also have access to the "Developer Suite All Inclusive", so if VIs from a LV toolkit are going to be helpful, let me know.
02-16-2016 09:13 AM
A very important question is:
What features of the data provided do you want to extract?
Any filter will have an impact on the data, but what is the information you are looking for?
A highpass with a very loooong periode ( low frequency) will shift the 'base line' sligthly below zero since there are positve pulses....
02-16-2016 10:42 AM
Henrik,
Thanks for the drift filter VI, looks like an useful idea! I will try it on my data later today. I do not follow exactly what is happening in the "red" method, but that one seems more appropriate than the white.
What I would like to do is shift the baseline to zero and keep the peaks. In my case, the baseline constitutes of the values of the signal between the peaks. In real life what is happening is we are measuring a pollute event between sampling clean ambient air. The pollute events are the peaks and the clean ambient air is the part between the peaks.
At this stage, I am not too concerned noise and whether baseline is exactly at zero. As long as that strong visible drift is fixed while still keeping the relative rise of the peaks intact, I am good.
Gurdas
10-27-2016 11:04 AM
upon request here is a 2010 version..