Motion Artifacts Correction from Single-Channel EEG and fNIRS Signals Using Novel Wavelet Packet Decomposition in Combination with Canonical Correlation Analysis

The electroencephalogram (EEG) and functional near-infrared spectroscopy (fNIRS) signals, highly non-stationary in nature, greatly suffers from motion artifacts while recorded using wearable sensors. Since successful detection of various neurological and neuromuscular disorders is greatly dependent upon clean EEG and fNIRS signals, it is a matter of utmost importance to remove/reduce motion artifacts from EEG and fNIRS signals using reliable and robust methods. In this regard, this paper proposes two robust methods: (i) Wavelet packet decomposition (WPD) and (ii) WPD in combination with canonical correlation analysis (WPD-CCA), for motion artifact correction from single-channel EEG and fNIRS signals. The efficacy of these proposed techniques is tested using a benchmark dataset and the performance of the proposed methods is measured using two well-established performance matrices: (i) difference in the signal to noise ratio ( ) and (ii) percentage reduction in motion artifacts ( ). The proposed WPD-based single-stage motion artifacts correction technique produces the highest average  (29.44 dB) when db2 wavelet packet is incorporated whereas the greatest average  (53.48%) is obtained using db1 wavelet packet for all the available 23 EEG recordings. Our proposed two-stage motion artifacts correction technique, i.e., the WPD-CCA method utilizing db1 wavelet packet has shown the best denoising performance producing an average  and  values of 30.76 dB and 59.51%, respectively, for all the EEG recordings. On the other hand, for the available 16 fNIRS recordings, the two-stage motion artifacts removal technique, i.e., WPD-CCA has produced the best average  (16.55 dB, utilizing db1 wavelet packet) and largest average  (41.40%, using fk8 wavelet packet). The highest average  and  using single-stage artifacts removal techniques (WPD) are found as 16.11 dB and 26.40%, respectively, for all the fNIRS signals using fk4 wavelet packet. In both EEG and fNIRS modalities, the percentage reduction in motion artifacts increases by 11.28% and 56.82%, respectively when two-stage WPD-CCA techniques are employed in comparison with the single-stage WPD method. In addition, the average  also increases when WPD-CCA techniques are used instead of single-stage WPD for both EEG and fNIRS signals. The increment in both  and  values is a clear indication that two-stage WPD-CCA performs relatively better compared to single-stage WPD. The results reported using the proposed methods outperform most of the existing state-of-the-art techniques.


