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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestions to improve the filter output of the acquired pulse signal

Hello,

I am working with acquiring the pulse signals form DAQ using a sample rate of 1k and number of samples as 1k for every 1sec signal using the DAQ.

I am using the smoothing type filter with Moving average->Rectangular->Halfwidth=3 and passing the smoothed signal to the butterworth filter with my requirements of 2.3hz and 0.7 with sample rate of 1000.

 

Problem:The filtered signal is always starting form 0 instead to start with the first value in the acquired pulse signal.For example, starting from 0 instead to start from around 0.057 as shown in the images. 

 

How to make the filtered signal to start from the original pulse signal value.

Thanks in Advance.

 

0 Kudos
Message 1 of 16
(3,503 Views)

All filters have a transient response. A bandpass filter with a DC component at the input will have that transient strongly excited.

 

Some of the filter VIs have an Init? input. If the signal is continuous but is being filtered in segments, that input can help by retaining the previous state of the filter. The first transient will still be there, but later ones should be erduced or eliminated.

 

In the example VI attached you will find that there is a transient at the beginning of each segment. This is due to the sine signal not having an integer number of cycles.

 

The IIR Cascade Filter with I.C.vi and IIR Filter with I.C.vi in the Signal Processing >> Filters >> Advanced IIR Filtering palette have an initial state input.That might be helpful but calculating an appropriate set of initial conditions from the signal data may not be straightforward.

 

What do you want the output to look like? What are you doing with the filtered data? Perhaps there is a better approach than a filter.

 

Lynn

0 Kudos
Message 2 of 16
(3,478 Views)

Hello,

My goal is convert the acquired pulses having noise+unwanted frequency components into pulse signals with no noise+with required frequency limit components.

For removing noise I used smoothing filter of rectangular of avg type and for removing unwanted freq's used bandpass filter.

The final result should count the number of pulses found in a particular time interval and for this purpose I used convert analog to digital.vi where the the sum of 1's in a 1 sec are calculated and if the sum >threshold then it will be considred as '1' pulse,otherwise '0'(No) pulse encoutered in the 1sec interval.

The usage of bandpass filter making the filter ouput to start from zero which is resulting the pulse count to '1'  when the pulse is divided into two half's in the 2 consecutive 1 sec time interval.In real time the 3 pulses in the 2 sec interval should give the pulse socunt as 3 but as per the implemented design it is giving out 4 pulses becuase of the bandpass filter response.

 

Any suggestions regarding this implementation.

Thanks sin Advance.

0 Kudos
Message 3 of 16
(3,466 Views)

Is this a school assignment? The requirements seem a bit strange for a real-world problem.

 

Do you have specifications on the pulses? Minimum time at 0 between pulses? Minimum and maximum pulse width at 1? Minimum and maximum amplitude (ignoring noise and interference) of the pulses?

 

I am thinking in terms of finding the segments which are near 0 and between each pair of zero segments would be one pulse. Filtering and counting those pulses should be somewhat easier.

 

Can you post a VI (or a text file) with some data, preferably with several seconds of data and multiple pulses?

 

Lynn

0 Kudos
Message 4 of 16
(3,458 Views)

This project deals with counting of PPG signals whose number can be used to calcualte or estimate the hearbeatrate.

As counting the number of pulses in a particular time interval will give out the hearbeatrate.For this I am acquiring the data(Pulse signal) for a 1 sec using DAQ.Thus the obtained data for this 1 sec interval is further filtered to find out the exact number of pulses encountered in a 1 sec.The number of pulses found will give out the hearbeatrate.

As of now I can only provide you the acquired pulse signals for some x interval of time and its filtered output in the image also showing the effect of filter.Pulsesignals

0 Kudos
Message 5 of 16
(3,451 Views)

Any suggestions to improve the filter output so that it starts form original value instaed of starting from zero.

Thanks in Advacne.

0 Kudos
Message 6 of 16
(3,424 Views)

You should be able to get a reasonable estimate of the heartrate from even the noisy signal by doing FFT on the data. The lowest large peak should be the frequency of the heart beat.  This will only provide an average rate and will not track heart rate variability.

 

The pulses shown in the images in your recent post appear to be quite different from those in the first post, even after accounting for the x-axis scale differences. The signal in the original post has a very strong signal at approximately 50 Hz, which I suspect is the power line frequency. Proper application of electrodes and a well designed differential preamplifier should eliminate much of the power-line frequency interference. That signal also seems to have segments of near-zero amplitude. The pulsesignals link does not appear to have any flat regions and the noise appears more random than periodoic.

 

Lynn

0 Kudos
Message 7 of 16
(3,415 Views)

Yes,the both images are different as they are the response of the two different LED's of different intensities.

I  want to eliminate the usage of analog filters or circuitry.So, the reason to implement the filtering in Labview.

Is there any method to make filter response to start from the origianl value of the filter before filtering instead of starting from zero or some other filtering method to bandpass to a range of freq's and I hope this will solve my most of my requirement.

Thanks in Advance.

0 Kudos
Message 8 of 16
(3,404 Views)

Hello,

Can someone suggest a method to make the filter response to start from the origianl value of the filter before filtering instead of starting from zero  or any other method to do the same filtering type.

Thanks in Advance.

0 Kudos
Message 9 of 16
(3,387 Views)

I too am interested in a simple solution.

 

Here is a concept to consider:

 

Pre-Pad the signal with several the first data point

You will need to look at the response of your filter, @2.7 Hz, it will need to be about 750 mSecs worth (1/1.35 hz), more if you are using a higer order filter,

 

Prune those samples off your result at the end.

 

Give it a go

iTm - Senior Systems Engineer
uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT
0 Kudos
Message 10 of 16
(3,361 Views)