07-11-2016 04:17 AM
Hello,
I am using a 6th order elliptical low pass filter to remove signal trend from a blood pressure measurement from pre-sampled data, however since the program needs to process and calculate an indice in a particular time frame, I can not filter and then store the data for calculation later.
The sampe size is this 1250 or 10secs worth of data with the sampling rate is 125 samples/sec.
In the effort to remove distortion in the filtered signal I am using a described technique to add/tag a start and final ampitude value onto the begining and end of the sample of the same length (1250), I also run the data in reverse to remove phase effects.
However what I am getting is still some distortion that can be seen in the start of the sample; first one here with loss of amplitude, but more often it is worse than this and distortion occurs at the end from time to time.
I have some DSP experience (but from from 20 years ago!) and remembered windowing might be a way but I keep thinking that filter shouldnt be that hard to implement plus I dont want to lose any amplitude information.
Any help would be appreciated.
Cheers,
Kevyn
Solved! Go to Solution.
07-11-2016 04:35 AM
07-11-2016 05:40 AM
Hi GerdW
1. Ah ok sorry about that for the data, I will wire it up next time. This is part of a much larger circuit and why I just cut a bit out.
2. Yes and now I see the init/cont part of the filter, I will investigate.
Thank you
07-12-2016 06:31 AM
Kevyn,
All filters have a transient effect which occurs at the beginning of the data set. The duration of the transient depends on the type of filter, its order, and its bandwidth.
Consider a physical filter composed of inductors and capacitors. When a signal is first applied to such a filter all the capacitors have zero stored charge and the inductors have zero flowig current. Until the charge and current values reach a steady state condition, the output of the filter will include the effects of the transition from all zeros to the new values. This is the transient. If the input signal changes suddenly, such as a jump to a different frequency or a change from a sine wave to a triangle wave, there will be a similar transient interval before the output waveform represents the new steady state value.
Filters are nice for some things. However, if you need to look at every data point including the first one, you may need to use different techniqoes which do not depend on stored information about earlier behavior of the signal.
Lynn
07-12-2016 02:59 PM
@johnsold wrote:..., you may need to use different techniqoes which do not depend on stored information about earlier behavior of the signal.
Lynn
In some special cases where the information that happened PRIOR to the data set you have available is implied but the data yo u do have, you can get away with reflecting the data set about the intial/final data point and then run the data through the filter first forward and then backwards. After doing that, toss the data that goes with your "pretend" data and just look at the part that iss associated with the actuall data set.
Ben
07-18-2016 11:46 PM - edited 07-18-2016 11:47 PM
Thanks Lynn (and Ben),
Thank you for that detailed explanation, I can see now that my options are possibly to use only the "good data" (discarding the edges) within the dat set; it is acheivable because I am looking for variation for each breath, and a full breath (or a couple of full breaths) is seen within each 10 second window.
I appreciate the information I can stop spending time on it.
Cheers,
Kevyn
07-24-2016 03:10 AM
I ended up using extra datapoints the same length of the original "current" sample at the front and the back. I filtered this longer set of data points and then cut out the "current" and now filtered sample without any loss of fidelity.
Thanks all.