**ASEF Algorithm **

Algorithm for removing peak and spike artifacts based on a threshold built on the analytic signal envelope.

The ASEF algorithm with an example of application can be found here

The paper describing ASEF can be found here.

This software was jointly developed with Dept IIE of LLeida University.

ASEF algorithm is currently maintained by the B2SLab at UPC, so please send us a note if you have any suggestion or comment.

**Please cite the following paper when using ASEF algorithm in your research**:

Melia U., Clariá F., Vallverdu M., Caminal P. (2014) “Filtering and Thresholding the Analytic Signal Envelope in order to improve Peak and Spike Noise Reduction in EEG Signals.” Medical Engineering & Physics. 36(4):547–553.

**ABOUT ASEF**

The ASEF algorithm reduces the amplitude of peaks or spikes in any kind of signals. Firstly, the envelope *m*(*t*) of a signal *x*(*t*) is filtered using a low-pass filter with a pass band *B _{AM}*, then a threshold

*Th*(

*t*) based on the filtered envelope

*m*(

_{filt}*t*) is defined and finally this threshold is applied to the envelope

*m*(

*t*). This

*Th*(

*t*) is calculated at each time sample of

*m*(

_{filt}*t*) as

*Th*(

*t*)=

*m*(

_{filt}*t*)+

*k M*, where

_{filt}*M*is the mean value of

_{filt}*m*(

_{filt}*t*) and

*k*is an arbitrary constant.

The main steps of the proposed filter algorithm applied to a signal *x*(*t*) are:

1) Calculation of the analytic signal of *x*(*t*).

2) Calculation of the envelope *m*(*t*) and the instantaneous phase *ϕ*(*t*).

3) Filtering of the *m*(*t*) by using a FIR filter with a cut off frequency *B _{AM}* in order to obtain

*m*(

_{filt}*t*).

4) Thresholding the filtered envelope in order to preserve the samples that satisfy *m*(*t*) < *Th*(*t*), in this way *m _{Th}*(

*t*) =

*m*(

_{filt}*t*)+

*k M*if

_{filt}*m*(

*t*) >

*Th*(

*t*) otherwise

*m*(

_{Th}*t*) =

*m*(

*t*) .

5) Multiplication of the filtered envelope* m _{Th}*(

*t*) by cos

*ϕ*(

*t*) , in order to obtain the final filtered signal

*x*(

_{filt}*t*).

This algorithm removes all or part of the peaks or spikes (depending on *k* value of *Th*(*t*) ) in the original signal* x*(*t*), preserving its frequency information.

For more details see the published article.

The optimum parameter B_{AM }and *k* were estimated for EEG signals in this publication.

By changing these parameters ASEF algorithm can be applied to any kind of digital signals.

**Contacts**

Umberto Melia

Email: umberto.melia@ upc.edu

Address:

Universitat Politècnica de Catalunya, dept. ESAII

c/ Pau Gargallo 5, 08028 Barcelona, Spain

Tel.: +34 93 407 07 73