Independent Component Analysis in ECG Signal Processing

Electrocardiogram (ECG) signal processing aims basically 1) at artifact reduction to make the ECG signals cleaner and better interpretable by human or machine observers, 2) at revealing aspects not immediately observable in plain measured ECG signals even after artifact reduction, or 3) at diagnostics decision support and automated ECG signal interpretation, including classification of ECG signals into different classes associated with normal or pathological heart function. Thus, sports related applications aside, body surface ECG signal processing aims at enhancing ECG based diagnostics. In this Chapter, we review and demonstrate a statistical signal processing approach, independent component analysis (ICA), which is inherently very suitable for ECG signal processing regarding the aims 1) and 2) above, and also equally applicable as a component in systems aimed at accomplishing the aim 3). For more on general ECG signal processing, the reader is directed to the textbook written by Sörnmo & Laguna (2005), and for a thorough treatment of ICA to the Hyvärinen’s book (Hyvärinen et al., 2001). A concise review on ICA in ECG signal processing has been presented by Castells et al. (2007a). In this Chapter, we describe and illustrate several widely adopted applications of ICA in ECG signal processing, and discuss associated practical aspects, some of which are not generally found in the literature. The treatment of the matter is aimed at conceptual and practical understanding, leaving the mathematical derivations and proofs far mostly for the interested reader to find in the references. ICA (Castells et al., 2007a; Comon, 1994; Hyvärinen et al., 2001; Hyvärinen & Oja, 2000; Naik & Kumar, 2011) is a statistical signal processing method for decomposing a set of signals into a set of mutually independent component signals. In general, in the applications of ICA, including in ECG signal processing, the objective is that the resulting independent component signals are the original source signals. Since ICA operates purely based on the input signals and a few assumptions, ICA belongs to the class of methods called blind source separation methods. For ICA, a source signal is called an independent component (IC). The terms ‘IC’ and ‘source signal’ are here used interchangeably. For ECG, the source signals are the bioelectrical signals generated by the heart, and all the possible artifact signals. Generally, ICA input signals are the observed signals, which may be measurement time series, such as sampled voltage values in time as in the case of ECGs, image pixel values, or basically any sets of values fulfilling the assumptions of ICA. In the sequel, the term

'measured signals' refers to a set of simultaneously measured digital discrete-time signals with constant interval between the measured signal samples.All signals are assumed to be sampled at the same time instances.ICA is realized by an iterative numerical algorithm, several of which exist.In Section 2 of this Chapter, we first introduce the basics of ICA, review ICA estimation principles and note a few commonly used available ICA methods.Thereafter, the specific applications of ICA in ECG signal processing are described and illustrative examples are given.Internet addresses of a few ICA related web sites and ICA program packages are given in the Appendix.For simplicity of presentation and the ease of reproducibility of the results shown in this Chapter, all the ICA calculations have been performed using FastICA (Aalto University [Aalto], 2005;Hyvärinen, 1999) with the default parameters.Note that for this kind of statistical signal processing software the results will differ from one run to another, but the conclusions should remain unaltered.Also, as usual with signals of biological origin, an ICA algorithm may or may not converge, and if not, further ICA input signal preprocessing may be necessary.For some ECG signals ICA just might not succeed.In the examples given in this Chapter only minor preprocessing has been applied, if any (possible preprocessing has been described in conjunction with the examples).In Section 2.1, we introduce the basic concepts of ICA and illustrate its functioning with a toy example.ICA estimation principles and the ICA package employed in the examples in this Chapter, FastICA (Aalto, 2005), and a few other popular ICA methods are mentioned in Section 2.2.In Section 2.3, practical aspects and reliability of the ICA results are discussed.The conceptual differences between ICA and principal component analysis (PCA) are outlined in Section 2.4, and common ICA related misconceptions in the literature are discussed in Section 2.5.Common ECG artifacts are shortly reviewed in Section 3.1 before proceeding to describe the applications of ICA in ECG signal processing in Sections 3.2 through 3.5.In Section 3, also illustrative examples are presented.In Section 4, usage of ICA as a part of diagnostic systems is discussed, and finally, concise conclusions on ICA in ECG signal processing are given in Section 5.

