I. Introduction
One of the major causes of death in the world is cardiovascular diseases (CVDs), which are extremely harmful to the heart, arteries, and blood vessels. Among the major symptoms of CVDs are high blood pressure, increased heart rate, and other heart abnormalities, which can result in fatal complications, such as heart failure, stroke, atherosclerosis, and long-term CVDs [1]. The diseases frequently interfere with the electrical heart activity, and an overabundance or anomalous heart rate patterns can lead to sudden life-threatening incidents. Cardiac dysfunction should be detected early and monitored continuously to prevent acute exacerbations and minimize mortality [2]. Heart rate variability (HRV) has become a promising non-invasive and valid biomarker of the autonomic nervous system (ANS) functioning and cardiovascular well-being. HRV is used to quantify the change in time between heartbeats (temporal) and indicates the relationship between the activity of the sympathetic and parasympathetic nervous systems (PNS), which is controlled by neurohumoral factors [2]. Traditionally, HRV is assessed by electrocardiography (ECG), which involves the use of several electrodes on the chest of the patient during continuous measurements, or photoplethysmography (PPG) with wearable devices [3, 7, 9]. Conventional HRV analysis is based on time and frequency domain measurements. Time-domain measures, including standard deviation of all normal R-R intervals (SDNN) and root mean square of successive differences (RMSSD) between R-R intervals are mostly parasympathetic and general autonomic control measures [6]. Frequency-domain measures of sympathetic and parasympathetic activity estimate sympathetic and parasympathetic activity within certain frequency bands, offering information about the level of cardiovascular stress and autonomic balance [4]. Here, physiological changes have been studied both with short-term and long-term HRV: long-term HRV assessment attenuates the effects of chronic stress and enhances cardiovascular risk assessment, whereas short-term HRV offers quick assessment but can be less stable [5]. Although conventional HRV measurement techniques are widely used, they are linked to a number of critical limitations that limit their accuracy, reliability, and practicality. To begin with, each ECG- and PPG-based HRV measurement is extremely susceptible to artifacts and noise, such as motion artifacts, signal interference, etc., which can cause inaccuracies and decrease the accuracy of the HRV estimations [9,10]. Secondly, frequency-domain analyses are frequently based on long, stationary records that are needed to obtain viable spectral data, making them not as well suited to continuous monitoring in real-world or emergencies [9]. Thirdly, long-term HRV data are prone to external and lifestyle influences, which may cause fluctuations in HRV, which may lead to fluctuating or inaccurate interpretation of the autonomic functioning [7]. Lastly, accessibility is an effective obstacle: traditional ECG systems require clinical installations with personnel supervision, whereas most wearable PPG gadgets do not support advanced HRV analysis or real-time monitoring, restricting their application in the context of proactive cardiovascular care [8]. Together, these constraints emphasize the importance of an HRV monitoring system which is precise, artifact-free, convenient, and able to measure itself in real-time.
a. Research gap
Despite the previous research that has proposed non-linear methods of HRV analysis and remote monitoring systems [8, 15], there is still a great gap in establishing an accurate, convenient, and easily deployable artifact-resistant HRV monitoring system. Current methods either trade accuracy for usability, or require complex and stationary installations that do not work well in real-world environments. Moreover, very little research has combined non-linear HRV feature extraction with wearables to enable the detection of cardiovascular abnormalities in real time during daily activities.
b. Proposed approach
To address the drawbacks of conventional HRV monitoring, this research paper suggests a real-time HRV monitoring system that makes use of wearable technologies, non-linear HRV features extraction, and remote monitoring possibilities. The system ensures that the required time to record accurate HRV measurements can be taken in a short time without reducing the reliability since the required recording time is minimized. The use of non-linear HRV characteristics increases the strength of the system and enables it to withstand the typical sources of errors, including motion artifacts, signal noise, and unreliable electrode location. Moreover, the framework helps to conduct continuous and remote monitoring, which allows to recognize abnormal cardiac outcomes in ordinary life or emergencies. This real-time option enables quick medical response, which can greatly reduce morbidity and help avoid life-threatening complications. Our previous works have already focused on estimating the Heart Rate (HR) and HRV with the use of PPG signals, but they mainly concentrated on simple signal extraction and offline analysis in controlled conditions. Conversely, the current paper presents a real-time smartphone-based model that is more robust and realistic to use.
The most notable innovation of this work is the combination of adaptive red, green, and blue (RGB) thresholding, motion artifact reduction, and optimized signal processing methods in a mobile application scenario. Moreover, the paper includes a more detailed assessment of the variability of devices, real-time limitations, and enhanced preprocessing strategies. Despite these, the basic idea of PPG-based HRV estimation is the same; however, the suggested system is quite different based on its implementation, efficiency, and practical applicability. The significant contribution of the model is depicted as follows.
b.i. Improved real-time precision across devices
In contrast to previous works, which frequently use fixed RGB thresholds, our system uses Hue-based dynamic thresholding, which considers differences in camera sensors and light scenarios among various smartphones. This guarantees a better PPG signal and HRV estimation.
b.ii. Integrated signal processing pipeline
The framework proposed integrates RGB extraction, frequency analysis using fast Fourier transform (FFT), peak-picking segmentation, and moving variance classification into one pipeline with a priority on real-time performance. The steps are often done independently or less efficiently in existing applications.
b.iii. Strong HRV estimation metrics
Our system is not only able to compute heart rate but also to establish time-domain HRV metrics (RMSSD) and frequency-domain metrics (low frequency [LF]/high frequency [HF] ratio, power spectral density [PSD] analysis) to give a full measure of activity of the ANS similar to clinical-grade oximeters.
b.iv. Test on real-time dataset
The methodology has been tested on 42 volunteers in real-time conditions, showing low mean error (5.97%) relative to pulse oximeter readings, indicating both accuracy and usefulness in real-world situations, which most of the previous works do not have.
b.v. Finger placement variability
The system takes into consideration the variability in finger pressure and finger positioning, and dynamically changes the PPG extraction to preserve signal fidelity, a feature that is frequently ignored by current mobile HRV solutions.
Finally, the novelty lies in the combination of device-adaptive PPG signal acquisition, integrated real-time processing, robust HRV computation, and valid performance across a variety of smartphone devices, which together offer a more accurate and reliable mobile HRV monitoring solution than any current application.
The rest of the research manuscript is organized in the following manner. Section II provides the literature survey that evaluates the existing methods of HRV measurement under real-time monitoring. Section III depicts the system model representation of the proposed model and the brief explanation is provided in Section IV. Section V intercepts the achieved results, and Section VI portrays the conclusion of the research along with future reference.
II. Literature Review
The detailed explanation of existing methods utilized in the research of real-time monitoring of HRV measurement is provided in this section.
Naeini et al. [11] established a Deep Learning (DL) based HRV assessment approach under the utilization of PPG. In this technique, each parameter of the model was trained by a customized Convolutional Neural Network (CNN) along with evaluation of the electrocardiogram signal. By considering this approach, the performance of the model was improved with better accuracy and standard deviation (SD). Moreover, the model faced certain potential issues that reduced the generalizability and reliability functions. Georgieva-Tsaneva et al. [1] employed a continuous monitoring method using an ECG signal, which includes a gyroscope and accelerometer for analyzing the cardiac activity of the patients. In the context, the method detects syncope and arrhythmia diseases using the quantitative deviation principle. Meanwhile, the model was only suitable for short-term observations. For long-term evaluation, the model suffered from computational and complexity problems. Hoog Antink et al. [13] introduced an optical heart rate (OHR) monitoring system to estimate the physiological variations of cardiac arrhythmias using PPG. The model details the subtle changes of heart rate and provides an accurate estimation of beat-to-beat interval. But the parameters of the model were affected by HF content and cautious LF/HF ratios. Hoang et al. [6] presented a mobile application to evaluate the prognostic and adverse significance of cardiovascular events. Conceptually, the method measured the potential significance of HRV measurement with predictive indicator, which reduced the mortality rate specifically. However, the model faced certain challenges while revealing the accessibility of relevant outliers, which influenced results with overestimating problems.
Liu et al. [15] developed a hybrid learning-based medical intelligence ResNet-BiLSTM technique to detect physical fatigue effectively. In this context, the developed DL framework analyzes the physiological advancement using edge computing biosensor resources. In addition, the model reduced the computational challenges. While performing the detection process under real-time estimation, the accuracy and robustness were minimized gradually. Further, the observed temporal and spatial features reduced the detection performance. Esgalhado et al. [16] presented a real-time monitoring system for evaluating the autonomic nervous function and HRV regulation under the utilization of ECG and PPG signals. Conceptually, the method utilized the Hilbert Double Envelope Method (HDEM) to detect the peak value of the signal. From this perspective, the Pearson correlation, root mean square error (RMSE), and T-Test value were determined, which provide highly accurate results. Further, the developed model faced computational cost problems and flexibility issues. Comfort et al. [17] employed a hybrid approach to measure the pulse wave of subjects using a smartphone, which demonstrates high correlation with minimal sampling rate measurements. Moreover, the developed model efficiently addressed the potential problems. However, it faced a feasibility problem with a minimal accuracy rate, which minimizes the PNS activity and causes overestimation problems. Hillmann et al. [18] established a TeleCheck-AF application to assess the activity of ANS and the feasibility of variations using PPG signal. In this method, the data consistency and compliance were observed effectively. But the adherence of patients was high, which reduced the effectiveness of performance gradually. In a similar field, Vargas et al. [24] pointed out the importance of robotic exoskeletons in the rehabilitation of post-stroke, with the authors noting that the robots assist in neuromotor recovery and passive and active therapy. On the same note, Razak et al. [25] introduced a system that builds upon Internet of Things (IoT) and includes heart rate and alcohol sensors to avoid impaired driving, demonstrating the significance of real-time physiological control and automated decision making in safety applications. Taken together, these studies highlight the increased significance of applying the frameworks of physiological signals analysis, intelligent systems, and real-time monitoring in the field of health care and applications focused on safety. Additionally, Ardyansyah et al. [26] proposed a systematic approach to the development and validation of a patient outcome measure of interprofessional tuberculosis treatment with the Delphi method. Their multi-level process, which includes conceptual design, consensus of experts, translation into languages, and validation with COSMIN, provides high content validity and reliability in five domains. Although the method has some benefits like systematic validation and expert-based accuracy, it is constrained by its reliance on expert opinion and the absence of real-time clinical validation. Taken together, all these studies highlight the increasing significance of merging physiological signal analysis, intelligent systems, and proven frameworks into useful applications of real-time health care monitoring.
a. Limitations
The limitations faced by the existing conventional methods are listed below,
The observed DL ensemble classifier did not extract the prominent features of HRV Measurement under PPG signal, which results in potential challenges as minimal generalizability functions [10].
For long-term evaluation, the continuous monitoring method using ECG signal suffered from computational and complexity problems, which also degrade the model’s ability progressively [11].
While estimating complex optical heart rate, the physiological variations of cardiac arrhythmias ensure the changes accurately, but the potential effectiveness of the model was reduced because of HF content cautions.
During evaluation, the ResNet-BiLSTM model achieved effective computation, but the robustness and performance efficacy were reduced gradually and resulted in poor detection accuracy [12].
The high correlation features of HRV measurements using a hybrid approach faced feasibility problems, overestimation challenges, and complexity issues [14].
III. System Model for Real-Time HRV Measurement Using PPG
Figure 1, depicts the system model representation of real-time HRV measurement using PPG waveforms. Conceptually, the research evaluates the classification and segmentation process based on the accomplishment of the data acquisition phase, pre-processing phase, signal evaluation phase, estimation phase, and desired outcome. Under these specifications, the input PPG signal waves are captured from the recorded video. Further, the quality of the video frame is enhanced by a pre-processing technique. Moreover, the intervals between consecutive beats are evaluated properly to identify the peak interval of PPG. From this perspective, the heart rate and HRV measurements are estimated effectively. Based on these proposed algorithm, the video recording parameters were tweaked to improve the real-time heart rate (HR) measuring application’s performance across various devices.

