# Personalized PPG Normalization Based on Subject Heartbeat in Resting State Condition
## 5 Personalized PPG Normalization Based on Subject Resting State Heartbeat  
The American Heart Association has underlined that the heart rate frequency of an adult in a resting state can vary in the range between 60 and 100 beats per minute. This inter-subject variability depends on many different factors, both personal and environmental. In the case of the CLAS and CLAWDAS datasets, the subjects' heartbeat range of the baseline recordings belongs to the one reported by the literature, as depicted in Figure 3, where the average heartbeat distribution for each dataset is plotted. In order to remove this inter-subject variability, the core idea of our normalization procedure is to map PPG signals, defined in the Discrete Time Domain (DTD), into a new Subject Normalized discrete Domain (SND), applying a mapping procedure based on the resting state heartbeat frequency. In this SND, all the subjects have the same resting state heart frequency. For each subject, a subject-based resampling frequency can be calculated, so that for all the subjects, the heart frequency of the resting state in the SND is equal, despite the original subject-peculiar frequency in the Continuous Time Domain (CTD). Then, the PPG data acquired during all the experimental tasks were also mapped into this new domain, applying the calculated subject-based resampling frequency and obtaining subject normalized PPG signals that can be considered for population-based analysis. Defining \(f_{\mathrm{c}}[\frac{\mathrm{sample}}{\mathrm{second}}]\) as the sampling frequency of the PPG signal, given by the acquisition device, and \(f_{b}[\frac{\mathrm{beat}}{\mathrm{second}}]\) as the heartbeat frequency in the resting state condition in the CTD, the corresponding normalized heartbeat frequency \(f_{Nb}[\frac{\mathrm{beat}}{\mathrm{sample}}]\) in the DTD is:  
\[f_{Nb}=\frac{f_{b}\frac{\mathrm{beat}}{\mathrm{second}}}{f_{c}\frac{\mathrm{ sample}}{\mathrm{second}}} \tag{1}\]  
We now define the subject normalized heartbeat frequency of the resting state in the SND as \(f_{SNb}[\frac{\mathrm{beat}}{\mathrm{SNsample}}]\), where SNsample stands for Subject Normalized sample, which is the independent variable of the SND. Figure 3: Distributions of the average heartbeat of the resting state PPG signals in CLAS (**left**), CLAWDAS Young (**middle**), and CLAWDAS Elderly (**right**) datasets. The subject-based resampling frequency that permits mapping the DTD PPG signal into the SND one is defined as \(f_{SNc}[\frac{\text{SNAME}}{\text{sample}}]\) and can be calculated as follows:  
\[f_{SNc}=\frac{f_{Nb}\frac{\text{beat}}{\text{sample}}}{f_{SNb}\frac{\text{beat}} {\text{SNSample}}} \tag{2}\]  
As our goal was to obtain a domain where the inter-subject variability is discounted, the \(f_{SNb}\) for all subjects' baseline should be the same. Once this constant value is chosen, the \(f_{SNc}\) resampling frequency for each subject can be calculated from Equation (2). Then, all the PPG data of the same subject can be resampled accordingly and mapped into the SND, making the SN data reliable for population-based analysis. In Table 2, the notation introduced is summarized for the sake of clarity. Taking this into account, Equations (1) and (2) can be rewritten as follows:  
\[f_{SNc}=\frac{f_{b}}{f_{c}}*\frac{1}{f_{SNb}} \tag{3}\]  
The resting state heartbeat in the SND (\(f_{SNb}\)) can be arbitrarily chosen, only paying attention to possible aliasing effects. In our calculations, we set \(f_{SNb}=\frac{1}{128}[\frac{\text{beat}}{\text{SNSample}}]\), which corresponds to one beat on 128 SNsamples in the SND. To analyze the effect of our normalization proposal, let us consider some numerical examples.