Introduction
Due to the paradigm shift of hospital-based treatment in the direction of wearable and ubiquitous monitoring, nowadays, the acquisition and processing of vital physiological signals have become prevalent in the ambulatory setting.Since the acquisition of physiological signals is inclined to movement artifacts that happen due to the deliberate and/or voluntary movement of the patient during signal procurement utilizing wearable devices, restricting patients totally from physical movements, intentional and/or unintentional, is exceptionally troublesome.As a result, the physiological signals may get corrupted to some degree by motion artifacts.In some instances, this defilement may end up so conspicuous that the recorded signals may lose their usability unless the movement artifacts are diminished significantly.
Electroencephalogram (EEG) measures the electrical activity of the human brain quantitatively which took place due to the firing of neurons [1] and such brain activity is recorded utilizing a good number of cathodes which are located at different regions of the scalp [2].EEG is one of the key diagnostic tests for epileptic seizure detection [3,4].Other decisive utilization of EEG includes the estimation of drowsiness levels [5][6][7][8], emotion detection [9], cognitive workload [6,10], and brain-computer interfaces (BCIs) [11][12][13][14][15][16].All of which have potential applications in the personal healthcare domain.Lately, the implementation of EEG-based biometric systems utilizing the inborn anti-spoofing capability of EEG signals was studied and appeared to be promising [17].
The functional near-infrared spectroscopy (fNIRS), a non-invasive optical brain imaging technique, measures changes in hemoglobin (Hb) concentrations inside the human brain [18] by employing light of various wavelengths in the infrared band and estimating the difference in the optical absorption [19].Medical applications of fNIRS mainly focus on the noninvasive measurement of brain functions [20,21], cognitive tasks identification [22,23], and BCI [24][25][26].
Apart from movement artifacts, physiological signals undergo other types of artifacts as well.Gradient artifacts (GA) and pulse artifacts (PA) are the two most frequent artifacts observed in EEG during the simultaneous EEG-fMRI tests [27][28][29].On the other hand, event-related fNIRS signals are regularly sullied by heartbeat, breath, Mayer waves, etc., as well as extra-cortical physiological clamors from the superficial layers [30].
In the last few decades, multiple motion artifacts removal techniques was proposed [44][45][46] for the removal of motion artifacts from the fNIRS signal.Sweeney et al. [47] used adaptive filter, Kalman Filter, and EEMD-ICA.Scholkmann et al. [48] utilized the moving standard deviation and spline interpolation method whereas in [49] wavelet-based method was proposed.The authors of [33] used DWT, EMD, EEMD, EMD-ICA, EEMD-ICA, EMD-CCA, and EEMD-CCA.In [50], Barker et al. used an autoregressive model-based algorithm whilst kurtosis-based wavelet transform was proposed in [51], and Siddiquee et al. [52] utilized nine-degree of freedom inertia measurement unit (IMU) data to mathematically estimate the movement artifacts in the fNIRS signal using autoregressive exogenous (ARX) input model.A hybrid algorithm was proposed in [53] to filter out the movement artifacts from fNIRS signals where both the spline interpolation method and Savitzky-Golay filtering were employed.Very recently, the two-stage VMD-CCA technique was employed in [42].
The development of robust algorithms that can successfully reduce motion artifacts significantly from EEG and fNIRS data is critical; otherwise, the signals' interpretation could be erroneous by medical doctors and/or machinelearning-based applications.As mentioned earlier, DWT, EMD, EEMD, VMD, DWT-ICA, EMD-ICA, EEMD-ICA, EMD-CCA, EEMD-CCA, VMD-CCA, etc. were the most commonly used methods for the correction of motion artifacts from EEG and fNIRS signals.ICA and CCA can not be used independently for single-channel EEG/fNIRS motion artifacts correction as the input of ICA/CCA algorithms require at least two (or more) channels data whereas DWT, EMD, EEMD, VMD, etc. algorithms suffer from several limitations which are discussed in the discussion section of this paper.Also, there is still room for improvement for  and  values which can be achieved using other effective novel methods.Therefore, in this paper, two novel motion artifacts removal techniques have been proposed which can eliminate motion artifacts from single-channel EEG and fNIRS signals to a great extent.The first is a single-stage motion artifacts correction technique using the wavelet packet decomposition (WPD) whereas the other novel method is WPD in combination with CCA (WPD-CCA), a two-stage motion artifacts removal technique, as the name suggests.
In this extensive study, for the correction of motion artifact from EEG and fNIRS signals using the WPD method, four different wavelet packet families (Daubechies (dbN), Symlets (symN), Coiflets (coifN), Fejer-Korovkin (fkN)) have been used with three different vanishing moments (for each of the wavelet packet) that resulted in a total of 12 different investigations.The wavelet packets used in the WPD method are db1, db2, db3, sym4, sym5, sym6, coif1, coif2, coif3, fk4, fk6, and fk8.To the best of our knowledge, the WPD algorithm has not been used for the removal of motion artifacts from single-channel EEG and fNIRS signals to date.WPD-CCA method is another novel contribution of this research work where Daubechies and Fejer-Korovkin wavelet packet families are utilized.In the WPD-CCA technique, db1, db2, db3, fk4, fk6, and fk8 have been used separately resulting in 6 different investigations to reduce motion artifacts from EEG and fNIRS signals more efficiently.
The rest of this paper is organized as follows: Section II discusses the theoretical background of the different algorithms (WPD, CCA, WPD-CCA) investigated here, Section III provides brief information about the EEG and fNIRS benchmark dataset, and experimental methodology.Section IV provides the results of the artifact removal techniques proposed in this work and section VI covers the discussion.Finally, the paper is concluded in section V.