Figure 1:
System model depiction of real-time HRV measurement using PPG.
IV. Smart Phone Application Based on HRV Measurement
The proposed study is a real-time experimental design to estimate HRV on the basis of PPG signals detected using a smartphone camera. The suggested methodology will combine video capture, video preprocessing, signal extraction, and HRV estimations to assess the efficiency of the created mobile application in real-time.
The research aims to develop a real-time HRV measurement based on PPG signal using smart phone applications. To predict the actual variability of heart rate, the input video sequence data is captured from the students and staff of Jagadguru Sri Shivarathreeshwara (JSS) Academy of Technical Education at Bangalore. From this context, all the sample data are taken in a relaxed position by keeping the finger in the smart phone. The observed data sequences are subjected to the preprocessing phase to split the video sequence into frames. The acquired frames are then fed into RGB extraction to extract the color channels of each pixel in the image. Every image pixel has a three-channel representation as RGB that contains specific intensity resolution. After calculating the intensity specification, the observed frames are transferred into the filtering process. In this filtering process, the unwanted noise and artifacts were removed to enhance the visual quality by a smoothing and sharpening process, Further, the quality-improved signals are allowed into FFT, which reveals the magnitude and frequency constituents of the time-domain signal. From this context, the systolic peak of the PPG waveform is segmented by peak picking process, which is then allowed into a distance constraint for calculating the optimal distance of consecutive heart beats. Meanwhile, a RGB threshold is applied to capture the subtle color changes of blood flow. Finally, a moving variance is integrated to observe the variance of individual’s ANS activity. Based on these calculations, the sampling rate of every heart rate is measured effectively. Thus, the developed smart phone application accurately monitors the HRV measurements for real-world applications. The basic block representation of real-time HRV measurement using PPG is illustrated in Figure 2.

