Heart rate too low #5794
Replies: 1 comment
-
Posted at 2022-02-15 by myownself Hi @niko, Which firmware version are you on? If you are not on 2v12 then upgrading (using the firmware update "app") should make a difference. Heart rate while exercising is not expected to he accurate yet but it is being worked on. Personally I see a low heart rate at rest about 50% of the time, but I am an outlier so hopefully you'll be OK on the latest firmware. Posted at 2022-02-15 by Niko Today I left the watch on my wrist overnight and the gadgetbridge recorded just below 60 more or less the whole night. So it might be more a problem of my bones preventing proper contact. I'll keep watching it. I am on 2v12. Posted at 2022-02-20 by Aadrik Hey @niko, I have been having the same issue with the heart rate monitor as well. When I download the logs from the health tracker, or the heart rate recorder app, my average heart rate is in the 30s. When I check my pulse with my fingers I get around 70. What I find really weird is that when I use the WebIDE and turn the Heart Rate Monitor on manually and just watch the raw data on the event my heart rate eventually reads 70 BPM after a few moments. I am also on 2V12. Not sure why my logs are so low. Posted at 2022-02-20 by myownself @Aadrik is the confidence higher with the correct or low reading? It should be higher when the reading is correct, but I wonder if like me you will see the correct rate has close to 0 confidence and the low one ~100%. Posted at 2022-02-20 by Aadrik @MyOwnSelf the confidence actually get pretty high values with lower BPMs as well as the correct 70 BPMs. It seems like as long as thr HRM can grab the same value a few times in a row the confidence value increases. I read through the github for the health app and the heart rate recorder but I don't see exactly how things are working. Posted at 2022-02-20 by myownself OK. Good to know. I finally had chance to look at what the algorithm is doing with mine and I can clearly see the skipped beats. Probably just need a tweak to the peak finding algorithm (or valley finding as it is if I remember correctly). Posted at 2022-02-25 by Niko Yeah, I can kind of confirm that. Although after activating the heart monitor in circle clock it was wrong even through the webIDE. I'll dig deeper. Posted at 2022-03-03 by user140377 Value seems to get too low when the arm is moved around. When holding still the measured heart rate seems to be ok. Posted at 2022-03-03 by @gfwilliams Yes, right now this is to be expected. Pretty much all wrist-mounted heart-rate monitors tend to have trouble when you move your arm around but generally they use the accelerometer data so they can filter out false positives and still get some useful information out. Espruino doesn't do this at the moment since it's trying not to use proprietary algorithms. However hopefully the current algorithm will get improved at some point. Posted at 2022-03-03 by user140377 ok, does someone know of an open paper or equal where we could copy some things lines from? Posted at 2022-03-03 by myownself I've linked some papers in another thread. http://forum.espruino.com/comments/16387616/ Posted at 2022-03-03 by Aadrik I think I am just completely missing this but where is the heart rate data actually getting called from? I am looking at heart/app.js and I am not seeing the call to either subscribe to the event or get the data. Everything I am seeing looks more like logging data and drawing the graphs. I'd like to help try to improve this if I can. I am mostly self-taught so I just need a bit of direction if possible. Thank you. Posted at 2022-03-03 by Mi See http://forum.espruino.com/conversations/372681/#16388080 I try to put together a summery of the current state (promised this a while ago) later this evening or tomorrow. Posted at 2022-03-03 by Mi For a quick start, you may also want to just paste this code Posted at 2022-06-06 by @gfwilliams Also now mentioned on espruino/BangleApps#1908 Posted at 2022-06-07 by user145221 Hi all, reporter of issue #1908 here. Moving the discussion to the forum as requested in that issue comments.
Thanks! -Yenya Posted at 2022-06-07 by @gfwilliams Right, I've just added a repository where you can dump test data and can test it out against the algorithm: https://github.com/gfwilliams/EspruinoHRMTestHarness It's currently only got some very short dumps I put in there in it, but you can see from plotting the graph how it's doing. Sitting at a resting heart rate works passably, others not so much. Looking at that I did notice one big issue in particular with how quick the running average adjusts, and I've just made some changes to Espruino itself (now in the latest builds) that should make it work a bit better particularly at higher heart rates. PRs for more data in particular would be great :)
You can install the 'custom boot code' app and paste the command
Not right now. The original app author did try to add this but I think he struggled. However you can still just run the app on an Android phone and get the data there while you're out and about. At some point I might have a look at doing a super stripped down app that included the Bluetooth HRM code in it as well, just so folks can get some data with basically zero effort. Posted at 2022-06-07 by @halemmerich The script on the custom.html page of the hrmaccevents app has a You can actually try that out by executing
in the custom.html scope in your chrome/chromiums debug view and pressing connect. As Gordon stated, I had problems getting the created files downloaded as they were fairly big. However that was a few months ago and I believe there were some changes that may have solved that issue. In that case a little bit of code for using the file based mode and getting that data of the watch should be doable. Posted at 2022-06-13 by user145221 @halemmerich: I downloaded the JS part of hrmaccevents app to my bangle.js2 (with method=2) and let it running for several minutes. The resulting CSV will for a while be at https://www.fi.muni.cz/~kas/tmp/hrm-log.csv (2.3 MB). @gfwilliams: Would this file be usable, provided that I amend it with either an external log file from Garmin watch or paste the heart rate from Garmin as the last (BTHRM) column? I tried to import the Garmin .fit file into the GoldenCheetah desktop application (https://www.goldencheetah.org/), and it apparently can export the data as CSV. The only problem is that the resulting CSV has relative timestamps starting at zero. But I guess I will be able to synchronize it either using the GPS data or simply by starting at the same time on both devices. Posted at 2022-06-14 by @gfwilliams
Yes, that'd be fine - but you want to merge the two so it's just one big CSV file with lines for the BTHRM column when the heart rate data is available. Syncing time could be an issue but I guess as long as you're within 10 seconds or so it's unlikely to matter However it's worth noting that the Garmin watch will be having similar issues grabbing your heart rate so it may not be that accurate - really spending £20 on an bluetooth ECG heart rate monitor would be the best way to get accurate data. Posted at 2022-06-15 by Kilrah Also noticed that problem, reading about half of what it should. Changing period to 20ms helps, I have a BT HRM and when steady the values match but basically as soon as I move my arm around it throws the internal one off completely. Posted at 2022-06-15 by Kilrah Here's a Recorder log with both if it helps. Attachments: Posted at 2022-06-15 by @fanoush
Recently I found interesting paper with some 'heavy handed' approach to this problem: Posted at 2022-06-19 by @halemmerich I have done a pull request on hrmaccevents to add recording to files and some status info on the bangle for easier use. Posted at 2022-06-28 by @gfwilliams The app loader does seem to be better about downloading big files - it wouldn't take long to make a 'interface.html' file for hrmaccevents pull back the files i guess as it's just a call to Utils.readStorageFile Posted at 2022-08-21 by user140377 I took a look at this and I have to give up now because I'm out of ideas. A few papers have code online, e.g. WPFV [2]. I tried them on data collected on my Bangle JS2, but they all failed to recover the exact heart rate, or even a value close to it. The following picture shows the frequencies in BPM of a random 8 second sample of motion artifacts in a PPG signal from the IEEE Signal Processing Cup 2015 [1], dataset 1, downsampled to 25Hz: We can simply see that the first and second dominant PPG peeks (blue) at about 90 BPM and 176 BPM are caused by motion because we can identify the spikes from the acceleration sensor at the same frequency. That leaves the third spike at 165 BPM as the real BPM which closely matches the ground truth at 163 BPM. Lets now look at the data I have recorded from my Bangle JS2: I think we now get an idea why the algorithms fail. Now lets take a look at the raw signal. First ieee: Now Bangle Js2, raw signal in blue, FIR filtered in red, both zero averaged: The BangleJS2 data has been recorded with acc rate=25Hz, hrm rate=50Hz, both sampled at 25Hz. See the attached recordppg.js. Though the sampling rate is not exact (more ~23Hz on mine) [1] https://signalprocessingsociety.org/community-involvement/ieee-signal-processing-cup-2015 Attachments: Posted at 2022-09-01 by user140377 Well I said I give up, but well.. As said I checked some algorithms that do remove motion artifacts from PPG with acceleration data and they all failed. I tried to analyze why the fail and, as result, developed a very simple mechanism: Lets just take the fft of both PPG and ACC and remove the frequencies from the PPG spectrum that have noise in ACC spectrum.
So my algorithm does not always get closer to the truth but it sometimes can, see the attachment. BPM of firmware in red, real BPM from belt sensor in green, calculated BPM in blue. X-Axis is time, Y-Axis BPM. Attachments: Posted at 2022-09-02 by user140377 Recommended reading list aka the better ones (unsorted):
Posted at 2022-09-02 by @thyttan It looks like it kind of stabilize around the ground truth from the middle point onward, with some oscillation. Is that only a coincident with these particular data or generally the case? Well done in any case! Posted at 2022-09-02 by user140377 This oscillation is visible in all datasets I have tried. Attachments: Posted at 2022-09-03 by Mi Thanks a lot @user140377. Posted at 2022-09-03 by user140377 Looks like I posted to the wrong thread. Lets continue the discussion in the other one. Posted at 2022-09-06 by user140377 Since the "Heart Rate Monitor"-application shall not be changed, I'll clone it. Any suggestions for a name? If not I'll default to "Heart Rate Monitor 2". Posted at 2022-09-06 by @gfwilliams
Posted at 2022-09-06 by user140377 Thats pretty long. Also movement compensation needs to be enabled in settings first. Posted at 2022-09-06 by @gfwilliams Well, to make things simple we could just make it do movement compensation by default. Maybe Posted at 2022-09-07 by user140377 "Adavanced" might raise the expectations to much (If I had a advertising department they would kill me). But reading "advanced" there is another word in the english language in my mind: "alternate", in short "alt. HRM" or "HRM alt" Posted at 2022-09-09 by @gfwilliams That's fine. Really we just need a way to point out that it's doing something extra behind the scenes Posted at 2023-03-31 by yshui For me, the heart rate is way off even at rest (measured 40~60 BPM while the real BPM is ~90 as measured by a pulse oximeter). Changing the poll interval to 20ms helps greatly, the result is nearly identical with the pulse oximeter at rest. Could we maybe change the default poll interval to 20ms? What are the tradeoffs of doing that? Posted at 2023-04-03 by @gfwilliams That's interesting - really the trade-off is power consumption. I just checked and it's You could always just use the In theory at 90 BPM there shouldn't really be a big problem with the default 25Hz poll interval - if you're running the HRM app can you still see a pretty clear pulse with it? It's possible that the filter used for the algorithm is filtering out too much high frequency |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-02-15 by Niko
Hi. I got my banglejs 2 about a week ago. The measured heart rate seems to be very low, approximately 75% of what I measure fingers on pulse. And this is pretty consistent, at rest the watch measures way below 50, when exercising not above 80. I fiddled with the settings also in different apps, pushed the watch on the skin but it's rarely showing the correct rate.
Does anyone have a similar experience? Any ideas what to try out?
Beta Was this translation helpful? Give feedback.
All reactions