Theoretical background 2.1 Wavelet packet decomposition (WPD)
Using the WPD technique, signals can be decomposed into a wavelet packet basis at diverse scales [54,55].For level decomposition, a wavelet packet basis is represented by multiple signals [( −   )] ∈ℤ where  ∈ ℤ + ,  ≤  ≤  − .The wavelet packet bases    (), are produced recursively from the scaling and wavelet functions,    () = () and    () = () respectively, as follows: where ℎ() represents lowpass filter and () is the highpass filter defined as [54,56]: The decomposition of a signal () onto the wavelet basis () at level  can be expressed as: where    () signifies the th wavelet coefficient of the packet , at level .Here,    () represents the intensity of the localized wavelet    ( − 2  ), defined by: Let () represent a recorded EEG/fNIRS signal which can be expressed as the sum of a source signal () and a motion artifact signal () as follows: In general, the source signal () is assumed to be normally distributed having a mean value equals to zero, () ~ (0, ), where  2 characterizes the variance of () [57].On the other hand, general assumptions regarding the artifact signal () includes temporal localization, not normally distributed with high local variance.
According to [58],    (), can be represented as the sum of    () and    () where    (),    (), and    () are the wavelet coefficients of (), (), and (), respectively: It is noteworthy to mention that the wavelet coefficients    () will be sparse as well as the non-zero coefficients will have a relatively higher magnitude as the variance of () is locally high which would cause an increase in the local variance of the recorded EEG/fNIRS signal ().

Canonical Correlation Analysis (CCA)
CCA [59] is one of the most popular blind source separation methods which has the capability of dissociating multiple mixed or noisy signals.Assuming linear mixing, square mixing, and stationary mixing [60], the CCA technique computes an un-mixing matrix  which helps identify the unknown independent components  ̂ from a matrix  which is a recorded multi-channel signal as follows: CCA also estimates the unknown independent components  ̂ using Equation 9 utilizing second-order statistics (SOS).CCA forcefully makes the sources to be autocorrelated maximally as well as makes the sources mutually uncorrelated [61].Let us assume  as a linear combination of neighboring samples for an input signal  (i.e.() = ( − 1) + ( + 1)) [62].Consider the linear combinations of the components in  and , known as the the canonical variates, where   and   represents the weight matrices.CCA computes   and   in such a way so that the correlation ρ between  and  will be maximized [62]: where   and   signify the nonsingular within-set covariance matrices and  xy represent the between-sets covariance matrix.The maximized ρ is calculated by setting the derivatives of Equation 12(with respect to   and   ) equals to zero.
and   can then be found out as the eigenvectors of the matrices   −1     −1    and   −1     −1    respectively and the corresponding eigenvalues ρ 2 are the squared canonical correlations.It is sufficient to solve only one of the eigenvalue equations to obtain the un-mixing matrix  as the solutions are related.Further, the underlying source signals  ̂ can be estimated.
The components that seem to be artifacts can then be discarded by simply setting the corresponding columns of the  ̂ matrix to zero before the signal reconstruction.

WPD-CCA:
The WPD algorithm can be utilized to decompose a single-channel signal into multi-channel signal X where each column of matrix X represents the detailed and approximated sub-band signals.The total number of generated subband signals would be equal to 2  where j denotes the level, a priori.To estimate the underlying true sources  ̂ (Equation 9), these generated sub-band signals can then be used as the multi-channel input signals to the CCA algorithm.
After that, the component/s of  ̂ which seem to be artifacts can be discarded by making the corresponding columns of the matrix  ̂ equal to zero.Bypassing this newly obtained source matrix through the inverse of the un-mixing matrix  − , the multi-channel signals  ̂ can be obtained.Finally, the cleaner signal  ̂ can be produced by simply summing all the columns of the matrix  ̂.

