# Estimation of Mental Distress from Photoplethysmography
## 2 Materials and Methods
### Feature Extraction  
Considering the short duration of each segment of analysis (70 s long), no additional windowing was set for the analysis, and the entire segment was used to extract the characteristics from the signal. It is important to highlight that all metrics were calculated retrospectively from PPG signals, rather than in real-time, as this work firstly intends to validate the proposed model. Similarly to other studies using short-term analysis of heart variability, classical time domain, frequency domain and morphological characteristics are computed from PRV and for both conditions (calm and stress) [31]. Table 1 shows the complete list of features used in the study. Concretely, adjacent normal cardiac cycles (\(NN\)) are computed and then, the mean of \(NN\) intervals (\(MNN\)), standard deviation of \(NN\) intervals (\(SDNN\)), standard error of successive differences of adjacent \(NN\) intervals (\(SENN\)) and the difference between the longest and shortest \(NN\) interval, that is the dynamic range, (\(DRNN\)) are calculated. Additionally, the ratio of pairs of successive \(NN\) intervals differing more than 50 ms (\(pNN50\)) are calculated by taking into consideration the total number of analyzed cardiac cycles. Finally, the first derivative (\(FD\)) of successive differences of adjacent \(NN\) intervals is computed and standard deviation (\(SDFD\)) and root mean square (\(RMSFD\)) are estimated. Moreover, it has been reported that frequency parameters extracted from PRV may contribute with significant information that is not present in time-based methods [12]. Therefore, power spectral density (PSD) of the PRV is estimated in this work to obtain how power variance distributes as a function of frequency. A non-parametric method based on Fast Fourier Transform (FFT) is used. FFT is characterized by the simplicity of the algorithm and a high processing speed which are desirable specifications to be implemented in our design. According to the literature, three main spectral components are commonly used to assess PSD, namely very low frequency (\(VLF\)), low frequency (\(LF\)) and high frequency (\(HF\)), respectively [32]. The physiological meaning of \(VLF\) is quite diffuse, specially in short-term recordings and, consequently, it is out of this study [33]. On the contrary, \(LF\) and \(HF\) represent the control and balance of parasympathetic and sympathetic components [33]. More concretely, \(LF\) component ranges from 0.04 Hz up to 0.15 Hz and its increase is generally associated with a sympathetic activation [32]. On the other hand, \(LF\) component ranges between 0.15 Hz and 0.4 Hz and it is associated with parasympathetic modulation [32]. Finally, the relationship between the power found in \(LF\) and \(HF\) components is usually estimated, because it assess the sympatho-vagal balanve controlling the heart rate [34]. Thus, absolute values of potency (\(LF\) and \(HF\)), as well as relationship of \(LF\) and \(HF\) (\(NHF\)) regarding the total power (excluding \(VLF\) component) are calculated in this study. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Signal** & **Analysis** & **Features** \\ \hline \multirow{3}{*}{PRV} & Temporal & \multirow{3}{*}{\(MNN\), \(SDNN\), \(SENN\), \(DRNN\), \(SDFD\), \(RMSFD\), \(pNN50\)} \\  & Morphological & \multirow{3}{*}{\(HRNN\), \(TINN\), \(SANN\), \(KINN\)} \\  & Frequency & \multicolumn{2}{c}{\(LF\), \(HF\), \(NHF\)} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Temporal, frequency and morphological features computed for pulse rate variability (PRV) signals. With regard to morphological markers, HRV Triangular Index (_HRNN_) and Triangular Interpolation (_TINN_) are estimated. Morphological features are based on the fact that _NN_ interval durations can be converted into a geometric pattern, such that _NN_ density distribution is assessed by a simple equation to measure variability.