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

PSoC™ 5, 3 & 1 Forum Discussions

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

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
First comment on KBA 1000 replies posted 750 replies posted
Level 9

 

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
odissey1
Level 9
First comment on KBA 1000 replies posted 750 replies posted
Level 9

 

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

DennisS_46
Employee
50 sign-ins 100 replies posted 25 solutions authored
Employee

Typical noises found in SpO2 systems are:

DennisS_46_0-1641845973781.png

Your noise looks characteristic of both random noise and occasional motion artifact.
For pulse rates between 40 bpm and 200 bpm, the fundamental of the waveform is between 0.67 and 3.3 Hz.
The normal waveform looks like it has a lot of second harmonic, as in a softened sawtooth. Capturing the first few
harmonics should be sufficient to yield a clean waveform.

Filter with an FIR or IIR low pass filter with a corner frequency of 15 Hz. This should help get rid of the noise.

Preceding this with a median filter might help, but don't rely on the median filter only.

If you send me a raw data file for 10 seconds or so of data, I'll be happy to look at it and test some filters.

---- dennis.seguine@infineon.com

0 Likes