Portable Sensor System for Registration, Processing and Mathematical Analysis of PPG Signals

: This article introduces an integrated photoplethysmographic (PPG) based cardiovascular monitoring system that consists of an individually portable PPG device for recording photoplethysmographic signals and a software system with a serverless architecture for processing, storing, and analyzing the obtained signals. The portable device uses the optical plethysmography technique for measuring blood volume in blood vessels. The device was tested and validated by a comparative analysis of three photoplethysmographic signals and one Electrocardiographic signal registered simultaneously in the target subject. The comparative analysis of these signals shows insignificant deviations in the obtained results, with the mean squared error between the studied signals being less than 21 ms. This deviation cannot affect the results that were obtained from the analysis of the interval series tested. Based on this result, we assume that the detected signals with the proposed device are realistic. The designed software system processes the registered data, performs preprocessing, determines the pulse rate variability, and performs mathematical analysis of PP intervals. Two groups of subjects were studied: 42 patients with arrhythmia and 40 healthy controls. Mathematical methods for data analysis in time and frequency domain and nonlinear methods (Poincaré plots, Rescaled Range Plot, Detrended Fluctuation Analysis, and MultiFractal Detrended Fluctuation Analysis) are applied. The obtained results are presented in tabular form and some of them in graphical form. The parameters studied in the time and frequency domain, as well as with the nonlinear methods, have statistical significance ( p < 0.05) and they can distinguish between the two studied groups. Visual analysis of PP intervals, based on Poincare’s nonlinear method, provides important information on the physiological status of patients, allowing for one to see at a glance the entire PP interval series and quickly detect cardiovascular disorders, if any. The photoplethysmographic data of healthy individuals and patients diagnosed with arrhythmia were recorded, processed, and examined through the system under the guidance of a cardiologist. The results were analyzed and it was concluded that this system could serve to monitor patients with cardiovascular diseases and, when the condition worsens, a signal could be generated and sent to the hospital for undertaking immediate measures to stabilize patient’s health. values in the range (0.5, 1.0). The Hurst exponent values of the arrhythmia patient


Introduction
The prevention of cardiovascular diseases and their early detection is one of the main areas of modern cardiology [1,2]. Usually, studies in hospitals and clinics are done after the disease has already occurred. One way to prevent and reduce the risk of cardiovascular disease is to use portable devices designed to detect changes in blood volume in the blood vessels based on the photoplethysmographic method. The non-invasive photoplethysmographic (PPG) method is an effective way to study heart rate and cardiovascular disease, monitor respiratory rate, blood oxygen saturation, autonomic functions, and tissue perfusion [3]. Through the PPG method, assessments can be made of the aging processes of the vascular system, the monitoring of hypertension, atherosclerosis, early screening, and assessment of arterial stiffness and elasticity [4].
Portable PPG devices must work reliably under the conditions of free movement activity and allow them to be used for a long time. The amount and quality of diagnostic information obtained with these devices must be sufficient to form a conclusion regarding the condition of the cardiovascular system and its modification. PPG-based medical systems should be cheap and easy to use, enable reliable processing of retrieved biomedical signals, and the rapid transfer of processed data and the results of mathematical analysis.
The portable PPG devices used in the diagnosis of cardiovascular disease are among the most sought after medical devices. These devices are an alternative to electrocardiographic (ECG) devices and they are used in several applications, such as modern, non-invasive, convenient, and inexpensive equipment.
The assessment of the physiological parameters of the human body based on photoplethysmographic signals that were recorded by portable PPG devices is an up-to-date scientific task. Applying innovations in this area will lead to the widespread use of these types of devices to reduce cardiovascular mortality. According to a study [5,6], the use of the parameters that were determined in the mathematical analysis of PPG data for the diagnosis and prevention of cardiovascular disease is an unresolved problem.
As is well known, PPG and electrocardiographic (ECG) signals today are regarded as nonlinear and non-stationary processes that have periodic and chaotic components. At the end of the 20th century, based on the ideas of the Nobel laureate Ilia Prigozhin, M. Shaldach suggested that the heart be considered as an open, non-linear, and nonequilibrium system [7]. He identifies it as the first major task facing scientists, physiologists, and physicians, the pooling of their efforts, and knowledge in the search for new ways to solve a number of clinical problems, thus to help a large number of patients with cardiovascular diseases. The existing nonlinearities in the heart's regulating systems determine the chaotic nature of the heart rhythm, with each PP (RR) interval (PP and RR are the intervals between successive heartbeats) different from the rest, as they are unique [8]. The reason for the appearance of randomness in the photoplethysmograms (electrocardiograms) is related to the randomness of the processes that takes place in the heart. Therefore, it is appropriate to use nonlinear dynamics methods, such as fractal and multifractal methods for evaluating the information characteristics of the internal organization of PPG signals [9]. Processes with fractal characteristics have the following properties: fractal dimension and self-similarity. The fractal dimension (D) is determined by the following formula: D = 2 − H, where H is a Hurst exponent [10]. The formula shows that the Hurst exponent is one of the key indicators characterizing fractal signals. In the physical sense, this parameter characterizes the degree of self-similarity, as well as the complexity of the dynamics and the correlation function of the investigated signal. The signal is self-similar if it can be decomposed into smaller parts, each of which is similar to the main signal. For example, when heart rate is recorded at different time intervals (minutes, hours, days), rapid signal fluctuations appear to be the same as slow fluctuations. The Hurst exponent accepts values that are in the range from 0 to 1. If H > 0.5, then the investigated signal has the property of long-range dependence, ie. the autocorrelation function tends to zero slowly with the increase of the time parameter [11]. If H < 0.5, then the signal has the property of short-range dependence, that is, the autocorrelation function decreases exponentially with increasing time. In the boundary case, when H = 1/2, then D = 3/2, and the signal studied is a Brownian motion. Among the methods for nonlinear analysis of PPG signals, methods of obtaining estimates of their large-scale invariance are of particular interest. The monofractal signal is homogeneous in the sense that it has the same scale properties that can be characterized both locally and globally by a single scale indicator, for example, the Hurst exponent, fractal dimension. In contrast to the monofractal signal, the multifractal signal consisted from a large number of homogeneous fractal subsets, whose features can be characterized by a spectrum of local Hurst exponents or fractal dimensions. The fractal and the multifractal approach allows for new estimates to be obtained that give an idea of the intrinsic, nonlinear, dynamic processes in the studied signals as compared to the classic Time-and Frequency-Domain analysis methods [12]. The decrease in the fractal dimension, respectively, the increase in the Hearst exponent, indicates an increase of the chaotic components of the cardio intervals. Non-linear methods for analyzing PPG signals can determine the presence or absence of a disease and they can be used both for rapid diagnosis and as an integral part of a more complex diagnostic system. The introduction of additional nonlinear methods, such as Poincaré plot, Approximate entropy, and Sample entropy for characterizing PRVs, allow for an additional assessment of the qualitative and quantitative properties of PPG signals, which extend the scope for clinical interpretation [13].