Figure 2:
Block diagram for real-time HRV measurement using PPG.
a. Study design and experimental details
The research was carried out in 2024 as live experimental research to test the smartphone-based HRV measurement with PPG signals. The research has a systematic workflow, which includes data acquisition, preprocessing, signal processing, segmentation, classification, and HRV estimation. The subjects of the study were 42 in total, conducted in controlled conditions indoors. Video data of fingertips was recorded via a smartphone camera with the same resolution and frame rate. Participants were asked to sit in a relaxed position and keep their fingers in a stable position on top of the camera and flashlight to guarantee proper signal capture. Figures 1 and 2 represent the system model and block diagram of the overall experimental process respectively to make it more understandable and reproducible.
b. Developed android application
The major building elements of the Android application were created, which acquire PPG signal from the processing frame-to-frame image camera and process it to compute HR. The first step in the smart phone application is the acquisition of a frame image in YUV420sp format and NV21 encoding. The Android Luminance–Chrominance Color Space (YUV) buffer is converted to an RGB pixel array, and by averaging the red component of the pixel array, the PPG waveform is obtained. An enhanced algorithm was utilized for heart rate estimation, HRV, and PPG signal classification. The sequential steps that were taken to construct the application are depicted in Figure 3.

Figure 3.
Steps involved in an android application design.
Initially, the position, orientation, and internal properties of camera parameters are set properly, which includes the principal point, focal length, and distortion coefficient. In this context, the mobile camera’s preview size was set to 640 × 480 pixels. The average frame rate ranged from 25 fps to 30 fps. Standard YUV420sp format and NV21 encoding were selected for the camera preview. Compared to a straight RGB representation, the YUV format allows for a lower bandwidth for chrominance components when encoding a color image or video. Luminance component Y represents the actual linear-space brightness, and the chrominance components U and V describe blue-red projection respectively in the YUV model. Based on camera specifications, the camera previews will be received in Standard YUV420sp format and NV21 encoding with a frame rate that varies between 25 fps and 30 fps. To retrieve the PPG signal, YUV420sp (NV21) is essential to be converted to RGB. NV21-encoded data byte array is converted into an RGB array using the decode YUV420SP method, which is derived from the Ketai Library. Thus, the single frame of YUV 420 is illustrated in Figure 4.

