Marco Altini
  • Home
  • Research & Publications
  • Apps & Projects
  • Blog
  • Substack

after All, it's just apps

3/2/2015

1 Comment

 
After All, It’s Just Apps
I wrote a piece on Medium about my experience as indie app developer. If you love to make things, code or are just thinking about getting started, you might find it interesting.
Follow @marco_alt
1 Comment

Insights from user generated heart rate variability data

15/1/2015

 
In this post I'll explore the dataset I acquired over the last year (Jan 2014 to Dec 2014) from HRV4Training's users. HRV4Training is an app I made to quantify physiological recovery using heart rate variability (HRV), providing advice to athletes and sport enthusiasts on their daily trainings (see here for details on how the app works). 

I released the app for iOS around a year and a half ago. The first stable version was released around Jan 2014, and a major update followed last year before summer, which improved UI, reliability of the camera data acquisition and also connected the app to a backend (on Parse). At that point, I had already blogged about insights from my own data (see this post) and I wanted to see if I could find similar effects of training on HRV on a wider user population, therefore further validating the effectiveness of HRV measurements as a marker of physiological recovery. 
Picture
I'll cover three aspects:
  1. dataset: number of users, users data, settings, etc.
  2. HRV recordings: values, differences by age, etc.
  3. HR, HRV and training: effect of training intensity on heart rate (HR) and HRV

Read More

Map your trips using pics from your phone (+ R code)

23/12/2014

0 Comments

 
Picture
Picture
my geotagged pics in 2014 and between december 2011 and april 2015
For  a while I wanted to map my flights and the locations I've spent time in throughout the year, so last night I downloaded my location data, which I thought I was tracking for a long time using a few apps. Unfortunately that was not the case. Turns out most apps were not running in the background, and I forgot to start others after rebooting my phone. 

What to do? There's one thing I always do. Taking pictures. Everywhere. These days most pictures are geotagged, or at least the ones taken using smartphones. I found a couple of tutorials online on how to extract metadata from JPEGs in R and Python, and eventually worked with R since thanks to Nathan Yau and this post, I could make better looking maps. Another helpful post was on timelyportfolio, explaining how to extract exif metadata using  exiftool and R. 

Quickstart

I haven't tested much the code, but if you are lucky, this should be sufficient to make your own map:
  • get the code from github
  • download and install exiftool, which is called by the R script
  • download your pics from your mobile phone (I used Dropbox Camera Uploads)
  • set the path to your pics folder in the R script
  • run the script
The map will be exported as pdf in the same folder you set as path.

Read More
0 Comments

A look at a few months of HR and HRV measurements

21/5/2014

3 Comments

 
I've got only a few months per year where I'm relatively happy with my trainings. That's more or less between december and april, when temperatures in Holland are low (I suffer the heat too much). This year I measured my HR and HRV every morning while preparing for a half marathon, and I finally collected enough data to explore the two main aspects I'm interested in tracking while training:
  • short term physiological changes -> recovery and training load
  • long term physiological changes -> fitness level (VO2max)

As explained in another post, both changes are somehow related to HR and HRV. So let's have a look at what I've got in about three months of measurements.

Hardware & Software

Hardware:
All measurements were taken using either Under Armour's Armour39 or Polar's H7, given the high reliability. I took the measurements right after waking up, while still in bed.

Software:
I used HRV4Training, with the following settings:
  • 1 minute test duration
  • 8 breaths per minute
  • Single test (lying down)
In my experience paced breathing is very important to ensure reliability and repeatability of measurements. While some researchers agree [1], others claim the opposite [2]. Here you can see differences in RR intervals and rMSSD due to paced breathing. The sequence is about 2 minutes of normal breathing, followed by 4 minutes of deep breathing, and again 2 minutes of normal breathing. There's a 2x difference due to respiratory sinus arrhythmia (i.e. HRV due to respiration, clearly shown by the sinusoidal pattern in the middle of the second plot). That's why I stick to paced breathing, trying to keep this component constant.
Picture
Picture
HR & HRV
The only HRV feature I will consider in this analysis is rMSSD, together with average heart rate. There are a lot of reasons why rMSSD should be used instead of other features. Most importantly, its reliability for short duration measurements and the high correlation with training load shown in past research. For more information have a look at Andrew Flatt's and Simon Wegerif's blogs. They are both amazing resources if you are interested in HRV research with focus on training. 

