Blood flows when the heart beats
Similarities and differences in measures of cardiac variability derived using photoplethysmography (PPG) and electrocardiography (ECG)
Most sensors these days use a technology called photoplethysmography (PPG) to measure heart rate variability (HRV). For example, phone cameras as used in HRV4Training, or dedicated sensors as present in Oura rings or Garmin watches, all use this technology to capture changes in blood volume during a cardiac cycle, and report HRV.
While we use the term HRV, in this context we should be talking about pulse rate variability (or PRV), as what we are actually measuring are PPG-derived changes in pulse rate, not in heart rate.
We should be talking about HRV only if we do measure changes in heart rhythm (as opposed to pulse rate), but to do that, we need a different type of technology: electrocardiography (ECG). This is the technology used by more cumbersome devices with sticky gel electrodes or patches, or simply chest straps.
The questions I’d like to address in this blog are the following: is HRV the same as PRV? Can we use wearables and phone cameras to track HRV? What are the differences and similarities between these two methods?
Let’s get to it.
A brief history of heart activity measurement
The most common way to measure heart activity is by using electrocardiography, which means we measure the electrical activity of the heart. The very first electrocardiogram (ECG) machine was developed by Willem Einthoven, at the University of Leiden at the beginning of the 20th century.
The principle behind an ECG machine's functionality is pretty simple. With each heartbeat, the heart depolarizes and repolarizes, this process, which is what characterizes the heart muscle’s electrophysiology, results in electrical changes on the skin, which are captured by an ECG machine. In practice, these electrical changes are picked up by amplifying small currents detected using electrodes placed on the body.
Before Einthoven’s time, the electrical activity of the heart could be measured only by placing electrodes directly on the heart, instead of on the skin. Einthoven’s device needed 5 technicians to operate, weighed almost 300 kilograms, and required submerging your arms and a leg in buckets filled with a saline solution, to help conduct the small current that is measured to capture your ECG.
As we all know, technological developments have made huge progress since then, especially as we entered the digital era. Thanks to sensors miniaturization and our ability to pack more and more transistors into tiny integrated circuits where size is measured in nanometers, we can now wear an ECG device without anyone noticing.
Since HRV by definition refers to variability in heart rhythm, an ECG is the only way to measure it.
While ECG is still today the main technology used to monitor cardiac activity (what we call the gold standard), different technologies have been developed to monitor heart activity, somewhat indirectly.
In particular, one technique stand out in terms of ease of use and accuracy in the context of HRV applications; photoplethysmography (PPG).
Let’s try to understand a little better how this alternative works and if it can be as effective as ECG in the context of HRV* analysis.
*I am using somewhat interchangeably here HRV and PRV, but again, when we use PPG, we are actually looking at PRV, or pulse rate variability, and not HRV, or heart rate variability.
Photoplethysmography (PPG)
PPG sensors are becoming more and more widespread because of improvements in sensing technologies. In turn, HRV analysis is receiving interest by a broader public, due to the (obvious, I dare say) usefulness of measuring physiological responses for health and performance.
User comfort and convenience are certainly the big advantages of PPG sensors, with respect to chest straps or other ECG devices. Using just your phone without any external sensor, makes it much easier to collect data consistently. Alternatively, wearables allow you to measure without doing anything, as you sleep. PPG has become quite a popular non-invasive method for extracting physiological measurements such as heart rate and oxygen saturation, as commonly used in hospital settings for example.
How does PPG work? With PPG, we detect changes in blood volume during a cardiac cycle, by illuminating the skin and measuring light absorption or reflection.
As the heart contracts, blood is pushed via your arteries, and this flow of blood can be measured in different ways. For example, an infrared light emitting diode (LED) and relative photodetector could be placed above and below the measurement area, so that the light transmitted would change based on the cardiac cycle phase. This is the typical setup of modern-day pulse oximeters used in hospitals to measure heart rate and oxygen saturation at the fingertip via PPG. This method is called transmission mode as the light is transmitted from the source (e.g. the LED) to the receiver (e.g. the photodetector). An alternative is to use the so-called reflection mode, which could consist of a light and a camera, to capture changes in skin color as blood flows through the measurement area. This is the principle used by some mobile phone apps or video-based systems relying on PPG, such as the HRV4Training app.
To sum up, as blood volume changes during a cardiac cycle, the amount of light that is absorbed or reflected also changes, and these differences are captured by either dedicated sensors or a regular camera. As measurement locations, any area with arteries close to the skin, such as the fingertip or earlobe, is preferable.
A note on exercise heart rate
PPG is also the same technique used by most sports watches that can measure heart rate continuously or while exercising. However, this does not mean that such watches are able to measure beat to beat intervals - and therefore HRV - accurately (we should really be saying peak to peak intervals, and PRV, here).
A technology such as PPG, potentially able to capture reliably beat to beat differences and HRV, can be used in different ways depending on the data processing pipeline and target application. For example, most sport watches whose target application is to provide reliable heart rate while exercising, hence when much movement is present, deploy algorithms with heavy filtering (which is key to provide a more accurate heart rate measurement), but artificially reduce beat to beat differences making the resulting signal unusable for HRV analysis.
Always keep in mind that the same technology can be used in different ways, and not all PPG is equal. If a PPG sensor is developed for PRV (HRV) analysis, it is not the same as a PPG sensor developed to simply measure heart rate or heart rate during exercise. In this blog, the assumption is that we are looking at PPG sensors developed for HRV (PRV) analysis.
The link
As the title of this post says, blood is flowing when the heart is beating. Hence, the two measures of variability (HRV and PRV) are of course tightly coupled.
As we get into the nuances of the differences between ECG and PPG, and figure out what we can use PPG for, we always need to remember that the PPG signal is there mainly because the heart is beating. Hence, by definition, it carries a lot of the same information that we can find in ECG, when it comes to heart rate and its variability.
Heart and pulse rate variability
Below you can see a few minutes of ECG data, in which I have marked the R peaks. The R peak is the part of the QRS complex associated with the onset of the ventricular contraction. Typically, we collect 1-5 minutes of data, compute the time differences between R peaks, which we call RR intervals, and then compute HRV features from these RR intervals.
Now let’s look at PPG.
Here we have about a minute of data, and this time, I have marked the peaks of the PPG signal. Similarly to what we do with ECG data and RR intervals, we can compute peak to peak time differences, and then use these PP intervals to compute PRV features.
Now the question is, are these HRV and PRV features the same?
Differences between HRV and PRV
As you might imagine, the answer is: it depends.
In particular, there are two important aspects to consider in terms of potential differences between HRV and PRV: the technology, and the physiology. Let’s evaluate them.
Technology
Normally, when looking at an ECG, it is fairly easy to determine where the peak is. There are many different algorithms that automate peak detection for an ECG, and some are better than others, but when looking at the data, there is little doubt on when the peak occurs.
With PPG, things are less straghtforward. For example, we can see from the figures above that the signal is smoother and there might be a less obvious peak. This “smoothness” might introduce a little error when trying to determine the exact timing of a peak. Additionally, many different methods have been proposed to capture peaks and peak to peak differences with somewhat inconsistent results.
The quality of the data and signal processing pipeline used will also be very important. For example, at least 25 Hz are normally recommended to make sure PPG data can be used for HRV analysis. This is in contrast with the 256 o 512 Hz required for ECG. Detractors of the use of PPG will resort to this as one of their talking points, failing to understand that the shape of the two signals are dramatically different, and the smoothness of the PPG signals plays in its favor, i.e. the same information can potentially be captured with a much lower sampling rate (we will see later how the data backs this statement). Additionally, interpolation techniques can be used to upsample the signal, and improve accuracy in the context of HRV analysis, if needed.
For clarity, in HRV4Training we use a 30 Hz signal and upsample it to 180 Hz using a cubic spline interpolation, resulting in a perfect match with ECG, for resting measurements in healthy individuals. The entire signal processing pipeline is something I had described on my website almost a decade ago, and includes the following steps:
Data acquisition from the phone's camera
Filtering & smoothing
Resampling with cubic spline interpolation
Peak detection
Artifact removal and features extraction
If you are not doing a geat job at any of these steps, then the analysis and comparison of the difference between PRV and HRV is irrelevant. I want to stress this point because I suspect many of the scientists writing papers about this, and finding odd results, are making mistakes in one of the steps above, more than discovering actual inconsistencies. On the other hand, it seems many companies figured this out quite well, given the results found when comparing currently commercially available wearable sensors to ECG, in terms of HRV analysis.
To sum up, technology matters, both in terms of the quality of the sensors used, and the signal processing pipeline implemented to go from raw PPG to PRV features. Given the work I have been doing, to me there is little doubt that when a PPG sensor “doesn’t work”, it is almost certainly due to faulty hardware or suboptimal software.
From what I mentioned so far, it is quite clear that I do believe PRV can be used to estimate HRV with a high degree of accuracy. However, this is not always the case, and regardless of how good the technology is, there are situations in which PRV might not be as good or as close to HRV. And for this, we need to turn to the physiology.
Physiology
We are measuring beat to beat variability in heart activity, and we are measuring pulse rate variability at a location such as the finger or the wrist. What happens in between your heart beating and blood flowing to e.g. the finger? What factors might influence peak to peak differences in a way that they are not representative of beat to beat differences anymore?
A clear candidate here is blood pressure, and everything that impacts it (e.g. arterial stiffness). If we have changes in blood pressure, which cause changes in pulse transit time (the time it takes for blood to reach your finger for example), then this could in turn impact peak to peak intervals and therefore make PRV differ from HRV.
Indeed, research on critically ill patients has shown that PRV might be impacted more than HRV by changes in blood pressure, despite these changes being consistent between PRV and HRV. Differences in arterial stiffness and local vasculature are also possible explanations for the variation in PRV when measured at different sites (I will address this further later in the practical considerations section). Other changes could also be due to respiration and mechanical modulation, as highlighted by studies in children and elderly patients with pacemakers. In this case, PRV showed larger influence of breathing, with respect to HRV. However, when looking at critically ill patients with an rMSSD of 5 ms (i.e. almost no variability), a large correlation between PRV and HRV was still reported (~0.8), which shows that even when variability is really low, most of it comes from HRV, not differences in pulse rate variability or blood pressure.
Note that none of these studies actually looked at how the data is used in real life: monitoring relative changes over days, as opposed to comparing groups or measuring the same individual once and looking only at absolute values of HRV and PRV.
In real life, when measuring longitudinally, we are looking at high frequency changes in peak to peak or beat to beat data, over a period of a minute or a few more. Hence, only if we were to have changes in e.g. arterial stiffness at this high frequency, we would find a mismatch between relative changes in PRV and HRV. This would likely be the case in situations such as post-exercise, when homeostasis is disrupted, and the body is quickly re-normalizing from a large stressor. However, this is likely not the case for resting measurements taken under conditions of normal breathing, as I will show in the next section.
Can we use PRV as a surrogate of HRV?
From all that I have discussed so far, it follows that we can use PRV as a surrogate of HRV, under certain circumstances. We need to make sure we are using good technology and a state of the art signal processing pipeline. And we need to make sure we are not messing with the physiology: we are measuring at rest, and possibly in healthy individuals. I am saying possibly because there is no good longitudinal data showing that PRV changes over time are not equivalent to HRV changes in different patients populations, despite absolute differences between PRV and HRV, mostly due to a lower HRV. Hence, it could very well work in people other than healthy individuals.
And indeed, this is also what the research has shown, especially for the parameters we are interested in, such as rMSSD. In my own research and work, I’ve shown countless times the relationship between PPG-derived and ECG-derived HRV, for resting measurements.
We can in fact look at the data at each step of the way:
Raw PPG and ECG with detected peaks and beats
PP and RR intervals over time
PRV and HRV features
Below is a figure in which I put together a minute of PPG and a minute of ECG from a participant of our validation study. We can see almost perfect agreement between the detected peaks:
We can then compute differences in consecutive peaks and beats, and plot them over time, a procedure that allows us to see how instantaneous heart rate (and pulse) change in relation to breathing.
The figure below comes from our validation of HRV4Training, published in the International Journal of Sports Physiology and Performance, showing almost perfect overlap between ECG, Polar straps and a phone camera:
Finally, as a third step, we can take the PRV and HRV computed from the series of PP and RR intervals plotted above, and compute our feature of interest: rMSSD. When doing so, we can see again almost perfect correlation:
I am of course not the only one that has developed decent technology to measure PRV and there are many other similar analysis out there.
For example, in this paper, a correlation of 0.95 was reported for rMSSD, similar to what we have shown in our work. In this other paper, a correlation of 0.99 was reported. Almost perfect correlations were reported in yet another study (r = 0.93).
Finally, another study showed a perfect correlation at rest, but not during a stress test. This is in line with what I discussed above in the physiology section, as only during measurements taken at rest (e.g. in the morning or the night) we can assume PRV is equivalent to HRV. In our (unpublished) data, we have also seen the same, with greater differences in PRV and HRV after exercise, but not at rest. This is why I would recommend using a chest strap and the HRV Logger for HRV measurements taken before and after exercise, as I discuss here.
Everything reported above looks at absolute values. While it is nice to see that we have great agreement between HRV and PRV even in terms of absolute values, at least under certain circumstances (i.e. measurements taken at rest), in practice, this level of agreement is not even necessary. What do I mean by this?
It is unfortunate that in research, real-life scenarios are hardly ever tested. For example, even if we do have a small difference between HRV and PRV (even though this was not really present in our validation nor in many others, highlighting how the two can in fact be the exact same), we should keep in mind that this difference is likely an absolute offset. An absolute offset stays the same when measuring at rest, and it becomes irrelevant in the context of how the data is used: to assess relative changes over time.
I would advise anyone looking at PRV and HRV to do at least what I’ve been doing for my own comparisons, which is to collect longitudinal data with various devices (an ECG reference and three wearables are shown below, one at the finger, one on the arm, and one at the wrist). We can see quite clearly in the figure below that the same data is captured by all devices, using either ECG or PPG. We can see similar suppressions, similar trends in the baseline (blue line), and similar normal ranges, despite the different measurement modalities and sensors locations.
Looking at the data below, it is fairly obvious that we don’t need to wear an ECG all night, but we can rely on an optical measurement taken using a wearable sensor.
This is the beauty of this metric: there is no frame of reference, and therefore minor differences in absolute values become irrelevant in applied settings. Only how HRV or PRV changes over time for you, with respect to your own frame of reference (normal values), matters.
A note on artifacts and signal quality
Once again, context is key. Everything I have discussed so far is only relevant in the context of resting measurements as otherwise, PPG data is unreliable since the signal gets disrupted very easily. See this blog for an example of how inaccurate wearable-derived HRV is even when just typing on your laptop (i.e. when small muscle contractions are present). PPG can only be used for spot-check measurements or during periods of the night in which no movement is present. Additionally, proper artifact removal needs to be present, and ideally, signal quality should be reported, as we do in HRV4Training. Otherwise, it can be difficult to understand when the data can be trusted.
Other applications
The application of interest here is quantifying physiological stress at rest. This is so far the one application in which PRV and HRV can be considered equivalent, at least in healthy individuals. Continuous HRV measurement, measurements during deep breathing, or after exercise, might result in a larger discrepancy between HRV and PRV. I would also add a word of caution though for people that have particularly low HRV: given that there can be differences, these differences might be greater in relative terms if HRV is particularly low. In this case, relative changes might also be less meaningful (I am speculating here, but if anything, this could be a case in which I would maybe measure with a strap as well and see if relative changes are consistent).
Wrap up
In the past 15 years, I have developed technology for HRV analysis based on both ECG and PPG, and compared countless measurements.
Only recently however, I went deeper into the literature, to better understand some of the nuances. In particular, it is important to realize that in not all situations PRV can be used as a measurement of HRV. For example, during or after exercise the differences might be larger. This is likely due to changes in blood pressure, as I tried to cover in the physiology section.
At the end of the day, it is certainly true that PRV and HRV are not the same thing.
However, it is also true that under the conditions in which PRV is mostly used today (i.e. resting measurements), we can consider it a very accurate surrogate of HRV (in fact, the exact same in most circumstances).
If you are looking at PRV and HRV, make sure to collect longitudinal data, and analyze relative changes over time, which is how the data is used in real life by users of these technologies.
I hope this was informative, and thank you for reading!
Marco holds a PhD cum laude in applied machine learning, a M.Sc. cum laude in computer science engineering, and a M.Sc. cum laude in human movement sciences and high-performance coaching.
He has published more than 50 papers and patents at the intersection between physiology, health, technology, and human performance.
He is co-founder of HRV4Training, advisor at Oura, guest lecturer at VU Amsterdam, and editor for IEEE Pervasive Computing Magazine. He loves running.
Twitter: @altini_marco
Fascinating stuff, brilliantly analysed and written. I'm using the PRV (!) on a Garmin Fenix 6. I seem to get a dip after a hard training day and also after a hard alcohol day. I currently have a virus, so not feeling great nor training much. The tech doesn't actually 'know' about the virus and therefore lacks some input. I'm not using your app, Marco...maybe you address these confounding factors?
It was a fantastic read Marco!