LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elimination of motion artifacts in the pulse

Hi all! I have the task of implementing the algorithm eliminate motion artifacts when registering pulse. The task is to turn the forecast of the next pulse values on the basis of previous values. Curve pulse was formed window is the upper limit and lower. If the person is calm and artifacts there is no movement, then the range or window is comparatively large. If artefacts appear motion, i.e. very large/small values of the pulse, the range or window is drastically reduced. I know the function "Nonlinear Curve Fit.vi" which builds similar ranges of values. But this function does not suit me because it is very difficult to implement on the microcontroller. Because after implementation on LabVIEW I would like to implement this algorithm to a microcontroller. How do you implement this algorithm? Atmogramme with artifacts attached.

0 Kudos
Message 1 of 5
(2,267 Views)

the non linear curve fit vi uses the Levenberg-Marquardt algorithm to determine the least squares set of coefficients that best fit the set of input data points (X, Y). so if you have to find C code of this algorithm on internet

 

here is a link , might help you

 

Levenberg-Marquardt in C/C++ - FORTH-ICS: Welcome note by the ...

 

http://www.ics.forth.gr/~lourakis/levmar/

0 Kudos
Message 2 of 5
(2,233 Views)

I agree that Lev-Mar is probably not a good choice for implementation on a microcontroller. It can be very computationally intensive.

 

Question regarding your text file: What do you expect the results to be for that file? It looks like peaks at 77, 90?, 99, 116, 134, 157, 171?, 195?, 211?, 236, 248, 257, and 266 may be the pulse signals you want. Peaks which may be at slightly different locations due to artifacts I marked with "?"  The peaks at 195? and 211? are probably modified by artifact. No peaks before 77 can be obvioulsy identified as candidate pulses.

 

Graph of CGR.png

 

It appears that your data is undersampled. Many of the artifacts have only one sample. This means that much of the information in those parts of the signal may be lost. When I tried to look at a frequency spectrum of the data to see if it could discriminate between the pulses and the artifacts, the results seemed more random than meaningful.

 

Lynn

0 Kudos
Message 3 of 5
(2,221 Views)

Thanks for the reply, the download includes the pulse values in milliseconds, not in beats per minute. Therefore, the normal values are in the area of 800 MS, and artifacts - from 100 to 400. Ultimately for the signal, I need to create some floating window with an upper and lower limit, which will be adjusted depending on the previous value of the pulse. In the presence of artifacts floating range is reduced and thereby the current value of the pulse is replaced by the value that is within range. Here, of course, much depends on empirical boundary values of a normal heartbeat. It is worth noting that the ordinary averaging the previous value will result in a low variability/variability of the values of the pulse, that is, they will not be much different from each other. I need to be substituted values had some variability.Снимок.PNG

0 Kudos
Message 4 of 5
(2,204 Views)

The whole problem consists in the substitution of the artifacts on valid values any way, but:

1. The algorithm is not meant to replace the artifacts averaged previous times.

2. The algorithm should be relatively simple mathematical realization

0 Kudos
Message 5 of 5
(2,182 Views)