Getting some perspective on my values

Any physiological parameter is very personal and should always be looked at in relation to our own baseline. While your heart rate can be normalized with respect to your age-predicted maximal, the situation is a bit more complicated for HRV, where there is no predefined range or zones. However I did want to get some perspective on my values, compared to what is out there. 

I plotted simulations from my data together with data simulated according to what was reported in literature about rMSSD  values [3,4] (this is another advantage of using this feature, since frequency domain features are computed differently by everyone, and even if HF power is also considered a good proxy to parasympathetic activity, it's almost impossible to compare results published in literature). 
Picture
The distributions are quite wide (published results come from very few subjects, typically in the order of 10). Hopefully soon enough I'll get enough data from HRV4Training to be able to provide better ranges for different populations (age and gender also play a factor here). Anyway for the moment this still shows some meaningful data, since I overlap with the "trained subjects" population, which falls between sedentary and athletes.

Read More
3 Comments

Outsourcing R&D / Under Armour's Armour39 Challenge

14/4/2014

1 Comment

 
Picture
I just came back from a very exciting (and tiring) two days in Baltimore, where I was invited for the final of the Armour39 Challenge. 

It all started in November last year, when Under Armour decided to crowd source their R&D and the future of their Armour 39 platform.

The Armour39 wearable sensor was launched early 2013. Similarly to what UA usually organizes for their Future Show, where last year more than 4000 applicants competed, they crowd sourced software development for this April's Digital Future Show. Given the experience I have with wearable technology and my passion for running, I thought it was a pretty good match, and decided to give it a try. 

The competition

I'm gonna start with the outcome of the competition, followed by my thoughts after the whole thing finished, which are certainly biased by the outcome. Then, I'll cover in detail my submission.
The competition was divided into three phases. We had first to submit a proposal outlining our idea (sometime in November). 50 proposals were selected and moved on to the second phase. At this stage we all received a development kit including the A39 sensor and an SDK to access the non-standard data stream (i.e. everything that is not heart rate). We had between January and March to develop our prototypes, and had to submit a video and report (see below for both of them). Up to 15 projects were selected and moved on to the final phase, consisting of a presentation in Baltimore at the Digital Future Show. Eventually it was only 5 teams reaching the final:
Picture

Read More
1 Comment

Heart Rate Variability using the phone's camera

2/1/2014

22 Comments

 
No doubt the main inconvenience of HRV-based applications is the need for a heart rate monitor. Even when you have one, performing your daily measurement can be a burden (sensor needs to be wet and comfort is clearly an issue). 

Can smartphones come to the rescue? Current generation phones include both a camera and a light emitting diode, which can be used for reflection based bio-optical imaging. 
The technique is called photoplethysmography (PPG for short) and consists in detecting changes in blood volume during a cardiac cycle, by illuminating the skin and measuring changes in light absorption. PPG has become quite a popular non-invasive method for extracting physiological measurements such as heart rate and oxygen saturation. However, most applications today focus simply on heart rate, and it is not clear from literature if HRV features can also be reliably extracted using a phone's camera [1]. 
Picture
Here is the good news: it is indeed possible to achieve good accuracy in HRV measurements using this technique, but the methods needed are slightly more complicated than acquiring a video and computing peak detection on the PPG signal (which is sufficient for heart rate measurement). This post covers the steps involved in the implementation of Camera HRV, the iPhone app I developed to measure HRV using the phone's camera. The algorithms are part of HRV4Training since version 3.2.

Later in 2017, we have also validated these methods and published the results with respect to ECG and Polar straps, showing equivalency. You can find the full paper here.

Overview

1 - Data acquisition from the phone's camera
2 - Filtering & smoothing
3 - Resampling with cubic spline interpolation
4 - Peak detection
5 - Artifact removal and features extraction
6 - Comparison with heart rate monitors (Polar H7)
7 - Tips

Read More
22 Comments

HRV4Training - app details

16/12/2013

15 Comments

 
IMPORTANT: this post is outdated. HRV4Training offers now many more features and a better user experience, please refer to HRV4Training.com for the latest updates. Thanks.


HRV4Training is an app that helps you optimize your goals and prevent overtraining by measuring your Heart Rate and Heart Rate Variability (HRV). I built this app while trying to understand better how I was recovering from my running trainings, since HRV is a proxy to parasympathetic activity and therefore physiological stress (read more here). HRV4Training does not require a heart rate monitor, since it can accurately assess your HRV using the phone's camera.
Picture

Features

  • HRV-based advice helps you to adapt your trainings based on objective measures of recovery 
  • configurable test (single or orthostatic, choose test duration between 1, 3 or 5 minutes) 
  • configurable paced breathing to improve test reliability (choose between 6, 8 and 10 breaths per minute) 
  • extracts and stores the following heart rate variability features while lying down and/or standing: heart rate, mean of beat-to-beat intervals (AVNN), standard deviation of beat-to-beat intervals (SDNN), square root of the mean squared difference of successive R-Rs (rMSSD), number of pairs of successive R-Rs that differ by more than 50 ms (pNN50), low frequency power (LF, 0.04-0.15 Hz), high frequency power (HF, 0.15-0.40 Hz) 
  • works with Bluetooth SMART heart rate monitors (tested with Polar H7, mio alpha and Armour39) or simply your finger (phone camera)
  • shows the PPG signal view to ensure signal quality during the test if the camera is used instead of a Bluetooth SMART sensor 
  • lets you annotate your training days and training intensity to provide more accurate analytics on how your trainings impact your physical condition 
  • HRV4T Fitness Points to provide a single, straightforward metric to analyze your physical condition 
  • weekly and monthly overviews 
  • custom analysis on the relation between trainings and HRV 
  • data export via email or Dropbox 
  • RR-intervals correction
Picture
This post serves as a quick start guide for the app, while more details on HRV features and HRV analysis for fitness can be found in previous posts.

Read More
15 Comments

Heart Rate Variability Logger - app details

12/12/2013

39 Comments

 

Read More
39 Comments

Heart Rate Variability for Training

1/12/2013

6 Comments

 
Picture
This post provides information on Heart Rate Variability (HRV), with focus on usage of HRV features for training. Monitoring physical performance is of major importance in competitive sports. The rationale behind using HRV, is that other indices commonly used (e.g VO2max) cannot be easily and frequently determined [11]. Specifically, HRV analysis can be used to monitor training in two ways, related to short and long term changes in HRV:
  • training load: short-term changes in HRV
  • fitness level: long-term changes in HRV

Overview + Hardware & Software (+data)


Read More
6 Comments
Forward>>

    Marco ALtini

    Founder of HRV4Training, Advisor @Oura , Guest Lecturer @VUamsterdam , Editor @ieeepervasive. PhD Data Science, 2x MSc: Sport Science, Computer Science Engineering. Runner

    Archives

    May 2023
    January 2023
    December 2022
    August 2022
    June 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    January 2020
    November 2019
    October 2019
    May 2019
    April 2019
    March 2019
    November 2018
    October 2018
    April 2018
    March 2018
    June 2017
    December 2016
    July 2016
    March 2016
    September 2015
    August 2015
    May 2015
    March 2015
    February 2015
    January 2015
    December 2014
    May 2014
    April 2014
    January 2014
    December 2013

    RSS Feed

  • Home
  • Research & Publications
  • Apps & Projects
  • Blog
  • Substack