# Detection and Characterization of Physical Activity and Psychological Stress from Wristband Data
## 2 Materials and Methods
### Signal Processing
#### 2.2.1 Blood Volume Pulse  
Since the PPG is highly susceptible to noise and motion artifacts, the PPG signal requires denoising and the ACC data are used as a reference signal to remove the motion artifacts. We used three different signal processing techniques to obtain the denoised PPG signal from the raw PPG data (Figure 4). Both the raw ACC and PPG signals were normalized within the [\(-\)1,1] range. The ACC data were upsampled to obtain the same sampling frequency with the PPG data. Cross-correlation analysis was used to determine the delay between the ACC and the PPG signals. A time-delay of approximately 1 s was found between the ACC and the PPG data, where the highest correlation value occurred at a lag of 73 samples, and with a sampling frequency of the PPG and upsampled ACC signals of 64 Hz, the time-delay was found to be approximately 1.1 s. The same band-pass filter was applied to both the ACC and PPG readings. Physiologically, the HR in humans varies between 30 and 210 bpm (0.5-3.5 Hz) except for extraordinary situations. Several publications consider the 0.5-3.5 Hz frequencies as cut-off frequencies of a band-pass filter [12,49], which was also used for our band-pass filter design. After considering several different methods such as Butterworth, Chebyshev Type I/II, and Elliptic filter, a 4 th-order Butterworth band-pass filter was designed with the selected cut-off frequencies. The band-pass filter yielded a smoother signal by eliminating most of the noise. However, \begin{table}
\begin{tabular}{l c c c} \hline \hline \multicolumn{4}{c}{**Data Collection for EE Model Development (VO2 Mask + Wristband)**} \\ \hline
**Physical Activity** & **Number of Experiments** & **Number of Subjects** & **Minutes** \\ \hline Treadmill & 22 & 6 & 304 \\ \hline Stationary Bike & 37 & 9 & 656 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Experiments conducted for energy expenditure (EE) data collection. Figure 4: Overview of photoplethysmogram (PPG) signal processing. motion artifacts can still exist after the band-pass filter because its frequency can be inside the pass-band region (0.5-3.5 Hz). Therefore, additional steps were considered to filter out the artifacts from the signal. Adaptive noise cancellation (ANC) is a commonly used approach for PPG signal processing [50, 51]. Several different algorithms have been proposed for ANC, including the recursive least-squares filter and the least-mean-squares filter. Nonlinear recursive least-squares (NRLS) filters were used in this work for ANC. We used ANC involving NRLS filtering to remove the motion artifacts in the BVP signal. Since the motion artifacts are related to the movement of the users, and hence the ACC signals, we use the ACC data as the reference signal in the ANC algorithm. In the proposed approach, the ACC readings and the BVP signals are first processed through a band-pass filter to remove frequencies that are not physiologically reasonable. This band-pass filter removes all frequencies that are not representative of the underlying heart rate variations. After only the physiologically meaningful range of frequencies are retained in both the accelerometer and blood volume pulse signals, NRLS is used to remove the motion artifacts in the BVP signal. Since motion artifacts may arise due to movements in different dimensions, we use the three-axis ACC data. We sequentially remove the motion artifacts that are associated with the x-, y-, and z-axis of the ACC signals though the NRLS algorithm applied in series. The NRLS algorithm [51] consists of Volterra series expansion, which provides additional non-linear terms to handle the non-linearity of motion artifacts. The parameters include the filter length (\(M\)), forgetting factor (\(\lambda\)), covariance matrix (\(P\)), and weight matrix (\(w\)), which are specified as 6, 0.999, 1000 \(\times\)\(I\), and 0, respectively. Figure 5 illustrates the structure of ANC using NRLS.