{'fraction_non_alphanumeric': 0.026242588390308175, 'fraction_numerical': 0.007832515921235635, 'mean_word_length': 4.7065580618212195, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cascade and parallel combination (CPC) of adaptive filters for estimating heart rate during intensive physical exercise from photoplethysmographic signal

Photoplethysmographic (PPG) signal is getting popularity for monitoring heart rate in wearable devices because of simplicity of construction and low cost of the sensor. The task becomes very difficult due to the presence of various motion artefacts. In this study, an algorithm based on cascade and parallel combination (CPC) of adaptive filters is proposed in order to reduce the effect of motion artefacts. First, preliminary noise reduction is performed by averaging two channel PPG signals. Next in order to reduce the effect of motion artefacts, a cascaded filter structure consisting of three cascaded adaptive filter blocks is developed where three-channel accelerometer signals are used as references to motion artefacts. To further reduce the affect of noise, a scheme based on convex combination of two such cascaded adaptive noise cancelers is introduced, where two widely used adaptive filters namely recursive least squares and least mean squares filters are employed. Heart rates are estimated from the noise reduced PPG signal in spectral domain. Finally, an efficient heart rate tracking algorithm is designed based on the nature of the heart rate variability. The performance of the proposed CPC method is tested on a widely used public database. It is found that the proposed method offers very low estimation error and a smooth heart rate tracking with simple algorithmic approach.

1. Introduction: Photoplethysmogram (PPG) is a low-cost electro-optic technique for measuring various clinical observations, such as respiration rate and heart rate [1]. Recently, PPG has become a popular option for monitoring heart rates of patients in hospitals and athletes during exercise. Traditionally, electrocardiogram (ECG) signal is used to monitor the heart rate. However, the problem with ECG is that, it requires several sensors to be placed at different portions of the subject's skin, which is cumbersome and creates discomfort. On the other hand, the concept of heart rate monitoring using PPG signal is very simple where the pulse-oximeter captures the reflected light by the tissues and blood vessels and converts it into electrical signal. The amount of blood in vessels varies with cardiac cycle, which causes variation in the reflected light intensity in pulse-oximeter and thus the periodicity of the PPG signal corresponds to the cardiac heart rate. PPG is getting preference for measuring heart rate because of its simple acquisition mechanism and low-cost of pulse-oximeters. However, depending on where and how the pulse-oximeter is mounted, recorded PPG data can be heavily corrupted by motion artefacts, which may affect estimation of heart rate. As a result, a large number of efforts have been made to remove motion artefacts from PPG signal.
Motion artefact removal schemes are primarily based on three approaches: adaptive filtering [2][3][4], signal decomposition [5,6], and spectral subtraction [7,8]. In [3], a synthetic noise from the motion artefact corrupted PPG signal is generated to use as a reference signal in adaptive step-size least mean squares (LMS) filter for noise cancellation. Considering all pole model for cardiac rhythm, in [4], Kalman filter is used to remove noise. A two stage normalised LMS adaptive filter-based noise cancellation technique is proposed in [2], where the reference signal is generated by subtracting the two channel PPG signals. The method provides a highestimation accuracy even in the presence of heavy motion artefacts. Assuming that the quasi-periodic cardiac rhythm and motion artefacts are independent, independent component analysis is used in [5]. In [9], a lightweight and easily deployable method is constructed using short time Fourier transform. The TROIKA framework, proposed in [6], utilises signal decomposition and sparse signal reconstruction for heart rate estimation. The convergence of this method requires sparse signal and thus a major step is to sparsify the signal using some signal decomposition techniques, such as singular spectrum analysis (SSA). The paper introduces a public database for PPG-based heart rate estimation which has stemmed a number of works [7,8,[10][11][12]. In [7], a method namely JOSS is introduced based on principle of multiple measurement vector and spectral subtraction, where a reduced sampling rate is proposed. One of the main drawbacks of these methods is their high-computational complexity. Later, an algorithm with low-computational complexity is proposed, which utilises spectral subtraction based on asymmetric least squares to remove motion artefacts and employs Bayesian decision theory to estimate the heart rate [8]. It also introduces a post processing step intended for off-line monitoring. In [10], an efficient heart rate estimation scheme is proposed where outcomes from SSA block and cascaded recursive least squares (RLS) filter block are conditionally added to denoise the PPG signal. In this method, in many cases, only the output from the RLS block is used considering the limitations of the SSA, especially when the spectral peaks of the motion artefacts are very close to the heart rate's peak.
Recently in [13], it has been shown that convex combination of adaptive filters has the capability of producing robust systems. Motivated by this proposition and competitive performance of adaptive filters in PPG signal analysis, in this paper, a parallel combination of cascaded adaptive noise cancelers, namely cascadeparallel combination (CPC) scheme, is proposed for heart rate estimation. First, three-channel accelerometer signals are separately used as references in three adaptive noise cancelers connected in cascade to remove the motion artefacts successively from the PPG signal. Next, the output of two such cascaded noise cancelers, where two different types of adaptive filters are used, are combined in convex combination scheme. Finally, a spectral domain scheme is developed to estimate the heart rate. The proposed method is 18 This is an open access article published by the IET under the Creative Commons Attribution -NonCommercial License (http:// creativecommons.org/licenses/by-nc/3.0/) tested on widely used PPG database reported in [6] and its performance is compared with that of some state-of-the-art methods.

Data and task specification:
The data set used in this study is publicly available [6] and widely used by several researchers. It contains PPG signals collected from 12 male subjects, age ranging from 18 to 35, where the PPG and accelerometer signals were recorded from the wrist using a sampling frequency (F s ) of 125 Hz. The duration of recording of each subject is 5 min where the speed and duration of walking or running on a treadmill vary for different cases. The subjects are asked to purposely use the hand with the wristband to pull clothes, wipe sweat on forehead, and push buttons on the treadmill, in addition to freely swing [6]. Two channel PPG signals available in the data set are contaminated with motion artefacts caused by hand swing and random noises introduced during the data recording process from the surroundings and sensor coupling. Moreover, three-channel accelerometer data are recorded simultaneously which can be used as reference for motion artefacts. The ground truth heart rate in each time window of 8 s is also provided, which is obtained by using the available ECG data. Each time window has an overlap of 6 s with the previous time window.

Proposed method:
In the proposed method first, average of the two channel PPG data is used for filtering. Next, in order to overcome the effect of motion artefacts, a two stage cascade and parallel combination (CPC) of adaptive filters is proposed. Since, the three-channel accelerometer data are separately available, a cascaded adaptive filtering is employed instead of conventional single-stage adaptive filter and then two of such cascaded filters are used in a combination scheme. At the third stage, the output of the noise cancelling block is processed in spectral domain to estimate the heart rate. Finally, fluctuations of the estimates are mitigated by using a post processing operation. In what follows, detail description of each step is presented.
3.1. Preprocessing: PPG signal has direct correlation to cardiac rhythm and its frequency band of interest corresponds to the heart rate. As a result, a spectral domain band pass filtering by eliminating spectral coefficients beyond the desired frequency band is performed on PPG signals obtained from both the channels. The range of frequency band is chosen to be 0.4-3.5 Hz corresponding to the general range of heart rates 25-210 bit per minute (BPM). For the sake of consistency, a similar bandpass filtering is performed on each of the three axis accelerometer data.
Since the PPG sensors are placed very closely, in view of obtaining the heart rate from the acquired two channel PPG data, instead of considering them separately, in this paper, an average of those data is utilised. It is expected that due to the averaging operation, presence of unwanted random noises in different PPG channels will be reduced. In Fig. 1, the effect of proposed preprocessing stage is presented in frequency domain using a sample PPG window. Here in Figs. 1a and b, periodograms of filtered PPG signals obtained from channel-1 and channel-2 are shown, respectively. In Fig. 1c, periodogram corresponding to the average of filtered signals obtained for channel-1 and channel-2 is shown. The location of the true heart rate is marked using a blue circle and the dominant peak is marked using red diamond. It can be observed from Figs. 1a and b that the peak corresponding to heart rate is not present. Rather the heart rate peak lies in the escarpment of nearby peaks. However, it can be observed from the periodogram of averaged signal in Fig. 1c that it gives a distinct peak. Thus, such averaging increases the quality of the signal as well as removes some random noises.
3.2. Proposed noise removal block using CPC of adaptive noise cancelers: Presence of noise in PPG signal is an impediment to heart rate detection. Preprocessing stage, described in the previous sub-section is designed in such a way that the effect of random noise is significantly reduced. Hence, motion artefacts still remain in the pre-processed PPG signal. Characteristics of motion artefacts can be efficiently captured from the accelerometer data. To demonstrate effects of accelerometer frequencies on the pre-processed PPG data, another sample of PPG window is taken into account and its periodogram is shown in Fig. 2. The location of the ground truth heart rate, obtained from the ECG data, is indicated by blue circle and the dominant peak by red diamond. In Fig. 2a, it is observed that the peak corresponding to heart rate is available but has very little power. The rest of the peaks correspond to motion artefacts and are referred as auxiliary peaks. One auxiliary peak has more power Fig. 2 Another sample of PPG window is taken into account a Periodogram of PPG signal after pre-processing b-d Peak corresponding to heart rate in periodogram of PPG is separable but with low power compared with the relatable peaks in periodogram of X-, Y-and Z-axis accelerometer than the peak corresponding to heart rate. Figs. 2b-d correspond to the periodogram of the three-channel accelerometer data. It is found that peaks of the accelerometer data are present in the pre-processed PPG signal and they correspond to the motion artefacts. In some other time windows, the motion artefacts affect the PPG signal differently, which may be observable in PPG and accelerometer spectra. In simplest form, the motion artefacts m[n], present in the pre-processed PPG signal can be considered to be a weighted linear combination of three-channel accelerometer data, namely, m x [n], m y [n] and m z [n] in three dimensions of movement along x-, y-, and z-axis, respectively and can be written as Here a x , a y and a z are weighting parameters and their values depend on relative strength of movement in a particular direction.
To reduce the effect of motion artefacts, one conventional approach is to consider three-channel accelerometer data together and perform an overall noise subtraction. In this case, the peaks caused by motion artefacts and residing near the true heart rate peak, may diminish the heart rate peak as well. To overcome this problem, in this paper accelerometer data from each channel is used separately as reference for motion artefacts removal. Moreover, instead of performing motion artefacts removal task independently by using the respective or corresponding reference accelerometer data, a cascaded noise cancellation scheme is proposed. In this case, components of motion artefacts in x, y, and z directions will be removed successively. Since each of the three-channel accelerometer data can be used as a reference of motion artefacts, an adaptive noise canceler block is employed. Each of the accelerometer data is used separately in three adaptive filters placed in cascade. In the cascaded noise canceler, at the first stage, the input signal to the adaptive filter is the pre-processed PPG signal and reference is the x-channel accelerometer signal m x [n]. The output of this stage is used as the input signal of the second one with y-channel accelerometer signal m y [n] being the reference signal. Similarly, for the third adaptive noise canceler the input signal is the output of the second noise canceler and the reference signal is the z-channel accelerometer signal m z [n]. The output y [n] of the final stage is the motion artefact reduced output of the cascaded noise canceler. It is expected that the three stages partially and sequentially remove the motion artefacts corresponding to x-, y-, and z-channel. Any desired adaptive algorithm, such as LMS or RLS [14], can be employed in the filters of the cascaded noise canceler. However, noise cancellation performance may vary depending on the type of adaptive filter. To further enhance the noise cancellation performance, one may separately employ two cascaded noise cancelers using two different adaptive filters and combine the output of those two cancelers in an affine and convex combination. In [13], it is shown that, in general, use of parallel combination of adaptive filters can enhance the overall robustness. Hence in this paper, a CPC of adaptive noise cancelers is proposed to significantly reduce the effect of motion artefacts in the pre-processed PPG signal. The CPC scheme is shown in Fig. 3 with two cascaded noise cancelers and affine and convex combination layer. The upper cascaded noise canceler is referred as the first and lower one is the second cascaded noise canceler and corresponding final stage outputs are denoted as y 1 [n] and y 2 [n], respectively. The outputs of each of the stages of the ith cascaded noise canceler are y i1 [n], y i2 [n] and y i [n]. The symbol F i corresponds to the type of filter used for motion artefacts removal and parameter l i in the delay elements corresponds to the order of the filter. The overall output of the combination of filters is given by The sample window which is used in Fig. 2 is also used in Fig. 4 to show the effect of CPC scheme described above. Similar to Fig. 2, blue circles indicate location of the peak corresponding to true heart rate and the red diamonds indicate dominant peak. The periodogram of the preprocessed PPG signal is shown in Fig. 4a. For this example, the filter types in the first and second cascaded noise canceler blocks are chosen to be LMS and RLS, respectively. The output of the cascaded LMS filters is shown in Fig. 4b where it can be observed that even though the noise is reduced substantially, still a peak corresponding to motion artefacts is dominant. On the other hand, the filtered signal obtained from the cascaded RLS filters, as shown in Fig. 4c, indicates that the RLS filters can remove the noise well enough. However, the peak corresponding to heart rate is not recovered completely. The heart rate locations reside in the escarpment of the dominant peak. Finally, the output of the combination scheme with l = 0.5 (giving equal weights to the two cascaded filters) is shown in Fig. 4d, which clearly exhibits that the heart rate peak and dominant peak coincide. To further explore the CPC scheme, the dominant peak tracking of all the subject is performed and as an example, tracking of subject 12 is The first one is the ground truth heart rate shown using blue solid line. The latter two curves are for cascaded LMS and RLS filters shown using red dotted line and pink dashed line, respectively. Finally the plot for the CPC scheme employing LMS and RLS is shown using solid and dotted black line. It can be observed that the outliers that exist for the LMS or RLS filters are absent in the case of proposed CPC filter and in this case, the curve follows the ground truth precisely.
3.3. Heart rate estimation and tracking: From the noise and motion artefacts reduced PPG signal obtained in the previous subsection, the heart rate is computed based on spectral peak estimation. From the location (N ) of the spectral peak of the noise reduced PPG signal, the heart rate is calculated in terms of BPM using the following formulaB where N F is number of points used for computing periodogram and F s is the sampling frequency in Hz. It is expected that the proposed noise cancellation method may not be able to completely remove noise in all time windows. In some extreme cases true heart rate peak may be totally absent (or very weakly present) due to the motion artefacts. Obviously the spectral peak obtained in these cases will provide false estimation. In view of reducing errors in heart rate estimation and to avoid false peak picking, a robust heart rate tracking scheme is proposed utilising natural phenomenon of heart rate variation with respect to time. As it is well known that the general pattern of heart rate seldom exhibits random fluctuation and it either gradually increases or gradually decreases depending on human action, the estimates of previous windows can be used to track the heart rate.
In the proposed tracking scheme, for the estimation of the frequency of current window, a search range in the neighbourhood of estimated frequency location (N 0 ) in the previous time window is employed. The highest peak location (N cur ) in the search range (N 0 + D s ) is considered for estimating heart rate in the current window. The value N cur is then converted to BPM by setting N to N cur in (3) and thus providing the initial estimate of the heart rate. Next, in order to obtain a smooth heart rate tracking the final estimate is obtained by using a conventional three point moving average operation considering 90% weight to the obtained initial estimate and 5% to each of the estimates of the previous two windows.
For the cases involving long-term heart rate monitoring for heart disease diagnosis and monthly or weekly physiological information, an additional post-processing method similar to [8] has been performed by computing mean and variance of current estimated heart rate, its four previous and three future estimates. If the absolute difference between estimated heart rate and computed mean is greater than the variance, then the estimated heart rate is replaced by the computed mean.

Results and analysis
4.1. Parameter settings: One major concern in the proposed CPC scheme is the choice of various adaptive filters to be used. Two most widely used adaptive filters are taken into consideration, namely LMS and RLS adaptive filters. Filter parameters used in the simulations are varied in a wide range to investigate the performance variation. For the purpose of analysis, the results shown in this section are obtained by using following parameter values for LMS and RLS filters, respectively: 0.0001 and 0.999 for step size, and 27 and 55 for order of the weight vectors. The combination parameter l, used in (2), is kept fixed to 0.5 to put an equal weight to the outputs, y 1 [n] and y 2 [n], of the cascaded noise cancelers. The search range D s in the neighbourhood of estimated frequency location is set to 10, which provides a range of 37 BPM. Number of points N F to compute the periodograms is set to 4096.

Performance measurement:
To evaluate the performance of the proposed method, different performance indices are taken into consideration, such as average absolute error (AAE), Pearson correlation (r) and Bland-Altman plot [15]. The AAE is defined as where B est (i) and B true (i) are estimated and ground truth heart rate in BPM of the itch window, respectively, and M is the total number of 4.3. Results: Some recently reported heart rate estimation methods have been taken into consideration for comparing the performance of the proposed method, namely TROIKA [6], JOSS [7], SPECTRAP [8] and TFD [10]. In the TFD method, the SSA preprocessed output is conditionally added with the outcome of the RLS block considering the limitations of the SSA scheme. As a result, in many cases, only the output from the cascaded RLS filer block is used to estimate the heart rate and may not provide satisfactory performance. On the contrary, in the proposed CPC scheme (with a moderate choice of lambda), there is no chance of using the output of only RLS or LMS block alone, all the time convex combination is used, which overcome the individual limitations of RLS or LMS block. In addition, it is to be noted that the SSA approach, unlike adaptive filter-based schemes, requires concurrent computations in both time and frequency domain to denoise the signal. Besides the proposed method, one possible variation of it is the case when only cascaded scheme is employed using one specific type of adaptive filter (i.e. no parallel blocks), namely cascaded scheme.
To compare the performance of the proposed method with that obtained by some of the existing methods, in Table 1, AAE values obtained for all 12 subjects are reported for JOSS, TROIKA, SPECTRAP, TFD, cascaded scheme using LMS, cascaded scheme using RLS and the proposed CPC. It is to be noted that in case of JOSS and TROIKA methods, for performance evaluation, some initial time windows are excluded by the authors of those papers. However, in the proposed method, all the time windows are taken into consideration. It is found that the performance of the proposed method is superior in most of the subjects in comparison to that obtained by other three methods. The lowest average AAE for different subjects are obtained by using different methods other than CPC in the case of six subjects (1, 2, 5, 7, 9 and 11). From Table 1, it is also observed that out of twelve subjects, only in three (1, 2 and 7) of those six cases, the TFD method provides slightly better results and for remaining nine subjects the CPC scheme provided better results. However, results obtained using the proposed CPC scheme for these six subjects are very comparative. For the remaining six cases, the proposed CPC scheme provides the lowest AAE, especially for subject 10, where it shows a 15.20% lower AAE than nearest TFD method. Moreover, the average AAE over all 12 subjects obtained by the proposed CPC method is found lowest among all methods. From the table it can also be seen that, the standard deviation of AAE of the proposed CPC, reported in the final column, is satisfactory. Moreover, the computation time required by the proposed CPC method is found to be 100 ms per time window, which is faster than the 170 ms required for the TFD method.
In view of further investigating the quality of the heart rate estimation obtained by the proposed method, in Fig. 6, estimated heart rate is plotted against the ground truth considering all time frames of all 12 subjects. It is observed from the figure that a linear relation exists between ground truth and estimated heart rate and the approximated linear curve passes close to the origin. The Pearson correlation coefficient is computed to be 0.99458 which indicates a very consistent estimation, as it is nearly 1. Next, using all time frames of all 12 subjects Bland-Altman plot is shown in Fig. 7. It is found that a reasonable LOA [-5.13, 4.87] is obtained when 96.55% data exist within 1.96s. No matter whether the ground truth heart rate is very small or large, the difference between estimated values and ground truth is found within a satisfactory limit.
To investigate the heart rate tracking using the proposed method, estimated heart rates with respect to time has been plotted in Fig. 8 for two subjects, subject no. 12 (left-hand side) and subject no. 3 (right-hand side). In the figure, the ground truth heart rate is plotted using blue curve, the dominant peaks tracked by the CPC scheme is shown using black curve and the estimated heart rates using the proposed method is shown using red dashed curve. It can be observed from both curves that the spikes and outliers originating from the dominant peaks visible in the black curve are removed in the proposed method and the estimated heart rates closely follow the ground truth heart rates.
To investigate the effect of l on the AAE, a simple experiment is conducted by incrementing the value of l from 0 to 1.0 by 0.1. The average error is computed and plotted in Fig. 9 for all 12 subjects for each value of l. It can be observed that, the AAE gradually decreases as l increases to a certain level and then the AAE increases again. Moreover, it is observed that l = 0.5 provides the lowest average error which is marked by a red circle.

Conclusion:
In this paper, an efficient scheme for heart rate estimation during intensive physical exercise from wrist type PPG signal is proposed, which effectively reduces the motion artefacts based on CPC of adaptive noise cancelers. It is shown that, instead of using a single cascaded adaptive noise canceler, convex combination of two such noise cancelers is more effective in reducing the noise. In the proposed scheme, the two channel PPG signals are pre-filtered and averaged to improve signal quality. Then, convex combination of two cascaded adaptive noise cancelers, one using LMS filter and the other one using RLS filter, is employed to reduce the motion artefacts. Next, spectral domain approach is introduced to estimate and track the heart rate considering the neighbouring estimations. From extensive analysis, it is observed that in some cases, the cascade scheme alone (no matter cascaded LMS or cascaded RLS) shows very high level of error in heart rate estimation. However, the proposed CPC scheme provides very satisfactory performance in terms of AAE and standard deviation in comparison to that obtained by some state-of-the-art methods. Moreover, the proposed method is capable of tracking the ground truth heart rate with high estimation accuracy in presence of abrupt changes in heart rate with respect to time.
6. Funding and Declaration of Interests: Conflict of interest: none declared. Fig. 9 Effect of the value of l on the AAE as l is incremented from 0 to 1 by 0.1