Research Background
Different types of PPG devices have been developed according to the type of sensors used, according to the location of the device, according to the method of transmission of the recorded data [6].
The use of PPG data for cardiac activity analysis can be very useful in cases where the ECG cannot be taken or when the obtained ECG has large electrical artifacts [14].
The location of the sensor is one of the main factors for recording correct and quality cardiac signals. It has been found that, when a finger sensor is used [6,15], high amplitude signals are obtained as compared to the amplitude of signals received from other locations of the human body. Sufficiently good quality of the registered PPG signals can be obtained by locating the sensors on the palms, ears, and face [16] of the subject under study. The improvement of PPG technology enables the entry of cardiac recording devices that can be located on the wrist of the hand [17], the ear mussel [18], the forehead [19], the esophagus [20].
The authors of [21] present a PPG device for measuring the patient's blood-oxygen saturation level (SpO2) and pulse rate. The device uses a sensor that is positioned on the patient's finger. The software has been created to process and investigate the received signals in a LabView environment.
Different types of sensors and software implementation of linear and nonlinear methods for analyzing PPG signals are presented in the work [22].
A wearable photoplethysmography sensor based device with a microcontroller that is built into the device and its application for assessing mental distress presents the study's authors [23]. The conducted studies are based on an analysis of the pulse rate variability of the obtained PPG data (taken with a sampling rate of 60 Hz and a 22-bit resolution). The algorithms created are built into the microcontroller and can work in real time.
In their work, [24] present an experimental model of a PPG based portable device that is designed for the individual observation of patients with cardiovascular disease. The device includes an infrared optical sensor, an analog filter, an operational amplifier, a user interaction module, a power management module, a flash memory, and a microcontroller that performs the analog-todigital conversion and data transmission. The created device can transmit the received data to the server through a mobile phone to which it is connected.
The authors of [25] investigate the use of PPG data for Pulse Rate Variability (PRV) analysis as an alternative to Heart rate variability (HRV [26] for ECG data) under non-stationary conditions. A software system for PPG and HRV analysis has been created in the time domain and frequency domain. Statistical, HRV indices and PRV indices, spectral capacities in LF and HF domain, TF coherence, etc. were determined, analyzed, and compared. The authors present results that are close to each other and only differences in the HF domain are observed.
In the study [27], the authors analyze PPG data that were obtained from the right forefinger of healthy people and propose a method for improving the accuracy of blood pressure measurement.
The authors of article [28] create a multi-site measurement system for analyzing right-left simultaneous differences in PPG pulse waveforms from the three segmental levels at the ears, thumbs, and toes (a total of six signals registered simultaneously). The system is validated by determining the RMSE coefficient for these signals and showing a high degree of correlation of the studied input signals. The authors investigate the similarities in the timing of signals from the left and right half of the human body and find a high degree of similarity in healthy individuals. In diseased individuals (especially in the presence of pathologies), differences are found that are explained by the presence of the disease in one half of the body (eg in an organ). An established system can be very useful in making clinical evaluations.
In their study, the authors of [29] describe the created multi-site measurement system for the analysis of eight PPG signals and one ECG signal simultaneously registered. The investigated signals are recorded online and the data processed offline while using the Matlab development environment. The analyzes were performed on signals received from 16 volunteers. The system can be used for medical diagnostics.
Pulse Rate Variability analysis and Heart Rate Variability analysis applications for cardiological data can be grouped into two main groups: desktop applications and web-based applications. Desktop applications must be installed or developed for a particular operating system and they must have strict hardware requirements to ensure the proper functioning of the application. This hardware dependency might be a disadvantage for some users. The most popular desktop applications for Heart Rate Variability analysis are: Kubios HRV software [30], CODESNA [31], SinusCor [32], gHRV [33], and others.
Traditional web-based applications [34][35][36][37] offer a single database. The centralized architecture of these applications allows for you to store all of your data in one place. The installation, setup, and maintenance of the software is web based. All of the changes and modifications to the system are made on the server of the system without having to be reflected in different jobs. This makes their maintenance efficient, fast, and inexpensive.
In modern medicine, there is an acute problem that is associated with organizing the process of continuous monitoring of indicators that determine the physical condition of the human body (photoplethysmograms, electrocardiograms, blood pressure, pulse, breathing, temperature) of patients being treated in hospitals and clinics with minimal involvement of nursing staff and observed patients when they are at work or home. Body Sensor Networks (BSNs) have been created to solve this problem, which are a continuation of Wireless Sensor Networks. BSNs are fast-paced in healthcare, fitness, rehabilitation, emotion recognition, and many other applications of the Internet of Things, thus enabling 24/7 monitoring of at-risk patients. BSNs collect sensitive data from various sensors located on the human body and use computational technologies for signal processing and machine learning to retrieve information. Combining data from multiple heterogeneous, sensory sources becomes a basic but non-trivial task for BSN.
In a publication [38], the authors discuss the motives and advantages of multisensor data synthesis, focusing on identifying the physical activity of the subjects studied, identifying parameters that influence the choice of data design at different levels (data, function, and decision). A major issue in the development of BSN for blood pressure monitoring, which is essentially related to the development of portable sensor devices, being characterized by small size, optimal placement, and low power consumption, is discussed in [39]. BSNs are progressing towards multi-technology integration and intelligence. With the advent of cloud technologies, BSNs are evolving toward the long-term monitoring of several vital human health indicators, long-term storage, and engagement with application services. The future of BSN is fundamentally promising, which will profoundly change human-machine relationships and improve people's quality of life [40].
On the basis of the conducted research for the existing photoplethysmographic systems, the following summary can be made: photoplethysmographic systems perform the following activities: registration of PPG signals, processing, mathematical analysis of the defined PP interval series, and evaluation of the obtained results. These systems record PPG signals of different duration: minutes, hours, 24 h, and perform assessments of various factors (cardiovascular disease, diseases of the autonomic-nervous system, physical and emotional stress, bad habits, etc.) that affect the human body. The created non-commercial systems use both linear and non-linear methods of analysis, and they have a primary scientific purpose because non-linear methods of analysis are not standardized. The software applications that are created on these systems are desktop or web-oriented.

