Friday, October 23, 2020

Movesense Medical ECG - improving the waveform and HRV accuracy

One of the troublesome issues involving the Movesense Medical ECG module has been waveform distortion.  For most arrhythmia identification purposes this probably has minimal impact, however with HRV matters it could be critical.  In particular, the fractal related DFA a1 should be affected by loss of RR peak precision.  The following waveform is what we want:

  
This is from a Biopac MP 36, high quality ECG with a sample rate of 1000 Hz.

Unfortunately, this is what we can get from the Movesense ECG:


There are many permutations of how the R peak sways side to side - which should create a timing issue for an index of fractal dynamics and self similarity (DFA a1).

Well, I finally figured it out and how to fix it!  I have tried about everything to tame the distortion and noticed that if I held my breath it looked ok.  On the other hand, during a deep inspiration, the wave looked like this:




Now we are getting somewhere.  So, some sort of muscular or thoracic motion is throwing off the signal.  What I did next was use the gel electrode kit.

 

Putting the electrodes high on the lateral upper chest gave me this beautiful waveform (at 250 Hz sample rate):

This is almost identical to the Biopac ECG signal above.  In addition, during an hour session of cycling, the signal remained this way - no distortion, sway or broadening.

Next step was to compare the Movesense to the commonly used Polar H10.  I'm not implying that the Polar is a gold standard device, but it's the only other HRM I have (that I trust).   

A standard cycling ramp was done - 5 watts/min, 20 minutes, 130 to 230 watts.  The session also involved a 3 minute max, 1 minute max and zone 1 intensity (2 hour total).  To verify proper synchronization of time points, here is a Bland Altman analysis of heart rate.  For those not familiar with the Bland Altman, it's simply the difference between methods on the Y axis vs the average between the methods on the X axis.  The closer to zero the mean line (thick blue) is, the better.  The average artifact for the Polar was between 1 and 6% depending on intensity.  Artifact in the Movesense was near zero for the ramp, but picked up for the sprints to about 5%.


  • What we see here is throughout the entire ramp, the heart rate pairs deviated from each other by an average of near zero (including 170 bpm).

The ramp:

  • The Movesense medical and H7 tracked very closely over time.  The Polar H7 seems to have under read the DFA a1 somewhat.  This was reflected in the Bland Altman plot between paired values over time:


  • The Polar mean difference was about 5% below the Movesense through the range of DFA a1.  The scatter (standard deviations - dashed blue lines) did widen at low DFA a1 (high intensity) and trended downward, signifying the potential for the H7 to read lower than the Movesense.

This was not a formal validation study, but you can get a sense that the numbers are close. 

Now that we have a solid waveform, a conjecture on why deep breathing (also seen at high intensity) will distort the waveform.  The diaphragm is a large muscle in the right location to interfere with a chest belt form factor ECG.  Some athletes may have more diaphragmatic mass, especially if the muscle is trained on a regular basis.  As per an old post, I have been doing regular diaphragm training for many months.  My suspicion is that this is the culprit in waveform distortion, hence, it should affect only a subset of users.  The fix is to shift the ECG sensors higher on the chest.

Chest belt worn high:

Here is an example of a waveform when the chest belt is worn high.  I did need to stabilize the belt with a piece of tape.  This is with a 250 sample rate:


With the resulting wave:



Summary:

  • The Movesense ECG is capable of near gold standard R waveform morphology.  If one is plagued by waveform distortion, moving the sensor higher on the chest as shown in the above example should eliminate diaphragm related effects.  
  • To confirm diaphragm activity related effects, simply observe the waveform during deep breathing and brief breath holding. 

Friday, October 9, 2020

Movesense Medical ECG V2.0 Firmware brief review

New firmware was just released today for the Movesense ECG module.  I thought it would be interesting to take a quick look at any potential changes or improvements.  One of the vexing issues I've encountered is the non uniform R wave peak seen at high zoom resolution.  I was most curious about this as well as the impact of the firmware on HRV precision (particularly DFA a1).  One of the easiest ways to compare the DFA a1 during exercise is to simply do an incremental ramp and plot the values over time.  We will take a look at that as well as the waveform in this post.