Basics of ICA
2.1 The basic concepts of ICA ICA requires the fulfillment of two assumptions: 1) the measured signals are linear combinations of independent source signals, and 2) the independent source signals are nongaussian.Fulfillment of the first assumption can usually be assessed based on the knowledge of the signal sources and the measurement setup with respect to the sources.Naturally, should there exist no source signals which were independent of each others, ICA would make no sense.To an approximation, the assumption of linear combinations of sources can be taken to be valid for ECG signals and most artifacts.The nature of the different artifacts is discussed in Section 3.1.The fulfillment of the second assumption cannot in general be known, unless an appropriate source signal model exists or the properties of the source signals can be otherwise assessed.For example, Rieta et al. (2004) conclude that during atrial arrhythmia episodes, atrial activity and ventricular activity are generated by independent generators, whose amplitude distributions are nongaussian.Shkurovich et al. (1998) show also nongaussian amplitude distributions of sinus rhythm and atrial fibrillation measured during defibrillator implantation.The first assumption would be clearly fulfilled if we considered the heart as one or several point sources and the possible electromyogram (EMG) and other artifacts as other point sources.Even though such a model might not exactly describe reality, ICA has been demonstrated to be feasible and useful in several ECG applications.Also, even if there is no knowledge on the fulfillment of the second assumption, ICA may be attempted.Please, see also Section 2.3 on practical considerations and ICA reliability.In the context of ECG signal processing, ICA assumes that the measured possibly artifact containing ECG signals are linear combinations of source signals.This is indicated by the mixing model where the voltage signal samples measured over a limited period of time are in the rows of the measurement matrix For performing the matrix multiplication (2), see (5).After successful ICA, the rows of the matrix X contain the ICs.In general, the aim of applying ICA is that each IC carried a signal generated by a single physiological or physical source, such as a signal generated by the heart or its individual structure, possible additive noise, or other artifact, such as EMG artifact.The mixing matrix A describes how the source signals are weighted as they are conducted from the respective generators to the electrode sites and summed at each ECG electrode on the body surface, i.e., how the measurements are linear combinations of the sources.
ICA can find at maximum as many ICs are there are ICA input signals.In (1) and (2), we have assumed that there are equally many ICs in X than there are input signals in Y.In the case that there are more measurements than actual sources, the resulting X has fewer ICs than there are measured signals in Y, and correspondingly the mixing matrix A is not a square matrix.Given L measured signals and L' true sources, and L > L', upon successful ICA, X will be of size L'-by-N, and A of size L-by-L'.On the other hand, in the case of more actual sources than measurements, L < L', the sizes of the matrixes are as shown in ( 2), but the system is underdetermined, and the true ICs appear mixed in unknown fashion in ICs in X, if the ICA algorithm converges.These cases are illustrated with a toy example in Fig. 1.
From (1) and (2), we also see a common application of ICA: measurement reconstruction with only the ICs carrying desired information.First, calculating ICA on Y, if successful, yields both A and X.Thereafter, the ICs in X can be analyzed to determine which ICs carry noise or artifacts and which carry contributions from the actual ECG.To reconstruct the ECG without the noise and artifacts, the corresponding rows of X are set to zero in (2), and Y is calculated according to (2) without altering A. This completely removes the contributions of the zeroed ICs.This is the basis of several ECG applications of ICA.
Due to the nature of the mixing model (1), ICA has three ambiguities: 1) signs of the ICs are arbitrary, 2) energies of the ICs are arbitrary, and 3) the order in which the ICs appear in X (1) is arbitrary.The ambiguities of X are facilitated by the corresponding changes in the mixing matrix A in (1).With an arbitrary nonzero real constant c, (1) can be written as which means that for the same set of measured signals Y (3), the signs and amplitudes of the ICs are arbitrary, as accommodated by the corresponding changes in A (3).Similarly, the indeterminate order of ICs in X is seen from ( 4).
Let us present a toy example to illustrate the workings of ICA, alike it can be expected to operate with biomedical signals.The same example will be used also to illustrate the difference between ICA and PCA in Section 2.4.Denote a measured ECG lead signal by y l = [y(l,1) … y(l,N)], l = 1, …, L, and a source signal by x l analogously.Note that the independence of the sources in this example has not been confirmed, alike usually is the case in the analysis of biomedical signals.Let us consider L = 4 simulated measured signals, and denote ICA calculated with input signals y 1 and y 2 by ICA(y 1 ,y 2 ), and the ICA of other input signal combinations analogously.In Fig. 1A are shown L' = 3 simulated source signals x 1 , x 2 , and x 3 , which are linearly combined to form the simulated measured signals according to y 1 = 0.7x 1 + 0.2x 2 , y 2 = 0.6x 1 + 0.7x 2 , y 3 = 0.9x 1 + 0.2x 2 + 0.4x 3 , and y 4 = 0.5x 2 + 0.2x 3 .In ECG measurements, this would correspond to the weighted summation of the source signals at the ECG electrodes.In reality the weights are dictated by the electrical conduction paths from the sources to the electrodes, including the electrode-skin contacts.The four simulated measured signals are seen in Fig. 1B.In Fig. 1C, the results of ICA on all the subsets of at least two simulated measurements are shown, displaying the ICs from one ICA calculation in each column.In the results of ICA(y 1 ,y 2 ), IC 11 and IC 12 in the first column of the subfigures in Fig. 1C, correspond quite well to the source signals x 1 and x 2 , as expected, since the simulated measurements y 1 and y 2 are composed only of these two sources.The results of ICA(y 1 ,y 3 ), ICA(y 2 ,y 3 ), and ICA(y 3 ,y 4 ), in Fig. 1C, illustrate one type of possible cases encountered in biomedical signal processing, including in ECG signal processing: the simulated measurements are composed of a larger number of sources than there are measured signals as ICA input.In these cases, the ICs are inhabited by the sources in an arbitrary manner, as clearly illustrated by the ICs resulting from ICA(y 2 ,y 3 ) and ICA(y 3 ,y 4 ).The results of ICA(y 1 ,y 3 ) may seem to display fairly clean source signals, but the contribution of the source Fig. 1. (A) The three simulated original sources, i.e., the desired results of ICA.(B) The four simulated measured signals, constructed as linear combinations of the sources as y 1 = 0.7x 1 + 0.2x 2 , y 2 = 0.6x 1 + 0.7x 2 , y 3 = 0.9x 1 + 0.2x 2 + 0.4x 3 , and y 4 = 0.5x 2 + 0.2x 3 .(C) The results of ICAs, with the results from one ICA calculation presented in each column.Note the arbitrary sign of the ICs, e.g., comparing IC 53 and IC 63 .Units of amplitude are arbitrary in all (A), (B), and (C), and the time span is equal in all subfigures.Adapted from (Tanskanen et al., 2005).
x 2 is still buried in an unknown manner in the ICs.For ICA(y 2 ,y 3 ,y 4 ), there are equally many ICA input signals as there are original sources and ICA succeeds well in separating the sources, as expected.Due to the numerical nature of ICA calculations, and the fact that we did not ensure independence of the original sources, the ICs may not be exactly clear of the contributions from the other sources.The same holds for ICA(y 1 ,y 2 ,y 3 ,y 4 ) (Fig. 1C) where we also see the inherent property of ICA to determine the true number of ICs in an overdetermined case: even though there are four simulated measurements as ICA inputs, ICA correctly produces only three ICs.Such an observation is highly desirable also in practice in biomedical signal processing, since is it allows us to determine the true number of the sources (down to a numerical approximation).Note that in the examples shown in Figs. 3 and 6, there are eight measured ECG leads and one calculated lead, and thus ICA can find at maximum eight ICs since the calculated lead does not contribute new independent information.Such dimension reduction does therefore not indicate that the true number of sources would be indicated by the number of ICs.Let us note that in ECG measurements, artifacts quickly increase the number of the true sources.Given too few measured ECG leads as ICA input signals, this may render the results of ICA useless, since the artifacts may populate most of the ICs, thus possibly causing the separation of the desired sources fail.This may be alleviated by increasing the number of ICA input ECG leads, and by general preprocessing of the ECG signals such as noise alleviation filtering, line interference alleviation, and baseline wander reduction.On the other hand, if the artifacts are well separated by ICA in the ICs of their own, they may be easily removed, as illustrated in Section 3.For example, the fist clenching artifact seen in Fig. 3A was removed easily with ICA (Fig. 3C).

