Sunteți pe pagina 1din 8

250 Int. J. Biomedical Engineering and Technology, Vol. 22, No.

3, 2016

Comparative study of FIR and IIR filters for the


removal of 50 Hz noise from EEG signal

Vivek Singh
Department of Electronics and Communication Engineering,
Punjabi University,
Patiala, Punjab, India
Email: vivekspatiala@gmail.com

Karan Veer*
Department of Electrical and Instrumentation Engineering,
Thapar University,
Patiala, Punjab, India
Email: karan.una@gmail.com
*Corresponding author

Reecha Sharma
Department of Electronics and Communication Engineering,
Punjabi University,
Patiala, Punjab, India
Email: richa_gemini@yahoo.com

Sanjeev Kumar
Central Scientific Instruments Organization,
Chandigarh, India
Email: virdi205@gmail.com

Abstract: Small amplitude (µV) of the Electroencephalography (EEG) signal


is contaminated by various artefacts in a recorded signal and changes the
originality of the signal. The most common disturbance among them is power-
line frequency noise of 50 Hz. This makes clinical analysis and information
retrieval difficult. It is necessary to remove all such disturbances in EEG
signals for proper diagnosis. In this study, performance analysis of Finite
Impulse Response (FIR) filter based on various windows and Infinite Impulse
Response (IIR) filters for noise reduction from EEG signals have been done.
Digital FIR and IIR filter of 100th order applied to signal epochs were studied
and performance analysis was done by calculating the fast Fourier transform
and signal-to-noise ratio. The result shows that Kaiser window-based FIR
filters is better at removing power-line noise from EEG signal.

Keywords: EEG; electroencephalography; FIR; finite impulse response; IIR;


infinite impulse response; FFT; fast Fourier transform; SNR; signal-to-noise
ratio; signal processing; noise; analysis; interpretation.

Copyright © 2016 Inderscience Enterprises Ltd.


Comparative study of FIR and IIR filters for the removal of 50 Hz noise 251

Reference to this paper should be made as follows: Singh, V., Veer, K.,
Sharma, R. and Kumar, S. (2016) ‘Comparative study of FIR and IIR filters for
the removal of 50 Hz noise from EEG signal’, Int. J. Biomedical Engineering
and Technology, Vol. 22, No. 3, pp.250–257.

Biographical notes: Vivek Singh is currently working at NBRC. He


completed his MTech in 2015 from the Department of Electronics and
Communication Engineering, Punjabi University, Punjab, India.

Karan Veer has done his PhD in Electrical and Instrumentation Engineering
from Thapar University, Patiala, India. He has more than 4 years of research
experience in the area of signal processing and soft computing. He has
published 22 peer-reviewed research papers in different international
journals of repute with good impact factors and has one research book on
‘prosthetic devices’ to his credit. His current research areas include biomedical
instrumentation, signal processing, prosthetic devices and soft computing.

Reecha Sharma is an Assistant Professor in the Department of Electronics and


Communication Engineering at Punjabi University. Her current research areas
include signal processing.

Sanjeev Kumar is currently working a Scientist at the Central Scientific


Instruments Organization, Chandigarh. He has completed PhD from IIT Delhi.
His current research areas include biomedical instrumentation.

1 Introduction

The human–computer interaction system has become an increasingly important part of


our daily lives. It determines the effective utilisation of the available information flow
of the computing, communication and display technologies. In recent years, there
has been tremendous interest in the neural linkage with computers, and various
biomedical signals have been used, which can be acquired from a specialised nervous
system. The parallelism between brain signals and activity in certain tasks presents a
continuing challenge to define this relationship in relevant quantitative terms (Veer,
2015; Sharma and Veer, 2014; Veer and Agarwal, 2015).
Signal processing plays a vital role in biomedical field. It is used in many fields of
applications, e.g. biomedical signal processing field, image processing, data communication
and many others (Niedermeyer and da Silva, 2005). Electroencephalography (EEG) is the
neurophysiologic measurement of the electrical activity of the neurons in the brain
recorded with the help of electrodes placed on the scalp (Sanei and Jonathan, 2008). EEG
signal is a graphical representation of brain activity that gives helpful information on
clinical-related problems such as brain injury, coma, head injury, stroke, epilepsy, sleep
disorder and depth of anaesthesia (Al-kadi et al., 2012). There are two general methods
for measuring the electrical signals of the brain: invasive and non-invasive. In an
invasive method, the needle electrodes are physically inserted inside the scalp of the
human brain. They need surgical procedures and are not generally suggested. In a non-
invasive method, surface electrodes are located on the surface of the scalp to measure the
252 V. Singh et al.