Figure 4:
Single frame of YUV 420.
Based on these YUV 420 frames, the values of RGB and Hue of various smart phones where, the red value of RGB varies from smartphone to smartphone and cannot be in a fixed threshold for red. The threshold issue could be solved based on the Hue value. The Hue ranges are specified as threshold values for the Red Hues that are depicted in Table 1. And, the value for RGB and Hue on various smart mobile devices is portrayed in Figure 5.

Figure 5:
Value of RGB and Hue for diverse smart phone devices.
c. Input video representation
After defining the RGB threshold and Hue values, the fingertip video was captured by the smart phone. In the Research, the HRV measurement of every person is monitored by an effective mobile application using PPG waveforms. For this context, the input is captured from the real time dataset. Conceptually, the real-time dataset is gathered from the students and staffs of JSS Academy of Technical Education at Bangalore in relaxed position by keeping the finger in the smart phone. In this study, totally 42 members participated whose age ranges from 20 years to 30 years. The observed video specification is listed in Table 2. The experiment was conducted with the help of recording fingertip videos of the participants in controlled situations with the help of a smartphone camera. The videos were recorded at a steady resolution and frame rate, and the participants were asked to keep a steady finger position to guarantee quality data collection.
d. Data collection and experimental procedure
The data collection was carried out by capturing videos of fingertips of the participants with a smartphone camera in similar lighting conditions. Each recording was performed for a fixed duration with a frame rate of 30 fps and standard resolution. The obtained video data were then subjected to frame extraction, RGB signal calculations, filtering and peak detection to obtain heart rate and HRV parameters. The whole workflow was introduced and tested in a real-time mobile application setting to test the efficiency of the proposed method.
e. Preprocessing using RGB frame calculation
The observed input fingertip video is fed into pre-processing phase to improve the quality by removing the artifacts, noise, missing attributes, errors, and so on. In this context, the quality standardization process involved video to frame conversion, RGB extraction, and intensity calculations, which are briefly described in the following sections.
e.i. Video to frame conversion
Initially, the garnered video sequence input is converted into frames with specific dimensions. The frame size is the same when compared to the size of database repository. From this perspective, the resultant frames are used to explore the pixel area for diverse estimation. Thus, the estimation of video frames is expressed as,
Therefore, the obtained extracted frames are then allowed into RGB extraction to represent the color channels [11].
e.ii. RGB extraction and intensity calculation
In this phase the captured frames from smart phone’s built in camera along with the flash light classifies the severity level of heart rate by comparing with the normal rate. To estimate the variance of heart rate, color extraction concept is integrated. In RGB color space extraction, the frame array indicates the RGB color components for every specific pixel representation. Moreover, each pixel has been extracted by the combination of RGB intensities based on pixel’s location. In general, RGB extraction has the potential for exploring 16 million colors. Because of these pixel colors every minor information of frame images are extracted efficiently [16]. Therefore, these three-dimensional graphs analyze the variation of heart rate based on color intensities. From this perspective, the highest intensity of R/G, B\G, estimate the variance of heart rate from PPG. Additionally, the color space observed the density of blood vessel surface in PPG samples. Further, the extracted color channel dimensions along with intensity estimation enhance the accuracy of PPG screening with additional benefits [17]. The extracted color channel images are then subjected into representation phase. From this context, the obtained RGB extraction is portrayed in Figure 6.

