## 4 Proposed Algorithm
### Detection and Cancellation of Movement Noise  
The algorithm detects noise in SDPPG signals during periods of pulse waves. Instead of continuous time, we consider time slots of which length is the pulse wave period. The length of the time slots can vary according to subjects. Even if signals are measured for a single subject, the duration of the pulse wave can vary according to physical conditions, so a fixed slot time cannot be used for this work. Hence, the algorithm first defines time slots of a pulse wave from the approximation coefficients that contains frequencies between 0 and 4 Hz, and determines whether the movement noise is included in each time period using the detail coefficient that contains a frequency range between 32 and 64 Hz. Each time slot is defined as the time from a peak time to the next peak time of \(A_{N}\). The procedure for movement noise detection is summarized in Figure 11.  
After determining a time slot, to decide whether movement noise exists the algorithm checks whether the period of the time slot is less than a threshold (\(Th_{p}\)). In this paper, the threshold is set to 0.3 (In [17], the heart rate is 40-200 beats per minute, which means that the shortest period is 0.3 s.), since the typical heart rate is between 0 and 4 Hz. If the period is less than 0.3 s, i.e., the heart rate is greater than 200 beats per minute, it is decided that the subject is abnormal or the signal is contaminated. If the period of the measured signal is greater than or equal to 0.3 s, the algorithm computes the power of the detail components between 32 and 64 Hz to detect a movement noise.  
To determine how much noise is included in a signal for any duration, for a given period the signal-plus-noise-to-signal (\(SNS\)) is defined as  
\[SNS=\frac{\text{Total power of measured signal and noise}}{\text{Total power of a reference signal}}\]  
As a signal and a noise cannot be separately measured, the algorithm is not able to directly use the signal quality used in communications, which is defined as the signal-to-noise ratio. \(SNS^{i}_{S}\) and \(SNS^{i}_{D(N\text{-}3)}\) denote \(SNS\) of the total signal and \(SNS\) of the detail component of level \(N-3\) at channel \(i\), respectively.  
If the \(SNS\) of detail component of level \(N-3\), whose frequency range is between 32 and 64 Hz, is greater than a threshold \(Th_{D(N\text{-}3)}\), the algorithm decides that the SDPPG signal includes movement noise during the period. Otherwise, the SDPPG signal has no noise. If only one channel has no noise among the channels, the algorithm selects the channel signal at the period without further computation. Otherwise, the algorithm calculates \(SNS\)s of the measured signals for all channels and chooses the best  
Figure 11: Procedure of movement noise detection algorithm.  
channel signal as the selection combining scheme [18]. Since the \(SNS\) closest to one means that the signal has the highest fidelity to the reference signal, the algorithm chooses the best channel such that  
\[k=\text{argmin}_{\{\text{i in all channels}\}}\left|SNS_{S}^{i}-1\right|\]  
Instead of \(SNS^{i}S\), alternative measures for selecting the channel can be used, such as \(SNS^{i}_{D(N-3)}\) of the SDPPG signal instead of its detail components.