ICA estimation principles and algorithms
In this Section, we bring into attention the multiplicity of ICA approaches without going into details or mathematics.The general ICA estimation principles (Hyvärinen et al., 2001) are: 1) Nonlinear decorrelation: the components are independent if they are uncorrelated and their appropriately chosen nonlinear transformations are uncorrelated.The appropriate nonlinear functions can be found using estimation and information theories.2) Maximization of component nongaussianity.Intuitively, since central limit theorem states that summing nongaussian random signals yields signals that are closer to gaussian than the original signals, decomposing such sums of signals into the components maximizing the nongaussianity of the components results in ICs.ICA has been realized by numerous methods including nongaussianity maximization, maximum likelihood estimation (Pham & Garat, 1997), mutual information minimization, tensorial methods, nonlinear decorrelation, and nonlinear PCA (Stamkopoulos et al., 1998).One practical difference between the methods is that several methods estimate all the ICs simultaneously, whereas, for example, nongaussianity maximization can be used to estimate a single IC at a time or all the ICs simultaneously.All the mentioned methods have been discussed by Hyvärinen et al. (2001), and several comparisons of ICA algorithms have been published, including a more general comparison by Giannakopoulos et al. (1999), comparison of different ICA methods for arrhythmia analysis (Llinares & Igual, 2009), atrial fibrillation analysis (Vayá et al., 2007), fetal ECG extraction in (Hild et al., 2007;Parmar Sargam & Sahambi, 2004), and movement artifact removal (Milanesi et al., 2008).There exist numerous ICA software packages implementing different ICA algorithms.Web addresses of several ICA web sites and program packages are listed in the Appendix at the end of the Chapter.In the examples presented in this Chapter, we have applied FastICA (Aalto, 2005;Hyvärinen, 1999;Hyvärinen et al., 2001) version 2.5 using its default parameters.FastICA is an iterative numerical algorithm, which has been developed by Hyvärinen (1999), giving also instructions for parameter selection.FastICA runs in Matlab (The MathWorks, Inc., Natick, MA, USA) and is available also for a few other environments.FastICA package includes both a command line function and a graphical user interface.The program also automatically performs signal preprocessing in order to greatly ease the ICA calculations.The preprocessing steps are mean removal and PCA, or more exactly, whitening (Hyvärinen et al., 2001).Whitening the data makes the ICA input signals uncorrelated and of unit variance.PCA also provides for possible dimension reduction prior to ICA.Since the ICA algorithms are necessarily numerical and generally iterative, the independence can be achieved only down to an error.According to our experience, the FastICA default parameters are usually appropriate.By default, FastICA strives to estimates all true ICs and possible further dimension reduction can be set by the user.For example, leaving out the most insignificant PCs in the preprocessing phase results in fewer ICA input signals.For this, the eigenvalues of the PCs can be observed also graphically.Furthermore, the nonlinear function to be used in the ICA can be selected from the given choices, with general selection criteria stated in (Hyvärinen, 1999).That said, according to our experience, the default parameters are a very good starting point for most experimentations with ICA.Should FastICA fail to converge, one can resort to the parameter settings, to the practical considerations described in the next Section, or finally to another ICA algorithm.Finally, for some specific ECG signals ICA just might not succeed.

