## 7 Unveiling the Essentials of Empirical Mode Decomposition (EMD)  
EMD is a nonlinear adaptive technique for signal analysis that decomposes a signal into a finite number of intrinsically oscillating components called Intrinsic Mode Functions (IMF). This approach is particularly useful for non-stationary and non-linear signals such as EEG, allowing for the removal of artifacts while maintaining the characteristics of the original signal [102, 103]. The EMD process for an EEG signal \(x(t)\) takes place through iterations that progressively extract the IMFs, which satisfy two conditions:  
1. The number of local extrema and the number of zero crossings must differ by at most one throughout the function;
2. At each point, the average of the local maximum values (upper envelope) and local minimum values (lower envelope) must be zero. \begin{table}
\begin{tabular}{p{142.3 pt} p{284.5 pt}} \hline \hline \multicolumn{2}{c}{**Wavelet Approaches**} \\ \hline \multirow{3}{*}{**Strengths**} & Versatile approaches that isolate the characteristics of EEG signals at different time and frequency scales. Suitable for identifying and removing a wide range of artifacts. Ability to provide simultaneous time-frequency representation that preserves signal integrity. Great adaptability of wavelet functions to the characteristics of EEG data. \\ \hline \multirow{3}{*}{**Weaknesses**} & Choosing the appropriate wavelet function. Optimal decomposition levels. Approach is not very accessible to users without adequate experience. Artifacts overlapping in frequency with signals complicate removal. Difficulty in processing data affected by uncertainties and/or inaccuracies. \\ \hline \multirow{2}{*}{**Opportunities**} & Development of new wavelet functions. Integration with other artifact removal approaches. \\ \hline \multicolumn{2}{p{142.3 pt}}{**Threats**} & Evolution of EEG recording technologies introduce new artifacts. Computational complexity and efficiency. \\ \hline \hline \end{tabular}
\end{table} 
Table 3: SWOT analysis for wavelet approaches. The process begins by identifying all local extrema in \(x(t)\). These endpoints are then used to construct the upper and lower envelopes by interpolation, typically using cubic splines. The upper envelope, \(e_{\text{sup}}(t)\), is obtained by interpolating all the local maxima, while the lower envelope, \(e_{\text{inf}}(t)\), is obtained by interpolating all the local minima of the signal. Once the envelopes are obtained, the average \(m(t)\) between the upper and lower envelope is calculated:  
\[m(t)=\frac{e_{\text{sup}}(t)+e_{\text{inf}}(t)}{2}. \tag{9}\]  
The first IMF candidate, \(h_{1}(t)\), is obtained by subtracting \(m(t)\) from the original signal,  
\[h_{1}(t)=x(t)-m(t). \tag{10}\]  
This process is repeated on \(h_{1}(t)\) treating \(h_{1}(t)\) as the new signal from which to extract the envelope, until \(h_{1}(t)\) meets the conditions to be considered an IMF. At this point, \(h_{1}(t)\) is definitively accepted as the first IMF of the original signal. The residue. \(r_{1}(t)\), obtained by subtracting \(h_{1}(t)\) from \(x(t)\), becomes the new signal on which to apply the entire process to extract the next IMF:  
\[r_{1}(t)=x(t)-h_{1}(t). \tag{11}\]  
This procedure is iterated, and each residual, \(r_{n}(t)\), is treated as the new signal to extract the next IMF, until the final residual no longer shows significant oscillation and can be considered as a trend or as residual noise. Removing artifacts in EEG signals through EMD involves analyzing the extracted IMFs to identify those that represent artifacts based on characteristics such as frequency, amplitude, or temporal behavior unrelated to the brain activities of interest. The IMFs identified as artifacts are then excluded, and the clean EEG signal is reconstructed by summing the remaining IMFs:  
\[x_{\text{clean}}(t)=\sum_{i=1}^{k}IMF_{i}(t)+r_{k}(t) \tag{12}\]  
where \(k\) is the number of IMFs deemed free of artifacts and \(r_{k}(t)\) is the final residual after extraction of the last significant IMF.