Filtering heart rate signal

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Benz
Level 2
Level 2
25 sign-ins 10 replies posted 10 sign-ins

Dear Community,

Do you have any idea how to remove the unused noise and unwanted half-signal risings from this signal? On the picture below you can see the signal, and you can notice the true heart beats, and the unwanted part of the data.

Benz_0-1617616639071.png

I am working with a 16 sized circular buffer, every time a new data comes, I push it into the circular buffer. I want to make the filtering without using any top design element, so only with "C code". The hardest thing in the filtering is, that every person has his/her own heart rate, and the light absorption (which is the method of how it works) can be different by person, so implementing fix [Hz] filters might be dangerous, because of the fact that the data can change suddenly if other person uses the sensor.

Thank you for the ideas, and I also accept example C codes for doing this filtering 🙂 .

Happy easter,
Ben

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

 

Benz,

I think your signal might be a good candidate for a median filter with the length of 5-20:

MedianFilter: sliding window median filter component 

/odissey1

Figure 1. Effect of the Median and FIR filters on the data with pulsed noise. Black - signal w/o noise, Green - signal with disturbance, Red - FIR output, Blue - median filter output (recovered signal). Data output demo using SerialPlot charting software.

Median_basic_01a_D.png

View solution in original post

2 Replies