Practical considerations and reliability of ICA results
In general, biomedical signals are stochastic random signals by nature, and the fulfillment of the ICA assumptions, especially regarding nongaussianity cannot be guaranteed.An appropriate model or measurement analysis may naturally shed light on the matter.In any case, ICA may be attempted.On the other hand, failing ICA with the specific input signals and using one algorithm with certain parameters, may not mean that the data at hand was unfit for ICA in general.Specifically in the case in which we can assume that the ICA assumptions should be sufficiently fulfilled, but ICA algorithm tends to fail, achieving convergence can attempted by changing number of ICA input samples, i.e., the length of the ECG signal segment used as input to ICA at one time, or by changing the number of ICA input ECG lead signals, input signal bandwidth and sampling rate, or ICA parameters.Also different ICA algorithms may yield different performances.Due to the stochastic nature of the ECG measurements and the properties of ICA estimation algorithms, the ICA results can vary from one run to another.This raises the question of ICA reliability, which should be assessed at least in critical applications.At simplest, ICA reliability assessment can be approached by running ICA several times on the same data, and for example also on slightly time shifted data.First and foremost, the ICA results should naturally result in the same final conclusions regarding the original hypothesis.Secondly, the ICA results should greatly resemble each other from run to run.Note that the signs, amplitudes, and the order of appearance of the ICs may vary from one run to another; this does not constitute a reliability issue but is expected behavior, which is to taken into consideration by the biomedical algorithm developer.Another approach is to resample the same data in a few different ways, calculate ICA on the differently sampled data, and use the average of the resulting ICs as ICA results.Further methods for reliability assessment have been devised, for example, by Meinecke et al. (2002), and Icasso: software for investigating the reliability of ICA estimates by clustering and visualization developed by Himberg et al. (2004) (c.f. the Appendix for the Internet address).
2.4 ICA vs. PCA PCA (Hyvärinen et al., 2001;Jolliffe, 2002) employs the same mixing model (1) as ICA, but the resulting components are fundamentally different.Whereas ICA yields components, which are mutually statistically independent, PCA yields principal components (PCs), which are mutually statistically uncorrelated.Uncorrelatedness is a much weaker requirement than independence; independent signals are also uncorrelated, but uncorrelatedness does not imply independence.Thus, also the aims of applying PCA and ICA are partially different.One of the applications in which both PCA and ICA have been successfully applied is noise reduction by excluding noise carrying components from the reconstruction.However, due to the different nature of the components resulting from PCA and ICA, the basis of noise reduction is different.For PCA in ECG signal processing see, e.g., (Castells et al., 2007b).The PC found first by a PCA algorithm explains the greatest amount of variance in the measured signals and the last found PC the least.Thus, in practice the last found one or a few PCs may consist of mostly noise, thus PCA has been successfully applied in noise and dimensionality reduction.As the PCs are only statistically uncorrelated, they are in general not directly related to the actual independent physical or physiological sources.Therefore, in contrast with ICA, PCA cannot in general recover the actual source signals.Furthermore, strictly speaking, even if the last found PC may resemble a noise only signal, it may still contain contributions of the actual source signals.Even though such contributions were most probably minor, the ECG information they carry would be lost in noise reduction by PCA.Nevertheless, PCA is a powerful tool for noise reduction if applied appropriately.Also, as noted in Section 2.2, PCA is often used as preprocessing for ICA.Functioning of PCA is illustrated in Fig. 2. The PCs produced by PCA of the simulated toy measurements shown in Fig. 1B are seen in Fig. 2A.In the toy example, comparing the ICs produced by ICA(y 2 ,y 3 ,y 4 ) or ICA(y 1 ,y 2 ,y 3 ,y 4 ) in Fig. 1C with the PCs shown in Fig. 2A, it is seen that ICA was able to separate the sources whereas PCA was clearly not.In Fig. 2B are shown the results of PCA applied on the eight-lead ECG measured on the abdominal region of a pregnant mother.The corresponding original measured signals are shown in Fig. 4A.Maternal ECG contributions are seen in PC 7 and PC 8 in Fig. 2B and fetal ECG is evident at least in PC 2 and PC 3 .Results of ICA calculated on the same data are shown in Fig. 4B.Comparing Figs.2B and 4B, the inability of PCA to separate the different sources is not obvious to the eye, but the effects of PCA vs. the effects of ICA are expected to be similar to those seen in the toy example.The PCs in Fig. 2 were produced with FastICA using the command line option which yields only PCs, or more precisely, components which are zeromean and white, meaning that in addition to being uncorrelated they are of unit variance.