Methods
This section describes the benchmark dataset used, pre-processing, study design, motion component identification, and evaluation metrics.

Dataset Description
A publicly available PhysioNet dataset [32,33,63] is used in this study that contains "reference ground truth" and motion corrupted signals for both EEG and fNIRS modalities.The details of the data recording procedure for EEG and fNIRS modalities were mentioned in [47].During the data acquisition, two channels having the same hardware properties were placed on the test subject's scalp at very close proximity (20 mm for EEG modality and 30 mm for fNIRS modality) where the first channel was impacted with motion artifacts for 10-25 seconds at regular 2 minutes interval and the second channel was left untouched and undisturbed for the entire recording period.From the unimpacted channel (2 nd channel), EEG/fNIRS signal was extracted which was free from motion artifacts and referred to as "reference ground truth" signal whereas the impacted channel (1 st channel) provided EEG/fNIRS signal corrupted with motion artifacts.It is worthwhile to mention that both the motion corrupted and "reference ground truth" signals were extracted simultaneously from channels 1 and 2 respectively for approximately 9 minutes for each of the trial/test subjects.Also, the same channels were used to extract EEG/fNIRS data from all of the test subjects.EEG signal.The average correlation coefficient between the reference "ground truth" and motion corrupted EEG signals is very high over the epochs where the motion artifacts are absent and the average correlation coefficient drops significantly during the epochs of motion artifacts [32].The superimposed reference "ground truth" and motion corrupted EEG signals are illustrated in Figure 1a.
fNIRS signals were recorded at two different wavelengths: 690 nm and 830 nm wavelengths.There were 16 sets of fNIRS recordings (9 recordings at 830 nm wavelength and 7 recordings at 690 nm wavelength) in total from 10 test subjects at a sampling frequency of 25 Hz [33,63].Like EEG recordings, each recording of fNIRS consists of one motion corrupted fNIRS signal and one "reference ground truth" fNIRS signal.The overlaid "reference ground truth" fNIRS signal and motion artifact contaminated fNIRS signal is depicted in Figure 1b.
The fNIRS signals were not upsampled/downsampled as the original sampling rate was 25 Hz during acquisition.
Power line noise removal: To remove power line noise, a 3 rd order Butterworth notch filter with a center frequency of 50 Hz was utilized to remove 50 Hz and its subsequent harmonics as a pre-processing technique for all the EEG and fNIRS signals.
Baseline Drift Correction: Both the EEG and fNIRS signals were found to have significant baseline drift, which is defined as undesired amplitude shifts in the signal that would result in inaccurate results if not corrected.To remove baseline drift from EEG and fNIRS recordings, a polynomial curve fitting method was used to estimate the baseline, which was then subtracted from the recorded raw signal.

Study Design
The simulations of this work were carried out in a PC with Intel(R) Core (TM) i5-8250U CPU at 1.80GHz which was equipped with 8 GB RAM.In-house-built MATLAB code was written to pre-process the EEG and fNIRS data.The single-stage WPD and two stages WPD-CCA methods were deployed in "MATLAB R2020a, The MathWorks, Inc".

Removal of Motion Artifact Components using "Reference Ground Truth" Method:
A common challenge in eliminating motion artifacts utilizing the aforementioned artifact removal approaches is consistently identifying and removing the motion corrupted components from the signal of interest and reconstructing a cleaner signal.The available reference "ground truth" signal of EEG and fNIRS modalities were used to identify the motion corrupted components as well as test the efficacy of the proposed algorithms.If a component of the decomposed signal is removed and the signal is rebuilt using the other components, the correlation coefficient between the newly reconstructed signal and the ground truth signal will only rise if the removed component has motion artifacts.Using this basic yet efficient notion, motion artifact-affected components of the decomposed signal were discovered and discarded to reconstruct a cleaner signal, ensuring the best performance of each suggested technique during evaluation.Figure 3a shows an example motion corrupted EEG signal and below Figure 3b represents the corresponding 16 sub-band components generated from that corresponding EEG signal using WPD(sym4) algorithm.Figure 4a  From visual inspection of the components generated from the single-stage (WPD) and two-stage (WPD-CCA) motion artifacts removal techniques, it can be stated that in most of the cases, motion artifacts components are usually found in one or two approximation sub-band/CCA components.Although this was the case for most of the EEG and fNIRS recordings, rather than blindly discarding these one or two sub-band/CCA components as motion artifact components, only those components were discarded, when removed, improved the correlation coefficient of the reconstructed signal in comparison with the available reference "ground truth" signal.