The Purpose of this Article
The purpose of this article is to present a portable system for recording, processing, storing, and mathematically analyzing PPG signals to assist cardiologists in the diagnostic process and in taking preventive measures to protect the health of at-risk patients. The system combines the convenience of photoplethysmographic devices, the accuracy of the results of PPG analyzes performed with modern mathematical technologies, and the advantages of serverless architecture in web-based software implementation. The new photoplethysmographic system enables the expansion of hardware with additional sensors and other components, as needed (to solve new future tasks).

Portable Sensor System for Registration, Processing and Analysis of PPG Signals
The new portable sensor system for recording and analysing PPG signals that is presented in this article consists of a portable device for registering PPG signals and a serverless web application for preprocessing, mathematical analysis, and evaluation of PRV of time series obtained while using a photoplethysmographic device.

Portable Sensor Device for Registration of PPG Signals
The portable sensory device ( Figure 1) is used to record changes in blood volume by a sensor placed on the patient's finger and/or ear. PPG technology is an optical measurement technique, whereby, using an invisible infrared light source transmitted to human tissue and a photodetector, the intensity of the light transmitted or reflected by the tissues is recorded.  The created photoplethysmographic device is managed from a microcontroller, as for the specific conversion a microcontroller from the LPC546xx MCU family (manufactured by NXP Semiconductors), was used. The PPG device can work with discrete sensors that are external to the device (in the form of a pinch that is placed on the index finger of the hand or the ears).
The AFE4490 integrated circuit (manufactured by Texas Instruments) is used to process the signals that they receive, which is used to convert the signals and control the LEDs. This integrated circuit has two separate channels, which allows for the use of two external sensors (pinch) at the same time. Standard Nellcor-compliant PPG finger and ear sensors are used ( Figure 2). In addition to the ability to work with external sensors, the device has a built-in integrated sensor (using the MAX30102 scheme, manufactured by Maxim Integrated), which allows for short-term measurements of heart rate and oxygen content in the blood. Several types of memory are built into the PPG device, such as for RAM, the internal memory of the microcontroller is used. The device has a real-time clock (DS3231/manufactured by Maxim Integrated) powered by a separate battery, which can track and record the exact astronomical time of the study (recording of photoplethysmographic signals of the investigated individual). An expansion connector (if necessary to add new functionality), a Bluetooth module, and more module can be installed.
The device's PCB is four-layer and it is designed with an open source KiCAD PCB design system [41].
Power is provided by a Li-ion rechargeable battery and a buck-boost SMPS converter (TPS63001, manufactured by Texas Instruments) and a charger circuit (BQ24075, manufactured by Texas Instruments) for battery management and charging, when the device is connected to a PC through a USB connector.
The device has two buttons. One for switching ON/OFF, while using a smart button on/off controller (STM6601/STMicroelectronics) and other that can be used by a software.
The created PPG based device can transmit the logged data over a period of time (from a few seconds to several hours) or continuously to the software web based system for processing and analyzing the received data.
PPG sensing technology uses the properties of the light to detect changes in the arterial blood volume in a closed area (tip of the finger, ear, nose, wrist, etc.). The principle of operation of PPG sensors is to record changes that occur in the light intensity upon reflection or transmission through the tissue. These differences reflect the changes in the blood perfusion of the human tissue. The PPG sensors can operate in two modes: transmission mode and reflection mode. In the reflection method, the light source and the photodetector are placed on the same side of the fabric, while two different sides of the fabric are placed in the transmission method.
The experimental device works in two modes: transmission mode, with integrated sensor, which is external to the device and in the form of a pinch; reflection mode via a discrete sensor that is integrated into the device.
For the discrete sensor, the red LED operates at a wavelength of 660 nm; the infrared LED operates at wavelength-880 nm. For the integrated sensor (max30102), the red LED operates at a wavelength of 660nm; the infrared LED operates at wavelength-880nm. Standard Nellcor compatible PPG sensors for finger and ear are used [42].