Common misconceptions in the biomedical ICA literature
The main misconception appearing in the biomedical ICA and PCA literature is that of ICA vs. PCA, especially regarding their capabilities to separate sources.As already noted, ICA yields independent components, whereas PCA yields merely uncorrelated components.Thus, PCA is incapable of separating the independent sources.Reconstructing ECG lead signals from the ICs excluding also one or several ICs carrying ECG activity can be a hazardous practice.Whereas the resulting ECG signal reconstructions are cleaned of the noise and other artifacts carried in the excluded ICs, such reconstruction may yield ECG signals whose morphology may have been altered, or some waves may have disappeared altogether or appear with changed relative amplitudes.An expected IC not appearing in the results of ICA is sometimes claimed to be due to the IC being minor in amplitude and buried in noise, and thus not separable.On the contrary, ICA is often very powerful in separating weak ICs whose contributions cannot be observed directly in the original measured ECG signals.Rather, the explanation is likely to be either one or several of the following: there may be an insufficient number of measured ECG leads, i.e., less measured ECG lead signals have been used as input to ICA than there are sources.As a consequence, the expected IC may be buried in a mixture of sources in the ICs.Noise or artifacts not independent of the expected IC, which thus are not separable by ICA.For example, respiration and blood pressure are known to modulate ECG (Sörnmo & Laguna, 2005), although it is unknown if these contributions were actually able to mask expected ICs.The expected IC may also have fallen victim of dimension reduction by PCA in signal preprocessing, if the information of the expected IC was contained in PCs whose eigenvalues were below the threshold for inclusion.Still, as discussed in Section 2.3, it is not impossible that the results of ICA have not been sufficiently reliable, and may thus be false.In this case, the precautions noted in the Section 2.3 are recommended.(Zhu et al., 2008) or even hundreds of ECG lead signals used as ICA input to achieve enhanced level of source separation.

ECG artifacts
In this Section, the artifacts generally encountered in ECG signals (Sörnmo & Laguna, 2005) are shortly reviewed and discussed in the view of the ICA assumptions.In all cases in which ICA can be expected to work, a sufficient number of measured ECG leads must be provided for efficient artifact signal separation and removal.
In most environments, electrical devices and wiring can be found in the vicinity of the ECG measurement equipment and wiring, and 50/60 Hz power line frequency artifact can be easily introduced to the measured ECG signals.Power line frequency artifact is clearly independent from the ECG signals and often well-separable and removable by ICA.EMG artifacts generated by muscles other than the heart muscle are generally independent of ECG signals.However, in principle, EMG represents a distributed source and cannot be immediately assumed to originate from a single or a small number of discrete sources comparative to the number of ECG leads.Nevertheless, separating EMG artifacts may well be attempted and can be successful in practice (c.f., the fist clenching example in Fig. 3).A usual application of ICA is also the removal of ECG artifacts from EMG or electroencephalogram (EEG) signals, as e.g., proposed in (Jung et al., 2000).Baseline wander is a usual artifact seen in ECG signals.It is clearly an independent effect, which may be seen in only one or a few ECG lead signals.It may also appear totally different in different leads and can easily be generated by applying slowly changing pressure to an ECG electrode, among other reasons.In general, the effect is well separable and removable.ECG baseline wander removal by ICA has been proposed by Barati & Ayatollahi (2007), for example.Limb movement, couching, and general restlessness among other similar activities represent a more complex class of artifacts, which may include EMG artifacts and other artifacts due to the movement of wires and stresses on ECG electrode contacts, and maybe other artifacts as well.Removal of such complex artifacts may be attempted but in general the success cannot be predicted a priori.Shoulder movement artifact removal was successfully performed in (Milanesi et al., 2008).
Holding hands together or grasping hospital bed metal side railings with both hands may effectively bring the two wrist electrodes to a nearly equal potential, thus making the signals of the standard ECG leads II and III almost equal, and lead III signal may nearly disappear.
www.intechopen.comSuch an effect is not caused by an independent source of interference, and cannot be expected to be removable by ICA.

ICA for noise and artifact removal
As described earlier, the basic approach to noise and artifact removal is to perform ICA followed by ECG reconstruction using (2) with the noise and artifact carrying ICs set to zero.
Here, a crucial step is the recognition of the ICs carrying the artifacts.This may be achieved, e.g., by different statistical or waveform classification methods in time domain or in frequency domain, or by more advanced methods as described, e.g., by He et al. (2006) who also give several illustrative examples.Note that in the examples in (He et al., 2006) the artifacts and noise to be removed are contained in ICs which seemingly do not carry ECG contributions, thus yielding correct ECG reconstruction which does not alter the actual ECG waveforms.In this Chapter, recognition of the ICs carrying atrial fibrillation is considered in the example shown in Fig. 6, whereas otherwise IC classification has been performed by visual observation only.ICA can also be successfully applied, for example, to ECG baseline wander (Barati & Ayatollahi, 2007) and motion artifact removal (Milanesi et al., 2008).In Fig. 3A, a standard ECG is shown with an artifact caused by the subject clenching his left fist.The artifact is evident in all leads except in the lead II.The measurements were performed with NeuroScan (SynAmp by Compumedics NeuroScan, El Paso Texas, USA) with the reference on the left ankle.The standard chest ECG leads in Fig. 3A have been determined using Wilson's central terminal.
In Fig. 3B, ICs resulting from ICA calculated on the ECG signals seen in Fig. 3A, are shown.Since the lead III in Fig. 3A has been calculated from the leads I and II, there are only eight actual measurements in the nine ICA input signals.Accordingly, ICA found only eight ICs (Fig. 3B), as it could at maximum.In Fig. 3B, the left fist clenching artifact is nicely contained in IC 4 , although here the artifact has been detected by visual assessment only, and it is hard to exclude the possibility of artifact contributions in the other ICs.At least IC 1 , IC 2 , IC 3 , IC 5 , IC 6 , and IC 7 , can be seen to carry ECG information.IC 7 might be taken to display contributions from T wave in addition to some other ECG contributions during QRS complex, but this is only speculative.IC 8 may be noise and carry also minor ECG information (noise is comparative to the possible ECG information).In Fig. 3C, the ECG reconstructed without IC 4 is shown.In visual inspection, the fist clenching artifact has been removed, and for the second heart beat shown, the T wave morphology in the lead I' and the details of the QRS complex morphology in the lead II', both of which are unobservable in Fig. 3A, have been recovered in Fig. 3C.A reconstructed lead is denoted with a prime in the lead name, also in the sequel.

ICA for ECG feature extraction
ECG feature extraction using ICA (Huang et al., 2010;Hyvärinen et al., 2001;Jiang et al., 2006) generally includes preprocessing the ECG signals by mean removal and dimension reduction.In dimension reduction, the original large data set is reduced to a smaller number of signals, also decreasing noise.The resulting data set is input to ICA, whose output is the set of features, or basis functions.Thereafter, ECG data to be classified, e.g., according to pathology, is then classified based on the basis functions.For example, Jiang et al. (2006) classified heart beats into 14 classes of arrhythmia types, including normal beats.Heart beat classification using ICA has also been considered in several other publications, e.g., in (Chou & Yu, 2007;Herrero et al., 2005;Ye et al., 2010). www.intechopen.com

ICA for fetal ECG extraction
ECG signals originating from the hearts of the mother and the fetus are clearly independent of each other and they can be efficiently separated using ICA, thus providing for extraction of fetal ECG (Lee et al., 2005;Martín-Clemente et al., 2011;Sameni et al., 2006;Zarzoso & Nandi, 2001).The approach is to perform ICA on a set of ECG leads, which includes leads measured on the abdominal region of the mother and possibly also other leads, such as chest ECG leads.The abdominal lead signals are expected to carry both fetal and maternal ECGs.Upon successful ICA, recognizing the ICs containing fetal ECG is generally straight forward based on the different heart rates.Thereafter, fetal ECG can be reconstructed from the recognized ICs carrying fetal ECG information, if desired.A simple method to determine which ICs carry fetal or maternal ECG, is to perform beat detection, e.g., by highpass filtering followed by peak detection by thresholding, and subsequently calculating the heart rates for every IC carrying ECG information.If the ICA source separation is successful, ICs with two distinct heart rates can be recognized, with the ICs with the faster heart rate belonging to the fetal ECG.An eight-lead ECG measured from the abdominal region of a 25-year old mother in the 33 rd week of pregnancy is shown in Fig. 4A.In Fig. 4B, are shown the ICs resulting from ICA on the signals shown in Fig. 4A.Fetal heart rate can be easily assessed from IC 1 in Fig. 4B, where as fetal ECG is not directly observable in the original measured ECG signals (Fig. 4A).In Fig. 5 are shown the fetal ECG signals reconstructed for all the abdominal leads using only IC 1 (Fig. 4B).Comparing Figs.4A and 5, it is seen that even though no fetal ECG is visually observable in the original abdominal measurements (Fig. 4A), every abdominal lead carried fetal ECG information and even some fetal heart beat morphology can be observed from the reconstructions (Fig. 5).Before ICA, baseline wander was removed from the measured signals by highpass filtering with an equiripple FIR filter of length 916, satisfying passband cutoff frequency of 5 Hz at -3 dB, stopband attenuation of at least -80 dB below 2 Hz, and passband ripple less than 1 dB.Note that this filter was not optimized to maximally remove baseline wander, but only to provide for the convergence of ICA.With original unfiltered measured signals FastICA did not converge.Note that ICA of maternal and fetal ECG does not always succeed.This may be due to either the general facts regarding ICA of biomedical signals discussed in Section 2.3, or due to too few ECG lead signals available.Considering that abdominal ECG leads also record the mother's abdominal EMG and the EMG of the fetus, the ECG lead count must be sufficiently high for the separation to succeed.

