Научная статья на тему 'Noise cancellation in unshielded magnetocardiography based on Least-Mean-Squared algorithm and genetic algorithm'

Noise cancellation in unshielded magnetocardiography based on Least-Mean-Squared algorithm and genetic algorithm Текст научной статьи по специальности «Электротехника, электронная техника, информационные технологии»

CC BY
122
32
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
MAGNETOCARDIOGRAPHY / ADAPTIVE NOISE CANCELLATION / LEAST-MEAN-SQUARED ALGORITHM / GENETIC ALGORITHMS

Аннотация научной статьи по электротехнике, электронной технике, информационным технологиям, автор научной работы — Valentina Tiporlini, Hoang N. Nguyen, Kamal Alameh

This paper discusses adaptive noise cancellation in magnetocardiographic systems within unshielded environment using two algorithms, namely, the Least-Mean-Squared (LMS) algorithm and the Genetic Algorithm (GA). Simulation results show that the GA algorithm outperforms the LMS algorithm in extracting a weak heart signal from a muchstronger magnetic noise, with a signal-to-noise ratio (SNR) of -35.8 dB. The GA algorithm displays an improvement in SNR of 37.4 dB and completely suppresses the noise sources at 60Hz and at low frequencies; while the LMS algorithm exhibits an improvement in SNR of 33 dB and noisier spectrum at low frequencies. The GA algorithm is shown to be able to recover a heart signal with the QRS and T features being easily extracted. On the other hand, the LMS algorithm can also recover the input signal, however, with a lower SNR improvement and noisy QRS complex and T wave.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Noise cancellation in unshielded magnetocardiography based on Least-Mean-Squared algorithm and genetic algorithm»

NOISE CANCELLATION IN UNSHIELDED MAGNETOCARDIOGRAPHY BASED ON LEAST-MEAN-SQUARED ALGORITHM AND GENETIC ALGORITHM

Valentina Tiporlini, Hoang N. Nguyen and Kamal Alameh

Electron Science Research Institute, Edith Cowan University, Joondalup, Western Australia [email protected], [email protected], [email protected]

PACS 87.85.-d

This paper discusses adaptive noise cancellation in magnetocardiographic systems within unshielded environment using two algorithms, namely, the Least-Mean-Squared (LMS) algorithm and the Genetic Algorithm (GA). Simulation results show that the GA algorithm outperforms the LMS algorithm in extracting a weak heart signal from a much-stronger magnetic noise, with a signal-to-noise ratio (SNR) of -35.8 dB. The GA algorithm displays an improvement in SNR of 37.4 dB and completely suppresses the noise sources at 60Hz and at low frequencies; while the LMS algorithm exhibits an improvement in SNR of 33 dB and noisier spectrum at low frequencies. The GA algorithm is shown to be able to recover a heart signal with the QRS and T features being easily extracted. On the other hand, the LMS algorithm can also recover the input signal, however, with a lower SNR improvement and noisy QRS complex and T wave.

Keywords: Magnetocardiography, adaptive noise cancellation, Least-Mean-Squared algorithm, genetic algorithms. 1. Introduction

The human heart is made of conductive tissues that produce both an electric and a magnetic field, depending on cardiac activity. Measuring the electric and/or magnetic fields enables various heart parameters as well as diseases to be diagnosed, such as heart beat rate and arrhythmia. Electrocardiography (ECG) enables the detection of heart-generated electric fields through electrodes placed on the surface of the human body. However, magnetocardiography (MCG) has been shown to be more accurate than electrocardiography for the (i) diagnosis of atrial and ventricular hypertrophy, (ii) non-invasive location of the heart's conduction pathways, (iii) the identification of spatial current dispersion patterns, and (iv) the detection of circular vortex currents which give no ECG signal [1]. Cardiac magnetic fields surround the human body and are typically very low in magnitude (about 100 pT for adults [2] and between 5 to 10 pT for a fetus [3]), necessitating the use of a high-sensitivity magnetometer to measure them. Furthermore, the environmental electromagnetic noise is typically much higher (in the order of 1 nT) than the heart-generated magnetic field, resulting in an extremely low signal-to-noise ratio, if patients are examined outside a magnetic shielded room.

