Skip to main content
. 2023 Jul 16;23(14):6434. doi: 10.3390/s23146434
Algorithm 7 Empirical Mode Decomposition (EMD) for EEG Artifact Removal [82]
  • Input: X: EEG data matrix

  • Output: Y: matrix of cleaned data
    • Set the stopping criterion and number of maximum iterations.
    • for each channel c in X do
      •     Initialize d0=ck=1                                  ▹dk: signal at iteration k
      •     repeat
        •         Find the local maxima and minima of dk1.
        •         Compute the envelope by interpolating the maxima and minima.
        •         Subtract the envelope from dk1 to obtain the detail component hk.     ▹h: detail component
        •         Update dk=dk1hk.
        •         Increment k.
      •     until stopping criterion or maximum iterations are reached.
      •     Compute the reconstructed signal as rc=i=1khi.             ▹rc: reconstructed signal for channel c
      •     Store the cleaned signal in the corresponding row of Y.
    • end for
    • return  Y