2005Conference on Information Sciences and Systems, The Johns Hopkins University, March 16–18,2005
Adaptive Notch Filter for EEG Signals Based on the LMS Algorithm
with Variable Step-Size Parameter
Daniel Olgu ´ınOlgu´ın
1
Frantz Bouchereau
1
Sergio Mart´ınez
1
e-mail:[email protected]:[email protected]:[email protected]
Abstract —
This paper presents the use of an adaptive noise canceler (ANC)with variable step-size parameter for the elimination of power line interference in the recording of EEG signals within the relatively unex-plored gamma-band (35-100Hz). The use of an adap-tive step-size parameter offersa balance in terms of convergence, misadjustment, and rejection bandwidth optimization. Simulation results are presented to sup-port the proposed algorithm and compare its perfor-mance with fixedstep-size ANC schemes. It will be shown that the proposed algorithm outperforms clas-sical fixedstep-size ANC algorithms and eliminates the cumbersome trial and error process needed to choose an adequate value for such parameter.
I. Introduction
The elimination of the interference caused by power trans-mission lines in the recording of physiological signals of elec-trical nature has been an active topic of research for the last few decades [1],[2],[3].The majority of electrophysiological recordings unavoidably contain an undesired level of interfer-ence deriving from the power transmission lines. Moreover, the line-frequency contamination is not of constant amplitude, phase, or even frequency [1].Such variability prevents a sim-ple subtractive filterfrom being completely effective.
A fixednotch filtermay eliminate the noise when its distri-bution is centered exactly at the frequency for which the filterwas designed [2].However, the frequency of the power-line noise is not constant at exactly 60Hz. The importance of the work presented in this paper relies on the fact that there is existence of epileptiform oscillations with frequencies nearby the power line interference frequency which have been ignored because of the lack of an effectivenotch filtercapable of elim-inating the noise components without affectingthe original electroencephalographic (EEG)signal. Worrell et al. [4]have found that currently available clinical EEG systems and EEG analysis methods utilize a dynamic range (0.1-30Hz) that discards clinically important information. Their results show that the dynamic range utilized in current clinical practice largely ignores fundamental oscillations that are signatures of an epileptogenic brain. A finerstudy of high-frequency EEG oscillations may open a new possibility for patients who are poor candidates to epilepsy surgery, allowing seizure predic-tion and epilepsy treatment through several therapeutic meth-ods. The results presented in [4]suggest the need to design a notch filterwith an optimal rejection bandwidth that effec-tively eliminates the time-varying noise introduced by power
1All
three authors are with the Department of Electrical Engi-neering, Tecnol´o gico de Monterrey, Campus Monterrey, Mexico. The authors acknowledge the finantialsupport provided by the Consejo de Ciencia y Tecnolog´ıadel Estado de Nuevo Le´o n (CO-CYTENL).
transmission lines. The proposed filtershould have an opti-mum speed of convergence and allow the minimization of loss
of information and distortion of the signal of interest.
Power line interference recorded in EEG generally results from poor electrode application on the scalp. This noise is often due to high-impedance electrodes that, when connected to the recording device, affectthe common mode rejection ra-tio of the amplifier,which changes when the impedances of electrodes and scalp are not matched. Ensuring impedance measurements of less than 5kΩwill usually reduce such line-frequency noise [5].The standard practice now is to measure all potentials relative to a common electrode which is isolated from ground. This improves subject safety and reduces power line noise. However, taking all the existing measures to min-imize the interference is not enough when we are interested in measuring signals with frequency components that are very close to those of the interference, and with amplitudes which are one or more orders of magnitude smaller than the noise. There have been several attempts of eliminating power line interference by using digital signal processing tech-niques [2],[3].In applications where the information of in-terest is contained within the classical EEG bands:delta (0-4Hz), theta (4-7Hz), alpha (7-13Hz) and beta (13-35Hz); it is of common practice to use a 60/50Hz notch filterwith a fixednull in its frequency response characteristic to remove the noise from the data. Sometimes the EEG signal is further low-pass filteredwith a cut-offfrequency of less than 50Hz to assure the integrity of the data. In [2],three differentadap-tive notch filtersare considered:an FIR second-order filter,a second-order IIR filterwith fixedzeros and varying poles, and a second-order IIR filterwith varying zeros and poles. The three filterswere designed using a constrained LMS algorithm with fixedstep-size. It was observed that only the non-fixedpole-zero IIR filterwas able to track the frequency variation with a variable bandwidth. However, a difficultdesign issue that arised from this filteringscheme was that of choosing an adequate step-size parameter to adjust the filter’scoefficientsand obtain optimal convergence, tracking and rejection band-width conditions.
In this paper, we propose an adaptive notch filterto elim-inate the interference introduced by power transmission lines in the recording of EEG signals within the gamma-band (35-100Hz), based on an adaptive noise canceling scheme imple-mented with a variable step-size LMS algorithm. The pro-posed algorithm avoids the cumbersome trial and error pro-cess needed to choose an adequate value for the step-size pa-rameter and will minimize the rejection bandwidth required to effectivelyeliminate the time-varying interference while, at the same time, preserving optimal convergence, tracking and misadjustment conditions.
Numerical results will be presented to compare the algo-rithm with the classical fixedstep-size adaptive noise cancel-ing scheme. We will consider the case where the frequency of
the noise is varying around the nominal frequency of 60Hz, following a first-orderGauss-Markov process model.
The paper is organized as follows. Section II describes the model utilized for the EEG and time-varying interference sig-nals. The classical adaptive noise canceler (ANC)is intro-duced in Section III where the proposed algorithm for the step-size parameter adaptation is also presented. Section IV presents simulation results. Here, several comparisons be-tween the fixedstep-size ANC and our proposed algorithm are presented. Finally, Section V presents conclusions.
II. Signal Model
The signal observation model is given by
x (n ) =s (n ) +p (n ) ,
(1)
where s (n ) is the EEG signal of interest and p (n ) is an additive time-varying sinusoidal interference.
Several mathematical models have been developed to de-scribe EEG signals. Some examples include AR models, matching pursuit method-based models, Kalman filters,and Markov processes. Since the EEG signal is highly non-stationary its statistical properties are difficultto model ac-curately. In this paper we use a Markov process amplitude model originally developed by Nakamura et al. [6].The artifi-cially generated EEG signal is formed by a linear combination of K differentoscillations x k (k =1, 2, ..., K ) as given by K s (n ) =
a k (n ) x k (n ) K =
a k (n ) sin(2πmk n +φk ) , (2)
k =1
k =1
where a k (n ) is the model’samplitude obtained from a first-order Gauss-Markov process, m k is the dominant k -th fre-quency, and φk is the initial phase. The (n +1)-th value of
the model’samplitude is definedas
a k (n +1) =γk a k (n ) +ξk (n ) ,
(3)
where ξk (n ) is a random increment of Gaussian distribution
with zero mean and variance σ2
ξ,k
, and γk is the coefficientof the first-orderMarkov process which must satisfy the condi-tion 0
The power line noise interference is a frequency-varying si-nusoidal with a center frequency of 60Hz. In this work this interference will be modeled as
p (n ) =A cos {2π[f 0+f v (n )]n +ψ}.
(4)
Here, A is assumed to be a constant and deterministic ampli-tude, f 0is the central frequency with a value of 60Hz, the initial phase ψis a random variable uniformly distributed over [0, 2π],and f v (n ) is a slowly varying random frequency which is assumed to be a steady state realization of a zero-mean Gauss-Markov process given by
f v (∆k +1) =ρfv (∆k ) +η(∆k ) ,
(5)
where ∆k is the time interval index for the process which might be larger than the signal sampling interval T , ρis the coefficientof the first-orderMarkov process, and η(∆k ) is a random increment of Gaussian distribution with zero mean
and variance σ2η
. III. Adaptive Noise Canceling System with
Variable Step-Size Parameter
The transfer function for a 2nd-order FIR notch filteris given by
H (z ) =1−2cos(2πf0) z −1+z −2, (6)with a null at frequency f 0. The problem with this filteris
that the notch has a relatively large bandwidth, which means that other frequency components around the desired null are severely attenuated [7].To improve the frequency character-istics of the filterwe may consider a 2nd-order IIR notch filterwith transfer function
1−2cos(2πf0) z −1+z −2
H (z ) =
1−2ζcos(2πfζ2z −2
, (7)
0) z −1+where ζis a constant that definesthe location of the poles in
the unit circle.
A very narrow notch is usually desired in order to filterout a sinusoidal interference without distorting the original sig-nal. However, if the interference is not precisely known, and if the notch is very narrow, the center of the notch may not fall exactly over the interference. When a reference for the interference is available, the adaptive noise canceling method originally proposed in [8]may be used. In this method, the interference is adaptively filteredto match the interfering sinu-soid as closely as possible, allowing them to then be subtracted out. The system is shown in Figure
1.
Figure 1:
Adaptive noise canceling system.
Applying this scheme to the problem of filteringa noisy
EEG signal, the primary input x (n ) of the system corre-sponds to the clean EEG signal s (n ) corrupted by power line noise p (n ). These signals are assumed to be uncorrelated, E {s (n ) p (k ) }=0, ∀(n, k ). The reference input r (n ) is a sinu-soidal signal with frequency f r and zero phase. The value of f r is set to the noise interference center frequency f 0. This reference signal given by r (n ) =C cos(2πfr n ), is applied to an M -stage tapped delay line. Here C is a constant deter-ministic amplitude usually differentfrom A (theinterference amplitude). The values at the M taps at time n form the reference M -vector r (n ) =[r (n ) r (n −1) ... r (n −M +1)]T . The output of the filtery (n ) is estimated to match the noise p (n ) in the primary input. The noise and the reference signals are assumed to be correlated, E {p (n ) r (k ) }=0.
If we definethe M -dimensional filtercoefficientvector as w (n ) =[w 0(n ) w 1(n ) ... w M −1(n )]T , then the equations that describe the adaptation of the system based on the LMS al-gorithm with fixedstep-size are given by
y (n ) =w T (n ) r (n ) , (8)e (n ) =d (n ) −y (n ) , (9)w (n +1) =w (n ) +µe(n ) r (n ) .
(10)
Let d (n ) denote the desired signal, which in this case is equivalent to the primary input x (n ). The error signal e (n ) is definedas the differencebetween the desired signal d (n ) and the filter’soutput signal y (n ) =p ˆ(n ), then
e (n ) =x (n ) −y (n ) ,
e (n ) =s (n ) +p (n ) −p ˆ(n ) , (11)
e (n ) =s ˆ(n ) .
Clearly s ˆ(n ) is an estimate of the noise-free EEG signal and the LMS algorithm is designed to minimize an instantaneous version of the mean square error (MSE)given by E {|e (n ) |2}=E {|s ˆ(n ) |2}.
It is well known that the ANC transfer function from d (n ) to e (n ),is given by [8]H (z ) =
1−2cos (2πfr ) z −1+z −2
1−2 1−
M µC2
cos (2πfr ) z −1 M µC2
,
4
+1−2
z −2
(12)
By comparing equations (12)and (7),we observe that
ζ2
=1−
MµC2
MµC2
2
2
+4
. (13)
If µis small enough, this can be approximated to ζ2=1−M µC2
. Then, it is clear that (12)is the transfer function of a 2nd-order 2
digital IIR notch filterwith a null centered at the reference frequency f r . It can be shown that the 3-dB bandwidth of the null is given by
BW 3dB
=
MµC2
4πT
(Hz ) . (14)
It is clear from equations (12)and (14)that the position of the filterpoles and the notch bandwidth are directly affectedby the step-size parameter µ. The pole locations become closer to the unit circle and the rejection bandwidth becomes smaller as µdecreases. Hence, the choice of the step-size parameter in the ANC algorithm represents a tradeoffbetween misadjust-ment, speed of convergence, tracking, notch attenuation and rejection bandwidth. For the application of interest it is de-sired to have the smallest notch bandwidth, however, it is not possible to minimize this bandwidth by making µarbitrarily small. Instead, to ensure an optimal equilibrium between all the desired filtercharacteristics it becomes necessary to finda method to chose the step-size parameter in an optimal way at every iteration of the algorithm.
Several variable step-size parameter algorithms have been proposed in the literature [9],[10].In [10]the recursion to obtain µ(n ) is based on an estimator of ∂e(n ) /∂µ(n ), however, the complexity of the algorithm and its requirement of the independence condition E {r (n ) r (k ) }=0, ∀n, k makes it not suitable for our application.
The objective is to ensure large µ(n ) when the algorithm is far from the optimum, and decreasing µ(n ) as we approach the optimum hence decreasing the notch bandwidth and in-creasing noise attenuation. The step-size adjustment proposed in [9]is controlled by the square of the prediction error. The simplicity of the algorithm and its sensibility to changes in the error signal allowed us to implement it in the ANC scheme. The algorithm for updating µ(n ) is as follows
µ(n +1) =αµ(n ) +γe2
(n ) .
(15)
The constant αis a forgetting factor with values between
00is the step-size parameter for the adaptation of µ. Substituting the variable step-size µ(n ) in (10)the update equation for the filtercoefficientsbecomes
w (n +1) =w (n ) +µ(n ) e (n ) r (n ) .
(16)
The initial step-size µ(0)is usually set to µmax and this max-imum value is chosen to ensure stability of the algorithm.
IV. Simulation Results
We applied the algorithm described by equations (8),(9),
(15)and (16)to artificiallygenerated EEG signals corrupted with time-varying power line noise and evaluated its effec-tiveness by analyzing the rate of convergence, misadjustment, rejection bandwidth and tracking capabilities.
Figure 2shows the power spectral density (PSD)of the EEG signal generated by using the Markov process amplitude model described in Section II with K =2dominant frequen-cies located at 3Hz and 12.5Hz, corresponding to an EEG recording during baseline. To create the frequency peaks we selected γ1=0. 98, γ2=0. 99, and σξ,1=σξ,2=0. 01.
Figure 2:
PSD of EEG signal generated by using a Markov process
amplitude model with dominant frequencies at 3Hz and 12.5Hz.
Let us present four experiments to compare the perfor-mance of the fixedstep-size ANC algorithm and the varying step-size ANC algorithm. The sampling frequency used along the experiments was set to f s =400Hz and the number of filtercoefficientswas set to M =8.
Let s (i ) and ˆs (i ) be N -dimensional vectors of the noise-free and estimated signal at the i -th experiment realization. Then, the ensemble average MSE presented in the following results is obtained as
Q MSE =1Q
|s (i ) −ˆs (i ) |2.
(17)
i =1
For the experiments presented in this section, N =16384samples and Q =200trials of the experiment. Note that this MSE is with respect to the noise free and estimated signal which is differentto the MSE definedin Section III for the output error e (n ). Experiment 1
The amplitude of the generated signal s (n ) was normalized to [−1, 1]and a power line noise signal p (n ) with amplitude
Figure 3:
(Top)PSD of signal plus noise, (Bottom)PSD of orig-inal EEG signal
Figure 4:
Comparison of MSE using a variable step-size param-eter µ(n),and two differentfixedstep-size parameters µ=0.02,and µ=0.5for Experiment 1.
A =0. 1and constant frequency f 0=60Hz was generated in order to analyze the rate of convergence of the LMS algorithm that adapts the weights of the ANC when using two differentfixedvalues for the step-size parameter and when using a vari-able step-size parameter µ(n ). We can see in Figure 3that the power of the noise signal is significantlysuperior to the power of the EEG signal in the gamma-band. Figure 4shows the MSE curves for three differentcases of step-size parameter selection. For the firstcase the value of step-size parame-ter was fixedat µ=0. 02. This value is below the optimum value found when using a variable step-size parameter and therefore the algorithm converges slowly after approximately 14,000iterations. For the second case the step-size
parameter was fixedat µ=0. 5, near its maximum allowable value µmax . We can observe that the algorithm converges very fast, after approximately 500iterations, but with the disadvantage of a large misadjustment. For the third case the noisy EEG sig-nal was filteredusing the variable step-size ANC algorithm. Clearly this algorithm maintains an equilibrium between fast convergence and small misadjustment.
Figure 5shows the ensemble average (overtwo hundred realizations) for the adaptation curve of the step-size parame-ter when using equation (15).The initial step-size parameter was set to µ0=µmax and this parameter converged to its average optimum value after approximately 500iterations. Note that after the step-size has reached its average optimum value, which in this case was found to be µopt =0. 05, it
Figure 5:
Convergence behavior of the step-size parameter
for
Experiment 1.
Figure 6:
MSE behavior when a step-change of frequency is ap-plied to the noise signal.
continues to vary around this value following the changes of the estimated EEG signal e (n ) =s ˆ(n ). It is clear that the adaptive step-size algorithm will minimize the value of µafter convergence to minimize misadjustment. Recalling equation (14),this means that the algorithm will optimize the rejection bandwidth while keeping excellent convergence properties as well as tracking capabilities as will be shown next.
Experiment 2
To analyze the tracking capabilities of the algorithm we set the noise signal to have a frequency step-change of 10Hz. This means that the center frequency of the interference varied from f 0=60Hz to f 0=50Hz. Obviously, the reference signal frequency was kept fixedat f r =60Hz. The abrupt change proposed in this example would never occur in reality since the power line frequency must be robust enough as to drift only in small quantities. However, this test was used for analysis purposes only. Figure 6shows the behavior of the MSE when the change in frequency was applied. We can see from the figurethat the MSE increases when the change in frequency occurs, and then it converges again to a minimum value for each of the differentcases of step-size parameter selection.
Figure 7shows the ensemble average (overtwo hundred realizations) for the adaptation curve of the step-size pa-rameter. It is interesting to note that even with the large
Figure 7:
Convergence behavior of the step-size parameter for
Experiment 2.
Figure 8:
Time-frequency magnitude plot of the noise PSD for
Experiment 3.
frequency step-change, the step-size values did not change considerably. This means that the rejection bandwidth of the filterremains fairly constant even in the presence of large unstationarities. We can conclude once more that the variable step-size algorithm minimizes the MSE while preserving good tracking capabilities, optimal step-size values and small rejection bandwidths. Experiment 3
Finally we consider the case when the power line frequency is constantly varying around its nominal value f 0=60Hz, following the Gauss-Markov model described in Section II. We defined∆k =2seconds, ρ=0. 99, and ση=0. 1and generated a power line noise signal whose frequency variation with time is shown in Figure 8. Figure 9shows the MSE for the three differentcases of step-size parameter selection. We can readily identify the instants in which the noise drifted in frequency. It is important to notice that in all cases the filterswere able to track the frequency changes. However, the variable step-size algorithm was able to track the frequency changes while maintaining a fast convergence rate, a small misadjustment and an optimum step-size value and hence a minimum rejection bandwidth.
Figure 10shows the PSD of the signal estimate s ˆ(n ) for the three differentselections of step-size parameter considered in this experiment. By comparing these plots with the PSD of the original EEG signal we can see that when the step-size
Figure 9:M SE behavior when the noise frequency is varying every 2seconds.
Figure 10:
Comparison of power spectrum in the gamma-band of
the noise free signal and its estimates. (Top)Spectrum of noise free signal s (n ). (Second)s ˆ(n ) obtained with adaptive µ, (Third)s ˆ(n ) obtained with µ=0.02,and (Bottom)s ˆ(n ) obtained with µ=0.5.
Figure 11:Gamma-band signals:(Top)Signal plus interference, (Center)Original EEG signal s(n),(Bottom)Estimated signal s
ˆ(n)using the variable step-size parameter algorithm.
Figure 12:
M SE behavior in the presence of a periodic non-sinusoidal noise signal.
parameter is adequately chosen, there is no distortion of the spectral content in the filteredsignal. This is true for the varying step-size parameter as well as for the case when it was kept constant with µ=0. 02. On the other hand, when the step-size was set to µ=0. 5the rejection bandwidth of the filterbecame too large and the distortion of the spectral content became apparent. One can clearly observe a null attenuating several frequencies around 60Hz for this scenario. Figure 11shows the EEG signal plus noise in the gamma-band (40-80Hz), the original noise-free EEG signal, and the signal estimate s ˆ(n ) obtained with the varying step-size parameter algorithm. We can appreciate that the original signal is completely masked by the noise signal, and how well it is reconstructed by the ANC system with varying step-size parameter proposed in this paper. Experiment 4
In this experiment we analyze the effectsof periodic non-sinusoidal noise on the ANC algorithm. Figure 12shows the
MSE when the interference was set to be a sinusoidal trun-cated at values of ±50%of its peak value. It is clear that although the convergence time of the algorithm increased, it was still able to eliminate the interference using a sinusoidal reference. This result is relevant in cases where amplifiersat-uration may occur and in cases where the signal is windowed in time.
V. Conclusions
When dealing with EEG signals in the gamma-band (35-100Hz), it is desirable to have a notch filterwith a small re-jection bandwidth that effectivelyeliminates the time-varying noise introduced by power transmission lines. The proposed ANC system based on a variable step-size LMS algorithm is able to findan optimum speed of convergence which is of great importance in real-time applications and allows the minimiza-tion of information loss and signal distortion by keeping the notch bandwidth as small as possible. The proposed filterscould be implemented in existing EEG recording devices or in new devices intended for real-time ambulatory EEG monitor-ing.
The choice of the step-size parameter in the adaptation al-gorithm plays an important role in the rate of convergence, stability, tracking capabilities and rejection bandwidth of the filters.The proposed variable step-size method may overcome the cumbersome trial and error process needed to choose an adequate value for such parameter and will minimize the re-jection bandwidth required to effectivelyeliminate the time-varying interference introduced by power transmission lines. This last property is of great importance since, as mentioned in the introductory paragraphs, valuable signal information is found around the interference frequency band.
References
[1]K. J. Eriksen “Non-DistortingPost-Acquisition Line-Frequency
for Evoked Potentials, Proceedings of the IEEE EMBS 10th Annual International Conference , p. 1168, 1988.
[2]M. Ferdjallah and R. E. Barr “AdaptiveDigital Notch Filter
Design on the Unit Circle for the Removal of Powerline Noise from Biomedical Signals”,IEEE Trans. on Biomedical Engi-neering , vol. 41, no. 6, pp. 529–536,1994. [3]M. V. Dragosevic, and S. S. Stankovic “AnAdaptive Notch
Filter with Improved Tracking Properties”,IEEE Trans. Signal Processing , vol. 43, no. 9, pp. 2068–2078,1995. [4]G. A. Worrell, S. D. Cranstoun, R. Jonas, G. Baltuch and B.
Litt “High-frequencyoscillations and seizure generation in neo-cortical epilepsy”,Brain , vol. 127, no. 7, pp. 1496–1506,2004. [5]J. S. Ebersole, and T. A. Pedley “Currentpractice of clinical
electroencephalography”,Lippincott Williams and Wilkins , 3rd Ed., USA, p. 281, 2003. [6]O. Bai, M. Nakamura, A. Ikeda, and H. Shibasaki “Nonlinear
Markov Process Amplitude EEG Model for Nonlinear Coupling Interaction of Spontaneous EEG”,IEEE Trans. on Biomedical Engineering , vol. 47, no. 9, pp. 1141–1146,2000. [7]J. G. Proakis, and D. G. Manolakis “DigitalSignal Processing”,
Prentice Hall , 3rd Ed., pp. 343–345,USA, 1996. [8]J. R. Glover “AdaptiveNoise Canceling Applied to Sinusoidal
Interferences”,IEEE Trans. on Acoustics, Speech, and Signal Processing , vol. ASSP-25, no. 6, pp. 484–491,1977. [9]R. H. Kwong, and E. W. Johnston “AVariable Step Size LMS
Algorithm”,IEEE Trans. Signal Processing , vol. 40, no. 7, pp. 1633–1642,1992. [10]A. M. Kuzminskiy “ARobust Step Size Adaptation Scheme
for LMS Adaptive Filters”,IEEE Workshop on Digital Signal Processing , pp. 33–36,1997.
2005Conference on Information Sciences and Systems, The Johns Hopkins University, March 16–18,2005
Adaptive Notch Filter for EEG Signals Based on the LMS Algorithm
with Variable Step-Size Parameter
Daniel Olgu ´ınOlgu´ın
1
Frantz Bouchereau
1
Sergio Mart´ınez
1
e-mail:[email protected]:[email protected]:[email protected]
Abstract —
This paper presents the use of an adaptive noise canceler (ANC)with variable step-size parameter for the elimination of power line interference in the recording of EEG signals within the relatively unex-plored gamma-band (35-100Hz). The use of an adap-tive step-size parameter offersa balance in terms of convergence, misadjustment, and rejection bandwidth optimization. Simulation results are presented to sup-port the proposed algorithm and compare its perfor-mance with fixedstep-size ANC schemes. It will be shown that the proposed algorithm outperforms clas-sical fixedstep-size ANC algorithms and eliminates the cumbersome trial and error process needed to choose an adequate value for such parameter.
I. Introduction
The elimination of the interference caused by power trans-mission lines in the recording of physiological signals of elec-trical nature has been an active topic of research for the last few decades [1],[2],[3].The majority of electrophysiological recordings unavoidably contain an undesired level of interfer-ence deriving from the power transmission lines. Moreover, the line-frequency contamination is not of constant amplitude, phase, or even frequency [1].Such variability prevents a sim-ple subtractive filterfrom being completely effective.
A fixednotch filtermay eliminate the noise when its distri-bution is centered exactly at the frequency for which the filterwas designed [2].However, the frequency of the power-line noise is not constant at exactly 60Hz. The importance of the work presented in this paper relies on the fact that there is existence of epileptiform oscillations with frequencies nearby the power line interference frequency which have been ignored because of the lack of an effectivenotch filtercapable of elim-inating the noise components without affectingthe original electroencephalographic (EEG)signal. Worrell et al. [4]have found that currently available clinical EEG systems and EEG analysis methods utilize a dynamic range (0.1-30Hz) that discards clinically important information. Their results show that the dynamic range utilized in current clinical practice largely ignores fundamental oscillations that are signatures of an epileptogenic brain. A finerstudy of high-frequency EEG oscillations may open a new possibility for patients who are poor candidates to epilepsy surgery, allowing seizure predic-tion and epilepsy treatment through several therapeutic meth-ods. The results presented in [4]suggest the need to design a notch filterwith an optimal rejection bandwidth that effec-tively eliminates the time-varying noise introduced by power
1All
three authors are with the Department of Electrical Engi-neering, Tecnol´o gico de Monterrey, Campus Monterrey, Mexico. The authors acknowledge the finantialsupport provided by the Consejo de Ciencia y Tecnolog´ıadel Estado de Nuevo Le´o n (CO-CYTENL).
transmission lines. The proposed filtershould have an opti-mum speed of convergence and allow the minimization of loss
of information and distortion of the signal of interest.
Power line interference recorded in EEG generally results from poor electrode application on the scalp. This noise is often due to high-impedance electrodes that, when connected to the recording device, affectthe common mode rejection ra-tio of the amplifier,which changes when the impedances of electrodes and scalp are not matched. Ensuring impedance measurements of less than 5kΩwill usually reduce such line-frequency noise [5].The standard practice now is to measure all potentials relative to a common electrode which is isolated from ground. This improves subject safety and reduces power line noise. However, taking all the existing measures to min-imize the interference is not enough when we are interested in measuring signals with frequency components that are very close to those of the interference, and with amplitudes which are one or more orders of magnitude smaller than the noise. There have been several attempts of eliminating power line interference by using digital signal processing tech-niques [2],[3].In applications where the information of in-terest is contained within the classical EEG bands:delta (0-4Hz), theta (4-7Hz), alpha (7-13Hz) and beta (13-35Hz); it is of common practice to use a 60/50Hz notch filterwith a fixednull in its frequency response characteristic to remove the noise from the data. Sometimes the EEG signal is further low-pass filteredwith a cut-offfrequency of less than 50Hz to assure the integrity of the data. In [2],three differentadap-tive notch filtersare considered:an FIR second-order filter,a second-order IIR filterwith fixedzeros and varying poles, and a second-order IIR filterwith varying zeros and poles. The three filterswere designed using a constrained LMS algorithm with fixedstep-size. It was observed that only the non-fixedpole-zero IIR filterwas able to track the frequency variation with a variable bandwidth. However, a difficultdesign issue that arised from this filteringscheme was that of choosing an adequate step-size parameter to adjust the filter’scoefficientsand obtain optimal convergence, tracking and rejection band-width conditions.
In this paper, we propose an adaptive notch filterto elim-inate the interference introduced by power transmission lines in the recording of EEG signals within the gamma-band (35-100Hz), based on an adaptive noise canceling scheme imple-mented with a variable step-size LMS algorithm. The pro-posed algorithm avoids the cumbersome trial and error pro-cess needed to choose an adequate value for the step-size pa-rameter and will minimize the rejection bandwidth required to effectivelyeliminate the time-varying interference while, at the same time, preserving optimal convergence, tracking and misadjustment conditions.
Numerical results will be presented to compare the algo-rithm with the classical fixedstep-size adaptive noise cancel-ing scheme. We will consider the case where the frequency of
the noise is varying around the nominal frequency of 60Hz, following a first-orderGauss-Markov process model.
The paper is organized as follows. Section II describes the model utilized for the EEG and time-varying interference sig-nals. The classical adaptive noise canceler (ANC)is intro-duced in Section III where the proposed algorithm for the step-size parameter adaptation is also presented. Section IV presents simulation results. Here, several comparisons be-tween the fixedstep-size ANC and our proposed algorithm are presented. Finally, Section V presents conclusions.
II. Signal Model
The signal observation model is given by
x (n ) =s (n ) +p (n ) ,
(1)
where s (n ) is the EEG signal of interest and p (n ) is an additive time-varying sinusoidal interference.
Several mathematical models have been developed to de-scribe EEG signals. Some examples include AR models, matching pursuit method-based models, Kalman filters,and Markov processes. Since the EEG signal is highly non-stationary its statistical properties are difficultto model ac-curately. In this paper we use a Markov process amplitude model originally developed by Nakamura et al. [6].The artifi-cially generated EEG signal is formed by a linear combination of K differentoscillations x k (k =1, 2, ..., K ) as given by K s (n ) =
a k (n ) x k (n ) K =
a k (n ) sin(2πmk n +φk ) , (2)
k =1
k =1
where a k (n ) is the model’samplitude obtained from a first-order Gauss-Markov process, m k is the dominant k -th fre-quency, and φk is the initial phase. The (n +1)-th value of
the model’samplitude is definedas
a k (n +1) =γk a k (n ) +ξk (n ) ,
(3)
where ξk (n ) is a random increment of Gaussian distribution
with zero mean and variance σ2
ξ,k
, and γk is the coefficientof the first-orderMarkov process which must satisfy the condi-tion 0
The power line noise interference is a frequency-varying si-nusoidal with a center frequency of 60Hz. In this work this interference will be modeled as
p (n ) =A cos {2π[f 0+f v (n )]n +ψ}.
(4)
Here, A is assumed to be a constant and deterministic ampli-tude, f 0is the central frequency with a value of 60Hz, the initial phase ψis a random variable uniformly distributed over [0, 2π],and f v (n ) is a slowly varying random frequency which is assumed to be a steady state realization of a zero-mean Gauss-Markov process given by
f v (∆k +1) =ρfv (∆k ) +η(∆k ) ,
(5)
where ∆k is the time interval index for the process which might be larger than the signal sampling interval T , ρis the coefficientof the first-orderMarkov process, and η(∆k ) is a random increment of Gaussian distribution with zero mean
and variance σ2η
. III. Adaptive Noise Canceling System with
Variable Step-Size Parameter
The transfer function for a 2nd-order FIR notch filteris given by
H (z ) =1−2cos(2πf0) z −1+z −2, (6)with a null at frequency f 0. The problem with this filteris
that the notch has a relatively large bandwidth, which means that other frequency components around the desired null are severely attenuated [7].To improve the frequency character-istics of the filterwe may consider a 2nd-order IIR notch filterwith transfer function
1−2cos(2πf0) z −1+z −2
H (z ) =
1−2ζcos(2πfζ2z −2
, (7)
0) z −1+where ζis a constant that definesthe location of the poles in
the unit circle.
A very narrow notch is usually desired in order to filterout a sinusoidal interference without distorting the original sig-nal. However, if the interference is not precisely known, and if the notch is very narrow, the center of the notch may not fall exactly over the interference. When a reference for the interference is available, the adaptive noise canceling method originally proposed in [8]may be used. In this method, the interference is adaptively filteredto match the interfering sinu-soid as closely as possible, allowing them to then be subtracted out. The system is shown in Figure
1.
Figure 1:
Adaptive noise canceling system.
Applying this scheme to the problem of filteringa noisy
EEG signal, the primary input x (n ) of the system corre-sponds to the clean EEG signal s (n ) corrupted by power line noise p (n ). These signals are assumed to be uncorrelated, E {s (n ) p (k ) }=0, ∀(n, k ). The reference input r (n ) is a sinu-soidal signal with frequency f r and zero phase. The value of f r is set to the noise interference center frequency f 0. This reference signal given by r (n ) =C cos(2πfr n ), is applied to an M -stage tapped delay line. Here C is a constant deter-ministic amplitude usually differentfrom A (theinterference amplitude). The values at the M taps at time n form the reference M -vector r (n ) =[r (n ) r (n −1) ... r (n −M +1)]T . The output of the filtery (n ) is estimated to match the noise p (n ) in the primary input. The noise and the reference signals are assumed to be correlated, E {p (n ) r (k ) }=0.
If we definethe M -dimensional filtercoefficientvector as w (n ) =[w 0(n ) w 1(n ) ... w M −1(n )]T , then the equations that describe the adaptation of the system based on the LMS al-gorithm with fixedstep-size are given by
y (n ) =w T (n ) r (n ) , (8)e (n ) =d (n ) −y (n ) , (9)w (n +1) =w (n ) +µe(n ) r (n ) .
(10)
Let d (n ) denote the desired signal, which in this case is equivalent to the primary input x (n ). The error signal e (n ) is definedas the differencebetween the desired signal d (n ) and the filter’soutput signal y (n ) =p ˆ(n ), then
e (n ) =x (n ) −y (n ) ,
e (n ) =s (n ) +p (n ) −p ˆ(n ) , (11)
e (n ) =s ˆ(n ) .
Clearly s ˆ(n ) is an estimate of the noise-free EEG signal and the LMS algorithm is designed to minimize an instantaneous version of the mean square error (MSE)given by E {|e (n ) |2}=E {|s ˆ(n ) |2}.
It is well known that the ANC transfer function from d (n ) to e (n ),is given by [8]H (z ) =
1−2cos (2πfr ) z −1+z −2
1−2 1−
M µC2
cos (2πfr ) z −1 M µC2
,
4
+1−2
z −2
(12)
By comparing equations (12)and (7),we observe that
ζ2
=1−
MµC2
MµC2
2
2
+4
. (13)
If µis small enough, this can be approximated to ζ2=1−M µC2
. Then, it is clear that (12)is the transfer function of a 2nd-order 2
digital IIR notch filterwith a null centered at the reference frequency f r . It can be shown that the 3-dB bandwidth of the null is given by
BW 3dB
=
MµC2
4πT
(Hz ) . (14)
It is clear from equations (12)and (14)that the position of the filterpoles and the notch bandwidth are directly affectedby the step-size parameter µ. The pole locations become closer to the unit circle and the rejection bandwidth becomes smaller as µdecreases. Hence, the choice of the step-size parameter in the ANC algorithm represents a tradeoffbetween misadjust-ment, speed of convergence, tracking, notch attenuation and rejection bandwidth. For the application of interest it is de-sired to have the smallest notch bandwidth, however, it is not possible to minimize this bandwidth by making µarbitrarily small. Instead, to ensure an optimal equilibrium between all the desired filtercharacteristics it becomes necessary to finda method to chose the step-size parameter in an optimal way at every iteration of the algorithm.
Several variable step-size parameter algorithms have been proposed in the literature [9],[10].In [10]the recursion to obtain µ(n ) is based on an estimator of ∂e(n ) /∂µ(n ), however, the complexity of the algorithm and its requirement of the independence condition E {r (n ) r (k ) }=0, ∀n, k makes it not suitable for our application.
The objective is to ensure large µ(n ) when the algorithm is far from the optimum, and decreasing µ(n ) as we approach the optimum hence decreasing the notch bandwidth and in-creasing noise attenuation. The step-size adjustment proposed in [9]is controlled by the square of the prediction error. The simplicity of the algorithm and its sensibility to changes in the error signal allowed us to implement it in the ANC scheme. The algorithm for updating µ(n ) is as follows
µ(n +1) =αµ(n ) +γe2
(n ) .
(15)
The constant αis a forgetting factor with values between
00is the step-size parameter for the adaptation of µ. Substituting the variable step-size µ(n ) in (10)the update equation for the filtercoefficientsbecomes
w (n +1) =w (n ) +µ(n ) e (n ) r (n ) .
(16)
The initial step-size µ(0)is usually set to µmax and this max-imum value is chosen to ensure stability of the algorithm.
IV. Simulation Results
We applied the algorithm described by equations (8),(9),
(15)and (16)to artificiallygenerated EEG signals corrupted with time-varying power line noise and evaluated its effec-tiveness by analyzing the rate of convergence, misadjustment, rejection bandwidth and tracking capabilities.
Figure 2shows the power spectral density (PSD)of the EEG signal generated by using the Markov process amplitude model described in Section II with K =2dominant frequen-cies located at 3Hz and 12.5Hz, corresponding to an EEG recording during baseline. To create the frequency peaks we selected γ1=0. 98, γ2=0. 99, and σξ,1=σξ,2=0. 01.
Figure 2:
PSD of EEG signal generated by using a Markov process
amplitude model with dominant frequencies at 3Hz and 12.5Hz.
Let us present four experiments to compare the perfor-mance of the fixedstep-size ANC algorithm and the varying step-size ANC algorithm. The sampling frequency used along the experiments was set to f s =400Hz and the number of filtercoefficientswas set to M =8.
Let s (i ) and ˆs (i ) be N -dimensional vectors of the noise-free and estimated signal at the i -th experiment realization. Then, the ensemble average MSE presented in the following results is obtained as
Q MSE =1Q
|s (i ) −ˆs (i ) |2.
(17)
i =1
For the experiments presented in this section, N =16384samples and Q =200trials of the experiment. Note that this MSE is with respect to the noise free and estimated signal which is differentto the MSE definedin Section III for the output error e (n ). Experiment 1
The amplitude of the generated signal s (n ) was normalized to [−1, 1]and a power line noise signal p (n ) with amplitude
Figure 3:
(Top)PSD of signal plus noise, (Bottom)PSD of orig-inal EEG signal
Figure 4:
Comparison of MSE using a variable step-size param-eter µ(n),and two differentfixedstep-size parameters µ=0.02,and µ=0.5for Experiment 1.
A =0. 1and constant frequency f 0=60Hz was generated in order to analyze the rate of convergence of the LMS algorithm that adapts the weights of the ANC when using two differentfixedvalues for the step-size parameter and when using a vari-able step-size parameter µ(n ). We can see in Figure 3that the power of the noise signal is significantlysuperior to the power of the EEG signal in the gamma-band. Figure 4shows the MSE curves for three differentcases of step-size parameter selection. For the firstcase the value of step-size parame-ter was fixedat µ=0. 02. This value is below the optimum value found when using a variable step-size parameter and therefore the algorithm converges slowly after approximately 14,000iterations. For the second case the step-size
parameter was fixedat µ=0. 5, near its maximum allowable value µmax . We can observe that the algorithm converges very fast, after approximately 500iterations, but with the disadvantage of a large misadjustment. For the third case the noisy EEG sig-nal was filteredusing the variable step-size ANC algorithm. Clearly this algorithm maintains an equilibrium between fast convergence and small misadjustment.
Figure 5shows the ensemble average (overtwo hundred realizations) for the adaptation curve of the step-size parame-ter when using equation (15).The initial step-size parameter was set to µ0=µmax and this parameter converged to its average optimum value after approximately 500iterations. Note that after the step-size has reached its average optimum value, which in this case was found to be µopt =0. 05, it
Figure 5:
Convergence behavior of the step-size parameter
for
Experiment 1.
Figure 6:
MSE behavior when a step-change of frequency is ap-plied to the noise signal.
continues to vary around this value following the changes of the estimated EEG signal e (n ) =s ˆ(n ). It is clear that the adaptive step-size algorithm will minimize the value of µafter convergence to minimize misadjustment. Recalling equation (14),this means that the algorithm will optimize the rejection bandwidth while keeping excellent convergence properties as well as tracking capabilities as will be shown next.
Experiment 2
To analyze the tracking capabilities of the algorithm we set the noise signal to have a frequency step-change of 10Hz. This means that the center frequency of the interference varied from f 0=60Hz to f 0=50Hz. Obviously, the reference signal frequency was kept fixedat f r =60Hz. The abrupt change proposed in this example would never occur in reality since the power line frequency must be robust enough as to drift only in small quantities. However, this test was used for analysis purposes only. Figure 6shows the behavior of the MSE when the change in frequency was applied. We can see from the figurethat the MSE increases when the change in frequency occurs, and then it converges again to a minimum value for each of the differentcases of step-size parameter selection.
Figure 7shows the ensemble average (overtwo hundred realizations) for the adaptation curve of the step-size pa-rameter. It is interesting to note that even with the large
Figure 7:
Convergence behavior of the step-size parameter for
Experiment 2.
Figure 8:
Time-frequency magnitude plot of the noise PSD for
Experiment 3.
frequency step-change, the step-size values did not change considerably. This means that the rejection bandwidth of the filterremains fairly constant even in the presence of large unstationarities. We can conclude once more that the variable step-size algorithm minimizes the MSE while preserving good tracking capabilities, optimal step-size values and small rejection bandwidths. Experiment 3
Finally we consider the case when the power line frequency is constantly varying around its nominal value f 0=60Hz, following the Gauss-Markov model described in Section II. We defined∆k =2seconds, ρ=0. 99, and ση=0. 1and generated a power line noise signal whose frequency variation with time is shown in Figure 8. Figure 9shows the MSE for the three differentcases of step-size parameter selection. We can readily identify the instants in which the noise drifted in frequency. It is important to notice that in all cases the filterswere able to track the frequency changes. However, the variable step-size algorithm was able to track the frequency changes while maintaining a fast convergence rate, a small misadjustment and an optimum step-size value and hence a minimum rejection bandwidth.
Figure 10shows the PSD of the signal estimate s ˆ(n ) for the three differentselections of step-size parameter considered in this experiment. By comparing these plots with the PSD of the original EEG signal we can see that when the step-size
Figure 9:M SE behavior when the noise frequency is varying every 2seconds.
Figure 10:
Comparison of power spectrum in the gamma-band of
the noise free signal and its estimates. (Top)Spectrum of noise free signal s (n ). (Second)s ˆ(n ) obtained with adaptive µ, (Third)s ˆ(n ) obtained with µ=0.02,and (Bottom)s ˆ(n ) obtained with µ=0.5.
Figure 11:Gamma-band signals:(Top)Signal plus interference, (Center)Original EEG signal s(n),(Bottom)Estimated signal s
ˆ(n)using the variable step-size parameter algorithm.
Figure 12:
M SE behavior in the presence of a periodic non-sinusoidal noise signal.
parameter is adequately chosen, there is no distortion of the spectral content in the filteredsignal. This is true for the varying step-size parameter as well as for the case when it was kept constant with µ=0. 02. On the other hand, when the step-size was set to µ=0. 5the rejection bandwidth of the filterbecame too large and the distortion of the spectral content became apparent. One can clearly observe a null attenuating several frequencies around 60Hz for this scenario. Figure 11shows the EEG signal plus noise in the gamma-band (40-80Hz), the original noise-free EEG signal, and the signal estimate s ˆ(n ) obtained with the varying step-size parameter algorithm. We can appreciate that the original signal is completely masked by the noise signal, and how well it is reconstructed by the ANC system with varying step-size parameter proposed in this paper. Experiment 4
In this experiment we analyze the effectsof periodic non-sinusoidal noise on the ANC algorithm. Figure 12shows the
MSE when the interference was set to be a sinusoidal trun-cated at values of ±50%of its peak value. It is clear that although the convergence time of the algorithm increased, it was still able to eliminate the interference using a sinusoidal reference. This result is relevant in cases where amplifiersat-uration may occur and in cases where the signal is windowed in time.
V. Conclusions
When dealing with EEG signals in the gamma-band (35-100Hz), it is desirable to have a notch filterwith a small re-jection bandwidth that effectivelyeliminates the time-varying noise introduced by power transmission lines. The proposed ANC system based on a variable step-size LMS algorithm is able to findan optimum speed of convergence which is of great importance in real-time applications and allows the minimiza-tion of information loss and signal distortion by keeping the notch bandwidth as small as possible. The proposed filterscould be implemented in existing EEG recording devices or in new devices intended for real-time ambulatory EEG monitor-ing.
The choice of the step-size parameter in the adaptation al-gorithm plays an important role in the rate of convergence, stability, tracking capabilities and rejection bandwidth of the filters.The proposed variable step-size method may overcome the cumbersome trial and error process needed to choose an adequate value for such parameter and will minimize the re-jection bandwidth required to effectivelyeliminate the time-varying interference introduced by power transmission lines. This last property is of great importance since, as mentioned in the introductory paragraphs, valuable signal information is found around the interference frequency band.
References
[1]K. J. Eriksen “Non-DistortingPost-Acquisition Line-Frequency
for Evoked Potentials, Proceedings of the IEEE EMBS 10th Annual International Conference , p. 1168, 1988.
[2]M. Ferdjallah and R. E. Barr “AdaptiveDigital Notch Filter
Design on the Unit Circle for the Removal of Powerline Noise from Biomedical Signals”,IEEE Trans. on Biomedical Engi-neering , vol. 41, no. 6, pp. 529–536,1994. [3]M. V. Dragosevic, and S. S. Stankovic “AnAdaptive Notch
Filter with Improved Tracking Properties”,IEEE Trans. Signal Processing , vol. 43, no. 9, pp. 2068–2078,1995. [4]G. A. Worrell, S. D. Cranstoun, R. Jonas, G. Baltuch and B.
Litt “High-frequencyoscillations and seizure generation in neo-cortical epilepsy”,Brain , vol. 127, no. 7, pp. 1496–1506,2004. [5]J. S. Ebersole, and T. A. Pedley “Currentpractice of clinical
electroencephalography”,Lippincott Williams and Wilkins , 3rd Ed., USA, p. 281, 2003. [6]O. Bai, M. Nakamura, A. Ikeda, and H. Shibasaki “Nonlinear
Markov Process Amplitude EEG Model for Nonlinear Coupling Interaction of Spontaneous EEG”,IEEE Trans. on Biomedical Engineering , vol. 47, no. 9, pp. 1141–1146,2000. [7]J. G. Proakis, and D. G. Manolakis “DigitalSignal Processing”,
Prentice Hall , 3rd Ed., pp. 343–345,USA, 1996. [8]J. R. Glover “AdaptiveNoise Canceling Applied to Sinusoidal
Interferences”,IEEE Trans. on Acoustics, Speech, and Signal Processing , vol. ASSP-25, no. 6, pp. 484–491,1977. [9]R. H. Kwong, and E. W. Johnston “AVariable Step Size LMS
Algorithm”,IEEE Trans. Signal Processing , vol. 40, no. 7, pp. 1633–1642,1992. [10]A. M. Kuzminskiy “ARobust Step Size Adaptation Scheme
for LMS Adaptive Filters”,IEEE Workshop on Digital Signal Processing , pp. 33–36,1997.