electrical potential produced by the muscle neurons. These are safe and painless methods
(Sanei and Jonathan, 2008). Both the methods provide different views and allow us to
visualise the brain and to monitor what occurs. The frequency of EEG signal lies between
0.5 Hz and 40 Hz and is contaminated during recording with different artefacts given
below:
1 power-line interference (50 Hz)
2 Electroencephalography (EMG) noise
3 electrode motion noise
4 pulse noise (electrocardiogram)
5 baseline wandering
The common noise present in the EEG signal is power-line frequency signal of 50 Hz
due to external equipments. Digital filters are more accurate and precise than analogue
filters (Chandrakar et al., 2013). In this paper, EEG signals have been taken from
different patients. EEG signals are recorded for a duration 4 seconds and each recorded
movement is called epoch and each epoch are sampled at a frequency of 256 Hz. We
have taken five epochs of each patient and applied the above filters on 20 epochs. Finite
Impulse Response (FIR) digital notch filter based on different windows and Infinite
Impulse Response (IIR) notch filter of 100th order are applied and the cut-off band to
find the proper notch band to be removed from the desired frequency varies. The Signal-
to-Noise Ratio (SNR) and fast Fourier transform from the filtered signal are calculated.

2 Objective of research

During the recording, EEG is contaminated by different artefacts such as 50 Hz noise,


EMG noise and eye blink, but the effect of power-line frequency noise of 50 Hz is more
than the other noises in the contaminated signal. It is necessary to remove 50 Hz noise
from the EEG signal and improve the accuracy and quality of the signal for proper
diagnosis.
Based upon the literature survey, the following are the different objectives of this
research:
1 to study the characteristics of EEG signal;
2 to study the function and characteristics of IIR and FIR;
3 to apply Kaiser window-based FIR low-pass filter and Butterworth IIR low-pass
filter on distorted EEG signal in MATLAB using the DSP tools to remove the
artefacts;
4 to compare the results of applied filters by calculating SNR and MSE values and find
the best from these applied filters for denoising the raw EEG signal.
The overall objective is to remove the artefact and improve the quality of the EEG signal
by applying different denoising filters.
Comparative study of FIR and IIR filters for the removal of 50 Hz noise 253

3 Design of filters

Two categories of digital filters are considered:


1 IIR
2 FIR
In the FIR filter, the impulse response is exactly the same as the sequence of filter
coefficients. It depends only on the inputs x[n], so it is called feed forward; also, it can be
calculated non-recursively (Rani et al., 2011):

yn   k  0 bk xn  k
n 1
(1)

The IIR filter is recursive in nature and the output depends on both current and previous
inputs as well as previous outputs (Rani et al., 2011):

y  n    k  0 bk x  n  k    k 1 ak y  n  k 
M N
(2)

where a,b: filter coefficients;


x[n]: input signal;
y[n]: output signal;
m,n: filter order.

3.1 Design of FIR filter


Hamming, Kaiser, rectangular and Hanning windows were used to design FIR notch
filter by MATLAB program (Sadasivan and Narayana, 1995). The basic parameters of
the filter design are as follows:
1 order of filter only 100,
2 cut-off frequency of 0.39 Hz,
3 sampling frequency 256 Hz (signal sampled at 256 Hz),
4 notch band range from 0.36 to 0.42.
The window length in all the windows is 101, which is obtained according to the filter
order 100 (window length is order plus one). In the case of Kaiser window, the beta value
was set as 4.

3.2 Design of IIR notch filter


IIR Butterworth notch filter was designed by the MATLAB program. In the design
process of IIR notch filter, filter order was set at 100 and cut-off frequency of the filter
was 0.39 Hz (Chandrakar et al., 2013). Notch band of the IIR filter was set from 0.36 to
0.42 for proper elimination of noise from the raw EEG signal.
254 V. Singh et al.

4 Methodology used for denoising the EEG signal

The denoising process of the EEG signal is shown in Figure 1. In first step, raw EEG
signal was taken from the patient having 256 sampling rate with time duration of
4 seconds. In the next step, DC shift is removed from the EEG signal by taking the mean
of the EEG signal and setting it at the ground level. IIR notch filter and FIR notch filter
are applied on the EEG signal and the filtered EEG signal is received. Later, the fast
Fourier transform and SNR values of the filtered EEG signal are obtained.

Figure 1 EEG noising flow process

5 Results and discussion

The raw EEG signal contained various artefacts. Baseline wandering artefact shifted the
signal to some value of the DC level. Recorded EEG signal was shifted to the negative
DC level, which is shown in blue signal in Figure 2. Baseline wandering was removed
from the EEG signal by eliminating the DC component from the signal shown in red in
the figure.
Both digital filters were applied on the red EEG signal. It gave the denoised signals,
which were used to calculate the SNR values to quantify the most effective filter for the
denoise signals. 20 epoch signals were filtered through both filters. The calculated SNR
values of all epochs are shown in Table 1. The FIR filter gave higher SNR values for
each epoch and it gave a good elimination of the 50 Hz noise.
Comparative study of FIR and IIR filters for the removal of 50 Hz noise 255

Figure 2 Raw EEG signal and EEG signal without DC shift

Table 1 SNR values of both filters

Sr. no. Patient IIR notch filter FIR notch filter


