# Personalized PPG Normalization Based on Subject Heartbeat in Resting State Condition
## 5 Personalized PPG Normalization Based on Subject Resting State Heartbeat
In the case of a sampling frequency of \(f_{c}=128\) Hz, as in the case of the CLAWDAS dataset, we can observe from Equation (3) that, in the case of a subject with a baseline heartbeat frequency of \(60\ \frac{\text{beat}}{\text{minute}}\), corresponding to \(1\ \frac{\text{beat}}{\text{second}}\), the subject-based resampling frequency is \(f_{SNc}=1\ \frac{\text{SNSample}}{\text{sample}}\), meaning that there are no differences between the signal in the DTD and in the SND. Note that \(60\ \frac{\text{beat}}{\text{minute}}\) is generally considered as the minimum value for normal people. For heartbeat frequencies higher than \(60\ \frac{\text{beat}}{\text{minute}}\), the mapping from the DTD to the SND implies an over-sampling, while for lower frequencies, the consequent under-sampling does not introduce aliasing, as 128 samples are guaranteed between two consecutive peaks. In Figure 4, PPG signals corresponding to the first baseline in the CLAWDAS Elderly dataset of Subjects 11 and 18, respectively, are considered. In the first row, the signals in the DTD are reported, showing the difference between the two subjects' heartbeat frequencies: for Subject 11, \(f_{Nb}=\frac{1}{78}\ \frac{\text{beat}}{\text{sample}}\), corresponding to \(84\ \frac{\text{beat}}{\text{minute}}\), while for Subject 18, \(f_{Nb}=\frac{1}{94}\ \frac{\text{beat}}{\text{sample}}\), corresponding to about \(82\ \frac{\text{beat}}{\text{minute}}\). In the second row, the same two signals resampled in the SND are shown. Note that we assumed in defining our procedure that the heartbeat during a resting state is a stationary and periodic signal; however, this is not the case in real life, justifying not having \(f_{Nb}\) strictly equal to \(\frac{1}{128}\ \frac{\text{beat}}{\text{SNSample}}\) for both subjects in the SND. In the case of multiple baseline signals, the heartbeat frequency is evaluated as the average of the heartbeat frequency of all of them. This procedure was applied, for example, during the normalization of the CLAWDAS signals. In this case, in fact, three different baseline signals were acquired from each subject. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Domain** & **Continuous Time** & **Discrete Time** & **Subject Normalized** \\ \hline Acronym & CTD & DTD & SND \\ \hline Heartbeat & \(f\ [\frac{\text{beat}}{\text{second}}]\) & \(f_{N}\ [\frac{\text{beat}}{\text{sample}}]\) & \(f_{SN}\ [\frac{\text{beat}}{\text{SNSample}}]\) \\ \hline Resting state Heartbeat & \(f_{b}\ [\frac{\text{beat}}{\text{second}}]\) & \(f_{Nb}\ [\frac{\text{beat}}{\text{sample}}]\) & \(f_{SNb}\ [\frac{\text{beat}}{\text{SNSample}}]\) \\ \hline Sampling frequency & – & \(f_{c}\ [\frac{\text{sample}}{\text{second}}]\) & \(f_{SNc}\ [\frac{\text{SNSample}}{\text{sample}}]\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Correspondences between the three domains. The pseudocode that allows applying the personalized normalization to the PPG signals of a generic subject \"s\" is reported in Algorithm 1. The first two rows initialize the counter variable \"i\" to 0 and set the SND resting state heartbeat frequency (FSNB) to the value arbitrarily chosen. In Rows [3; 4; 5; 6; 7; 8; 9; 10; 11], the resting state heartbeat of subject \"s\" is computed. Using this value, the subject-based resampling frequency \"fsnc\" is evaluated in Row 12. Finally, in Rows [13; 14; 15], all the signals collected from subject \"s\" are resampled using the new sampling frequency \"fsnc\".