Figure 6:
Extraction of RGB.
The RGB extraction technique was chosen because it is simple, fast to compute, and can detect fine changes in blood perfusion at the fingertip. Although more sophisticated signal processing or machine learning algorithms might offer greater accuracy, they generally need substantial data to train and additional computational resources. Conversely, the extraction of RGB is directly based on the color intensity changes in video frames due to blood flow, and thus it is quite suitable in real-time HRV monitoring with a standard smartphone camera without any extra equipment or extensive post-processing.
e.iii. Motion artifact reduction
Motion artifacts of finger movements, the unevenness of pressure, or slight movement of the fingertip may create a significant noise in real-time PPG signal acquisition with a smartphone camera and distort the signal extracted. To overcome these issues, a number of motion artifact reduction methods are integrated into the preprocessing phase.
First, the feedback should be given to the subjects to hold a constant finger position above the camera and flashlight to reduce large changes in motion when recording the data. In addition, frame-to-frame smoothing of RGB intensity values is carried out to eliminate sudden changes due to small movements. The extracted red channel signal is then subjected to a moving average filter to eliminate high-frequency noise elements that are related to motion.
Furthermore, an adaptive thresholding mechanism is used to detect and remove outlier samples that are not in line with the normal physiology of the PPG waveform. This is to make sure that sudden spikes due to movement are not misconstrued as legitimate cardiac peaks. Additionally, the Hue-based filtering makes the technique more robust by minimizing the sensitivity to changes in illumination and intensity due to motion.
This integration of preprocessing methods is sufficient to reduce the distortion caused by motions and enhance the stability and reliability of the PPG signal, which makes the suggested system applicable in real-time HRV monitoring with the help of smartphone devices.
To prepare the signal to be analyzed by HRV, the obtained data were processed by the preprocessing steps such as frame extraction, computation of the RGB signal, removal of noise, and evaluation of the intensity.
The assumption made in this research is that the fingertip is relatively stationary during the process of data collection, and that there exist sufficiently steady lighting conditions to allow the measurement of consistent PPG values. These assumptions are required to reduce artifacts of motion and variation in intensity during RGB extraction. Though slight violations of these conditions can cause noise in the signal, the preprocessing methods used (smoothing, adaptive thresholding, and motion artifact reduction) reduce the impact. Nonetheless, large movements or extreme changes in light could still affect the signal quality and accurate peak detection.
f. Image representation using fast Fourier filtering methods
To attain an accurate HRV measurement, the quality of the image is improved by image filtering techniques. In this method, the noises, edges, and blurred images are reduced to provide a quality improved smoothing image. In addition, the edges of the image are preserved effectively for processing [18]. Further, the quality improved image is allowed into FFT, which calculates the discrete Fourier transform (DWT) of a signal. Conceptually, the DWT operates on a vector representation, in which the rotational function space is evaluated by unit vectors. Conceptually, the wavelet transforms using FFT performed the filtering, splitting, and decimation function along with scaling coefficients, which separates the signal into stages as low-pass, band-pass, and high-pass band. In this transform, the signal was filtered with a low-pass filter with a cut-off frequency of 100 Hz, and a high-pass filter having the cut-off as 10 Hz. Due to this decimation, exact results of signal variation are computed with minimal computational complexity [19]. Therefore, the frequency domain of these responses is formulated by the FFT algorithm, which is mentioned in Algorithm 1.
In order to enhance the reproducibility and give a clear picture of the signal processing pipeline, mathematical formulations and implementation parameters of the filtering and FFT operations are detailed in this section.
f.i. Signal representation
The PPG signal extracted in red channel is represented as a discrete-time signal x[n], where n = 0,1,2,...........,N − 1 is the sample index. In this case, N will be the total number of samples obtained from the video frames, which will depend on the length of the video recording and the camera frame rate. Each sample x[n], is the mean change in intensity of red channel at a given time, at a time instance, which reflects the changes in blood volume at the fingertip. This discretization is the foundation of other signal processing tasks like filtering, frequency analysis, and the calculation of peaks to get the correct HRV estimations.
where N denotes the number of samples obtained from video frames based on the frame rate and recording duration.f.ii. Bandpass filtering
A bandpass filtering method is used to remove motion artifacts, noise, and irrelevant frequency components, using the physiological range of human heart rates. A sampling rate of 30 Hz is used to process the extracted PPG signal, with lower and upper cutoff frequencies of 0.7 Hz and 4.0 Hz, respectively, which are within the range of normal heart rate limits. These cutoff frequencies are scaled relative to the Nyquist frequency in order to design a digital filter appropriately. A 4th-order Butterworth bandpass filter is chosen because of smooth and steady passband response that maintains the important signal properties. Moreover, forward and backward filtering are used to implement zero-phase filtering to prevent phase distortion, thus preserving the time content of the PPG waveform to analyze HRV accurately.
In Eq. 3, and denote the normalized lower and upper cutoff frequencies of the bandpass filter. The terms fL and fH represent the actual lower and upper cutoff frequencies (0.7 Hz and 4.0 Hz), while fS is the sampling frequency (30 Hz). The quantity fs/2 is the Nyquist frequency, and normalization is performed by dividing each cutoff frequency by this value to obtain dimensionless parameters suitable for digital filter design.
f.iii. Windowing method
A windowing method is used on the PPG signal before the FFT to minimize spectral leaking and enhance the accuracy of the frequency analysis. In this work, a Hamming window is used due to its ability to smooth signal discontinuities at the boundaries. The window function w[n] is multiplied with the original signal x[n] to obtain the windowed signal xw[n]. This operation reduces sudden variations on the edges of the signals and thus limits distortion in the frequency domain, and allows a more accurate estimation of frequency content in the HRV.
A Hamming window is used to reduce spectral leakage prior to frequency transformation:
The windowed signal is given by:
f.iv. FFT
In order to examine the frequency properties of PPG signal, the windowed signal xw [n] is transformed to the frequency domain using FFT, and expressed as X[k]. Such transformation is possible to identify dominant frequency components related to the heart rate and HRV. A length of the FFT N = 256 is selected in this work to provide sufficient spectral resolution. The accuracy of the frequency estimation depends on the sampling frequency fs., defined by the frequency resolution . Also, zero-padding is used where necessary to ensure a regular FFT length to enhance spectral interpolation, as well as to ensure that each segment of the signal is analyzed equally.
The frequency spectrum of the signal is computed using FFT:
Frequency resolution:
Zero-padding is applied when necessary to maintain uniform FFT length.
f.v. PSD using Welch’s method
The PSD is computed with Welch method to have a stable and reliable approximation to the frequency content of the signal. In this method, the signal is divided into 50-percent overlapping 128 sample segments, and each segment is windowed with a Hamming window to minimize spectral leakage. Each segment of 256 points is then subjected to the FFT and the squared magnitude of the resultant spectra averaged over all the segments. Such averaging process as Pxx(f), minimizes noise variance and gives a more accurate and smoother estimate of the power distribution of the signal across the frequency with L being the total number of overlapping segments. PSD is calculated to be:
In Eq. 8, Pxx (f) denotes the PSD at frequency f, L is the number of overlapping segments, and Xi (f) represents the Fourier transform of the ith segment. The term ⌊Xi (f)⌋2 indicates the power of each segment, and averaging over L segments provides a smoother PSD estimate.
f.vi. Implementation details
The estimation framework of HRV proposed is implemented in Python with the help of efficient scientific computing libraries to guarantee accuracy and real-time performance. FFT calculations are done using NumPy, which has optimized numerical functions, and SciPy, which has signal filtering functions like butter to design filters, and filtfilt to zero-phase filter. The Welch method found in SciPy is also used to estimate PSD. These implementation options offer trustworthy frequency analysis, good noise removal and computational efficiency, which makes the strategy applicable in real-time smartphone-based HRV monitoring systems.
g. Parameter selection and sensitivity analysis
The choice of several main parameters including sampling frequency (30 Hz), bandpass filter (0.7–4.0 Hz), filter order, and the FFT length (N = 256) is based on the physiological range of the human heart rate as well as previous signal processing standards in PPG analysis. These parameters provide the preservation of the appropriate cardiac frequency components with minimal noise and motion artifacts. Alternative parameter values were experimented, such as varying cutoff frequencies and FFT sizes, and this caused loss of important signal components or increased sensitivity to noise. The findings suggest that the selected parameter set offers the best trade-off between accuracy and computational efficiency in real-time implementation. Sensitivity analysis also shows that even slight variations in cutoff frequencies may have a different impact on accuracy in detecting a peak, thus affecting HRV estimation.
The processing signal phase is based on the assumption that the signal displayed by the PPG is mainly comprised of the major frequency elements of the physiological heart rate and that noise may be adequately separated by bandpass filtering. This assumption can be explained by the well-founded biomedical signal processing principles. The filtering and FFT parameters chosen will conserve valuable cardiac data and reduce noise. Yet, there are differences in physiological states or abnormal heart rates, and this can alter frequency distribution, and subsequently, can impact the accuracy of HRV estimation. Nevertheless, in the normal real-time monitoring scenarios, the proposed method proves to be robust.
h. Segmentation using the peak picking method
The observed signal representation is then proceeded into the segmentation phase, in which peak picking is performed. Conceptually, peak picking is used to determine the salient peaks of the signal, which also extract the normal frequency range from the frequency domain representation. In addition to this, the peak picking assumes the excitation characteristics of ambient or impulse loading conditions. Based on these analyses, the frequency response function ensures the peak value is around the normal frequency location. From this context, the peak value frequencies are determined to measure the accurate variation of the signal [20].
Peak picking was the selected method of segmentation of PPG waveforms since it offers a simple and effective means of identifying systolic peaks required to calculate heart rate. More complex machine learning algorithms can automatically identify peaks, but need annotated datasets and can add complexity and latency to real-time applications. Peak picking technique, distance restrictions, and RGB thresholding enable effective real-time processing with limited computational cost, which is paramount in smart-phone HRV monitoring.
i. Classification based on the RGB distance variant method
The RGB threshold formulation applied in this research is adaptive by nature because it is based on the lowest and highest of the intensity values of the red channel per recording as opposed to a constant threshold. This dynamic calculation allows the technique to adapt to a change of tone in skin color, lighting, and various camera properties of smartphones. Also, the Hue-based filtering technique is another way of increasing the robustness, as it encourages the consideration of relative color data instead of absolute intensity values, thus making it less sensitive to illumination variations. Even though some small variations still might arise in extreme conditions of lighting or heterogeneous skin, the adaptive thresholding with Hue constraints used together guarantees consistency and reliability in adverse real-world conditions.
The attained highest peak representation is further allowed into the classification phase, which includes distance constraints, RGB threshold, and Moving Variants. Here, the distance constraints ensure the specific relation between two consecutive intervals that limit the optimization problem and provide more accurate results. In this process, the signal length is squared to identify the peak value. To remove the unneeded spikes, an average filter is utilized, which identifies the local maxima whose amplitude exceeds the predetermined RGB threshold. Thus, the mathematical expression for the threshold is given as,
where, min(red array) indicates the minimum value of the average red channel array, and max(red array) denotes the maximum value of average red channel array. After estimating the threshold value, the progressive variants of HRV signals along with peaks values are detected, which ensure robust representation for classification tasks. Based on these representations, the total number of peaks is determined and estimate the heart rate in terms of beats per minute (bpm), which is depicted as,j. Threshold selection and sensitivity
The RGB threshold and distance limits in this study are calculated adaptively according to the signal properties of each recording. This is explained by the need to support differences in the tone of the skin, the color of light, and the camera characteristics of devices. Other fixed threshold values were also tested but they did not lead to consistent peak detection and lower accuracy in different conditions. The sensitivity analysis shows that improper threshold selection can result in false peaks detection or beat-miss, directly affecting heart rate and HRV estimation. As such, the adaptive thresholding mechanism suggested is more stable and reliable in use in a variety of real-time situations.
k. Estimation of heart rate
The minor variations in the time between heartbeats are known as HRV. These variations can nevertheless signal existing or potential health difficulties, including heart ailments and mental health conditions like anxiety and depression, even though they cannot be seen without the use of specialized equipment.
HRV was computed based on RMSSD between each heartbeat in the time domain. Heart rate and were calculated based on the maximum peaks and between successive beats, respectively. RMSSD measures the parasympathetic activity of the subject. Average range of RMSSD varies from 20 ms to 200 ms, and it decreases as age increases. Low RMSSD values may lead CVD and depression. High RMSSD values indicate that the subject is more adaptable to the stress. According to world health organization (WHO), 50% of age 20–25 years old have an RMSSD in the range of 55–105 ms. Computations of RMSSD, 152.97 ± 34.44 ms were obtained from a smartphone for the age group 22.14 ± 3.99 years. RMSSD values obtained were correlated with standard values, and hence, it could be concluded that most of subject are in stable and clam state.
Additional analysis was conducted based on peak detection and statistical analysis like RMSSD and PSD to measure heart rate and HRV parameters with accuracy.
V. Result Discussion
The outcome obtained from the utilization of a real-time dataset for monitoring the HRV measurement using a smartphone application is specifically discussed in this section. In addition, the model effectiveness is assessed with PSD using Welch’s method and is estimated by mean and SD parameters, which are briefly explained in the section specifically.
a. System specification
The entire HRV measurement research is implemented in python software with certain specifications, which are significantly portrayed in Table 3.
b. Dataset description
The data was collected from the 42 volunteers of age group of 22.14 ± 3.99 years. Volunteers should be in relaxed position before capturing the PPG signal from smart camera. The mobile camera’s preview size was set to 640 × 480 pixels with frame rate 25–30 fps. Data quality is greatly influenced by applied pressure on the camera, finger position; placing the finger just on the camera produced better results than placing the finger on both the camera and the flash. Its was recommended for the volunteers to keep the finger in the still position on camera for duration of 2 min, so that accurate result could be achieved. If the pressure applied on the finger high, leads to an increased intensity of the RGB values and accuracy of the result decreases. If the finger is placed very far, then also the RGB values will be incorrect. Thus, the finger has to be placed on the camera smoothly, to obtain better accurate results.
c. Experimental research outcomes
The achieved real-time monitoring HRV measurement results are demonstrate in Figure 7, which portrays the outcome of every successive sections. Conceptually, the fingertip video sequence from real-time dataset captured by smart phone is effectively processed, represented, segmented, and classified. From this context, the observed results are portrayed significantly.