Performance Metrics:
The efficacy and performance of each proposed artifact removal approach can be computed using the provided reference "ground truth" signal for each modality, as detailed before.Since the objective of each proposed technique is to reduce artifacts from the motion-artifact contaminated signal, calculating SNR and percentage reduction in motion artifacts can assess the efficacy of that corresponding technique's capacity to remove artifacts.Hence, the difference in SNR before and after artifact removal (∆SNR), and the improvement in correlation between motion corrupted and reference "ground truth" signals, expressed by the percentage reduction in motion artifact  [33], are utilized as performance metrics.
For the calculation of ∆SNR, the following formula is used which was given in [33]: represent the variance of the reference "ground truth", motion corrupted signal, and cleaned signal, respectively.
To calculate the percentage reduction in motion artifact , the following formula is used [33]: Where   is the correlation coefficient between the reference "ground truth" and motion-corrupted signals.The correlation coefficient between the reference "ground truth" and the cleaned signals is denoted by   whereas   is the correlation between reference "ground truth" and motion corrupted signals over the epochs where motion artifact is absent.
In this study, we considered   = 1 as in an ideal situation, the "reference ground truth" and the motion corrupted signal over the artifacts-free epochs would always be completely correlated.Hence, the following equation was used to estimate :

Results and Discussion
The results obtained in this work, using the various novel artifact removal techniques are mentioned below where the performance metrics were calculated using Equations 14 and 16.

Motion Artifact Correction from EEG data:
All the algorithms (18 in total) were applied on all the 23 recordings of EEG. Figure 7a, Figure 7b, Figure 7c, and   The best average ∆SNR was found to be 30.76dB when WPD(db1)-CCA technique was applied over all the EEG records.
The highest average percentage reduction in artifact was also provided by the same algorithm which is 59.51% among these 6 single-channel motion artifact correction techniques for EEG modality.

Motion Artifact Correction from fNIRS data:
All the algorithms (18 in total) were applied on all the 16 recordings of the fNIRS modality.Figure 9a, Figure 9b,    and the WPD(fk8)-CCA produced the lowest ∆SNR value of 12.41 dB.Overall, an increase of 56.82% in percentage reduction in motion artifacts was found while the best performing two-stage motion artifacts technique i.e.WPD(fk8)-CCA was incorporated compared to the best performing single-stage motion artifact correction technique namely WPD(fk4).Also, an increase of 2.73% in ∆SNR value was found when best performing two-stage WPD(db1)-CCA was employed instead of the best-performing single-stage WPD(fk4) technique.
From Table 1, it is clear that two-stage artifacts correction techniques performed relatively better compared to the single-stage artifacts correction approaches for both EEG and fNIRS modalities.
Authors of [37] found that no brain activity was registered in trials 12 and 15.Moreover, they found a poor correlation coefficient over the clean epochs of the recordings of 12 and 15, and hence, they carried out their investigation on the remaining 21 recordings of EEG.We have also observed a similar situation in this work.Trials 12 and 15 consistently produced very bad performance metrics (∆SNR and η values) while both single-stage and twostage artifact reduction techniques were applied proposed in this paper.
The authors of this work are presenting a 2 nd table (Error!Reference source not found.)that illustrates the average ∆SNR and average percent reduction in motion artifacts using WPD(db1), WPD(sym4), WPD(coif1), and WPD(fk4).This time the faulty trials (trials 12 and 15) were excluded and the experiments were conducted on the remaining 21 sets of EEG recordings.The motion corrupted signal was decomposed into 16 sub-band components using WPD and then the cleaner signals were generated by simply discarding the lowest-frequency approximation sub-band component (S15, Figure 7) and adding the remaining 15 sub-band components directly.During this process, the reference ground truth signal was only used to compute the performance metrics.The similar approach can be used for motion artifacts correction from fNIRS signals also, but left as a future work.