A Serverless Web Application for Processing and Analyzing Photoplethysmographic Signals
In this work, the preprocessing and mathematical analysis of registered PPG signals with the developed experimental portable device is performed while using a web-based application through the application of Amazon serverless technology. In the serverless model, Amazon Web Services (AWS) cloud provider provides fully managed end-user computing and storage services. The services use servers, regardless of the name, and the developer abstracts these servers. In this way, the configuration and management of the underlying architecture are done by the cloud provider, not by the web application developer. The web application runs on servers, with AWS taking full control of them. This eliminates the need for resource allocation, scale, and server support for running applications, databases, and storage systems. While using serverless architecture, developers can focus on creating the web application without having to manage the servers or take the time to maintain them when running in the cloud or locally [43][44][45][46].
Creating web applications while using a serverless architecture as compared to traditional web applications has the following main advantages [47][48][49]: Scalability: Serverless architecture provides automatic scaling as the number of users while using the application increases or decreases. In a private or public cloud environment, it is possible to configure it, so that new computing instances are provisioned when there is an increase in demand. However, this usually takes some time to happen, which could potentially lead to users not being able to access the application and ultimately provide an unsatisfactory experience. Conversely, serverless applications can handle bursts of traffic by design, so no adjustments need to be made to handle intermittent traffic.
Cost-efficiency: One of the biggest benefits in implementing a serverless architecture is that the modal of paying for the computing power that is needed is taken to the next level. In a traditional cloud computing setup, server instances can be brought up or terminated based on the level of traffic to the application and costs are only accrued for running instances. In a serverless model, this is granularized further, so the costs are associated to the number of requests to the web application and the amount of stored data. This means that if there are no new requests are sent to it, the application is essentially running for free.
Development: A serverless implementation requires no time to be spent on managing the underlying architecture. The developers need to only focus on creating the logic required for the application, as they can just bundle it and its dependencies in serverless functions and invoke them when needed. In contrast, in a traditional web-application, the code would need to be deployed to a server that needs to be correctly provisioned and managed. Serverless is growing faster than any other cloud service with developing efficiency as one of the main reasons for its fast adoption rate.

Preprocessing and Mathematical Methods for PRV Analysis
Desktop and web applications are not new in the field of PRV analysis; in this article, the authors apply the use of a serverless web application in the creation of a PPG data processing, analysis, and storage software system. The web application created consists of the following three modules:  module for preprocessing of registered photoplethysmographic signals using the portable device presented above;  module for determining PP intervals between heart beats; and,  module for mathematical analysis and evaluation of PRV.

Module for Preprocessing
PPG technology is a modern, non-invasive method for measuring the activity of the cardiovascular system, based on the examination of blood volume that is caused by cardiac pulsations by the detection and analysis of optical radiation passing through human skin. The input data are obtained while using an integrated sensor directly in digital form or by using a discrete sensor and subsequent analog-to-digital conversion.
Cardiac function testing by determining the mathematical parameters while using the noninvasive integrated PPG-based method requires the use of pure biomedical signals. The extracted PPG data must undergo preprocessing (Figure 3) to remove the artifacts (such as Powerline Interference from the power frequency, artifacts caused by the recording system, the signal amplifiers used, etc.) in order to perform correct measurements and analyzes; interference with input data caused by poor contact with the sensor, involuntary movement of the body and others. To these external factors are added the location of the sensor, the presence of ambient lights and electrical sources. The individual characteristics of the subjects studied [23], such as the properties of the skin and the temperature of the human body, have significant influence. The permanent constituent contained in the input data is removed by a software DC (Direct Current) filter (DC component is the constant voltage added to a pure AC waveform). Subsequent is the reduction of noise components while using averaging filter, elimination of single large deviations using a median filter (triggered by motion, for example), the removal of high frequency components with a low pass filter (4 Hz cutoff frequency), and low frequency artifacts with a high pass filter (0.4 cutoff frequency). These cut-off frequencies are chosen to correspond to the frequency range within which the physiological human heart rate is approximately located. The frequency is for the final data-if there is a frequency of individual peaks greater than 4 Hz or less than 0.4 Hz, then they are filtered. We assume a heart rate greater than 240 beats/min. (4Hz) and less than 24 beats/min. (0.4 Hz) is due to some error in the signals or data.
Studies have been conducted that have found that the excessively fast movement (such as running, sports involving running, or fast movement) can cause artifacts to investigate the occurrence of artifacts in PPG due to movement. In these cases, no analysis data are taken. In addition, the input signal processing program includes procedures that check the quality of the input signals and, if the signals are not of good quality, they are not analyzed.