Magnetic noise suppression in magnetically unshielded environments has been demonstrated. For example, the performance of a multichannel system based on SQUID magnetometry in an unshielded environment has been shown to be comparable with magnetic field measurements performed inside a shielded room [4]. This demonstration, in conjunction with recent advances in adaptive signal processing, has triggered the use of adaptive magnetic noise suppression techniques for magnetically-unshielded magnetocardiography. The most common algorithm used for adaptive noise cancellation is the Least-Mean-Squared (LMS) algorithm that has been

very effective in removing low noise levels, especially in Electrocardiography [5,6]. However, the LMS algorithm has limitations, namely, (i) it requires the calculation of the punctual derivative of the squared error; (ii) it suffers high convergence time, especially if the noise power to be removed is much higher than the signal power; and (iii) it is susceptible to the risk of falling into local minima. Recently heuristic algorithms, such as genetic algorithms, are finding large application in adaptive noise cancellation applications. With respect to the LMS algorithm, the GA provides additional benefits, including (i) ability to perform parallel search for population points rather than for a single point, thus avoiding the fall into local minima; (ii) no prior information on the gradient of the signal is needed; (iii) the use of probabilistic rules instead of deterministic ones, thus ensuring the convergence to an optimum solution.

In this paper, we adopt the concept of adaptive noise cancellation shown in Fig. 1, and use two potential adaptive signal processing algorithms, namely the Least-Mean-Squared (LMS) algorithm and the Genetic Algorithm (GA), and compare their capabilities in minimizing the mean-squared of the error signal e(k) and improving the SNR performance.

<«k) = s(k) + n(k) ,

1 1 I / s _ 4 i

Adaptive y{k)

1 * Filler

/ _£M

Adaptive Noise Canceller

Fig. 1. Typical block diagram of an adaptive noise canceller

2. Adaptive Noise Canceller

Adaptive noise suppression techniques are typically based on adaptive filtering. To suppress the noise, a reference input signal is required, which is typically derived from one or more magnetic sensors placed at positions where the noise level is higher than the signal amplitude. Fig. 1 shows a block diagram of an adaptive noise canceller. The primary input to the canceller, denoted d(k), is the sum of the signal of interest s(k) and the noise n(k), which is typically uncorrelated with s(k). The reference input signal of the system, x(k) = nl(k), is a noise signal that is correlated in some unknown way with n(k), but uncorrelated with the signal of interest s(k). As shown in Fig. 1, nl(k) is adaptively filtered to produce a replica of the noise n(k) that can be subtracted from the primary input to eventually produce an output signal e(k) equals to s(k).

The objective of the noise canceller is to minimize the mean-squared error between the primary input signal, d(k), and the output of the filter, y(k).

Referring to Fig. 1, the output signal is given by [7]:

e(k) = d(k) - y(k) = s(k) + n(k) - y(k). (1)

Therefore, the mean-squared of e(k) is given by:

E {e2(k)} = E {s2(k)} + E {(n(k) - y(k))2} + 2E {s(k) (n(k) - y(k))} . (2)

Fig. 2. Genetic Algorithm (GA) flowchart

Since s(k) is uncorrelated with n(k) and y(k), the last term in (2) is zero, yielding:

E {e2 (k)} = E {s2 (k)} + E {(n (k) - y (k))2} . (3)

It is noticed from (3) that the mean-squared error is minimum when n(k) = y(k), and hence, when the output signal e(k) is equal to the desired signal s(k).

The LMS algorithm aims to minimize the mean-squared error by calculating the gradient of the squared-error with respect to the coefficients of the filter. Assuming that the adaptive filter is a FIR filter of order M, the updating procedure is applied on coefficients bi according the following rule [8]:

b(fc+i) = b(k) + 2^e(k)x(k - i), (4)

where i = 0,1,...,M — 1, k is the iteration index and ^ is the step size that indicates the adaption rate of the algorithm and is usually included in the range (0,1].

Genetic Algorithms (GA) are part of the Evolutionary Algorithms, which are stochastic, population-based techniques inspired by the natural evolution process [9]. Using GA, the optimal solution is found through the minimization of a defined function, called the fitness function. For the problem of magnetic noise cancellation, the objective of the optimization process is to minimize the MSE, defined in (5):

