MATLAB Simulation Analysis For Removing Artifacts From EEG Signals Using Adaptive Algorithms
MATLAB Simulation Analysis For Removing Artifacts From EEG Signals Using Adaptive Algorithms
net/publication/318131272
MATLAB Simulation Analysis for Removing Artifacts from EEG Signals Using
Adaptive Algorithms
CITATIONS READS
0 543
4 authors, including:
Pallavi Jadhav
SVERI´s College of Engineering
5 PUBLICATIONS 39 CITATIONS
SEE PROFILE
All content following this page was uploaded by Pallavi Jadhav on 26 September 2018.
Keywords EEG Ocular artifacts (EOG) Least mean squared Normalized least
mean squared MSE SNR Convergence Stability EEG signal Depth of
anasthesia DoA
1 Introduction
EEG signal is the record of cerebrum activity. Thus, EEG is a non-stationary signal.
These signals are affected by noise called as artifacts. Simple filters and
Non-adaptive filtering technique is not able to remove noise such as EMG, ECG
and EOG. The increasing value of EMG in EEG signal could raise the BIS index
which results in inaccurate amount of DoA. For removing the artifacts from EEG
signal adaptive filters are required [1–3] (Fig. 1).
2 Database
500 PSG records belonging to sixteen subjects were selected from the MIT-BIH
Polysomnographic Database. All subjects are aged 44 ± 12 years. This database
contains over 80 h of four-, six-, and seven-channel PSG recordings. All of them
contain EEG, ECG and Blood Pressure (BP) signals, some of them have Nasal or
Plethysmograph Respiratory signals, five of them have O2 Saturation signal, EOG
and EMG signals. All the subjects have ECG signals annotated beat-by-beat, and
EEG and respiration signals annotated by an expert with respect to sleep stages and
apnea. In this work were used only the EEG, ECG and EOG signals, all of them
were sampled at 250 Hz [4].
The algorithm was developed by Widrow and Hoff in 1966 and was the first linear
adaptive-filtering algorithm for solving problems such as prediction and commu-
nication [5].
The filter tap weights of the adaptive filter are updated according to the fol-
lowing formula:
One of the primary disadvantages of the LMS algorithm is that it has a fixed step
size parameter for each iteration and this is overcome by NLMS algorithm. When
the convergence factor l is large, the algorithm experiences a gradient noise
amplification problem. In order to solve this difficulty we can use the NLMS
algorithm. The correction applied to the weight vector w(n) at iteration n + 1 is
“normalized” with respect to the squared Euclidian norm of the input vector x(n) at
iteration n [6].
4 Artifacts
By artifacts, it is understood that all signals which appear in the EEG record which
don’t come from the brain. The common artifacts occurred in EEG signal are EOG,
EMG and ECG.
MATLAB Simulation Analysis for Removing Artifacts … 401
The major noise source of EEG signal is EOG. It is because of the movement of the
eye ball causes an electric field around the eye and affected the electric field of the
scalp. EOG is considered as a signal with high amplitude and low frequency.
Amplitudes of EOG are in the range of 0.05 and 3 mV. EOG occurs in 0–16 Hz of
EEG signal.
The electrical artifact actually is the ECG, as recorded from head electrodes. The P
wave and T wave are usually not visible, because of the distance from the heart and
the sub-optimal axis. Essentially, the artifact is a poorly formed QRS complex. It is
the most prominent, when the neck is short. Amplitude level is from
1.15 ± 0.69 mV. Frequency range is 0.3–30 Hz.
5 Simulation Diagram
For simulation we require the recorded EEG signal and then it will be given as an
input as shown in Simulink model for LMS filter. Recorded EEG Noise samples
also taken and then it will be added with original signal. The recorded noise taken
might be EOG, EMG and ECG. Added signal is subtracted from the output of the
adaptive filter and then given to the display. By changing the filter parameters we
can use LMS as NLMS filter. Filter order is 32 for LMS filter and 40 for NLMS
filter. The step size for LMS and NLMS filteris 0.027 and 0.8 resp. MATLAB
function blocks are created by user for statistical parameters such as MSE, SNR and
convergence rate. Sampling of the EEG signal and noise signal is already done.
‘sig’ signal is the pure EEG signal and ‘nio’ signal is noise signal which is any i. e
EOG, EMG and ECG. Around 1000 samples are taken for the simulation (Fig. 2).
402 P. Jadhav et al.
6 Results
The Simulation is done to remove the noise of an EEG signal which is corrupted by
various types of interferences and distortions. Figure 4 shows de-noise EEG signal
by LMS filter algorithm.
See Fig. 3.
Fig. 3 a Pure EEG signal. b EEG + EOG. c Error signal. d De-noised EEG signal
MATLAB Simulation Analysis for Removing Artifacts … 403
See Fig. 4.
Fig. 4 a Pure EEG signal. b EEG + EOG. c Error signal. d De-noised EEG signal
See Fig. 5.
Fig. 5 a Pure EEG signal. b EEG + EMG. c Error signal. d De-noised EEG signal
404 P. Jadhav et al.
See Fig. 6.
Fig. 6 a Pure EEG signal. b EEG + EMG. c Error signal. d De-noised EEG signal
See Fig. 7.
Fig. 7 a Pure EEG signal. b EEG + ECG. c Error signal. d De-noised EEG signal
MATLAB Simulation Analysis for Removing Artifacts … 405
Fig. 8 a Pure EEG signal. b EEG + ECG. c Error signal. d De-noised EEG signal
Table 1 Comparison of LMS and NLMS algorithm for EOG removal based on statistical
parameters
Sr. No. Algorithm SNR MSE Convergence speed
1. LMS −6772 0.00774 0.85
2. NLMS −6755 0.00772 0.95
Table 2 Comparison of LMS and NLMS algorithm for EMG removal based on statistical
parameters
Sr. No. Algorithm SNR MSE Convergence speed
1. LMS −3.6e+7 0.00116 0.885
2. NLMS −1.6e+7 0.00109 0.985
Table 3 Comparison of LMS and NLMS algorithm for ECG removal based on statistical
parameters
Sr. no. Algorithm SNR MSE Convergence speed
1 LMS −925.55 0.3399 0.985
2 NLMS −949.54 0.3300 0.985
406 P. Jadhav et al.
Selection of Order and Step Size for LMS and NLMS Filter
(a) For step size = 0.5
7 Conclusion
For EOG artifact SNR and MSE values are better for NLMS as compared to LMS.
The NLMS filter of order 40 and step size of 0.5 is selected for minimum value of
MSE. For more convergence speed NLMS filter with order 40 and step size 0.9 is
selected. For EMG artifact SNR and MSE values are better for NLMS as compared
to LMS. The NLMS filter of order 40 and step size of 0.9 is selected for minimum
value of MSE. For more convergence speed NLMS filter with order 40 and step size
0.15 is selected. NLMS gives better SNR and minimum value of MSE.
Convergence speed of NLMS is more as compared to LMS. The NLMS is mainly
used to remove EOG noise in EEG signal. EOG artifacts are largely reduced to
improve BIS index in DoA. During the simulation for NLMS algorithm, SNR is
improved as compared to LMS. Mean square error is less for NLMS compared to
LMS which is close to zero. EMG artifacts are largely reduced which increases the
BIS index, which is useful in correct DoA. Hence NLMS algorithm is better than
that of LMS algorithm.
MATLAB Simulation Analysis for Removing Artifacts … 407
References