Discussion
In this extensive work, we have proposed two novel (WPD and WPD-CCA) using four different wavelet were commonly employed for the correction of movement artifacts from motion corrupted EEG and fNIRS signals.
Each of these methods suffers from some limitations.
Using DWT-based approaches, to improve signal quality from motion-corrupted physiological data, selecting the suitable wavelet is critical and rather complex.To date, there is no hard and fast rule for selecting the appropriate wavelet for the specific physiological signal of interest; instead, wavelets are often selected depending on the morphology of the signal.As a result, improper wavelet selection would result in inefficient denoising.
The EMD-based motion artifact reduction approach suffers heavily from the "mode mixing" issue [33], which may result in an incorrect outcome.To fix this problem, the EEMD approaches are employed [33,36].Although EEMD is not affected by the mode mixing problem, it still requires a prior declaration of the number of ensembles to be employed which is determined through trial and error basis [33].
To make use of the SSA algorithm, for the correction of movement artifacts from physiological signals, a prior declaration of the window length and the required number of reconstruction components is necessary, which makes SSA inefficient as well [37].
The authors of [40] employed DWT along with approximation sub-band filtering using total variation (TV) and weighted TV.While reconstructing the cleaner signal, the first three high-frequency detailed sub-band signals were rejected since they included no important information from the EEG signal.But, detecting non-useful sub-band signals when utilizing DWT-based algorithms is very challenging for removing motion artifacts from EEG and fNIRS signals.
Furthermore, the value of the regularization factor used to address the optimization problem of TV and MTV approaches was picked without explanation.
In [52], they studied the autoregressive exogenous input model (adaptive technique) to model motion corrupted segments as output and IMU data as exogenous input.Only four test participants' fNIRS data were used by the authors to demonstrate the efficacy of their prescribed approach.One of the most important aspects of adopting this technique is the precise synchronization of fNIRS and IMU data.Furthermore, if the epoch duration of the motion artifacts is sufficiently long (specifically, the sample size), modeling the artifacts mathematically using the least square method would necessitate higher-order models which would eventually cause instability.Hence, incorporating this method to remove motion artifacts would be extremely difficult in a real-world scenario.
ICA and CCA algorithms are multi-channel signal processing algorithms meaning there must be two (or more) channel data as input.Therefore, ICA and CCA algorithms can not be incorporated independently for the processing of single-channel data.Also, since ICA uses higher-order statistics (HOS) and CCA uses second-order statistics (SOS) {Sweeney, 2012 #66}, the CCA algorithm is computationally efficient in comparison with ICA.That is why previous studies as well as this study used the CCA algorithm as a 2 nd stage signal processing method.
WPD is the more generalized version of DWT but the former provides better signal decomposition which enhances the signal quality for further processing.Also, WPD is better in denoising in the sense that there is no necessity of identifying and discarding any sub-band signals other than the motion corrupted sub-band component.Also, the results obtained in this work utilizing the WPD method for 12 different wavelet packets, show a little variation while computing  and .This is a clear indication that, applying WPD compared to the DWT is much more robust and efficient in terms of performance metrics improvement.
Although the two-stage motion artifacts removal approaches (WPD-CCA) proposed in this paper performed better compared to the single-stage artifacts correction techniques using WPD, the WPD-CCA technique will not be able to identify the motion corrupted CCA components In the absence of a ground truth signal, which is a limitation of twostage artifacts removal technique.Hassan et al. provided an alternate technique in [65], in which the authors employed the autocorrelation function to detect the motion corrupted components.The automated artifact component selection approach introduced in [65] employing the autocorrelation function has not been experimented in this study and left as a future study.
However, even in the absence of the "reference ground truth" signal, our proposed single-stage motion artifact reduction approach (WPD) would produce optimal results.While decomposing the signal of interest (EEG/fNIRS) using WPD, it was visually seen that the approximation sub-band component (having the lowest frequency band compared to the rest of the sub-band components) included the highest percentage of motion artifacts.Hence, discarding this noisy sub-band component and reconstruction of the signal using the remaining sub-band signals would reduce the motion artifacts to a great extent.The validation of this statement is supported by Table 2 where the performance metrics ( and ) were reported and produced acceptable results.
Throughout this work, while estimating the percentage reduction in motion artifacts , we have considered Equation 16, instead of 15.Where we have assumed that   = 1 as in an ideal situation, the "reference ground truth" and the motion corrupted signal over the artifacts-free epochs would always be completely correlated.But in practice, the value of   would always be less than 1.Because it is impossible to extract a "reference ground truth" signal which would completely be similar while compared with a motion-corrupted signal during the artifacts-free epochs.It is counter-intuitive that lower value of   would produce a lesser value of .Rather it is just the opposite.For example, let   = 0.6;   = 0.8;   = 0.95, from Equation 15, we would get  equals 57.14% and Equation 16would give 50%.That is why choosing   = 1 would give a worst-case scenario result.Also, this same formula is used in [40][41][42] assuming the ideal "reference ground truth signal".

Conclusions
In this extensive study, two novel motion artifact removal techniques have been proposed, namely wavelet packet decomposition (WPD), and WPD in combination with canonical correlation analysis (WPD-CCA) for EEG and fNIRS modalities.Further, the proposed algorithms were investigated by 18 different approaches where four different wavelet packet families namely Daubechies, Symlet, Coiflet, and Fejer-Korovkin wavelet packet families were utilized.WPD-CCA techniques can be used on single-channel recordings as the WPD algorithm can decompose a single-channel signal into a predefined number of sub-band components which can be fed as the input channels for the CCA algorithm.The performance parameters obtained from all these approaches are a clear indication of the efficacy of these algorithms.
The novel WPD(db1)-CCA and WPD(fk8)-CCA technique provided the best performance in terms of the percentage reduction in motion artifacts (59.51% and 41.40%) when analyzing the EEG and fNIRS data, respectively.On the other hand, the WPD(db1)-CCA technique generated the highest average ∆SNR (30.76 dB and 16.55 dB) for both EEG and fNIRS signals.An alternative approach for removing motion artifacts from EEG signals using the WPD method has also been proposed where the lowest-frequency approximation sub-band component was discarded and clean EEG signal was reconstructed by adding up the remaining sub-band components.By computing the performance metrics, it has been shown that this single-stage motion artifacts correction technique is also capable of removing motion artifacts to a great extent.In the future, deep learning-based models will be investigated for the automated detection and removal of artifacts in physiological signals (EEG, ECG, EMG, PPG, fNIRS, etc.).New methods based on the use of different multivariate signal processing approaches will be developed for the elimination of other artifacts from the EEG and fNIRS signals that are recorded using multiple electrodes.

Figure 1 :
Figure 1: Example of motion-corrupted EEG (a) and fNIRS (b) signals.Two signals (blue: ground truth and red: motion-corrupted) are highly correlated during the motion artifacts free epochs.Boxed areas show the epochs of motion corrupted signals.A zoomed version is presented underneath each sub-plot.

Figure 2
Figure 2 depicts the motion artifacts elimination framework presented in this study.An automated way for identifying motion corrupted components of the preprocessed signal is also discussed.

Figure 2 :
Figure 2: Methodological framework for the motion artifact correction.
depicts an example motion corrupted EEG signal and Figure 4b represents the resultant 16 CCA components where the input of the CCA method was 16 sub-band signals generated from the motion corrupted EEG signal using WPD(coif1).Similarly, Figure 5a and Figure 6a show 2 separate motion corrupted fNIRS signals whereas Figure 5b, and Figure 6b represent the sub-band signals generated from WPD(db1), and 16 output CCA components where the input of the CCA algorithm was 16 sub-band signals generated from the motion corrupted EEG signal using WPD(fk8), respectively.

Figure 3 :
Figure 3: An example motion-corrupted single-channel EEG signal (a) and corresponding 16 sub-band components generated using WPD(sym4) algorithm (b).S15 denotes the Approximation sub-band signal having the lowest center frequency compared to the other sub-band signals i.e.D1-D15.

Figure 4 :Figure 5 :
Figure 4: An example motion-corrupted single-channel EEG signal (a) and corresponding 16 CCA components generated from CCA algorithm (b)

Figure 6 :
Figure 6: An example motion-corrupted single-channel EEG signal (a) and corresponding 16 CCA components generated from CCA algorithm (b)

Table 1 :
Average ∆SNR and average percentage reduction in artifacts () for all the EEG and fNIRS recordings.Corresponding standard deviations are shown inside the bracket.(*) represents the best-performing metrics.

Table 1
(50.00%) and smallest ∆SNR (29.08 dB) was produced by WPD(coif3) method.When two-stage motion artifacts removal techniques were employed (WPD-CCA) using six different wavelet packets separately, the best average correlation improvement (59.51%) and best average ∆SNR value (30.76 dB) was produced by WPD(db1)-CCA approach whereas the lowest performance was recorded utilizing WPD(fk8)-CCA technique (average ∆SNR and  values of 28.86 dB and 55.88%, respectively).Overall, An increase of 11.28% in the average percentage reduction in motion artifacts was found while the best-performing two-stage WPD(db1)-CCA was incorporated compared to the bestperforming single-stage motion artifact correction technique namely WPD(db1).Also, the average ∆SNR value improved by 4.48% (from 29.44 dB to 30.76 dB) while the best performing two-stage WPD(db1)-CCA technique was utilized instead of the best-performing single-stage WPD(db2) method for the correction of motion artifacts from single-channel EEG that the cleaner EEG signals reconstructed using the WPD(db1) technique provided the highest average  value (53.48%, with corresponding ∆SNR value of 29.26 dB) compared to the other 11 types of single-stage motion artifact correction approaches whereas the greatest average ∆SNR value (29.44 dB) was provided by WPD(db2) with corresponding average  value of 51.40%.Among these 12 different single-stage artifact removal approaches, the lowest average

Table 1 ,
the cleaner fNIRS signals reconstructed using WPD(fk4) technique provided the highest average  value (26.40 %) compared to the other 11 types of single-stage motion artifact correction approaches.The greatest average ∆SNR value (16.11 dB) was also provided by the same approach.Among these 12 different single-stage artifact removal approaches, the lowest average  (25.92%) was produced by WPD(db2) whereas the smallest ∆SNR value (15.33 dB) was produced by WPD(coif3).When two-stage motion artifacts removal techniques were employed (WPD-CCA) using six different wavelet packets for all the fNIRS signals, the best average correlation improvement (41.40%) was produced by WPD(fk8)-CCA technique and the lowest average percentage reduction in artifacts (36.58 %) was generated from WPD(db1)-CCA.On the other hand, the best average ∆SNR value (16.55 dB) was obtained from WPD(db1)-CCA technique,

Table 2 :
Average ∆SNR and average percentage reduction in artifacts () for 21 recordings of EEG modality.Corresponding standard deviations are shown inside the first bracket.(*) denotes the best-performing metrics.From table 2, it is clear that the cleaner EEG signals reconstructed using WPD(db1) technique provided the highest average  value (60.22 %, corresponding ∆SNR value of 26.20 dB) compared to the other 3 types of single-stage motion artifact correction approaches whereas the greatest average ∆SNR value (26.70 dB) was produced by WPD(coif1) with an average  value of 58.19 %.The values obtained following this process is a clear indication that without the availability of "reference ground truth signal", correction of motion artifacts from EEG signal is still possible.