Figure 7:
Experimental outcome of developed model. HF, high frequency; LF, low frequency; PPG, photoplethysmography; PSD, power spectral density; RGB, red, green, and blue; VLF, very low frequency.
d. Estimation metrics
The activity of sympathetic nervous system (SNS) to PNS is analyzed by mean and SD parameters. In general, Mean determines the overall summation of all values. Similarly, SD expresses the difference of mean value from the observed subject. Thus, the observed mean and SD values are portrayed in Table 4.
e. Comparative discussion
To examine the effectiveness of the android application, the obtained results were compared with existing oximeter real data to calculate the error. Also, the Frequency domain analysis was performed to estimate PSD using Welch’s method. The spectrum of HRV recordings can be divided into spectral components such as very low frequency (VLF), low frequency (LF) and HF. Short-term (1–5 min) and long-term recording times are used (entire 24 hr) to estimate VLF, LF and HF.
VLF: A VLF occurs between 0.003 Hz and 0.04 Hz. Although the specific cause of VLF component is unknown, it is believed that it could have evolved due to temperature, hormonal, and vasomotor activity, and is unrelated to the ANS.
LF: LF includes of both sympathetic and parasympathetic actions, frequency range between 0.04 Hz and 0.15 Hz. LF are associative with peripheral vasomotor activity and thermoregulation.
HF: HF determines parasympathetic activity of the ANS special for respiratory sinus arrhythmia, where frequency range lies between 0.16 Hz and 0.4 Hz. Short-term (1–5 min) and long-term recording times are used (entire 24 hr).
The frequency domain features plays a vital role in the determination of health of a subject. While performing the PSD function using Wlech’s method, the subject has VLF, LF and HF with their peak, and LF/HF ratio was computed. The VLF band (0.0033–0.04 Hz) has rhythms with durations ranging from 25 s to 300 s. The LF band (0.04–0.15 Hz) is made up of rhythms with periods ranging from 7 s to 25 s and is influenced by breathing rates ranging from 3 bpm to 9 bpm. There are 12–45 full periods of oscillation in a 5 min sample. Breathing rate ranging from 9 bpm to 24 bpm influences the HF or respiratory band (0.15–0.40 Hz). Under controlled conditions, the ratio of LF to HF power (LF/HF ratio) may estimate the ratio of SNS to PNS activity. The energy present in the VLF, LF, and HF bands is combined to form total power. It was observed that VLF component values were constant for all the subjects. This was because all the recordings were carried out for duration less than 2 min. Thus, there was no variation in the readings. The VLF values vary only when the duration of the recoding is more than 2 min.
LF band is also called the baroreceptor range during the resting state. PNS activity could be identified with LF of 0.05 Hz, whereas SNS activity could not be traced below 0.1 Hz. LF bands in the rest state describe breathing activity. Almost all the subjects contribute toward LF with 32.30 ± 10.90% with a smartphone application, indicating both PNS and SNS activity. Parasympathetic activity in the HF band relates to respiration cycle. Subjects contributed with an absolute power of 67.70 ± 10.90, indicating a normal respiration rate in the subjects.
The LF/HF ratio describes activeness parasympathetic or sympathetic nerve system of the subject. If the LF/HF ratio is high, it indicates that the sympathetic nerve system is active. The subject can be under stress or can be anxious, due to which the adrenaline glad secrets large amount of fight hormones. Similarly, if the LF/HF ratio is very low, it indicates that the parasympathetic nerve system is active and the candidate is calm and stable. From the study carried out, it was found that most of the subjects had very low LF/HF ratios with 0.49 ± 0.59, which shows that subject were a stable and thus their parasympathetic nerve system was active. In the investigation, four candidates had a higher LF/HF ratio, indicating that they were under stressful conditions, which indirectly depicts that their sympathetic nerve system was active.
It is observed that with a smartphone camera, the mean of all errors is 5.969% compared to the pulse oximeter. The results obtained from the developed application were compared with a pulse oximeter which are illustrated in Figure 8.