Although upgrading the firmware was not difficult, caution is recommended.  The bootloader needs to be updated as well, which opens the possibility of not being able to go back to the old firmware or even bricking the device (or in this case "coining", since it's the size of a coin).  Unfortunately, after the flash, the module was "dead", no LED light present and not seen by my phone.  After a battery pull, I was able to get it into bootloader mode and flashed it again - and it was successful.  Bottom line - be careful.

The android app is the same as previous with a max sample rate of 512 Hz.  I chose 500 Hz and had no issues with my Samsung S20.  Although I could not get the app to split screen or be present as a popup (force closes), it did stay active in the background with no issues even with screen off.

The ramp:

After a 20 minute easy warmup, here is the 20 minute ramp, 5 watts per minute for a total of 100 watts (130 to 230 watts over 20 min).

Here is the ramp in Kubios (auto correction mode) 

The nice linear decline in DFA a1 is in yellow.  Notice the "hump" in the middle of the ramp, that is due to the lone APC (with some aberrant conduction) noted in the top ECG tracing (green).

Let's compare to the Polar H10:


The yellow linear decline in DFA a1 is there as well, but the artifacts are high, between 2 to 6%.  The "hump" is not there, but could be lost among the artifact effects.

Comparison between the H10 and Medical Module:

This is difficult to easily do with confidence.  Alignment is always a concern, therefore a demonstration of how heart rate comparison is done - they should be matched at each time point.  The following is a plot of the heart rate of each device at every time point (ramp plus warm up):


  • The R correlation is very high and the slope of the line is 1.0 both indicating excellent agreement.

How does the DFA a1 look:


The "hump" is circled (that is related to the one aberrant ECG beat) and I would ignore that discrepancy.  However, it does seem that the Medical module was higher throughout the ramp, especially in the early portions.  Toward the end, things get a lot closer together.  At that time in the session, the H10 is subject to higher artifacts.  This does not mean the medical module is less precise in obtaining DFA a1 readings, for all we know, the H10 may be at fault.  Indeed, the DFA a1 response with an H10 has not been well studied during high intensity exercise.

The heart rate variability threshold - (otherwise known as the heart rate at DFA a1 = .75):

As previously described in some older posts, here is the derived heart rate at which DFA a1 equals .75.  It is quite possible this is closely related the first ventilatory threshold.

Heart rate vs DFA a1:

Polar H10:



Movesense Medical module:


  • Both have less than perfect plots up close (despite looking good in Kubios).  The reason is that this is a plot of heart rate vs DFA a1, not time vs DFA a1.  In most cases the curves match up very well, but there are exceptions
  • The Polar H10 reads about 8 bpm lower than the ECG module, not surprising given the under reading of DFA a1 throughout the test.
DFA a1 over time:

If we look at the DFA a1 drop over time, things look at lot better.  In this case one does a plot over time, figure the time at which DFA a1 = .75, then use the 5 watt per minute rise in power (starting at 130w) to calculate the DFA a1  = .75 crossover.

Polar H10:


Movesense Medical module:


It certainly appears that the Polar H10 is reading the DFA a1 decline with intensity differently than the Movesense Medical.  Only comparison to a high quality reference device will be able to fully resolve this.  In the past, the wattage at which DFA a1 = .75 has been between 170 to 190 watts, depending on conditioning, heat, stress and device.

Waveform morphology:

In the past, the ECG waveform was prone to distortion with the Movesense module.  Here are a few examples:



If the fractal related DFA a1 index is to be accurate, very precise pattern matching is optimal.  The above examples should logically have some kind of effect on the self similarity index.

Here are some waveform examples from today (all the same scale as above):



Although there is a mild degree of asymmetry, it appears better than previous.  I need to ask the development team if any changes were made in the firmware to cause this, or was this just a good day.

An interesting observation in waveform shape is the following.  I recorded a session using my wife riding the indoor bike trainer with the Medical module several weeks ago (old firmware).  The waveform was perfect (with only a 250 Hz sample rate):


It makes one wonder if changes in chest muscular activity or dimensional differences could be factors as well.  I'm considerably larger with more chest muscle present - items that need to be accounted for in the signal filtering software.

Maximum effort quality:

This is an extract from a 30 second, all out Wingate test done today:

  • The top panel is the ECG tracing, bottom is the heart rate.  Max heart rate was 171 bpm (green line).
  • Note the excellent quality of the ECG, minimal noise despite substantial usage of the upper body for stabilization on the bike.  This would come in handy for arrhythmia. identification

Summary:

  • The new firmware for the Movesense medical module was successfully flashed - but do so cautiously.
  • Waveform symmetry appears better.
  • Measurement of the fractal based HRV index, DFA a1 seems to be read a bit higher with the Movesense than the Polar H10.  Which one is correct will need better study and testing.  However, do not assume equivalence device to device.
  • As previously noted, Movesense artifact rejection is impressive.  Even at maximal intensity, the ECG is readable.  The Polar H10 had artifact rates in the 5 to 6% range during that time.



 

Friday, September 18, 2020

Fractal Correlation Properties of Heart Rate Variability (DFA a1): A New Biomarker for Intensity Distribution in Endurance Exercise

Today our article advocating the potential of DFA a1 as a modality to measure endurance exercise intensity was published in full. The article is fully referenced and self contained.



 

I would like to thank both Drs. Gronwald and Hoos for the opportunity to be a part of this fascinating project.  

It's been a great learning process for me and very different than the life centered around 30+ years of clinical medicine.  I also want to thank the reviewers, Drs. Mourot, Hupin and Gremeaux who worked with us to make it a better article and added much to it's depth.

There are additional pieces to being worked on concerning the DFA a1 index, and over the coming weeks I may have more to share.  For now here is a listing of prior posts in one place for those interested:

 

Thursday, July 30, 2020

Movesense Medical Module and dynamic heart rate variability

 
Over the past several weeks I have been testing both the Movesense Medical module as well as the Heart rate plus device to see if they can track the non linear HRV index, DFA a1 accurately during a 20 minute incremental ramp.  The ramp protocol has been discussed before - after a 20 minute warmup, begin with a starting power at 130 watts then a 5 watt per minute rise up to 230 watts ending at 20 minutes (100 watts over 20 minutes).  In the past my DFA a1 .75 value has been consistently in the 170-180 watt range with a heart rate about 130.  My intent here is to compare the Polar H10 to the Movesense Medical as well as the "Heart rate plus" modules to see if they are in that ballpark.  Although it is difficult to wear two chest belts simultaneously, it can be done - but be prepared to throw out some results if they slide into each other (and cause too many artifacts).

First off, it's been an interesting journey.  The initial results with the Medical module were not consistent,  occasionally having corrupted output files, abnormal ECG wave structure and HRV results that did not make sense.  Some of the difficulties involved using too high a bluetooth sample rate.  Although I have been able to get 500 Hz to work, it is less reliable than 250 Hz.  However, even with a good sample rate and bluetooth transmission, the ECG waveforms were not normal originally. 

Here is an example of what the QRS should look like (taken from a medical grade 1000 Hz ECG):
  • The waveform is smooth and symmetrical.
  • There is a sharp peak.


Now for some samples of the Medical module:
This is a bad waveform with a deviation to the right recorded at 500 Hz:

This is a good waveform with a sample rate of 500 Hz:
  • Better, but still not as sharp as the first sample form the 1000 Hz device.

Does sample rate matter?
There have been several publications examining the importance of sample rates for HRV and even DFA a1.  They do not indicate huge disparities in results comparing rates of 128 and 1000 Hz.  But, they have been done at rest and no study has looked at what happens during exercise.  The problem with lower sample rates is that the waveform loses some smoothness and definition.  Remember, with the lower sample rate, less information about the wave structure is present.

Here is a 200 Hz sample from the Medical module:
  • Notice that the wave is composed of straight line sections.

Here is a Hexoskin sample taken form the .wav file using Audacity:
  • This is a great example of a low-ish sample rate (256 Hz). Each data point that makes up the waveform structure is now exposed


Of course, if we zoom out (on the 200 Hz Movesense above), the structure looks fine:


My concern was that the lower sample rates could affect an index of self similarity (DFA a1) if the level of fine detail was lost.  In addition, the distortion of the wave (tilt left or right) could also lead to some change in the RR timing.

The software engineer in charge of the Movesense Medical device was kind enough to work with me on this issue.  After some adjustments in preprocessing filters (new firmware), both the waveform and bluetooth transmission seem better.

One of the interesting subjects I was introduced to was the effects of pre processing on the final wave or RR.  Depending on the device, internal software, hardware filtering, and processing, the final result could be quite different.  For starters, the Heart rate plus device, although capable of ECG display, does not have the on board hardware and software that the Medical Module has.  This leads to a potential issue in HRV accuracy as we are about to see.


Ramp results:
DFA a1 curves generated from each device as a pure RR sequence to a Garmin watch:
Both devices may have similar RR acquisition and processing (when not in ECG mode) with an internal sample rate of 125 Hz.  The following was recorded using each module as just a heart rate unit with a Garmin watch receiving the bluetooth signal of RR time (like a Polar H10).

Heart rate plus:



Here is the same ramp done using the Medical Module:


  • The results are very close, DFA a1 .75 at: 191 vs 187 watts and 133 vs 131 bpm.
  • This is near my historic averages
The nice thing about both ramp recordings was the absence of any lost beat artifact:
  • Zero artifacts in the 20 minute ramp.

For comparison, here is a Polar H10 recording session (on a different day):


The artifacts were about 1.5% overall, but more prevalent toward the middle - end:

  • This artifact rate was actually very low for the Polar device (I usually get 2-4%).
  • The DFA a1 power and heart rate at a .75 value were also close to both Movesense devices.  Some of the discrepancy could be from artifact.
  • DFA a1 = .75 at 195 watts/135 bpm for the Polar vs 191/187 watts and 133/131 for the Movesense units.
  • Very close indeed despite not being a validation study using multiple ramp trials

ECG recording from both the Medical module and Heart rate plus:
As opposed to RR times series, the following uses the ECG waveform to determine HRV

Heart rate plus, ECG recorded with a sample rate of 500 Hz:

  • Wow, this is really off the mark. 
  • The DFA a1 was below .75 from the start and dropped to very low values right away.  I did repeat this and it was the same.
  • The Heart rate plus module does not seem to accurately measure DFA a1 during exercise.

Why?
Lets look at the raw waveforms in Kubios:


  • There are absolutely no artifacts or arrhythmia in the 20 minute ramp.
  • The waveform appears fine.
  • However, apparently, the heart rate plus device does not have the necessary hardware (and software) to reproduce a precise ECG derived timed signal.

Movesense Medical module as ECG recorded at 500 Hz:

  • DFA a1 .75 was reached at 188 watts/131 bpm heart rate.  This was about the same as the Movesense RR series above.  There were no artifacts.
  • I was wearing the Polar H10 at the same time this was done (note the Polar H10 date from the above) which showed 195 watts/135 bpm heart rate at the DFA a1 .75 value.
  • The numbers were close.

Movesense Medical module - Waveform in Kubios:

Here is a closeup.  The waveform is smooth and has a sharper peak than the Heart rate plus unit.


Ability to identify arrhythmia or artifact:


  • This is where having the actual ECG comes in handy.  Both benign (like the above APC) or potentially harmful arrhythmia can be identified in an athlete's tracing.  In addition, a missed beat due to noise could be corrected manually.

Usage under extreme body motion:
I decided to torture test the Medical module.  In this scenario, I performed 3 sets of body weight push ups, 45 seconds per set, only 15 seconds rest between sets (total 3 minutes).  Since the overlying muscles will be very active with their own EMG related electrical activity, this should provide some information on how good the signal filtering mechanism is in the Med module.

Here is the start of the series of push ups (the orange line, red arrow)


Notice how the background noise appears on the baseline signal:


But despite this, the entire series does not have any missed beat artifact:
  • I have tried this with a Polar H10 and the series is essentially unusable due to missed beat artifact.
For instance, here is a 3 minute cycling interval at VO2 max power, followed by some easy pedaling:
  • Over the 3 minute interval the artifact rate was over 7%!

Back to the Medical module during push ups - Arrhythmia identification
There was one APC in the series, easily identified:




Summary:
  • Both the Movesense Medical module and Heart rate plus are able to record a single lead ECG.  From the standpoint of arrhythmia identification, both are comparable.
  • Simple RR transmission to a Garmin watch or other headunit is done with both devices using a sample rate of 125 Hz.  I have been told that the Medical module may be able to go higher with a firmware change.  Both seem to track DFA a1 well during one of my typical ramps, making them potentially useful for zone 1 identification.  I was extremely impressed with the lack of missed beat artifacts compared to the Polar H10
  • For bare bones HRV using RR values only, the Heart rate plus is a reasonable choice at a very attractive price.
  • The Medical module operating in ECG mode at 500 Hz, will record a single lead ECG with good precision, excellent DFA a1 tracking and is extremely resistant to body motion artifact.  Even significant usage of the chest wall muscle group does not markedly interfere with the ECG nor HRV.  The Medical module can also transmit simple RR values to a bluetooth head unit (even a smartphone or trainer) with what appears to be good precision, despite a sample rate of 125 Hz.  Ideally, a sample rate of at least 250 Hz would be preferable.  The Medical module with it's current form factor, range of abilities, artifact rejection and price are unbeatable.  The development team has been extremely helpful and informative.  I have very high hopes for the role of the Medical module in HRV research during exercise.
  • One last comment - each bluetooth device can only transmit to one other receiver unit at a time.  For instance, recording the Medical module RRs to a Garmin watch will disable the ability to record the ECG series to a smartphone.  You would need to stop the watch recording session, then open the smartphone app for ECG recording.
See also: