Research on Algorithm of Extracting PPG Signal for Detecting Atrial Fibrillation based on Probability Density Function

Research on Algorithm of Extracting PPG Signal for Detecting Atrial Fibrillation based on Probability Density Function

The Open Biomedical Engineering Journal 31 Aug 2015 RETRACTED ARTICLE DOI: 10.2174/1874120701509010179


The paper introduced a new method based on probability density function (PDF) and phase space diagram method for photoplethysmography (PPG) signal extracting. In the paper, PPG information was generated from human fingertips by smartphones. The pulse wave period was then separated and reconstructed into probability density function (PDF) by the phase space diagram algorithm. The difference between normal sinus rhythm (NSR) and atrial fibrillation (AF) was finally found by skewness of the PDF. The results of the present study demonstrates that the new method is vividly viable for detecting AF on the smartphone.

Keywords: Atrial fibrillation, Probability density function, PPG, Skewness.


Atrial fibrillation (AF) is one of the most common sustained arrhythmias in adults, and its occurrence increases with age. The incidence rate is estimated to be 5% for people over 60 years old, and 10% for people over 80 years old [1]. Moreover, the AF increases the mortality rate and risk of stroke [2]. Several risk factors for AF include myocardial infarction or congestive heart failure [3, 4].

At present, AF detection mainly relies on professional hospital equipment [5].

However, the long time in ECG detection of AF in ambulatory condition remains a high cost.

Therefore, there is a great need for developing new monitoring technologies that are easy to use. The paper introduced a signal detection method by using the built-in smart phone camera. The signal was recorded by placing a finger over the camera. The pulse wave was extracted by the PPG method which counted with changing of the color of image due to changing of fingertips blood volume [6, 7]. Pulsatile signal of about 3 minutes was collected for further analysis.

In this paper, the processed PPG signal was analyzed by PDF and phase space reconstruction. AF information was then detected by skewness coefficient. The results showed that the new method was practicable and could be applied to smartphones for users.


2.1. Extracting PPG Information