ICA of amplitude parameterized ECG
Diagnostics based on amplitude parameterized ECG is common practice.By ECG amplitude parameterization, we mean construction of a new set of signals from the signal amplitudes at some defined fiducial points of the ECG, such as R peak or ST60 amplitudes (amplitudes 60 ms after the start of the ST segments), or from time averages of delineated ECG segments.ICA of parameterized ECG has been proposed, e.g., by Chawla (2007) and Tanskanen et al. (2006aTanskanen et al. ( , 2006b)).In this Section, we explicitly show that such ECG signal parameterizations in fact fulfill the assumption of linearly combined components.Related to parameterized ECG and more generally to the ECG wave delineation problem (Sörnmo & Laguna, 2005), an ICA based method for locating R peaks have been proposed by Chawla et al. (2008).From (2) it can be seen that the mixing matrix A remains unchanged for a new set of ICA input signals formed by picking individual columns from X (samples measured at the same time instances from all the measured signals).This means that we may freely choose the ICA input samples in time as long as all the ECG leads are sampled at the same time.One ECG sample (2) measured at time n via the lead l is given by , = , , , where L is the number of ECG leads.Time average of M samples of the lth measured lead, starting from the sample number n 0 , is given by Inserting ( 5) into (6) we get

ICA in ECG based diagnostics
ICA has found several applications in signal processing systems aimed at aiding in diagnostics.ECG based diagnostics applications in which ICA has been utilized include, e.g., classification of ECG beats (Chou & Yu, 2007;Huang, et al., 2010), analysis of parameterized ECG signals (Chawla, 2007;Tanskanen et al., 2006aTanskanen et al., , 2006b)), heart rate variability analysis (Zhangyong et al., 2005), arrhythmia estimation (Castells et al., 2005;Jiang et al., 2006;Llinares & Igual, 2009), and atrial fibrillation extraction and analysis (Rieta et al., 2004;Stridh & Sörnmo, 2001;Zarzoso & Comon, 2010).A nice diagram of an atrial source separation system has been presented by Castells et al. (2005).Analyzing sub-signals in heart rate variability, Zhangyong et al. (2005) proposed to approach analysis of the effects of the autonomic nervous system.For a general description of the effects of blood pressures and respiration, see the book by Sörnmo & Laguna (2005).As mentioned, several proposed ECG analysis systems employ ICA as one system component, e.g., as in the heart beat classification system by Herrero et al. (2005), in which ICA based feature extraction is employed in combination with preprocessing, time-frequency feature extraction, and neural network based classifiers.As mentioned earlier, 12-lead ECG may sometimes be insufficient for efficient ICA based analysis of the phenomenon of interest.For example, Zhu et al. (2008) analyzed 72-lead and 98-lead ECG measurements using ICA and were able to separate the P wave, QRS complex, and T wave.Thus, with high-density ECG measurements and ICA based analysis more detailed diagnostics applications might be realizable.In Fig. 6A, ECG measured from a patient with atrial fibrillation during exercise stress test is shown.In Fig. 6B, the results of ICA on the signals in Fig. 6A are shown.In Fig. 6B, atrial fibrillation can be identified in IC 7 and IC 8 .For both IC 7 and IC 8 , power spectrum estimation using Welch method (Sörnmo & Laguna, 2008) reveals a clear peak around 6-7 Hz, which translates to the fibrillation rate of 360-420 beats per minute.Corresponding power spectral peaks are not found for the other ICs seen in Fig. 6B.Thus, in this case power spectral peak detection can also be used to recognize the ICs carrying atrial fibrillation information.

Conclusions
The numerous features making up the measured ECG signals originate largely from independent sources, whose contributions are linearly combined at the ECG electrodes.These sources are artifacts, such as muscle generated electric signals, and actual ECG generator signals originating from the operation of the heart itself.Also within the heart, a few independent signal generators can be identified.Due to the inherent independent component nature of the measured ECG signals, they lend themselves to be effectively processed with ICA, given the proper precautions outlined in this Chapter.Thus, ICA has been widely applied to enhance the ECG signals or their specific features to provide for enhanced diagnostic value.ICA has also been employed as a component in several proposed signal processing system aimed at diagnostics decision support.In this Chapter, several of these aspects were reviewed and practical illustrations were provided.To get the reader started on ICA of ECG signals, notes on popular available ICA program packages were made and the list of references was designed to widely cover the associated fields.We sincerely hope that this Chapter provides valuable practical insight into ICA and to the nature of the ECG signals with regard to processing them using ICA, and promotes novel ideas for enhancing ECG based diagnosis with the aid of this powerful statistical signal processing method.

