New AlphaHRV version

Luckily for me, my daughter, who is a nurse, can lactate me.

Does the respiration rate metric with Alpha HRV rely on fractal calcs or is it more robust to autonomic variation day to day?

One thing, amongst many things, that I don’t understand is, are artefacts only caused by technical issues ie. sensor placement, movement etc poor connection. Or can they also be caused by the your underlying physiology ie.fatigue, poor night’s sleep, pre workout nutrition etc.

Artefacts are mostly caused by technical issues and in more rare circumstances by physiology. Scary moments, like just escaping a hit by a car or similar, will cause artefacts. Heart problems, like premature beats, missed beats, slight fibrillations,… will also cause artefacts. If you have a lot of those, better check a cardiologist.
If in doubt for technical issues, I would suggest you use Kubios or Polar Sensor Logger (not a Polar app) to check live ECG. Viewing live ECG will quickly identify issues with the strap, placement, rubbing, etc.
A strap that is too tight will cause the patches to rub over your skin when breathing deep and cause anomalies. Best strap placement can be identified by checking for a maximal ECG amplitude and making sure it is positively oriented. This is what a normal ECG beat looks like:

I adjust my strap too make sure that when I fully exhale, it doesn’t come loose from the chest. That way, it becomes quite tight when fully inhaling but doesn’t move on the chest.
I posted before that I was getting a faulty strap from H10 rather quickly, about 3 months of use. Since, I used the better quality strap from my Garmin dual with the H10 sensor on it. They are compatible.

4 Likes

Any RR-int sequence contains information about respiration rate. It’s a matter of signal processing engineering how to extract it.
There’s no need to consider day to day evolution, but just current measurements

1 Like

Many thanks. I’ve downloaded the app and will have a look the next time I get a chance.

I read once somewhere that sometimes you’ve got turn the sensor 180 degrees in order to get a positive measure.
I have done and it worked …

I’ve just tried that , and it is better, not perfect, but better

I got myself an H10 strap and then discovered the alpha1 analysis. Still trying to get it to work. This threads as been most useful for me, hope it is ok to ask couple of questions.

I wasn’t sure what software to use and tried to run Fatmaxxer and alphaHRV in parallel, so I could compare the results.

I have encountered two kind of problems: first of all lots of artefacts and secondly the results between Fatmaxxer and alphaHRV differ, with Fatmaxxer showing higher values.

First, one thing that I discovered just today after doing all the tests. I read that ANT+ should not be used for transmitting RR data because there is some limitation at higher heartrates. I thought to use one BLE channel for Fatmaxxer and another one for alphaHRV running in Fenix 7. Today I learned from this thread that Fatmaxxer actually uses both BLE channels - one for RR data and another for ECG. So perhaps the alphaHRV did use ANT+ after all. Perhaps this explains why the calculated alpha1 was so different between Fatmaxxer and alphaHRV?

Another problem is that both Fatmaxxer and alphaHRV report lots of artefacts. I’ve now understood that artefacts are defined purely based on the RR data (initially I thought that the programs analyze the ECG waveform, but now I know that RR analysis is done internally by H10).

Those are the alphaHRV results from recent indoor training:

Yesterday I run outside and later analyzed the Fatmaxxer data. This is the plot of RR data:

Most of the artefacts are from undetected heartbeats by H10 - RR value is approximately doubled. There are clusters of them. I also had some longer artefact-free intervals.

I then tried to plot ECG waveform together with RR times. I’m not sure if the graphs are totally correctly aligned - the timestamps in Fatmaxxer logs weren’t really unified and I’m also not really sure about the timing of RR reporting by H10. Anyway it wasn’t really obvious from the ECG waveform why H10 didn’t recognize the heartbeats or what I can do about it. I’ve added some examples.

Green crosses show the RR value. I hope that cross is positioned after the heartbeat that “closed” the corresponding interval, but I’m not totally sure. You can see two beats that are missed. Some heartbeats have irregular shape but similarly irregular beats have been detected in other cases:

I plan to do next exercise using alphaHRV only and make sure that it uses BLE. But that wouldn’t do anything to artefacts I’m afraid.

I already played with strap positioning while looking at the waveform - little bit on the left side gave stronger signal with correct polarity.

2 Likes

PS. Found a discussion thread in Polar Github

Apparently matching ECG waveform and RR intervals is complicated. So the missed beats might be different than those indicated in my diagrams.

