Robust Beat-to-Beat Detection Algorithm for Pulse Rate Variability Analysis from Wrist Photoplethysmography Signals


Heart rate variability (HRV) from electrocardiograms (ECG) is a well-known diagnostic method for the assessment of autonomic nervous function of the heart. A more convenient approach to assess cardiac function is by using photoplethysmography (PPG) waveforms where pulse rate variability (PRV) replaces HRV. However, the unavailability of robust detection algorithms for PPG signals has prevented the medical market from providing clinical diagnosis using PRV and from measuring biological information for wellness purposes, such as sleep stage, stress state, and fatigue.

This article provides a robust peak and onset detection algorithm for beat-to-beat pulse interval analysis using PPG signals. We demonstrate our method through large data collection with the Analog Devices, Inc. (ADI) multisensory watch platform with high coverage, sensitivity, and low root mean square of successive difference (RMSSD) as compared to the beat-to-beat results from ECG signals.


Heart rate (HR) monitoring is a key feature in many existing wearable and clinical devices but a function to measure the continuous heart rate variability using a beat-to-beat pulse interval has not yet been provided with these devices. HRV consists of changes in the time intervals between consecutive heartbeats called interbeat intervals extracted from an electrocardiogram (ECG). 1 HRV contains well-known biometric information that reflects the sympathetic and parasympathetic activities of the autonomic nervous system.2 Researchers have widely used HRV as a tool to support clinical diagnosis and measure biological information for wellness purposes, such as sleep stage, stress state, and fatigue.2, 3 Given the technical requirements of ECG measurements, the signal may not always be available in accident/catastrophe sites, battlefields, or areas where ECG can cause electrical interference.

Pulse rate variability extracted from photoplethysmography signals could be used as an alternative to HRV.5, 6, 7 The PPG signals are obtained by illuminating human skin using an LED and by measuring the intensity changes due to blood flow in the reflected light by a photodiode.

Furthermore, PPG can provide relevant information about the cardiovascular system, such as heart rate, arterial pressure, stiffness index, pulse transit time, pulse wave velocity, cardiac output, arterial compliance, and peripheral resistance.8, 9, 10 However, the performance of PPG-based algorithms can be degraded by poor blood perfusion, ambient light, and, most importantly, motion artifacts (MA). 11 Many signal processing techniques, including the ADI motion rejection and frequency tracking algorithm, have been proposed to remove the MA noise by using a three-axis acceleration sensor placed close to the PPG sensor.

It is important to extract significant points such as systolic peaks, onsets, and dicrotic notches from PPG waveforms accurately for PRV analysis.12 The onset of the PPG waveform is due to the commencement of blood expulsion from the heart to the aorta, while the dicrotic notch is the end of blood ejection or the closure of the aortic valve. The unavailability of robust detection algorithms for PPG signals has, at least partially, prevented researchers from fully conducting PRV analysis using PPG. Some previous work on PRV ignores the fiducial points,13 some reported using manual or empirical detection of the systolic peaks,14 and some are based on nonvalidated time window-based algorithms to obtain the pulse peak.15

This article proposes a robust peak and onset detection algorithm that uses a delineation method originally proposed for arterial blood pressure (ABP) waveforms.16 It is important to note that PPG signals using wrist-worn wearable devices contain many motion artifacts, baseline fluctuations, reflected waves, and other noise that can affect the behavior of detection algorithms.6 Therefore, the data is preprocessed first before feeding it to the beat-to-beat extraction model. The automatic delineator used in this work is a hybrid approach in which different preprocessed signals from raw PPG and the first derivative of the signals are used to extract both the peaks and onsets. We use a large database collected using our ADI watch platform that provides synchronized PPG and ECG signals. In terms of memory footprint, this algorithm is light and can be used as an embedded algorithm in the ADI watch platform. The algorithm is validated and compared with the beat-to-beat results from ECG signals using coverage, sensitivity, positive productivity, and the root mean square of successive difference.17

Beat-to-Beat Algorithm Based on the PPG Morphology

In this section, we explain the details of the proposed beat-to-beat algorithm for wrist PPG signals comprised of (i) preprocessing, and (ii) high resolution beat-to-beat extraction modules. A block diagram of the algorithm is shown in Figure 1.

Figure 1. Flowchart of the proposed beat-to-beat extraction algorithm comprised of (i) preprocessing and (ii) high resolution B2B extraction.


The susceptibility of the PPG signal to poor blood perfusion of the peripheral tissues and motion artifact is well known.18 In order to minimize the influence of these factors in the subsequent phases of the PPG analysis for beat-to-beat estimation, a preprocessing stage is required. This step is comprised of:

  • Framing and windowing
  • Band-pass filtering (0.4 Hz to 4 Hz)
  • Automatic gain control (AGC) to limit the signal level
  • Signal smoothing and baseline wandering removal

The PPG input data is processed using a window of T0 seconds and further blocks are processed by moving the window with mT0 (that is, m = 3/4) overlap. A band-pass filter is then required to remove both high frequency components (such as power sources) of the PPG signals, as well as low frequency components such as changes in capillary density and venous blood volume, temperature variations, and so on. Figure 2a and 2b show a PPG signal before and after filtering. The filter has a cutoff frequency at 0.4 Hz and 4 Hz. The fundamental frequency of the HR ranges between 0.4 Hz to 3 Hz. Therefore, using a range that is a little higher for beatto-beat estimation allows us to include harmonics that emphasize the beat times. Sudden spikes are removed from the filtered signals using a median filter. Then, an AGC module limits the signal level to ±V volts in order to verify the selected peaks by checking the amplitude of the signal at a later stage. The durable PPG measuring process for HRV unavoidably introduces another type of artifact, such as baseline wandering. Consequently, a low-pass finite impulse response (FIR) filter is used to smooth the array of the PPG samples in the frame (shown in Figure 2c), to remove the baseline wandering noise, and to get a smoother signal for the delineation module.

Figure 2. PPG plots.

High Resolution Beat-to-Beat Extraction Module

The beat-to-beat extraction algorithm consists of the following modules:

  • Interpolation
  • Delineation
  • High resolution beat-to-beat extraction
  • Signal quality metric

The output of the preprocessing module is fed to an interpolation block to increase the accuracy of the beat-to-beat extraction algorithm. If a PPG segment from t0 to tτ is given in the first frame with a beat-to-beat interval of b0 and bτ, we linearly interpolate the beat-to-beat interval values using n points between the endpoints and then extract a high resolution beat-to-beat (for example, 1 ms resolution) from b0 and bτ. Next, the delineation module relies on both the signal morphology, as well as rhythmic information to extract the peaks and onsets. Therefore, not only are the systolic peaks needed, but also the onsets and dicrotic notches should be reported for beat-to-beat detection. The proposed delineator is theoretically similar to the one shown in the papers “An Adaptive Delineator for Photoplethysmography Waveforms”12 and “On an Automatic Delineator for Arterial Blood Pressure Waveforms,”16 and it is adapted to the wrist PPG signals by using a pair of inflection and zero-crossing points from the first derivative of the signal. Figure 2d plots both inflection and zero-crossing points for PPG characterization. For the zero-crossing points, the signal is processed with a zero phase distortion filter that minimizes startup and ending transients by matching initial conditions. This is to make sure that the time-domain features are preserved after filtering. Note that the onsets from the derivative of the PPG waveform correspond to zero-crossing points before a maximal inflection, while the systolic peak relates to zero-crossings after that inflection point. The signal quality metric used for this beat-to-beat algorithm is clarity and indicates the extent that a signal has a tone. This metric was originally proposed in the Philip McLeod and Geoff Wyvill article, “A Smarter Way to Find Pitch,”19 where a normalized squared difference function (a form of autocorrelation function) is used for finding the periodicity of the signal. We use this metric to decide when the beat-to-beat algorithm is confident to report the peaks and onsets.

Evaluation Results from the ADI Wrist Platform 

Our PPG beat-to-beat algorithm results are compared to results from the Pan-Tompkins algorithm,20 which is a well-recognized algorithm for ECG peak detection. Data was collected to evaluate our algorithm using the ADI Vital Signs Monitoring (VSM) wrist watch platform. The ADI VSM iOS application was used to interface with the watch over a Bluetooth® connection. The ADI wrist watch includes a PPG sensor used to collect PPG signal from the subject’s wrist. The ECG signal was also collected on the ADI wrist watch. Three ECG electrodes were attached to the subject’s chest area. Wires from these electrodes were connected to the ADI wrist watch where the signals were processed and logged concurrently with the PPG signal. This platform provides synchronized PPG and ECG signals. Figure 3a shows the ADI wrist watch used for data collection while Figure 3b shows the iOS app interface and sample signals obtained from the platform.

Figure 3. ADI platform and tool.

Evaluation Metrics and Results

Before computing the beat-to-beat metrics, it is important to have an outlier removal process that identifies missing/extra peaks in the Pan-Tompkins algorithm outputs and our PPG beat-to-beat algorithm outputs. Ignoring missing/extra peaks causes abnormal beat durations that would lead to inaccurate results. Missing/extra peaks in the ECG signal were identified by looking at the successive beat durations provided by the Pan-Tompkins algorithm. Any ECG peak that changed the beat duration by more than 20% was labeled an outlier. After removing these ECG peaks, missing/extra peaks in the PPG signal were identified by correlating each ECG peak with a peak in the PPG signal. A PPG peak was correlated with an ECG peak if it is within time proximity of the ECG peak. When a PPG peak cannot be identified or too many peaks are identified within the time proximity of an ECG peak, these were identified as outliers. The abnormal beat durations that these missing/extra PPG beats would cause are ignored as outliers during metrics calculations.

A number of metrics are computed using the beat-to-beat values from our proposed algorithm and from the Pan-Tompkins algorithm. These metrics are: (i) coverage (Equation 1); (ii) Sensitivity or Se (Equation 2); (iii) positive predictivity or P+ (Equation 3); and (iv) root mean square of successive differences or RMSSD (Equation 4). Figure 4 presents a visual representation of some of the values used for the metrics calculations.





Figure 4. ECG and PPG signals with IBIs shown and the respective peaks and onsets from the beat-to-beat algorithm on the raw PPG signals.

where TP (true positive) is the number of heart beats correctly identified by the PPG B2B algorithm, FP (false positive) is the number of PPG heart beats that did not correspond to an actual heart beat in the ECG, and FN (false negative) is the number of heart beats that the PPG beat-tobeat algorithm missed. The interbeat interval (IBI) is the time between successive ECG peaks, PPG peaks, or PPG onsets.

In order to evaluate our algorithm, PPG and ECG signals are collected simultaneously for each subject. Data was collected on a large number of subjects of different ages, skin tones, and body types. This was to ensure that our evaluation results would be relevant across all populations. Data is collected on 27 subjects (male and female with different skin tones) each for 2 minutes and 30 seconds. Subjects were asked to stand for the first half and sit for the second half of the time. Table 1 presents the average results of each of the metrics for the beat to beat algorithm. As shown in the table, the coverage, sensitivity, and positive predictivity are all above 83% with the average RMSSD difference below 20 ms for the wrist data as compared to the results from the ECG signals.

Table 1. Beat-to-Beat Metrics Results
Metric Result
Coverage 83%
Sensitivity 87%
Positive Predictivity 98%
Average PPG vs. ECG RM 12 ms

Discussion and Conclusion

A robust peak and onset detection algorithm for PRV analysis from wrist PPG signals was proposed in this article. The algorithm used multiple stages of preprocessing and suggested a hybrid delineation algorithm to detect the fiducial points of wrist PPG signals. The ADI multisensory watch was used as our evaluation platform to test the proposed algorithm. The results showed strong correlations and concordance with respect to the ECG HRV. Future work will focus on applying motion rejection algorithms and on dealing with the missing beats issue in the PRV analysis.



1 H. Posada-Quintero, D. Delisle-Rodríguez, M. Cuadra-Sanz, and R. F. de la Vara-Prieto. “Evaluation of Pulse Rate Variability Obtained by the Pulse Onsets of the Photoplethysmographic Signal.” Physiological Measurement, Vol. 34, No. 2, p. 179, February 2013.

2 Hyun Jae Baek and JaeWook Shin. “Effect of Missing Interbeat Interval Data on Heart Rate Variability Analysis Using Wrist Worn Wearables.” Journal of Medical Systems, Vol. 41, No. 10, p. 147, 2017.

3 Tine Willum Hansen, Jan A. Staessen, Christian Torp-Pedersen, Susanne Rasmussen, Lutgarde Thijs, Hans Ibsen, and Jørgen Jeppesen. “Prognostic Value of Aortic Pulse Wave Velocity as Index of Arterial Stiffness in the General Population.” Circulation, Vol. 113, No. 5, p. 664–670, 2006.

4 Chun-Chieh Hsiao, Fang-Wei Hsu, Ren-Guey Lee, and Robert Lin. “Correlation Analysis of Heart Rate Variability Between PPG and ECG for Wearable Devices in Different Postures.” 2017 IEEE International Conference on Systems, Man, and Cybernetics (SMC).

5 Eduardo Gil, Michele Orini, Raquel Bailon, José María Vergara, Luca Mainardi, and Pablo Laguna. “Photoplethysmography Pulse Rate Variability as a Surrogate Measurement of Heart Rate Variability During Nonstationary Conditions.” Physiological Measurement, Vol. 31, No. 9, p. 1271, 2010.

6 Chiung Cheng Chuang, Jing Jhao Ye, Wan Chu Lin, Kuan Ting Lee, and Yu Ting Tai. “Photoplethysmography Variability as an Alternative Approach to Obtain Heart Rate Variability Information in Chronic Pain Patient.” Journal of Clinical Monitoring and Computing, Vol. 29, No. 6, pp. 801–806, 2015.

7 Sheng Lu, He Zhao, Kihwan Ju, Kunson Shin, Myoungho Lee, Kirk Harry Shelley, and Ki H. Chon. “Can Photoplethysmography Variability Serve as an Alternative Approach to Obtain Heart Rate Variability Information?” Journal of Clinical Monitoring and Computing, Vol. 22, No. 1, p. 23–29, 2008.