Module for Determining PP Intervals
The detection of P peaks in the photoplethysmographic signal is performed while using a mathematical algorithm that is based on the first and second derivatives of the investigated signal [23] and performing additional checks to ensure that a signal peak is detected. The P peaks detection algorithm is programmatically implemented in the web based system, where the received input data for mathematical processing and analysis are sent.
After determining the consecutive P peaks in the test signal, the time series of consecutive PP intervals are formed-Pulse Rate Variability. A series of adjacent normal-to-normal cardiac cycles are formed (NN) after the successive PP intervals have been determined, which only contains the vertices that are caused by the operation of the sinus node of the heart. Mathematical analysis is performed by calculating the parameters in the time domain, in the frequency domain, and nonlinear PPG based analyzes are performed, based on this normal-to-normal sequence.
The received input signal is further interpolated while using a cubic splines interpolation procedure that increases the resolution of the samples up to 1 KHz.

Module for Mathematical Analysis of PRV
The mathematical analysis of PRV is performed by applying linear and nonlinear methods. Time-Domain analysis is very commonly used in cardiology due to the boundaries of normpathology being known according to the standard introduced [50]. The following parameters are determined in the Time-Domain: the mean of normal-to-normal intervals (MeanNN), the mean of heart rate (MeanHR); the standard deviation of normal-to-normal intervals (SDNN), standard deviation of the averages normal-to-normal time intervals (SDANN), the ratio of pairs of successive normal-to-normal intervals differing more than 50 ms (pNN50), the square root of the mean of the sum of the squares of successive differences between normal-to-normal intervals (RMSSD), and the mean of the standard deviations of all normal-to-normal intervals (SDIndex). Table 1 presents the formulas for the most commonly used parameters in the time domain. In the Frequency-Domain, studies are conducted in three main ranges (Table 2): Very Low Frequency domain; Low Frequency domain; and, High Frequency domain. The Very Low Frequency domain refers to the mechanisms of the nervous system that are responsible for the long-term regulation of the human body; Low Frequency domain is related to the sympathetic nervous system, while also taking the influence of the parasympathetic nervous system into account; High Frequency domain corresponds to parasympathetic influences and it takes the influence of respiratory processes into account. Sympathetic cardiac control of the nervous system operates at frequencies lower than 0.15 Hz (0.01-0.15 Hz, Low Frequency) domain, accelerates cardiac activity, narrows blood vessels, raises blood pressure, widens the airways in the lungs, widens the pupil of the the eye, reduces the activity of the digestive system, raises the temperature, and mobilizes the whole body. Parasympathetic modulation, including humoral factors, gender and age, is also affected here.
The parasympathetic heart control of the nervous system operates at frequencies up to 0.4 Hz (from 0.15 to 0.4 it is High Frequency domain) and it modulates the activity of the human body by slowing the heart activity, thus lowering blood pressure (generally its activity is the opposite of the sympathetic one).
A non-parametric Welch periodogram method [51], which is suitable for cardiac biomedical data, was used for determining the spectral components. In this method, the obtained individual periodograms for overlapping individual data blocks are averaged to produce the final periodogram. The power spectral density (PSD) of the PRV data series is determined while using the Welch Periodogram method.
The Frequency-Domain analysis is also standardized, with the limits of norm-pathology being known, thus making it a preferred method.
The introduction in recent years of the non-linear methods of PRV analysis has allowed for an additional assessment of the qualitative and quantitative characteristics of PRV and it has expanded the scope for clinical interpretation. These methods are not standardized, but they are in the process of active research and they provide additional information on the "chaotic" dynamics of PP interval series. When compared to linear analysis methods, nonlinear methods allow for new, additional estimates to be obtained that give an idea of the nonlinear, dynamic processes in the studied signals.
Poincaré plot [52,53] is a geometric method for representing the time series, such as PP intervals in a Cartesian plane [54]. This method allows for physicians to view the PP time intervals of the entire PPG signal at a glance and quickly detect cardiovascular disorders, if any [55].
Physiological signals, such as PPG and ECG, have been proven to have fractal behavior and have the following properties: self-similarity and fractal dimension [56]. The degree of self-similarity can be determined with the Hurst exponent. The R/S method is one of the most popular fractal analysis methods. The fractal analysis is intended to assess the degree of harmonization of the biorhythms of different organs and systems of the body, including the cardiovascular system, in order to identify the functional and pathological changes in the human body, as well as to predict changes in the health status of the patient. The value of the Hurst exponent is in the range of 0.5 to 1.0 if the signal is fractal [57].
The DFA method is suitable for the study of dynamic changes in PPG signals, which takes into account, not only the stationary, but also the non-stationary components of the temporal structure of the heart rhythm [53,58]. DFA quantifies the fractal, correlation properties of PP intervals. The correlations are short-term and long-term, being characterized by the parameters α1 and α2, respectively [59].
Fractal signals are two types: monofractal and multifractal [60]. The monofractal signal is homogeneous, because it has the same scale properties, both locally and globally. This signal can only be characterized by a one Hurst exponent value [60]. The multifractal signal consists of homogeneous, fractal subsets, whose singular properties can be characterized by a spectrum of Hurst exponent values [60]. The Genaralized Hurst exponent is an MFDFA tool that reflects the structural inhomogeneity of the PPG signal.
The Approximate Entropy [61] and Sample Entropy [62,63] are quantitative measures of chaos in a dynamic system, such as the PP time series. Larger values of entropy indicate the irregularity of the signal, and smaller values indicate that the signal is largely regular [1].

