The weakest link of my system so far is the translation of data from the BVP sensor. I have found that there is only a small margin of error to capture a true pulse signal above thermal noise levels and nominal blood flow within the finger.
Left uncalibrated Max will either miss 'pulse' events or perceive the occasional burst of noise as a trigger. As the visual works on an average bpm (using a tap tempo), changing its colour in respect to a rising or falling average. If max recognises the data as two very close pulse events then this will be interpreted as a rapid rise in bpm and therefore colour.
I can see two ways of solving this. Firstly is to use the max window to observe directly what the data is doing. Within this data it is much easier to see what values to set thresholds at to provide the most accurate translation. This worked well and meant that there were only minimal instances where beats were missed (there tended not to be any unwanted events in close succession).
I now need to make some kind of averaging stage where if a beat is missed it will not affect the bpm. At the moment the only way i can think of doing this would be to compare the last bpm result with the present one and only accepting changes which are within a particular threshold. It is unlikely your heart will slow by half within a single heartbeat so this should work. To accommodate for higher pulse rates its important that the threshold is a proportion of the previous bpm value and not a constant number.
Functions could be similar to below where x is the previous bpm and y is the current value:
Accept y if - y >= (x - 1/3x) so at 60bpm y would be accepted at 40bpm or above
Reject y if - y < (x - 1/3x) so at 60bpm x would remain at 60bpm if y is at 39bpm or under
This allows higher heart-rates to accept more sudden drops, which is likely after sudden startling etc.
i.e. 120bpm can safely drop to 80bpm without being rejected. Just have to figure out how this would work within Max.

No comments:
Post a Comment