Figure 8:
Achieved results of android application. HF, high frequency; HRV, heart rate variability; LF, low frequency; VLF, very low frequency.
VI. Conclusion
The current research introduces a real-time smartphone-based HRV monitoring system based on the PPG signal and shows that this method is more accurate, robust, and computationally efficient than the traditional ones. The suggested approach combines adaptive RGB thresholding, motion artifact reduction, and optimized signal processing, which allows the reliable estimation of HRV in the conditions of the real world. The experimental findings indicate that the fingertip PPG signals effectively estimate the heart rate and the HRV parameters, such as RMSSD, and are within the standard physiological ranges, thus confirming the functionality of the system developed.
Theoretically, the work has an impact on the field in that it proposes an adaptive, computationally efficient real-time HRV analysis system based on smartphone sensors to mitigate the effects of noise and motion artifacts, as well as device variability. The combination of preprocessing, frequency-domain analysis, and peak-based estimation in a mobile platform underlines that there is a way to approach continuous health monitoring in a scalable way.
Despite these contributions, there are limitations to the study. The data is restricted to a particular age and controlled conditions, and this can impact the generalizability. Also, the differences in the brightness, skin color, and the hardware of the devices can affect the quality of the signals. Future studies will involve increasing the dataset in various populations, enhancing the system with more robust machine learning techniques, and working out the long-term continuous monitoring of the environment with the system.
Comprehensively, this work will fill the gap between existing clinical HRV measurement systems and available mobile health solutions and will offer a practical, reliable, and scalable method of real-time cardiovascular health monitoring and early detection of abnormalities.