Acknowledgment
The work of J. M. A. Tanskanen was funded by Academy of Finland (decision numbers 135220 and 122947).We thank Dr. Pasi Kauppinen, Dept. of Biomedical Engineering, Tampere University of Technology, Finland, for the help with the ECG artifact measurements using Neuroscan and for insightful comments.

Appendix
In this Appendix, Internet addresses of some ICA related web sites and program packages are given.There exist numerous ICA related sites and ICA software packages and scripts available in the Internet, and the list provided here is far from exhaustive.The list is intended to serve as a starting point for research using ICA.Although some of the listed web sites and ICA program packages are concerned with EEG processing, they are nevertheless excellent sources of ICA related information and programs.

Fig. 2 .
Fig. 2. (A) The results of PCA of all four simulated signals in the toy example seen in Fig. 1B.The corresponding ICA results are those of ICA(y 2 ,y 3 ,y 4 ) and ICA(y 1 ,y 2 ,y 3 ,y 4 ) seen in Fig. 1C.(B) The results of PCA of the eight-lead maternal ECG seen in Fig. 4A.The results of ICA calculated on the same data are shown in Fig. 4B.Units of amplitude are arbitrary in (A) and (B).The time span in (A) is the same as in all the subfigures in Fig. 1.

Fig. 3 .
Fig. 3. (A) ECG with left fist clenching artifact visible in all leads but II.(B) Results of calculating ICA on the signals in (A).Fist clenching artifact has been separated into IC 4 .(C) ECG signals reconstructed using all the ICs except IC 4 .

Fig. 4 .
Fig. 4. (A) Eight-lead ECG measured on the abdominal region (leads Ab1 though Ab8) of a pregnant mother 1 .Maternal heart beats are clearly recognizable but fetal ECG cannot be visually observed.(B) Results of ICA on the data seen in (A).It can be clearly seen that IC 1 exhibits fetal ECG, whereas IC 2 and IC 3 carry maternal ECG. 0

Fig. 5 .
Fig. 5. Fetal ECG reconstructed for all the abdominal leads shown in Fig. 4A using only IC 1 seen in Fig. 4B. 0 Y, the source signals are in the rows of X, and A is the mixing matrix.For ICA of ECGs, signal samples measured during a short period of time via one ECG lead form one row of Y (1).For a standard 12-lead ECG measurement, Y is thus a matrix of L = 12 rows and N columns, with N being the number of signal samples taken to be processed by ICA at one time from each ECG lead signal.N may in general be decided according to the ECG sampling rate and the phenomena of interest, e.
g., to span one or several cardiac cycles.Let us denote one measured ECG signal sample by y(l,n), where n = 1, ..., N is the discrete time index, and l = 1, ..., L is the ECG lead index.ICA can naturally be performed in a running window, but here we always consider running ICA once for one measured ECG signal segment.Writing (1) out with signal samples, we get , , ⋱

3. ICA in ECG signal processing
Mijović (2010).(2003)ed ECG processing techniques work similarly: After ICA, the unwanted ICs in (2) are identified and set to zero, and the measured signals are reconstructed using (2), thus yielding reconstructed signals clean from the artifacts contained in the zeroed ICs.The other common application is ECG beat classification, in which the ICA results are used as features based on which the beats are classified.Classification may be desired, for example, to indentify pathological beats and subsequently determine the pathology.Whereas ICA is usually applied to a set of a few concurrently measured ECG signals, such as 12-lead ECG, ICA based methods for single-channel ECG signals have also been proposed, e.g., byde Chazal et al. (2003)andMijović (2010).The other extreme is represented by ICA of high-density ECG measurements with tens which means that time averaging measured signals does not invalidate the assumption of the linearly combined ICs.From (7) we see that time averaged measured signals are linear combinations of correspondingly time averaged source signals, and that the separation matrix remains unaltered.A word of warning is in place regarding time averaging.An assumption of ICA is that the ICs are nongaussian.According to the central limit theorem, a sum of nongaussian random signals is closer to gaussian than the original signals.Here, it means that time averaged ICs might be theoretically forbidden.Nevertheless, running ICA on averaged measurements may be attempted with due consideration given to the reliability of the results, as discussed earlier.Amplitude parameterization without averaging is naturally free of such concerns.
Fig. 6. (A) ECG measured from a patient with atrial fibrillation during exercise stress test.(B) Results of ICA on the signals in (A).Atrial fibrillation is detectable in IC 7 and IC 8 .