Data Collection
The data with which the study was conducted in this article were recorded while using the experimental photoplethysmographic device created. The investigated data are two types: • data with which the device is tested; and, • data to perform mathematical analysis of two groups of subjects: healthy controls and patients with arrhythmia.
The data that test the device are for a healthy subject (male, 51 years old). Four signals of 30 min. duration are recorded simultaneously: ECG signal; PPG signal obtained from a sensor placed on the left ear auricle; A PPG signal obtained from a sensor placed on the middle finger of the left hand and a PPG signal obtained by placing the left hand index finger on the Discrete HR/SPO2 sensor that is built into the device. After registration of the ECG and PPG signals, specialized software determines the RR time intervals of the ECG signal and PP intervals of the PPG signal. The mean squared error (MSE) is calculated while using the following formula to demonstrate the coincidence of the intervals between the two types of signals: The variables x and y are denoted the PP and RR intervals, respectively; N is the number of intervals. When the MSE tends to zero, it indicates that the intervals of the two type investigated signals (ECG and PPG) are very close, ie they are identical.
The data are used to perform the mathematical analysis are following: 42 subjects with arrhythmia (volunteers diagnosed by a cardiologist) and 40 healthy individuals (volunteers who are not diagnosed with cardiac disease). Recordings are for a duration of 120 min. The studies were made while using an external sensor in the form of a pinch placed on the middle finger of the left hand of the test subject. The experiment involves a member of the technician team who checks the functioning of the created photoplethysmographic device and the reliable operation of the software program in the device.
The participating volunteers are familiarized with the instructions for recording the photoplethysmographic signals, after which each participant is made three consecutive registrations of PPG signals. The purpose of the three measurements is to verify the correctness of the data. Artifacts or other events are detected if the validation of the data is successful and no extraordinary noises, and they are then transmitted to the software module of the developed web application for preprocessing to obtain PP interval series, to which mathematical methods of analysis are applied. The signals registered with the developed device have a sampling rate of 60 Hz and a 22-bit resolution, thus avoiding the possibility of inaccuracies resulting from the distortion of the input signal.

Statistical Analysis
The obtained results are presented as mean ± standard deviation (mean ±SD). The values of the parameters of the study groups were tested by the T test. The values of the parameters at which is less than or equal 0.05 (5%) has been considered to be significant.

Experimental Results Obtained with a Portable Cardiology Device
An experimental multisensory system for simultaneous real-time recording of ECG and PPG signals of a healthy individual with a 30-min. measurement time has been created in order to prove the validity of the created portable PPG signaling device. The experimental system consists of:


ECG sensor for ECG signal recording;  Three photoplethysmographic sensors for a recording of three photoplethysmographic signals received from different places of the body. The sensors are placed by pinching the middle finger of the left hand, the earring of the left ear, and the index finger of the left hand touches the sensor that is built into the device.
The simultaneous registration of both types of signals (ECG and PPG) enables comparative analysis by modeling RR and PP time intervals. Figure 4 shows diagrams of the signals registered with the device: PPG1 is the photoplethysmographic signal recorded by the sensor placed on the left ear;  PPG2 is the photoplethysmographic signal recorded by the sensor placed on the middle finger of the left hand; and,  PPG3 is the photoplethysmographic signal registered by touching the left hand index finger to the sensor integrated into the portable device. The registrated signals were obtained at a sampling rate of 128 Hz. ECG records were obtained while using the MAX30001EVSYS system from Maxim Integrated Inc [64]. We use the original software of the system, adding the ability to synchronize with our developed system for the registration of PPG signals, ie. the reading of ECG and PPG data takes place at the same time. Table 3 shows the results of the study of 30 min. recorded ECG and PPG signals, such as: number RR/PP intervals; average intervals; min. value; max. value; and, MSE.  Figure 5 shows the graphs of the four tested signals (ECG (Figure 5 a)), PPG-ear (Figure 5 b)), PPG-middle finger (Figure 5 c), and PPG-index finger ( Figure 5 d)), as obtained by the Poincaré graphical nonlinear method.  Table 4 presents the demographic characteristics of investigated subjects. The parameter values are expressed as mean ± standard deviation (sd) or percentage (%). 42 patients that were diagnosed with arrhythmia (22 men and 20 women) aged 49 to 57 years and 40 healthy volunteers (21 men and 19 women) aged 52 to 64 were examined. No significant difference was found between gender and age group members.  Table 5 presents the results that were obtained in the time domain (statistical and geometric parameters) of the Pulse Rate Variability analysis. The study covered two groups of individuals (82 people in total): Healthy subjects (40 people) and diagnosed with the disease arrhythmia individuals (42 people).