Previous studies have shown that PPG Information can be found by the smart phone`s camera. The method relies on fingertips images captured from the built-in smart phone camera. The pixel values in red channel can be calculated from the images.

In the paper, YUV420SP model was selected for previewing video [8], and was changed to RGB color model for extracting and calculating inter-pulse period.

Some experiments verified the red channel of RGB color model could accurately reflect PPG signals [9]. Thus, the red channel information was isolated as the inter-pulse period. Meanwhile, the adjacent pulse beat time could be found by adjacent pulse wave peaks.

Two peaks of PPG signals were then calculated as heart rate. Correctness of this method [10] was verified by comparing the calculated heart rate to the one obtained from standard pulse measuring instrument.

2.2. Phase Space Reconstruction

In prior work, phase space reconstruction was introduced into the kinetic [11]. With the phase space reconstruction, chaotic time series can be reconstructed to nonlinear dynamical system [12].

It is common knowledge that pulse waves contain copious information of human body, including waveform, amplitude, and velocity. These information can reflect many characteristics of the human cardiovascular system [13-15]. Inter-pulse period is one of the considerable measures of the pulse wave. According to Takens’ embed principles, the inter-pulse period is applied to reconstruct phase space, while system dynamics remain unchanged. Assuming x(n),n=1,2,…N is the adjacent peaks time of the PPG signal, the m-dimensional vector can be constructed as

y(n)=(x(n),x(n+t),…x(n+(m-1)t)) (1)

In formula (1), m is embedded dimension, t is delay time. Phase space reconstruction y(n) of five-dimensional vector can be obtained by constructing x(n).

2.3. Probability Density Function (PDF)

Correlation function f(m,t,r) is constructed to calculate the probability for any two points whose distance in the phase space is less than r.

f(m,t,r) can be written as

Symbol is the Euclidean distance.Let the Unit step function be h:

The PDF can be obtained by the following formula:

2.4. Gaussian Fit

In this paper, PDF p was filtered, and Gaussian fit was then used for fitting function p. AF and normal sinus rhythm (NSR) could be separated based on Skewness of the fitting results.


3.1. Data Collection

In the paper, pulse data were collected by smart phone camera from fingertip information. The pulse data detection was compared with the standard ECG instrument simultaneously to ensure the accuracy of the extracted inter-pulse. Fig. (1) shows the results of PPG waveform and ECG waveform.

Fig. (1).

Compare ECG and PPG waveform.

Fig. (2).

PDF in 5-dimensional.

Fig. (3).

PDF curve of NSR after filtering.

Fig. (4).

PDF curve of AF after filtering.

Fig. (5).

Curve after fitting.

Fig. (6).

PDF curve after filtering for data from MIT-BIH Fibrillation Database.

Fig. (7).

PDF curve after fitting for data from MIT-BIH Fibrillation Database.

Fig. (8).

P-P plot of normal distribution.

Fig. (9).

P-P plot of lognormal distribution.

Table 1.

ECG and PPG comparative results.

No. ECG-RR time(ms) PPG inter-pulse time(ms) Relative error
1 762.4 824 0.0808
2 772.4 763 0.0122
3 787.5 757 0.0387
4 822.6 788 0.0421
5 807.5 820 0.0155
6 772.4 834 0.0798
7 737.3 774 0.0498
8 727.2 688 0.0539
9 742.3 746 0.0050
10 722.2 763 0.0565
Table 2.

Skewness of collected in experiment.

No Skewness of NSR in experiment Skewness of AF in experiment
1 2.332 0.753
2 2.101 0.880
3 2.087 0.426
4 2.332 0.638
5 2.297 0.831
6 1.831 0.874
7 2.749 0.836
8 2.074 0.927
9 2.813 0.858
10 1.743 0.650
11 2.043 0.589
Table 3.

Skewness of MIT-BIH.

No Skewness of NSR from MIT-BIH Skewness of AF from MIT-BIH
1 1.736 0.980
2 1.454 0.318
3 1.841 0.287
4 1.590 0.479
5 2.497 0.768
6 2.548 0.887
7 1.702 0.693
8 2.079 0.595
9 1.999 0.663
10 1.702 0.557

Table 1 shows one of the detecting information. The results of experiments proved that the accuracy of calculating inter-pulse time from collecting human pulse data by smart phones was more than 95%, and the average relative error was 0.0411.

Our study included 25 people of NSR in the University of Shanghai for Science and Technology, and 6 patients with persistent AF from community hospital.

It was found that the more human pulse data were collected, the easier it was to distinguish AF from NSR. Meanwhile, the more human pulse data were collected, the longer detecting time was needed. Considering these two factors, we collected 350 human pulse data in every experiment to ensure experiment accuracy while shortening the detection time.

3.2. PDF Distribution

We reconstructed different delay of the pulse data extracted in 5-dimensional based on the phase space reconstruction and PDF function, and then, we constructed the PDF by distance value of each data. Results are visually summarized in Fig. (2).

3.3. Filtering Result

In order to conveniently fit curve and ensure minimum loss of image information, the linear filter was used to make the curve more smooth as shown in Fig. (3).

It is obvious that PDF of NSR resembles lognormal distribution, while PDF of AF resembles normal distribution instead after filtering, as shown in Fig. (3) and Fig. (4).

In Fig. (4), the characteristic differences among different delay times were not very obvious in 5-dimension, and therefore, delay time t=1 was used for the next research.

With computer-aided technology [16], Gaussian curve fitting was used for the PDF curve with delay time t=1. As Fig. (5) shows, the fitting R-squared values are more than 0.95. The curve of NSR is shown as Fig. (5-1), and AF is shown as Fig. (5-2).

3.4. Comparison of Standard AF

To verify presented method ulteriorly, ECG signals taken from MITBIH database containing AF episodes were tested. The number of each AF segment data was selected as 350.

PDF curve was reconstructed from the AF segment data by phase space following the formula (2). The curve was then filtered by Gaussian fitting. Fig. (6) shows the filtering PDF curve.

Meanwhile, the curve with delay t=1 was fitted by Gaussian fitting. Fig. (7) was generated by plotting the time of delay t=1.

The new method was carried out exploiting the same number of date from MIT-BIH Fibrillation Database. Comparing Fig. (7) with PDF curve of AF in Fig. (5-2), it was obvious that they were all close to normal distribution.

3.5. P-P Plot

For evaluation of new method quality, the statistical regular pattern of PDF curve after fitting was analyzed by the P-P plot of NSR and AF normal distribution [17, 18].

Fig. (8-1) show the NSR P-P plots of normal distribution, and Fig. (8-2) show the AF P-P plots of normal distribution.

Fig. (9-1) show the NSR P-P plots of lognormal distribution, and Fig. (9-2) show the AF P-P plots of AF P-P plot.

It could be seen that results of NSR were more close to lognormal distribution and results of AF were more close to normal distribution.

Comparing with Zhang ChangLin, Fritz-Albert Popp’s study of human skin surface conductance measurement [19], we have obtained similar results. Their study found when a person was in a state of physiological disorders, skin surface conductance values were no longer close to lognormal distribution, but closer to normal distribution instead. This phenomenon was statistical self-similarity and was correspond with self-similar nested structure.

3.6. Skewness Analysis

As demonstrated in Fig. (8) and Fig. (9), PDF curves were close to normal distribution or lognormal distribution. Therefore, AF could be distinguished from NSR by the eigenvalues of normal distribution. The skewness of lognormal distribution was chosen to distinguish the curves [20, 21].

As shown in Tables 2 and 3, the skewness of data collected both from smart phones in experiment and MIT-BIH Fibrillation Database were calculated.

Results were visually presented in Tables 2 and 3. Skewness of AF data collected in experiment and MIT-BIH Fibrillation Database were all in range 0 to 1. Meanwhile, the skewness of NSR data were all out of range 0 to 1. Therefore, the skewness could be used to distinguish NSR and AF.


This paper described a new method for analysis of AF and NSR information.

We have collected color information from human fingerprints, so that we can extract pulse wave interval time from isolated red channel. We have reconstructed phase space of the data which is formed into PDF curve with the pulse wave interval time. Here, the PDF curve was processed by Gaussian fitting where the dimension=5 with delay t=1.

Moreover, the data of AF extracted from MIT-BIH Fibrillation Database has been chosen for verification. To conclude, obtained results showed that skewness between AF PDF curve and NSR PDF curve are significantly different.

Based on these preliminary observations, we believe the proposed technology has the potential to improve the prevention and monitoring of AF patients and it can be easily applied on a smartphone.

This study confirmed the PDF curve with the pulse wave interval time of a person in a physiological disorder state is no longer close to lognormal distribution, but closer to normal distribution instead.

Comparing to Zhang ChangLin and Friz-Albert Popp's study of human skin surface conductance measurement, our results also shows a statistical self-similarity phenomenon, and is correspond with self-similar nested structure.

We believe that the conclusion is suitable in other human study area.


The authors confirm that this article content has no conflict of interest.


We would like to thank the MIT-BIH Atrial Fibrillation database for the data used and the Biomedical Signal Processing Laboratory for the automatic R–R intervals detection algorithm. We also thank the anonymous reviewers for helpful advice.


G. Pagana, L. Galleani, S. Gross, M.R. Roch, E. Pastore, M. Poggio, and G. Quaranta, "Time-frequency analysis of the endocavitarian signal in paroxysmal atrial fibrillation", IEEE Trans. Biomed. Eng, vol. 59, no. 10, pp. 2838-2844, 2012.[CrossRef Link] [PubMed Link]
G.W. Botteron, and J.M. Smith, "A technique for measurement of the extent of spatial organization of atrial activation during atrial fibrillation in the intact human heart", IEEE Trans. Biomed. Eng, vol. 42, no. 6, pp. 579-586, 1995.[CrossRef Link] [PubMed Link]
K.J. Brunner, T.J. Bunch, C.M. Mullin, H.T. May, T.L. Bair, D.W. Elliot, J.L. Anderson, and S. Mahapatra, "Clinical predictors of risk for atrial fibrillation: implications for diagnosis and monitoring", Mayo Clin. Proc, vol. 89, no. 11, pp. 1498-1505, 2014.[CrossRef Link] [PubMed Link]
P. Dillon, and H. Ghanbari, "Diagnostic evaluation and follow-up of patients with atrial fibrillation", Cardiol. Clin, vol. 32, no. 4, pp. 507-519, 2014.[CrossRef Link] [PubMed Link]
H. Pürerfellner, E. Pokushalov, S. Sarkar, J. Koehler, R. Zhou, L. Urban, and G. Hindricks, "P-wave evidence as a method for improving algorithm to detect atrial fibrillation in insertable cardiac monitors", Heart Rhythm, vol. 11, no. 9, pp. 1575-1583, 2014.[CrossRef Link] [PubMed Link]
M.C. Sun, and P.J. Hsiao, "In-hospital case management to increase anticoagulation therapy for stroke patients with atrial fibrillation: a hospital-based registry", J. Formos. Med. Assoc, vol. 112, no. 5, pp. 263-268, 2013.[CrossRef Link] [PubMed Link]
G. Di Pasquale, G. Mathieu, A.P. Maggioni, G. Fabbri, D. Lucci, G. Vescovo, S. Pirelli, F. Chiarella, M. Scherillo, M.M. Gulizia, G. Gussoni, F. Colombo, D. Panuccio, C. Nozzoli, and M.Z. Berisso, "Current presentation and management of 7148 patients with atrial fibrillation in cardiology and internal medicine hospital centers: the ATA AF study", Int. J. Cardiol, vol. 167, no. 6, pp. 2895-2903, 2013.[CrossRef Link] [PubMed Link]
X. Li, "Image processing at your fingertips: the new horizon of mobile imaging", Academic Press Library in Signal Processing: Image, Video Processing and Analysis, Hardware, Audio, Acoustic and Speech Processing, vol. 4, pp. 249-246, 2013.[CrossRef Link]
D.D. McManus, J. Lee, O. Maitas, N. Esa, R. Pidikiti, A. Carlucci, J. Harrington, E. Mick, and K.H. Chon, "A novel application for the detection of an irregular pulse using an iPhone 4S in patients with atrial fibrillation", Heart Rhythm, vol. 10, no. 3, pp. 315-319, 2013.[CrossRef Link] [PubMed Link]
P. Wackel, L. Beerman, L. West, and G. Arora, "Tachycardia detection using smartphone applications in pediatric patients", J. Pediatr, vol. 164, no. 5, pp. 1133-1135, 2014.[CrossRef Link] [PubMed Link]
R. Yalon, and M. Porat, "Color image coding using regional correlation of primary colors", Image Vis. Comput, vol. 25, no. 5, pp. 637-651, 2007.[CrossRef Link]
J. Li, B. Dunmire, K.W. Beach, and D.F. Leotta, "A reflectance model for non-contact mapping of venous oxygen saturation using a CCD camera", Opt. Commun, vol. 308, pp. 78-84, 2013.[CrossRef Link]
P. Xu, "Differential phase space reconstructed for chaotic time series", Appl. Math. Model, vol. 33, no. 2, pp. 999-1013, 2009.[CrossRef Link]
L. Hong-Wei, S. Ying, L. Min, L. Pi-Ding, and Z. Zheng, "A probability density function method for detecting atrial fibrillation using R-R intervals", Med. Eng. Phys, vol. 31, no. 1, pp. 116-123, 2009.[CrossRef Link] [PubMed Link]
A.C. Lin, Y.C. Su, H.N. Huang, and Y.W. Huang, “Conceptual design of a multi-functional sphygmus detection system,” In: Engineering in Medicine and Biology Society, IEMBS'04. 26th Annual International Conference of the IEEE. vol. 1, IEEE,, 2004.[CrossRef Link]
J. Dragan, and R. Scitovski, "Least squares fitting Gaussian type curve", Appl. Math. Comput, vol. 167, no. 1, pp. 286-298, 2005.[CrossRef Link]
J. Adriana, and B.G. Ivanoff, "Multidimensional p–p plots and precedence tests for point processes on ℜd", J. Multivariate Anal, vol. 115, pp. 122-137, 2013.[CrossRef Link]
J. Beirlant, Stat. Probab. Lett, vol. 9, no. 3, pp. 241-251, 1990.[CrossRef Link]
C.L. Zhang, and F.A. Popp, "Log-normal distribution of physiological parameters and the coherence of biological systems", Med. Hypotheses, vol. 43, no. 1, pp. 11-16, 1994.[CrossRef Link] [PubMed Link]
P.K. Narayan, and H.A. Ahmed, "Importance of skewness in decision making: evidence from the Indian stock exchange", Glob. Finance J, vol. 25, no. 3, pp. 260-269, 2014.[CrossRef Link]
J. Ruiz-Castillo, and R. Costas, "The skewness of scientific productivity", J. Informetrics, vol. 8, no. 4, pp. 917-934, 2014.[CrossRef Link]