Just some quick remarks (don’t have much time to go in depth now):

  • Artefact and RR detection is different when comparing FatMaxxer and AlphaHRV. Fatmaxxer uses the full blown algorithm while AlphaHRV uses a less processing power demanding algorithm. That is because the watches and head-units are more limited in processing power. But AlphaHRV is really close with it’s own algorithm, in most cases the differences are negligible.
  • The small difference in Alpha values is also explained by the fact that Fatmaxxer uses a 2 minute window while AlphaHRV uses a 200 beat window to calculate Alpha.
  • For AlphaHRV, it doesn’t matter if you use BLE or ANT+. Both are equally good. That’s because the limitation for the number of RR’s that can be recorded is within Garmin’s implementation of the ANT+ communication. AlphaHRV uses its own ANT+ protocol and not the limited one from Garmin. That’s why you can’t use ANT+ for both AlphaHRV and regular Heart rate on your device. It can’t run 2 different ANT+ protocols at the same time. If you have a Garmin device that allows ‘HRV recording’ (which is actually a stream of RR intervals), you can see the misbehavior when you plot the RR intervals from higher Heart rates when using ANT+.
  • In most cases, it is best to use ANT+ for AlphaHRV and BLE for your device. Then you have regular HR and RR recording over BLE to your device and RR recording over ANT+ to AlphaHRV. Everything OK.
  • If you want to use Fatmaxxer at the same time, you need to disable the ECG strip option because, as you noted, Fatmaxxer will take both BLE channels and RR recording on your device will not work. Or the ECG strips on Fatmaxxer will not work because depending on which of the two took the BLE channel first.
  • The H10 has the algorithm to detect the beats but does no recording or analysis. It just sends the RR intervals from the beat detection over BLE and/or ANT+.
  • When looking at your ECG snapshots, something isn’t working as it should. The baseline of your ECG is way to noisy. There’s no way to discern the P and T wave. The QRS complex is mostly OK but some beats may get missed by the irregular base line. You should use Kubios app or Polar sensor logger to display live ECG at rest and then adjust the strap tightness and sensor placement to get a much cleaner result. At rest, it should be close to perfect. Don’t worry about the ‘sine wave’ modulation of the peaks. That’s the result of your breathing because when your chest expands, the sensor gets further away from the heart and the ECG amplitude is smaller. But make sure to get a much more stable baseline that has a lot less noise.
  • Tips for improving ECG signal quality: make sure the strap electrodes are moistened, adjust your strap so that it doesn’t fall off when fully exhaling and that it doesn’t rub over your skin when fully expanding your chest for forceful inhalation. In your case, I think the strap is bit to tight which makes the patches rub over your skin when expanding your chest. That could be the cause of the noise and irregular baseline.

H10 does not record anything but sends the RR intervals to your device. That is however not directly inline with the second per second recording of your device. It is a message block added to each record and contains for example [356,362]. Here meaning that since the last record, 2 beats occurred, one 356ms after the former beat and another 362ms later. That’s where Garmin’s ANT+ protocol lacks. If I’m not mistaking, they allow a max of 3 values, which in some cases isn’t enough. There can be 0 to 4 values needed to get all beats. Depends on the HR itself and the exact position of the beat referred to the sec/sec point. So, to read out that field, it isn’t a simple sec by sec stream like all other values. You need to reconstruct a stream with all separate values.
The more recent Garmin Edge models have a setting to record HRV and if that is enabled, the RR beat intervals will be added to the FIT file in the above way. I have no idea if any of the watches allow this.

3 Likes

Have a look at FitnessHRV. It’s a Windows application that allows recording of full ECG, and has RR beat detection with Alpha as well. Only for indoor off course, unless you want to go running with a laptop :wink:
I have been able to align them very well and played with the amplitude modulation to calculate breathing rate.

Couldn’t find this on Apple. Found this. Could be the same. Not sure.

Garmin Hrv protocol allows 5 values:

AlpaHRV opens a custom 4Hz Ant+ message period (8070 counts (~4.06 Hz, 4 messages/second)), instead the normal Garmin uses
From [Inigo_Tolosa]:

Yes, The H10 and I think majority of the HRM sensors will record RR or rather, transmit RR data.

BreakAway also records and writes the HRV data into the FIT file.
if you look into any FIT file you have, the RR is recorded into the HRV field

BenFIT (above link) explains how to get the timestamps and it’s not as straightforward.

I’ve not done anything besides recording the RR intervals data

1 Like

Thanks for the info. I’ve just got a Garmin Dual and the artefacts are very much reduced.

Just to be clear: I use the strap from the Garmin dual with the H10 sensor on it.
Garmin dual will work with AlphaHRV but AFAIK, it will not provide ECG.

1 Like

Here are some corrections to these remarks:

  • Since September 2023 (v0.9.950), alphaHRV has been performing DFA analysis using a 2-minute window on all compatible devices. In the referred activity, the F7 device used by @arnea executed DFA analysis accordingly.
  • There is no simplification in the DFA algorithm used by alphaHRV. The only difference compared to Fatmaxxer is in the initial detrending method: alphaHRV uses a FIR filter instead of smoothness priors. Both approaches yield the same results.

You should not find any significant differences when comparing DFA results provided by alphaHRV to those from other apps or platforms.

6 Likes

Thank you for your help and clarifications. I will do some tests tomorrow to find better positioning for strap.

I already tried out the setup where alphaHRV is connected via ANT+, Fenix via BLE and Fatmaxxer also via BLE. It worked nicely on the couch :slight_smile:

BTW, it seems that Fatmaxxer uses only on BLE channel, not two. I even switched the H10 to support only one BLE channel and Fatmaxxer still worked and created ECG waveforms for artefacts. With two BLE channels enabled I was able to run both Fatmaxxer and alphaHRV and get ECG waveforms from Fatmaxxer.

It would be interesting to see if the Zwift is compatible with the 4Hz ANT+ mode that alphaHRV uses - I would like to have Zwift as a third head (mostly for testing purposes).

If you want HR on Zwift too, you can use the normal ANT+ if your Zwift device supports ANT+. It´s only your watch that can´t have 2 different ANT protocols running at the same time. For the H10, it´s just ANT.
If your Zwift device only supports BLE, check if your watch can re-broadcast HR on a BLE channel.