Mathematical Analysis of PP Interval Series
The values that were obtained for the investigated Time-Domain parameters indicate that the parameters SDNN (p value = 0.0088), SDANN (p value = 0.0385), RMSSD (p value = 0.0718), and pNN50 (p value = 0.0363) are statistically significant (p value < 0.05) and they can be used as factors in determining the degree of the disease under study (and perhaps an additional aid in the diagnosis and treatment of the disease). The parameters MeanNN, MeanHR, and SDIndex have no statistical significance (NS), because the values of p value are for these parameters > 0.05. The obtained results in Frequency-Domain that are presented in Table 6 show high values of the very low frequency spectrum in a healthy group against arrhythmia group (1823.33 versus 1048.44). The low frequency spectrum in a healthy control group (1659. 48 ) is significantly lower in the group of patients that were diagnosed with arrhythmia (940.91 ). For high frequency, the highest values are in the group of healthy individuals (941. 33 ), lower values were obtained in the arrhythmia patient group (683. 11 ). The calculated parameter LF/HF (known as index of sympathovagal balance [65]) in the control group has values (1.76 ± 0.39) that are within the normal values that are recommended by the heart rate variability standard of measurement, physiological interpretation, and clinical use [50]. The LF/HF of the patiens with arrhythmia (1.38 ± 0.27) have values that are outside the normal values recommended by the standard. The power spectral density of PRV is presented in Figure 6; Figure 7. Power spectral density is obtained at Very Low Frequencies, Low Frequencies, and High Frequencies in s /Hz. Figure 6 (PPG data of healthy subject) shows high values for PSD in this frequency domain studied. This is an indicator of high values for Pulse Rate Variability, which shows the good overall health of the studied subjects.

Nonlinear Analysis
The introduction of the non-linear analysis of PRV provides additional information on the health status of the subjects studied. Figure 8 shows the graphs that were obtained through the Poincaré plot for healthy subject and patient with arrhythmia. This graphical method presents the correlation between consecutive PP intervals and constructs an ellipse with dimensions: width (SD1) and length (SD2).  Figure 9 shows the multifractal spectrum and behavior of the gensralized Hurst exponent of the studied groups while using the MFDFA method.  Table 7 shows the parameter values of the two study groups obtained by applying nonlinear PRV analysis methods.

Discussion
The created experimental device is suitable for continuous observation of the subjects studied, is easy to use, can be placed in different places on the human body, and allows for measuring different parameters, such as: pulse, blood pressure, oxygen saturation, etc. The device created is in line with the desire of the scientific community around the world to use modern technologies at the service of humanity [66].
From Figure 4, it is observed that the peak R in the ECG signal does not coincide with the onset of pulse wave propagation at the three recorded photoplethysmographic signals. This is because the peak R of the ECG signal corresponds to the electrical excitation of the heart muscle, after which it takes some time for the muscle to respond to this excitation, so that the aortic valve opens and the pulse wave begins to propagate through the arteries. The delay in the pulse wave of the PPG signal that was recorded by the sensor placed in the left ear is less than the delay in the PPG signals recorded by the other two sensors due to the greater proximity to the heart.
The graphs of the four studied signals ( Figure 5) corresponding to the RR and PP interval series of a healthy individual while using the non-linear Poincaré mathematical method are identical and well expressed ellipses, which is evidence that the studied data correspond to a healthy individual. The shape of the graphs has the appearance of a comet, which is further proof that the data examined relates to a healthy individual. Similar results have been reported in the publications [67,68].
Based on the results that are shown in Table 3, it follows that the RR and PP intervals of the two signal types (ECG and PPG) are identical. PPG signals versus ECG signals have a very small mean square error (MSE). The MSE for the signal recorded by the sensor placed on the ear mussel is smaller than the MSE for the signals that are registered by the fingers (index finger and middle finger) of the test subject. The reason for this is due to the following physiological features:  the muscle of the ear is smaller than the finger of the hand;  on the ear mussel no cartilage tissue; and,  the pulse wave reaches the ear sensor faster than the sensor placed on the fingers due to the greater proximity to the heart.
From the experimental studies that were performed on the operation of the experimental, portable PPG device by comparison with the second reference method-electrocardiogram, it follows that the device is applicable for recording PPG signals and that the mathematical data that were obtained from them correspond to RR intervals.
Studies that were conducted by the authors on PPG data from healthy people and patients with arrhythmia show a decrease in the value of PRV in the presence of disease. It could be suggested that a significant or sudden decrease in these values is a sign of a sudden worsening of the disease and the need for emergency measures to protect the health and life of the patient. For this reason, an organized system can be especially valuable when monitoring patients in conditions that are close to critical.
Arrhythmia is one of the serious diseases of the human cardiovascular system, leading to serious disorders of the heart rhythm. When there are major deviations from the heart rate, a pacemaker might need to be used to artificially regulate the heart's activity. Every year, millions of people worldwide are hospitalized as a result of the disease. For these reasons, the authors believe that the early detection of this disease, its constant monitoring, and the maintenance of optimally effective treatment of patients is essential. Wearing an individual, inexpensive, the lightweight biomedical device that, in an almost imperceptible way, to measure at regular intervals (or continuously as needed) cardiac activity could be of great benefit to patients, can guarantee a low risk to their health, and improve overall health.
The linear methods, such as Time-Domain and Frequency-Domain, can be used to directly estimate PRV. These methods are standardized and they can provide objective information regarding the condition of the cardiovascular system of the subjects studied. Much of the values of the studied Time-Domain and Frequency-Domain parameters ( Table 5 and Table 6) are statistically significant, since the p-value is less than 0.05. Therefore, these methods can distinguish the subjects of the two study groups.
The nonlinear analysis of the PP interval series allows obtaining additional information regarding the subjects studied. Based on the results of the nonlinear analysis of the subjects studied, the following conclusions can be drawn:


Poincaré plot allows for visual analysis of the entire recording of PP intervals based on the following parameters: the pattern of PP intervals, the ellipse size, and the points symmetry with respect to the identity line. This type of analysis makes it possible to distinguish healthy individuals from patients with various diseases. Figure 8 shows that the PP intervals for a healthy subject is comet-shaped and, for the patient with arrhythmia, has a fan pattern. Similar results are shown in a publication [30]. The values of the parameters SD1, SD2 of the ellipse, as well as SD1/SD2, are smaller for the group of patients with arrhythmia when compared to the group of healthy subjects (Table 7). Healthy subjects have a well-defined ellipse, while, in patients with arrhythmia, the ellipse approaches the shape of a circle. The graphs corresponding to the healthy individual and the patient with arrhythmia shown in Figure 8 are symmetrical to the identity line, which suggested that they have no rhythmic disturbance. Poincaré plot analysis can distinguish between the two groups studied, because the p-value is less than 0.05.  The DFA method determines the values of the following parameters: Alpha 1-short-range scaling exponent; Alpha 2-long-range scaling exponent. These values are in the range of 1.0 to 1.5 for the two study groups, which is evidence of the fractal behavior of the PP interval series.  The MFDFA allows for new estimates to be obtained that give additional insight into the nonlinear, dynamic processes in the studied PPG signals. Figure 9 shows the multifractal spectrum and the behavior of the genaralized Hurst exponent of the two subjects studied: a healthy subject and a patient with arrhythmia. The healthy subject's multifractal spectrum is 2.2 times broader than that of the arrhythmic patient. This is evidence that the PP interval series of the healthy subject have multifractal behavior and the patient with arrhythmia has monofractal behavior. The Genaralized Hurst exponent reflects the non-homogeneous structure of the investigated signal. For a healthy subject, the values of the Hurst exponents vary from 1.2 to 0.75 for different values of the q parameter. This is evidence that the healthy subject has multifractal behavior. In a patient with arrhythmia, the values of the Hurst exponents are almost constant, evidencing monofractal behavior. The values of the multifractal spectrum of the studied groups (Table 7) is statistically significant, therefore the two groups can be distinguished by the MFDFA.  The R/S plot is one of the most popular nonlinear methods for time series analysis that is based on Hurst exponent calculation. The fractal behavior of the signals is characterized by Hurst exponent values in the range (0.5, 1.0). The Hurst exponent values of the arrhythmia patient group are about 0.55, while the subjects of the healthy group have higher values ( Table 7). The higher Hurst exponent value is evidence of a higher PRV and better health.  The AppEn and SampleEn values that are shown in Table 7 are statistically significant, therefore these two parameters can be used to distinguish healthy controls from patients with the disease. AppEn and SampleEn values are higher in healthy controls, which is evidence that their PP data have stochastic, fractal behavior.

Conclusions
This article introduces a portable information system, consisting of a PPG signals recording device and web-based application for processing and mathematical analysis of PRV while using serverless architecture.
The prospect of introducing PPG-based equipment is due to the following advantages: mobility (recording PPG signals is performed while the patient is working, traveling, sporting (except excessively fast movement, such as running; sports involving running or fast movement), resting, and in extreme situations); security (24-h patient monitoring is possible, and short messages (SMS) may be sent to the attending physician when a deviation is recorded in the patient's results); prevention (identifying the disease at an early stage before it has become a serious health problem); diagnostics (long-term follow-up allows accurate diagnosis); and, others.
The preprocessing of the registered PPG signals involves the determination of the PP interval series to which linear and nonlinear methods for the data analysis are applied. The quantitative measurements of the studied parameters in the linear analysis have significant clinical application because the boundaries of norm-pathology are known. The nonlinear mathematical methods provide additional information on the formation of the parametric and the graphical assessment of patients' health status. The established information system can find application in modern clinical practice, offering an approach for long-term monitoring and investigation of changes in cardiac activity of the subjects studied.