E e2(k)

E {e2(k)} = (5)

Figure 2 shows a typical flowchart of the Genetic Algorithm. The initialization process produces a random initial population. For each individual belonging to the population, the fitness function is evaluated to find the fitness value of that individual. If the value of the fitness function for the best point in the current population is less or equal to a pre-defined threshold value, it is therefore considered as the optimum value and the iteration will be terminated. A few predefined end conditions are evaluated to avoid an infinite loop in case the optimum value cannot be found. If none of the predefined end conditions is verified, the algorithm proceeds with the reproduction, i.e., the creation of new generation. The individuals that have best fitness

3?

HI

li= y

flï c

■O) ■n.l

3000

0 2 0 4 06 0.8 1

Time [s]

Fig. 3. a) Measured heart signal showing the typical P wave, QRS complex and T wave, which correspond to atrial depolarization, ventricular depolarization and ventricular repolarization, respectively; b) Input signal of the noise canceller obtained by adding the heart signal to the environmental magnetic noise measured inside the laboratory

values are chosen as parents to produce children either by mutation (making random changes to a single parent) or crossover (combining the vector entries of pair of parents).

Each individual can be seen as an array of chromosomes. As for natural evolution, during the reproduction the chromosomes of parents are mixed together to form the children, according to the following rule [10]:

C = aPi + (1 — a)P2, (6)

where C is a child, P12 are the two parents and a is a randomly generated number in the range

(0,1).

The current population is then replaced with the new generation and the iteration continues.

Fig. 4. a) Spectrum of the heart signal; b) Spectrum of the input signal of the noise canceller, exhibiting a strong peak at 50 Hz and weaker peaks at 60 Hz, 100 Hz and 150 Hz

3. Simulations Results and Discussion

A measured cardiac signal taken from the MIT-BIH Arrhythmia Database (220.dat file) [11, 12] is used to verify the ability of both LMS and GA algorithms to extract heart signals from noisy measured cardiac signals. This signal was captured by electrodes placed on the surface of a patient chest. The magnetic field and the electric field generated by human heart have similar waveforms [13]; therefore, it is accurate to assume that the measured MCG signal has similar shape as the measured ECG signal but with amplitude of 100 pT, which corresponds to the typical amplitude of a heart-generated magnetic signal.

Figure 3(a) shows the heart signal with the typical cardiac features, namely, P wave, QRS complex and T wave, which correspond to atrial depolarization, ventricular depolarization

Fig. 5. a) Heart signal recovered by LMS algorithm, calculated SNR improvement factor was 33 dB; b) Heart signal recovered by GA algorithm, calculated SNR improvement factor was 37.4 dB

and ventricular repolarization, respectively. The environmental magnetic noise was measured in our laboratory. The measured environmental noise was due to two main sources, namely, the dc magnetic field of the earth and the magnetic noise caused by alternating signals generated by surrounding equipment in the laboratory. It is also noted that the magnetic noise is more than 10 times higher than the heart signal shown in Fig. 3(a). The signal-to-noise ratio (SNR) was -35.8 dB, calculated by integrating the measured signal and noise powers over several signal periods. The environmental magnetic noise was added to the heart signal to produce the input signal of the noise canceller. This signal is shown in Fig. 3(b). The environmental magnetic noise was also linearly filtered to produce a correlated noise which was used as the reference signal input to the noise canceller, as illustrated in Fig. 1.

Fig. 6. a) Spectrum of the heart signal recovered by the LMS algorithm; b) Spectrum of the heart signal recovered by the GA algorithm

Figure 4(a) shows the cardiac spectrum that is mainly spread over low frequencies, while Fig. 4(b) shows the spectrum of the input signal of the noise canceller. It is noticed that the heart spectrum was completely encircled by the noise; particularly strong noise peaks were exhibited at dc and 50 Hz whereas the other dominant peaks at the 60 Hz, 100 Hz and 150 Hz had lower levels.