8 Justine I. Davies and Allan D. Struthers. “Beyond Blood Pressure: Pulse Wave Analysis–a Better Way of Assessing Cardiovascular Risk?” Future Medicine, 2005.

9 Arthur de Sa Ferreira, José Barbosa Filho, Ivan Cordovil, and Marcio Nogueira de Souza. “Three-Section Transmission-Line Arterial Model for Noninvasive Assessment of Vascular Remodeling in Primary Hypertension.” Biomedical Signal Processing and Control, Vol. 4, No. 1, p. 2–6, January 2009.

10 John Allen. “Photoplethysmography and Its Application in Clinical Physiological Measurement.” Physiological Measurement, Vol. 28, No. 3, p. R1, 2007.

11 Byung S. Kim and Sun Kyung Yoo. “Motion Artifact Reduction In Photoplethysmography Using Independent Component Analysis.” IEEE Transactions on Biomedical Engineering, Vol. 53, No. 3, p. 566–568, April 2006.

12 Mohanalakshmi Soundararajan, Sivasubramanian Arunagiri, and Swarnalatha Alagala. “An Adaptive Delineator for Photoplethysmography Waveforms.” Biomedical Engineering/Biomedizinische Technik, Vol. 61, No. 6, p. 645– 655, January 2016.

13 Bistra Nenova and Ivo Iliev. “An Automated Algorithm for Fast Pulse Wave Detection.” International Journal Bioantomation, Vol. 14, No. 3, p. 203–216, July 2010.

14 Nandakumar Selvaraj, Ashok Kumar Jaryal, Jayashree Santhosh, Kishore K. Deepak, and Sneh Anand. “Assessment of Heart Rate Variability Derived from Fingertip Photoplethysmography as Compared to Electrocardiography.” Journal of Medical Engineering and Technology, Vol. 32, No. 6, pp. 479–484, 2008.

15 Keyne Charlot, Jérémy Cornolo, Julien V. Brugniaux, Jean-Paul Richalet, and Aurélien Pichon. “Interchangeability Between Heart Rate and Photoplethysmography Variabilities During Sympathetic Stimulations.” Physiological Measurement, Vol. 30, No. 12, p. 1357, 2009.

16 Bing Nan Li, Ming Chui Dong, and Mang I. Vai. “On an Automatic Delineator for Arterial Blood Pressure Waveforms.” Biomedical Signal Processing and Control, Vol. 5, No. 1, pp. 76–81, 2010.

17 Gary Berntson, David L. Lozano, and Yun-Ju Chen. “Filter Properties of Root Mean Square Successive Difference (RMSSD) for Heart Rate.” Psychophysiology, Vol. 42, No. 2, p. 246–252, March 2005.

18 Margareta Sandberg, Qiuxia Zhang, Jorma Styf, Björn Gerdle, and Lars-Göran Lindberg. “Noninvasive Monitoring of Muscle Blood Perfusion by Photoplethysmography: Evaluation of a New Application.” Acta Physiologica, Vol. 183, No. 4, pp. 335–343, 2005.

19 Philip McLeod and Geoff Wyvill. “A Smarter Way to Find Pitch.” ICMC, 2005.

20 Jiapu Pan and Willis J. Tompkins. “A Real-Time QRS Detection Algorithm.” IEEE Transactions on Biomedical Engineering, No. 3, p. 230–236, 1985.


Foroohar Foroozan

Foroohar Foroozan

Foroohar Foroozan is a signal processing scientist. Foroohar joined Analog Devices in August, 2015, and leads the Toronto Algorithm Team for vital signs and in-home monitoring systems in the healthcare business unit. She is also collaborating with the ADI imaging team for point-of-care ultrasound imaging systems. Prior to joining ADI, she was a research and development scientist at Geotech Ltd., Canada, working on smart filtering for the next generation of airborne, electromagnetic geophysical survey systems. She was a postdoctoral fellow at Sunnybrook Research Institute, working on 3D, super-resolution ultrasound imaging for brain vascular mapping from 2012 to 2013, with a PCT patent pending. She received her Ph.D. in computer science from Lassonde School of Engineering, York University, Toronto, Canada in 2011. Her area of interest is in signal processing and algorithms in biomedical systems, with a focus on vital signs systems and biomedical imaging. She is a member of the Professional Engineering Society of Ontario (P.Eng.) and a senior member of the IEEE.

Jiang Wu

Dr. Jiang Wu

Dr. Jiang Wu joined Analog Devices in 2006, where he works on real-time embedded systems and digital processing. In 2004, he received a PhD in electrical engineering from the University of Rhode Island. In 1996 and 1993, respectively, he received MS and BS degrees in automation, both from the Beijing Institute of Technology. His graduate research work was on modeling and instrumentation of biomedical systems. Prior to ADI, Jiang worked as a system engineer at Vivoda Communications.