1. P1.1 37.89 40.58
2. P1.2 42.10 46.31
3. P1.3 40.56 44.43
4. P1.4 40.92 44.93
5. P1.5 38.82 41.99
6. P2.1 34.13 38.04
7. P2.2 36.38 41.02
8. P2.3 32.46 34.55
9. P2.4 35.82 38.23
10. P2.5 35.73 37.63
11. P3.1 31.68 32.67
12. P3.2 32.21 33.50
13. P3.3 32.47 33.29
14. P3.4 28.26 29.17
15. P3.5 35.61 36.84
16. P4.1 27.71 30.92
17. P4.2 27.89 31.20
18. P4.3 28.76 32.85
19. P4.4 28.67 33.06
20. P4.5 28.92 34.18

The average value of the SNR of the IIR notch filter is 33.84 and that of the FIR notch
filter is 36.76, as shown in Figure 3. The higher bar in the figure shows the SNR value of
256 V. Singh et al.

the FIR filtered signal and the lower bar shows the SNR value of the IIR filtered signal.
The FIR filter is better than the IIR filter at eliminating the 50 Hz noise from the EEG
signal. The average SNR value of the FIR filter is larger for all the tested epochs.

Figure 3 Average SNR values of IIR and FIR filters (see online version for colours)

FFT gives the average frequency components of a signal which are calculated over the
entire time of the signal. Figure 4 shows the FFT of the filtered signal from the IIR and
FIR notch filters. Comparison of the FFT plot of the filtered signal with the raw signal is
shown in red, green and blue lines. The FIR filtered signal is completely down at the
50 Hz noise (green line), but in the case of the IIR filtered signal, some 50 Hz noise
component is present (red line). FFT shows that the FIR notch filter removes the 50 Hz
noise completely.

Figure 4 FFT of filtered EEG signals


Comparative study of FIR and IIR filters for the removal of 50 Hz noise 257

6 Conclusion

These methods were successful at removing the 50 Hz power-line frequency from the
EEG signal. The filters were applied to signals having sampling rate of 256 Hz with time
duration of 4 seconds (i.e. 1024 samples). The comparison was done on the basis of FFT
plot as well as SNR. The FIR notch filter preserved the desired frequency and completely
removed the 50 Hz noise from the raw EEG signal as compared with the IIR filter which
removed less 50 Hz noise. The FIR filter has the highest compatibility with the tested
EEG signals and gave a larger SNR value as compared to the IIR filter. During the study,
some limitation of the digital filters was found. Sometimes, the filters remove the main
frequency signal from the original signal. This reduces the quality of the signal. Wavelet
technique and ICA technique can be used to improve the quality of the signal.

References
Al-kadi, M.I., Reaz, M.B.I. and Ali, M. (2012) ‘Compatibility of mother wavelet functions
with the electroencephalographic signal’, Proceedings of the IEEE Biomedical Engineering
and Sciences Conference, 17–19 December, Langkawi, Malaysia, pp.113–117.
Cetin, A.E., Gerek, O.N. and Yardimci, Y. (1997) ‘Equiripple FIR filter design by the FFT
algorithm’, IEEE Magazine on Signal Processing, Vol. 14, No. 2, pp.60–64.
Chandrakar, S.B., Yadav, O.P. and Chandra, V.K. (2013) ‘A survey of noise removal techniques
for EEG signals’, International Journal of Advanced Research in Computer and
Communication Engineering, Vol. 2, No. 2, pp.1354–1356.
Niedermeyer, E. and da Silva, F.H.L. (2005) Electroencephalography: Basic Principles, Clinical
Applications, and Related Fields, Lippincott Williams & Wilkins, Philadelphia, PA.
Rani, S., Kaur, A. and Ubhi, J.S. (2011) ‘Comparative study of FIR and IIR filters for the removal
of baseline noises from ECG signal’, International Journal of Computer Science and
Information Technologies, Vol. 2, pp.1105–1110.
Sadasivan, P.K. and Narayana, D. (1995) ‘Line interference cancellation from corrupted EEG
signals using modified linear phase FIR digital filters’, Proceedings 1st RC IEEE Engineering
in Medicine and Biology Society and 14th Conference of the Biomedical Engineering Society
of India: An International Meeting, 15–18 February, New Delhi, pp.35–36.
Sanei, S. and Jonathon, A (2008) EEG Signal Processing, John Wiley & Sons, New York.
Sharma, T. and Veer, K. (2014) ‘Wavelet based feature extraction of electromyogram signal for
denoising’, International Journal of Advanced Research in Computer Engineering &
Technology, Vol. 3, pp.2623–2627.
Veer, K. (2015) ‘A technique for classification and decomposition of muscle signal for control
of myoelectric prostheses based on wavelet statistical classifier’, Measurement, Vol. 60,
pp.283–291.
Veer, K. and Agarwal, R. (2015) ‘Wavelet and short-time Fourier transform comparison-based
analysis of myoelectric signals’, Journal of Applied Statistics, Vol. 42, No. 7, pp.1591–1601.

S-ar putea să vă placă și