The LMS algorithm produced a SNR improvement of around 33 dB while for the GA algorithm the improvement in SNR was 37.4 dB. Fig. 5(a) and (b) show the heart magnetic signal recovered using the LMS and GA algorithms, respectively. It is obvious that for both recovered signals the QRS and T features are noticeable, whereas the heart magnetic signal

recovered by the LMS algorithm is noisier, making the QRS complex and the T wave hardly detectable.

Figure 6(a) and (b) show the spectra of the heart magnetic signals recovered by the LMS and GA algorithms, respectively. As seen from the results, the Genetic Algorithm outperforms the LMS algorithm at low frequencies, strongly reducing the noise. It is also important to notice that both algorithms are unable to completely cancel the noise at high frequencies; however, this is not crucial as most of the signal information lies in the low-frequencies range.

4. Conclusion

The use of LMS and GA algorithms has been investigated for adaptive noise suppression and the recovering of heart signals in magnetically-unshielded environment. Measured heart signals and magnetic noise have been used to compare the performances of both LMS and GA algorithms in terms of SNR improvement and heart peaks reconstruction. Simulation results have shown that the GA algorithm attains better SNR improvement than the LMS algorithm. A measured heart signal has been recovered by the GA algorithm with a SNR improvement of 37.4 dB and the QRS complex and T wave have successfully been detected. The LMS algorithm has also recovered the input signal, however, with a lower SNR improvement of around 33 dB and noisy QRS complex and T wave. The noise cancellation results shown in this paper are useful for signal processing applications where the signal to noise ratio is much less than unity.

References

[1] F.E.Smith, et al. Comparison of magnetocardiography and electrocardiography: a study of automatic measurement of dispersion of ventricular repolarization. The European Society of Cardiology, 8, P. 887-893 (2006).

[2] G.Bison, R.Wynards, A.Weis. Dynamical mapping of the human cardiomagnetic field with a room-temperature, laser-optical sensor. Optics Express, 11, P. 904-909 (2003).

[3] J.Q.Campbell, et al. Fetal Magnetocardiographic Source Separation: Indipendent Component Analysis Techniques and Signal-Space Projection. International Journal of Bioelectromagnetism, 7, P. 329-333 (2005).

[4] R.Fenici, D.Brisinda, A.M.Meloni, P.Fenici. First 36-Channel System for Clinical Magnetocardiography in Unshielded Hospital laboratory for Cardiac Electrophysiology. International Journal of Bioelectromagnetism, 5, P. 80-83 (2003).

[5] N.V.Thakor, Y.-S.Zhu. Applications of Adaptive Filtering to ECG Analysis: Noise Cancellation and Arrhytmia Detection. IEEE Transactions on Biomedical Engineering, 38, P. 785-794 (1991).

[6] M.Z.U.Rahman, R.A.Shaik, R.K.Reddy. Noise Cancellation in ECG Signals using Computationally Simplified Adaptive Filtering Techniques: Application to Biotelemetry. Signal Processing: An International Juornal, 3, P. 120-131 (2009).

[7] B.Widrow, et al. Adaptive Noise Cancelling: Principles and Applications. Proceedings of the IEEE, 63, P. 1692-1716 (1975).

[8] P.S.R.Diniz. Adaptive Filtering Algorithms and Practical Implementation, Springer (2008).

[9] D.E.Goldberg. Genetic Algorithms in Search, Optimization, and Machine Learning, Addison-Wesley pubb-lishing company, inc. (1989).

[10] A.Chipperfield, P.Fleming, H.Pohlheim, C.Fonseca. Genetic Algorithm Toolbox For Use with Matlab. User's Guide, version 1.2 (2005).

[11] M.GB and M.RG. The impact of the MIT-BIH Arrhythmia Database. IEEE Engineering in Medicine and Biology, 20, P. 45-50 (2001).

[12] MIT-BIH Arrhythmia Database. Available: http://physi0net.0rg/physi0bank./database/mitdb/.

[13] J.Malmivuo, R.Plonsey. Bioelectromagnetism. Principles and Applications of Bioelectric and Biomagnetic Fields. New York Osford: Oxford University Press (1995).

i Надоели баннеры? Вы всегда можете отключить рекламу.