- Research
- Open access
- Published:

# A new LMS algorithm for analysis of atrial fibrillation signals

*BioMedical Engineering OnLine*
**volumeÂ 11**, ArticleÂ number:Â 15 (2012)

## Abstract

### Background

A biomedical signal can be defined by its extrinsic features (x-axis and y-axis shift and scale) and intrinsic features (shape after normalization of extrinsic features). In this study, an LMS algorithm utilizing the method of differential steepest descent is developed, and is tested by normalization of extrinsic features in complex fractionated atrial electrograms (CFAE).

### Method

Equations for normalization of x-axis and y-axis shift and scale are first derived. The algorithm is implemented for real-time analysis of CFAE acquired during atrial fibrillation (AF). Data was acquired at a 977â€‰Hz sampling rate from 10 paroxysmal and 10 persistent AF patients undergoing clinical electrophysiologic study and catheter ablation therapy. Over 24 trials, normalization characteristics using the new algorithm with four weights were compared to the Widrow-Hoff LMS algorithm with four tapped delays. The time for convergence, and the mean squared error (MSE) after convergence, were compared. The new LMS algorithm was also applied to lead aVF of the electrocardiogram in one patient with longstanding persistent AF, to enhance the F wave and to monitor extrinsic changes in signal shape. The average waveform over a 25â€‰s interval was used as a prototypical reference signal for matching with the aVF lead.

### Results

Based on the derivation equations, the y-shift and y-scale adjustments of the new LMS algorithm were shown to be equivalent to the scalar form of the Widrow-Hoff LMS algorithm. For x-shift and x-scale adjustments, rather than implementing a long tapped delay as in Widrow-Hoff LMS, the new method uses only two weights. After convergence, the MSE for matching paroxysmal CFAE averaged 0.46â€‰Â±â€‰0.49Î¼V^{2}/sample for the new LMS algorithm versus 0.72â€‰Â±â€‰0.35Î¼V^{2}/sample for Widrow-Hoff LMS. The MSE for matching persistent CFAE averaged 0.55â€‰Â±â€‰0.95Î¼V^{2}/sample for the new LMS algorithm versus 0.62â€‰Â±â€‰0.55Î¼V^{2}/sample for Widrow-Hoff LMS. There were no significant differences in estimation error for paroxysmal versus persistent data. From all trials, the mean convergence time was approximately 1 second for both algorithms. The new LMS algorithm was useful to enhance the electrocardiogram F wave by subtraction of an adaptively weighted prototypical reference signal from the aVF lead. The extrinsic weighting over 25â€‰s demonstrated that time-varying functions such as patient respiration could be identified and monitored.

### Conclusions

A new LMS algorithm was derived and used for normalization of the extrinsic features in CFAE and for electrocardiogram monitoring. The weighting at convergence provides an estimate of the degree of similarity between two signals in terms of x-axis and y-axis shift and scale. The algorithm is computationally efficient with low estimation error. Based on the results, proposed applications include monitoring of extrinsic and intrinsic features of repetitive patterns in CFAE, enhancement of the electrocardiogram F wave and monitoring of time-varying signal properties, and to quantitatively characterize mechanistic differences in paroxysmal versus persistent AF.

## Introduction

In previous work it was shown that any pattern can be described based upon its intrinsic versus extrinsic features [1, 2]. The extrinsic features are those that can be normalized in a signal space. The intrinsic component is the final shape of the signal following normalization. Thus intrinsic features are those measured after normalization of the space. Normalization is essential for determining the similarity of the intrinsic component between two different signals, and the normalized weighting is a measure of extrinsic differences. Testing the similarity between signals in this way is a form of pattern recognition [3, 4]. Similarity measurements are also useful for noise cancellation when one signals acts as a noise reference with respect to another [5â€“7]. The intrinsic signal component may become apparent by averaging [1, 2]. Yet, patterns lacking stationarity of the mean cannot be characterized in this way. Therefore, when signal statistics are time-varying, as is often the case, it is desirable to use adaptive analysis methods.

Least mean squares (LMS) algorithms adapt the mean squared error of a reference signal with respect to a desired signal [5, 6, 8]. The error is estimated at the current time, and the error gradient is approximated by the gradient from a single sample. Adaptation occurs by iterating toward the minimum of the error function. A drawback is that if local minima exist along the path, convergence to the global minimum can only occur if the weight update steps are sufficiently large to shift the convergence path out of the concavity of the local minima. In this study an LMS algorithm is derived and implemented for real-time normalization of extrinsic signal features. For simplicity, initial conditions are set to enable convergence to global rather than local minima. The algorithm is applied to complex fractionated atrial electrograms (CFAE), which are electrograms with multiple continuous deflections or cycle length <120 milliseconds [9] acquired from the heart surface that result from passage of the electrical activation wavefront. CFAE were selected in part because the presence of randomness provides a rigorous test of the capacity to rapidly and accurately estimate signal differences. Furthermore, if the acquired signals can be successfully characterized prior to catheter ablation [9], it would be possible to glean knowledge concerning abnormal conduction caused by ischemia, infarction, or the presence of fibrosis, which can be assistive to guide the catheter toward optimal ablation sites.

## Method

### Clinical data acquisition

Electrograms were recorded from 20 patients referred to the Columbia University Medical Center cardiac electrophysiology (EP) laboratory for catheter ablation of AF. These were obtained prospectively as approved by the Internal Review Board at Columbia University Medical Center, but analyzed retrospectively after the catheter ablation procedures were completed using standard clinical protocols. Ten patients had documented clinical paroxysmal AF, with a normal sinus rhythm as their baseline rhythm in the electrophysiology laboratory. Atrial fibrillation was induced by burst pacing from the coronary sinus or from the right atrial lateral wall, and the arrhythmia persisted for at least 10 minutes for those signals that were included in retrospective analysis. Ten other patients had longstanding persistent AF, and had been in AF without interruption for at least several months prior to the catheter mapping and ablation procedure. Electrograms recorded from the distal ablation electrode during arrhythmia were filtered with a single-pole bandpass from 30-500â€‰Hz by the acquisition system to remove baseline drift and high frequency noise, sampled at 977â€‰Hz, and stored (CardioLab, GE Healthcare, Waukesha, WI).

Only signals identified as CFAEs by two cardiac electrophysiologists were included in the retrospective analysis. CFAE recordings of at least 20 seconds in duration were obtained from two sites outside the ostia of each of the four pulmonary veins. Similar recordings were obtained at two sites in the mid-posterior left atrial free wall, and from the anterior ridge at the base of the left atrial appendage. A total of 12 paroxysmal and 12 persistent CFAE sequences, selected at random, were used for measurement and statistical comparison.

### Definition of intrinsic versus extrinsic features

Consider two signals that are identical except for x-axis and y-axis shift and scale (Figure 1A). Similar deflections occur on each trace (see for example at * and **). As a first approximation toward normalizing these signals, their baselines, or degree of y-axis shift, can be globally adjusted (Figure 1B). Further normalization can be done by increasing the y-axis scale, or gain, of the red trace to better match it to the black trace (Figure 1C). If the x-axis shift, or phase lag, is adjusted, the two traces can be made to approximately align (Figure 1D).Yet there is still some misalignment due to differences in the degree of expansion along the x-axis, as noted by the # symbol in Figure 1D. If the x-axis scale is correctly adjusted, these traces perfectly match over the interval during which they both occur (Figure 1E). The signals are then normalized. The difference in extrinsic shape is then zero, and these particular signals have the same intrinsic shape.

Changes to the signal space that occur when extrinsic features are normalized are shown in a graphical representation in Figure 2. Three dimensions of the N-dimensional signal space are shown. In all panels, the vector direction is the intrinsic shape of the signal and it is unchanging. Baseline shift is represented by the position of the tail of the signal vector along the unity vector (Figure 2A). To remove the baseline level, the signal vector is moved from any nonzero location along the unity vector, for example at (0.2, 0.2, 0.2 â€¦) that is, a baseline level of 0.2 units, to the origin at (0, 0, 0, â€¦) which has a baseline level of zero. The signal amplitude is represented by the signal vector magnitude (Figure 2B). To adjust signal amplitude, the vector magnitude is adjusted. To adjust the phase lag, the signal space is rotated, or equivalently, the axes are renumbered. For example to adjust by +3 sample points, the axes are renumbered as shown in Figure 2C. This is done for all N axes, with wraparound from axis N to axis 1. Finally, to adjust x-axis scale, the sampling interval i.e., the time interval between sample points, is adjusted, for example as shown in Figure 2D. Here the sampling interval, originally 1 unit (such as 1 millisecond) is adjusted to 1.1 units. Based on these parameters, the signal space can be normalized so that extrinsic relationships between signals are removed and only intrinsic relationships remain.

By developing an LMS algorithm to normalize CFAE signals for x-axis and y-axis shift and scale, differences which are physiologically relevant can become apparent. For example, the baseline level in electrogram signals may be related to injury current gradients present at border zones where ischemia is present [10]. The amplitude is in part a result of the degree of tissue activating at any one time, although if bipolar recording electrodes are used this will also depend on the orientation and spacing of bipoles [11]. The phase lag is a direct result of the delay in arrival of the electrical activation wavefront at the recording site. The time duration or x-axis scale depends on conduction velocity, and will increase with a decrease in velocity [12]. A method to measure and normalize extrinsic signal features is described as follows.

### Description of the new LMS algorithm

We suppose a matched filter that consists of an unknown input or desired signal __d__ and an adaptively weighted known or reference signal __x__. The method of steepest descent can be used to update the weight w [5, 6]:

where Î¼ is the convergence coefficient, k is the discrete time, and the gradient is given by [13]:

with âˆ‚ being the partial derivative with respect to the particular weight parameter w, E the expectation operator, Ïµ_{k} is the error, and Î¾_{k} is the mean squared error (MSE) at discrete time k. The gradient defines the error surface (performance surface). The optimal weight vector (Wiener-Hopf equation), which is derived from the gradient vector for all parameters, requires matrix inversion for computation. However, a difference equation can be written to estimate the gradient for any parameter [8, 14]:

where Ïµ_{k}
^{+} and Ïµ_{k}
^{-} are errors with finite differences, described as [15â€“17]:

and d_{k} is the signal to be emulated, with estimates given by:

The reference signal is x_{k}, while Ï‰ is the mesh spacing used for gradient estimation. Substituting Eq.â€‰4b and 4c into Eq.â€‰3:

Supposing for finite differences, that:

where Ï‰ is the mesh size as in Eq. 5, and substitution was done using Eq.â€‰4a. To adjust the step size of the weight update by the method of steepest descent, a convergence coefficient can be added:

Eq.â€‰9 can be used to update a set of normalization weights to shift and scale the signal along the x and y axes. For y-axis scale:

where â€˜gâ€™ is the signal gain and Î³ is the mesh size. Eq.â€‰10 is the Widrow-Hoff LMS algorithm in scalar form [5, 6]. For y-axis shift, the gradient is:

where â€˜bâ€™ is the DC bias and Î² is the mesh size. Eq.â€‰11 is the Widrow-Hoff LMS update of the DC or average level [5, 6]. For x-axis shift (phase lag):

where â€˜pâ€™ denotes the phase shift, Ï• is the mesh size, and for simplicity the constant term 1/2Ï• is included in Î¼_{p}. For x-axis scale (interval weighting):

where â€˜aâ€™ denotes x-axial scale, Î± is the mesh size, and again for simplicity the constant term 1/2Î± is included in Î¼_{a}. Because the time index becomes a real number when adjusting for x-axis shift and scale, interpolation between discrete sample points is necessary. Eqs.â€‰1013 can be used in tandem to update the values of x-axis and y-axis scale and shift, once per discrete time epoch k. Accordingly, the equations for updating x-axis shift and scale are rewritten as:

and:

### Comparison of new and widrow-Hoff LMS algorithms

The performance of the new and Widrow-Hoff LMS algorithms was compared using CFAE, signals with significant randomly-varying deflections as well as repetitive components [18, 19]. Equationsâ€‰1016 were used to match CFAE signals of lengthâ€‰=â€‰8,192 discrete sample points (8.4â€‰s), which are the desired signals d_{k} for all k, with versions of the same signal that were shifted and scaled along the x and y axes by a known amount, which are the reference signals x_{k} for all k. Thus upon convergence, the weights will be inverse values to the x-axis and y-axis shift and scale that was applied to form each reference x_{k}. We used CFAE that were initially 16,384 sample points long for this application, because the x-axis shift and scale applied to form x_{k} could require values of kâ€‰>â€‰8192 in the original signal. In twelve trials, weighting initialization for reference signal __x__ of dimension 8,192, was based upon random adjustment of x-axis and y-axis shift and scale for each trial, within limits of the concavity of the global minimum along the four-dimensional performance surface. To determine efficacy, 12 paroxysmal and 12 persistent CFAE recordings were used (24 trials in all).

Although the mean-squared error surface of y-axis shift and scale forms a single concavity along the performance surface, the mean-squared error surface of x-axis shift and scale can have multiple concavities, i.e. local minima, due to the presence of multiple signal deflections. If during a given trial, the weighting did not converge at the global minimum error value due to arrival at a local minimum, the trial was excluded from analysis, and was redone with another set of initial weight values. The convergence coefficient magnitudes, the same for all trials, were selected manually for fastest convergence, without significant response, after convergence, of the weighting to individual signal deflections, so that the weighting foci upon convergence to the bottom of weight bowl had small footprint. The computer code to implement these equations is given in the Appendix.

For comparison of estimation error and convergence time, the Widrow-Hoff LMS algorithm [5, 6, 8] was implemented with the same desired signal __d__ and the same reference input __x__ adjusted for x- and y- shift and scale. Initially a tapped delay line of length 100 was used for Widrow-Hoff, so that variations in x-axis scale could be better accounted for as d_{k} became increasingly out of phase with x_{k} when a â‰ 1 (Eqs.â€‰15 and 16). However, it was observed that the relationship between many of the individual weights changed little even for p â‰ 0 and a â‰ 1. This is illustrated in Figure 3A. When 100 delays are used, taps in recent time (kâ€‰=â€‰âˆ’1, -2, -3 â€¦) are large but those furthest in time (kâ€‰=â€‰â€¦ -91 to âˆ’100) remain near zero (bottom part of panel). Thus much of the weighting was relatively unaffected by phase lag differences between __d__ and __x__. When only four taps were used (Figure 3B) there is more contribution from each weight (values are nonzero) and the lesser number of taps increases the computational efficiency. Thus for comparison, Widrow-Hoff with four taps was compared with the new LMS algorithm with four weights. For Widrow-Hoff, the convergence coefficient value was also selected for fast convergence without significant response to individual signal deflections following convergence (small foci at bottom of weight bowl).

The new LMS algorithm was initialized with weights gâ€‰=â€‰1, bâ€‰=â€‰0, pâ€‰=â€‰0, and aâ€‰=â€‰1 in all trials, i.e., supposing that there are no extrinsic differences between signals. The Widrow-Hoff LMS algorithm was initialized with weights for all four tapsâ€‰=â€‰1 in all trials. The weights were considered to be converged following the cessation of sharp trends of weight change. The error after convergence was then calculated for both LMS algorithms as:

where j is the start of the interval just after convergence for that algorithm which took longer to converge, y_{k} is given by Eq.â€‰16 for the new LMS algorithm, and for the Widrow-Hoff LMS algorithm:

where â€˜Â·â€™ denotes the inner product and __w__ is of dimension 4. The mean and standard deviation in the error (Eq.â€‰17) and the time for convergence were tabulated for each trial.

Significant differences in the means between the new and Widrow-Hoff LMS were determined using the unpaired *t*-test, with pâ€‰<â€‰0.05 indicating significance (SigmaPlot 2004version 9.01, Systat Software, Chicago, IL, and MedCalc 2011 version 9.5, MedCalc Software, Mariakerke Belgium).

### Application to the electrocardiogram

As proof of concept to show the utility of the new LMS algorithm with other types of AF signals, it was applied to lead aVF of the electrocardiogram in a patient with longstanding persistent AF. Due to the irregularity of atrial activation during AF, ventricular activation is also often irregular. Over a 25â€‰s interval, a prototypical waveform was matched with the actual aVF lead. The prototypical waveform was constructed as the average of all QRS complexes over the 25â€‰s sequence. The prototypical waveform consisted of Â±400 sample points centered on the R wave peak (820â€‰ms duration). A synthetic electrocardiogram was constructed by inserting this prototypical waveform at each instance of and aligned with the R wave peak of the actual aVF lead along a 977samples/s Ã— 25â€‰s sample point interval. Where no instance of the prototypical waveform occurred (cardiac cycleâ€‰>â€‰820â€‰ms), the sequence was set to zero. Where two instances of the prototypical waveform overlapped (cardiac cycleâ€‰<â€‰820â€‰ms), they were summed. The resultant synthetic electrocardiogram served as __x__, while the original electrocardiogram was __d__. The weighting of __x__ was initialized at random to values of:

to form the estimate __y__. The electrocardiogram statistical characteristics differed from that of surface electrograms, and different convergence coefficients were used:

Signals __d__, __y__, and __Ïµ__ were graphed prior to and after convergence. Extrinsic weights b, g, p, and a were graphed for the entire 25â€‰s sequence.

## Results

In Figure 4 is shown an example of the adaptive update using the new algorithm with a CFAE, trial 6, paroxysmal AF (see Table 1). The top panels show the desired signal (black), the reference (green) and the estimated signal (red). At top left is shown the onset of adaptation, sample points 1â€“1000. There is initially poor overlap of estimate signal __y__ (red) to desired signal __d__ (black). Based on the reference signal __x__ (green) there is substantial x-axis scaling, as the deflections increasingly misalign from left to right in the panel. However, during the interval from 7000â€“8000 sample points (right-hand panel) convergence has occurred and there is overlap between desired and estimated signals (black and red, respectively). The reference signal during this interval (green) is highly out of phase with the desired signal due to its nonunity weighting in x-scale. For example the first large deflection in the reference signal (green) occurs at approximately 7050, and in the desired and estimated signals (black and red traces, respectively) this deflection occurs at ~7250 (noted by *). The lower panels in Figure 4 show the weight adaptation. Convergence occurs at approximately sample point 3742, in the sense that rapid drifts in weight values cease to occur. The value of each weight at convergence is approximately the inverse of the corresponding value in Table 1, trial 6, so that the desired and estimated signals match.

In Figure 5 is shown an example of the adaptive update using the new algorithm, trial 8, persistent AF (see Table 2). As in Figure 4, the top panels show the desired signal (black), reference (green) and estimate signal (red). The desired and reference signals again become out of phase due to a difference in x-axis scale, but the x-scaling is in the opposite direction as compared with Figure 4 (see for example peaks at *). The lower panels show the adjustment of weights for x- and y-axis shift and scale. There is mostly convergence around sample point 1100, as is evident also in the top left panel. Thus even with quite different x- and y-axial shift and scale, adaptive adjustment and normalization of the reference signal toward the shape of the desired signal occurs. The value of the shift and scale weights upon convergence show the difference in extrinsic features between desired and reference signals.

A comparison of new versus Widrow-Hoff LMS algorithm during Trial 1, persistent AF, is shown in Figure 6. Shown after convergence, there is nearly exact overlap of desired and estimated signals using the new LMS algorithm (top panel). The Widrow-Hoff LMS algorithm matches desired and estimated signals to a slightly lesser degree - there is some misalignment in phase and amplitude. This is likely due to the need of a delay line with multiple taps to estimate changes in x-shift and x-scale.

The overall findings of this study are summarized in Tables 1, 2, 3 and 4. In Table 2 are depicted the results for the new LMS algorithm, persistent AF. Shown are the trial number, the parameter values for initialization of each trial, the mean and standard deviation in error after convergence, and the number of sample points necessary for approximate convergence. The y-shift (baseline level) of the reference takes on both positive and negative values in the individual trials. The y-scale (signal amplitude), is varied from 0.95Ã— to 2Ã—. The x-shift (phase lag), is varied by up to 8 units. Finally, the x-scale (time interval), is both >1 (signal contraction) and <1 (signal expansion). The error is similar for all trials with a mean of 0.55â€‰Â±â€‰0.95 Î¼V^{2}/sample point. The mean number of sample points for convergence is 1560â€‰Â±â€‰2217. Convergence is approximately proportional to the absolute difference between no change in x-scale (aâ€‰=â€‰1) and the value of x-scale that was actually used to initialize the reference signal (5^{th} column from left).

Similar results were obtained using the same initialization parameters for paroxysmal CFAE data (Tables 1 and 3). For the new LMS algorithm, the mean error was 0.46â€‰Â±â€‰0.49 Î¼V^{2}/sample point (Table 1) as compared with 0.72â€‰Â±â€‰0.35 Î¼V^{2}/sample point for the Widrow-Hoff algorithm (Table 3). The respective convergence times for paroxysmal AF data (Tables 1 and 3) are somewhat shorter than for persistent data (Tables 2 and 4).

The results for the Widrow-Hoff LMS algorithm, persistent AF, are shown in Table 4. The same weight values were used to initialize the reference signals (left columns). The mean error value is 0.62â€‰Â±â€‰0.55 Î¼V^{2}/sample point. The time for convergence is sometimes very short, at other times it is long, with a mean of 458â€‰Â±â€‰651 sample points.

For both paroxysmal and persistent AF data, the modeling of the desired signal with the reference using extrinsic shape factors was more accurate using the new LMS algorithm, though this difference did not reach significance with Nâ€‰=â€‰12.

### Electrocardiogram result

The result of the proof of concept exercise is shown in Figure 7. In the left panels are the electrocardiogram, lead aVF, during longstanding persistent atrial fibrillation. The top panel shows initial conditions leading to convergence. The black trace is the actual aVF lead, signal __d__. The green trace is the repeating prototypical trace, signal __x__. The red trace is __y__, the weighted manifestation of __x__. After convergence (bottom left panel) there is mostly overlap of __d__ (black) with __y__ (red). In the bottom left panel, the green trace now shows __Ïµ__ = __d__ â€“ __y__. The R wave and much of the QRS complex is eliminated. What remains is mostly the F wave (atrial signal). At right are the traces over ~25â€‰s (each iteration number corresponds to a sample point of data, taken at 977â€‰Hz). Convergence occurs after ~4000 iterations. The staircase shape prior to convergence in weights g, p, and reflects incidences of new cardiac cycles. The weights converge to approximately their expected values of:

Following convergence there are still slight changes in the weighting. For example, it is apparent that patient respiration is evident in the g weighting, as noted by *, although this should be verified in a prospective study.

## Discussion

### Summary

In this study a new LMS algorithm was derived for characterization of extrinsic signal features during signal normalization. These features are the x- and y- axis shift and scale parameters. The algorithm is adaptive and the weights are updated based upon the method of steepest descent (Eq.â€‰1). The error gradient is estimated using a finite difference approximation (Eq.â€‰8). Once coefficients are selected for fastest convergence without following individual deflections, the algorithm is stable and can adjust to a wide range of extrinsic feature values associated with a particular reference. In the study, once convergence occurred, the desired and estimated signals overlapped, i.e. their intrinsic shape was the same. The parameter values upon convergence are quantitative descriptors of differences in extrinsic signal shape, which can be related to real physiologic parameters. More rapid convergence of both LMS algorithms occurred for paroxysmal AF data (Tables 1 and 3) as compared with persistent data (Tables 2 and 4), perhaps because a greater degree of randomness in the paroxysmal deflections resulted in sharper changes in the error function, thereby increasing the step size from one iteration to the next. The new LMS algorithm enhanced the electrocardiogram F wave from a persistent AF patient. Spectral analysis of the F wave trace could be useful to characterize global atrial electrophysiologic signal during AF. The likely detection of patient respiration in the extrinsic weighting over 25â€‰s suggests that time-varying changes can be monitored over long intervals.

### New LMS algorithm â€“ direction of weight update

Consider how the normalization of x-axis shift is accomplished by the new LMS algorithm. To show the phase weight update direction, the relevant terms from Eqs.â€‰14 and 16 are:

where for simplicity, for Eq.â€‰19b an initialized weighting is supposed (gâ€‰=â€‰1, bâ€‰=â€‰0, pâ€‰=â€‰0, and aâ€‰=â€‰1), i.e., y_{k}â€‰=â€‰x_{k}. Consider the left-hand term in parentheses Eq.â€‰19b. The effect of this term on the weight update is illustrated in Figure 8A. When d_{k} is more positive than the weighted version of x_{k}, d_{k} - y_{k} will be positive. When d_{k} is more negative than the weighted version of x_{k}, d_{k} - y_{k} will be negative. The difference between k+Ï• and k-Ï• in Eq.â€‰19b (right-hand term) is just a difference in the phase of signal __x__ (Figure 8B). If the slope of __x__ is positive at k, then (x_{k+Ï•} - x_{k-Ï•}) will be positive, whereas if the slope is negative, (x_{k+Ï•} - x_{k-Ï•}) will be negative. Based upon Figure 8A-8B, along the upgoing slope, (d_{k} - x_{k}) and (x_{k+Ï•} - x_{k-Ï•}) will both be positive. Thus the phase update will be negative (Eq.â€‰14) and x_{k} will shift to the left toward d_{k}. Similarly, on the downgoing slope, (d_{k} - x_{k}) and (x_{k+Ï•} - x_{k-Ï•}) will both be negative and again x_{k} will be shifted to the left toward better alignment with d_{k}. If the weighted version of x_{k} were leading d_{k} (not shown), the product of the terms in Eq.â€‰19 will be negative regardless of whether k is located at an upslope or downslope of the signal, and x_{k} will be shifted to the right.

For normalization of x-scale, the relevant terms from Eqs.â€‰15 and 16 are:

supposing for Eq.â€‰20b, as in Eq.â€‰19b, initial conditions (gâ€‰=â€‰1, bâ€‰=â€‰0, pâ€‰=â€‰0, and aâ€‰=â€‰1). As for x-shift, the direction of weight update for x-scale depends in part on the difference between d_{k} and x_{k} (Figure 8C). In this panel, the weighting of reference signal __x__ is illustrated by a change in x-axis scale (expansion) as compared with desired signal __d__, but the same relationships apply as in Figure 8A. Similar to Figure 8B for x-shift, in Figure 8D are shown the effect of finite differences on x-scale (red dotted lines). Again, the difference will be positive along a deflection leading edge and negative along a deflection trailing edge. Thus the value a of x-scale will decrease whether k is on the leading or trailing edge of a deflection (shift to left) when the weighted version of x_{k} is expanded with respect to d_{k} (Figure 8D). When the weighted version of x_{k} is contracted with respect to d_{k}, the value a of x-scale will increase whether k is on the leading or trailing edge of a deflection (shift to right, not shown). Figure 8C illustrates that these relationships anticipate that the overlap between desired and weighted reference signal are sufficient for correct adaptation (large deflection at left in Figure 8C). Where smaller deflections are aligned with a non-corresponding deflection on the other signal (right portion of traces), local minima will occur in the performance surface, which will delay weight convergence to the global minimum error.

### Quantitative comparison to other applications

The approach described in this study minimizes the sum of squares of evenly weighted deviations of a template to an input signal and was specifically applied to CFAE. As a first approximation, it can be supposed that the MSE weighting in each parameter has constant variance independent of the position within the data set [20]. Another approach to the use of the method of steepest descent in adaptive problems is by frequency domain filtering, which reduces the computational cost relative to the Widrow-Hoff LMS algorithm in applications where long filter lengths are required [14]. While for simplicity, the convergence coefficient values were estimated manually in our study, this process can be automated to reflect the inverse signal power [6]. The step size depends on the position of the weights along a performance surface. In prior work, fixed step size has been used with finite differences to make adaptive updates with greater stability for simulated cardiologic data [21] as well as to cancel motion artifact from the blood pressure pulse obtained by tonometry [22]. The MSE is inversely proportional to the convergence coefficient Î¼ [23]. In our study, convergence coefficient values for both LMS algorithms were optimized manually for best step-size. Variable step-size LMS adaptive filtering may helpful to improve convergence [24, 25]. In cases when eigenvalues defining the signal statistics have a large spread, a variable leaky LMS algorithm, designed to overcome the slow convergence of the standard LMS algorithm under such conditions, may also helpful [26]. Future implementations should consider transient and steady-state responses of the LMS algorithms [27].

### Clinical correlates

In this study we tested a new LMS algorithm using CFAE, which contain both random and repetitive components which differ in paroxysmal versus persistent AF [19]. CFAE from paroxysmals tend to be less repetitive and more complex as compared with persistent AF data. In previous work, linear prediction was used to detect repetitive components [19]. For real-time analysis, once components are detected by linear prediction, the new LMS algorithm could be applied to normalize the extrinsic features. An instance of the repetitive shape early in the recorded signal would be used as the template or reference (__x__). The length of __x__ would equal the interval along which the repetitive pattern is detected. The template __x__ would be matched with new instances of the repetitive pattern __d__ by using the four weight system of the new LMS algorithm to form the weighted template __y__. The x-axis scale weighting will adjust the template length to meet any changes in time duration of the recurring pattern.

Upon application of this paradigm, the variation in x-axis and y-axis shift and scale itself would provide information about the character of CFAE repetitive patterns. Furthermore, the intrinsic shapes after normalization with the new LMS algorithm could be quantified using specially designed methods, such as analysis of morphology variations by cluster and principal components analysis [28] or by nonlinear dynamical measurements [18], wave similarity analysis [29], or correlation waveform analysis [30]. We would expect to see differences in intrinsic and extrinsic features not only in paroxysmal versus persistent AF data obtained at corresponding anatomical locations, but also for data from the same patient obtained at different anatomical locations such as at the ostia of the pulmonary veins versus the anterior and posterior left atrial free wall. Guidance for ablation therapy might be possible based upon the degree of temporal change in extrinsic shape of repetitive patterns in CFAE, as well as the character of their intrinsic shape.

It was also shown that the method is applicable to more deterministic signals, specifically the electrocardiogram. The F wave was enhanced in leaf aVF in a longstanding persistent AF patient, corresponding to atrial activation. Likewise, monitoring of the extrinsic weighting of the electrocardiogram over long intervals might be useful to determine the affect of antiarrhythmic drugs or the result of RF ablation. Individual electrocardiogram components such as the R wave could likewise be monitored. This could be useful for example, during administration of pharmacologic agents that specifically alter electrical conduction in the ventricles.

## Conclusions

It was found that a new LMS algorithm can converge stably and rapidly to normalize a reference CFAE __x__ to the same space as that of a desired CFAE signal __d__. All four parameters of x-axis and y-axis shift and scale converged during this process when the initial weighting was within the concavity of the global minimum error. Since each weight directly normalizes a particular aspect of extrinsic shape, the new LMS algorithm tends to converge with less error as compared with a four-tap Widrow-Hoff LMS implementation. Other algorithms have been developed which might be helpful to further reduce convergence time [31]. The new LMS method is potentially useful to determine differences in physiologic parameters for CFAE recorded at many atrial sites, based on measurements of x- and y-axis shift and scale and their variation over time. It can also be used to enhance the electrocardiogram F wave and to monitor global, time-varying changes in heart function.

### Limitations

In the study a limited number of trials were used for comparison. Only 24 different CFAE were used â€“ one for each trial. There were also 12 different initial weighting conditions used to test the adaptation of the algorithms. For more rigorous comparison, in subsequent work the number of trials and initial conditions should be increased. Furthermore, the intrinsic signal shape of desired versus reference signals should be made to differ. For the new LMS, the step size for weight update was proportional to the finite difference in estimated signal, but updates using fixed increments [21, 22, 32] may also converge rapidly and stably. Initialization was set so that the path along the performance surface was within the concavity of the global minimum error. Addition of a stochastic factor (random number) in Eq.â€‰16 may be useful to overcome local minima during update of x-shift and x-scale as caused by presence of multiple signal deflections [21]. In the study it was supposed as a first approximation that for Widrow-Hoff, the delay line with 4 taps equals the unknown system impulse response; actual response should be tested for more accurate approximation [33].

## Appendix

Computer program for new LMS algorithm

parameter (mâ€‰=â€‰8192, u1â€‰=â€‰0.03, u2â€‰=â€‰.08, u3â€‰=â€‰4., u4â€‰=â€‰.04, vâ€‰=â€‰.001)

real d(m),x(mâ€‰+â€‰500); data b, g, p, a/0., 1., 0., 1./

do 1â€‰kâ€‰=â€‰101, 8192â€‰+â€‰100

zâ€‰=â€‰a*(kâ€‰+â€‰p); zzâ€‰=â€‰int(z); xxâ€‰=â€‰x(zz)â€‰+â€‰(x(zzâ€‰+â€‰1)-x(zz))*(z-zz)

zâ€‰=â€‰a*(kâ€‰+â€‰pâ€‰+â€‰1); zpâ€‰=â€‰int(z); xpâ€‰=â€‰x(zp)â€‰+â€‰(x(zpâ€‰+â€‰1)-x(zp))*(z-zp)

zâ€‰=â€‰a*(kâ€‰+â€‰p-1); zmâ€‰=â€‰int(z); xmâ€‰=â€‰x(zm)â€‰+â€‰(x(zmâ€‰+â€‰1)-x(zm))*(z-zm)

yâ€‰=â€‰(aâ€‰+â€‰v)*kâ€‰+â€‰p; ypâ€‰=â€‰int(y); xppâ€‰=â€‰x(yp)â€‰+â€‰(x(ypâ€‰+â€‰1)-x(yp))*(y-yp)

yâ€‰=â€‰(a-v)*kâ€‰+â€‰p; ymâ€‰=â€‰int(y); xmmâ€‰=â€‰x(ym)â€‰+â€‰(x(ymâ€‰+â€‰1)-x(ym))*(y-ym)

eâ€‰=â€‰d(k) - (g*xx-b)

bâ€‰=â€‰b-u1*e; gâ€‰=â€‰gâ€‰+â€‰u2*e*xx); pâ€‰=â€‰pâ€‰+â€‰u3*e*g*(xp-xm); aâ€‰=â€‰aâ€‰+â€‰u4*e*g*(xpp-xmm)

write(*,*) d(k), g*x(a*(kâ€‰+â€‰p))-b, x(k), b, g, p, a

1 continue

The Fortran program (Intel Visual Fortran Compiler, ver. 9, 2005, Intel Corp., Santa Clara, CA) calculates error and update weights, and writes signals and weights to disk.

u are convergence coefficients, b, g, p, a are y- and x-axis shift & scale weights.

dâ€‰=â€‰desired signal, xâ€‰=â€‰reference signal, v is the differential for x-axis scale.

y, yp, ym and z, zp, zm are intermediate calculations of x-axis shift and scale, respectively.

xx is the calculation of x-axis shift and scale without finite difference.

xp and xm are differential calculations of x-axis shift.

xpp and xmm are differential calculations of x-axis scale.

k begins at 100 to prevent the possibility of a negative index in x-axis scale and shift.

x is extended to 8192â€‰+â€‰500 to account for positive ending x-axis scale and shift.

## Author contributions

EJC developed the LMS algorithm, conducted the data analysis, and wrote the manuscript. ABB, WW, and HG made helpful suggestions, provided the clinical data, and determined which recordings were complex fractionated atrial electrograms. All authors have read and approved the final manuscript.

## References

Widrow B:

**The Rubber Mask Technique (Part I). Pattern Measurement and Analysis.***Pat Rec*1973,**5:**175â€“197. 10.1016/0031-3203(73)90042-3Widrow B:

**The Rubber Mask Technique (Part II). Pattern Storage and Recognition.***Pat Rec*1973,**5:**199â€“211. 10.1016/0031-3203(73)90043-5Ciaccio EJ, Dunn SM, Akay M:

**Biosignal Pattern-Recognition and Interpretation Systems. 1. Fundamental Concepts.***IEEE Eng Med Biol Mag*1993,**12:**89â€“98.Ciaccio EJ, Dunn SM, Akay M:

**Biosignal Pattern-Recognition and Interpretation Systems. 3. Clustering and Classification.***IEEE Eng Med Biol Mag*1994,**13:**129â€“135.Widrow B, Glover JR, McCool JM, Kavnitz J, Williams CS, Hearn RH, Zeidler JR, Dong E:

**Adaptive noise cancelling: Principles and applications.***Proc IEEE*1975,**63:**1692â€“1716.Widrow B, McCool JM, Larimore MG, Johnson CR:

**Stationary and nonstationary learning characteristics of the least mean squares adaptive filter.***Proc IEEE*1976,**64:**1151â€“1162.Lai KC, Shynk JJ:

**A successive cancellation algorithm for fetal heart-rate estimation using an intrauterine ECG signal.***IEEE Trans Biomed Engin*2002,**49:**943â€“954. 10.1109/TBME.2002.802010Widrow B, McCool JM:

**A comparison of adaptive algorithms based on the method of steepest descent and random search.***IEEE Trans Ant Prop*1976,**24:**615â€“636. 10.1109/TAP.1976.1141414Nademanee K, McKenzie J, Kosar E, Schwab M, Sunsaneewitayakul B, Vasavakul T, Khunnawat C, Ngarmukos T:

**A new approach for catheter ablation of atrial fibrillation: mapping of the electrophysiologic substrate.***J Am Coll Cardiol*2004,**43:**2044â€“2053. 10.1016/j.jacc.2003.12.054KlÃ©ber AG, Janse MJ, van Capelle FJ, Durrer D:

**Mechanism and time course of S-T and T-Q segment changes during acute regional myocardial ischemia in the pig heart determined by extracellular and intracellular recordings.***Circ Res*1978,**42:**603â€“613. 10.1161/01.RES.42.5.603Plonsey R, Barr RC:

**Plonsey R, Barr RC.**In*Bioelectricity: A Quantitative Approach*. 2nd edition. Springer, New York; 2000:39â€“65.Jacquemet V, Virag N, Ihara Z, Dang L, Blanc O, Zozor S, Vesin JM, Kappenberger L, Henriquez C:

**Study of unipolar electrogram morphology in a computer model of atrial fibrillation.***Journal Cardiovasc Electrophys*2003,**14**(10 Suppl):S172â€“179.Lo Conte LR, Merletti R:

**Advances in processing of surface myoelectric signals: Part 2.***Med Biol Eng Comput*1995,**33**(3 Spec No):373â€“384.Mansour D, Gray A:

**Unconstrained frequency domain adaptive filter.***IEEE Trans Acoust Speech Sig Proc*1982,**30:**726â€“734. 10.1109/TASSP.1982.1163949Ciaccio EJ, Micheli-Tzanakou E, Dunn SM, Wit AL:

**The use of the differential steepest descent algorithm for adaptive template matching.***Proceedings International Biomedical Engineering Days*1992,**1:**198â€“202.Ciaccio EJ, Micheli-Tzanakou E:

**A least squares algorithm with one phase weight for adaptive cancelation of noise from biomedical signals.***Proceedings of the Eighteenth IEEE Annual Northeast Biomedical Engineering Conference*1992,**1:**41â€“42.Ciaccio EJ, Dunn SM, Akay M, Micheli-Tzanakou E, Coromilas J, Costeas CA, Wit AL:

**Characterization of spontaneous changes in electrogram morphology.***IEEE Computers in Cardiology*1994,**1:**701â€“704.Ciaccio EJ, Biviano AB, Whang W, Gambhir A, Garan H:

**Different characteristics of complex fractionated atrial electrograms in acute paroxysmal versus long-standing persistent atrial fibrillation.***Heart Rhythm*2010,**7:**1207â€“1215. 10.1016/j.hrthm.2010.06.018Ciaccio EJ, Biviano AB, Whang W, Vest JA, Gambhir A, Einstein AJ, Garan H:

**Differences in repeating patterns of complex fractionated left atrial electrograms in longstanding persistent atrial fibrillation as compared with paroxysmal atrial fibrillation.***Circ Arrhythm Electrophysiol*2011,**4:**470â€“477. 10.1161/CIRCEP.110.960153Chan IS, Goldstein AA, Bassingthwaighte JB:

**SENSOP: A Derivative-Free Solver for Nonlinear Least Squares with Sensitivity Scaling.***Ann Biomed Eng*1993,**21:**621â€“631. 10.1007/BF02368642Ciaccio EJ, Micheli-Tzanakou E:

**Development of gradient descent adaptive algorithms to remove common mode artifact for improvement of cardiovascular signal quality.***Ann Biomed Eng*2007,**35:**1146â€“1155. 10.1007/s10439-007-9294-xCiaccio EJ, Drzewiecki GM:

**Tonometric arterial pulse sensor with noise cancellation.***IEEE Trans Biomed Eng*2008,**55:**2388â€“2396.Caraiscos C, Liu B:

**A roundoff error analysis of the LMS adaptive algorithm.***IEEE Transactions on Acoustics, Speech and Signal Processing*1984,**32:**34â€“41. 10.1109/TASSP.1984.1164286Bilcu RC, Kuosmanen P, Egiazarian K:

**A transform domain LMS adaptive filter with variable step-size.***IEEE Signal Processing Letters*2002,**9:**51â€“53.Li XB, Fan YY, Peng K:

*A variable step-size LMS adaptive filtering algorithm. WiCom '09: 5th International Conference on Wireless Communications, Networking and Mobile Computing*. Beijing; 2009:1â€“4.Kamenetsky M, Widrow B:

**A variable leaky LMS adaptive algorithm'.***Record of the Thirty-Eighth Asilomar Conference on Signals, Systems and Computers*2004,**1:**125â€“128.Dabeer O, Masry E:

**Analysis of mean-square error and transient speed of the LMS adaptive algorithm.***IEEE Transactions Information Theory*2002,**48:**1873â€“1894. 10.1109/TIT.2002.1013131Faes L, Nollo G, Kirchner M, Olivetti E, Gaita F, Riccardi R, Antolini R:

**Principal component analysis and cluster analysis for measuring the local organisation of human atrial fibrillation.***Med Biol Eng Comput*2001,**39:**656â€“663. 10.1007/BF02345438Faes L, Nollo G, Antolini R, Gaita F, Ravelli F:

**A method for quantifying atrial fibrillation organization based on wave-morphology similarity.***IEEE Trans Biomed Eng*2002,**49**(12 Pt 2):1504â€“1513.Barbaro V, Bartolini P, Calcagnini G, Censi F, Morelli S, Michelucci A:

**Mapping the organization of atrial fibrillation with basket catheters. Part I: Validation of a real-time algorithm.***Pacing Clin Electrophysiol*2001,**24:**1082â€“1088. 10.1046/j.1460-9592.2001.01082.xHamouda WA, McLane PJ:

**A fast adaptive algorithm for MMSE receivers in DS-CDMA systems.***IEEE Signal Processing Letters*2004,**11:**86â€“89. 10.1109/LSP.2003.819855Verhueckx NAM, van der Elzen HC, Snijders FAM, van Gemin PJ:

**Distal echo cancellation for base band data transmission.***IEEE Trans Acous Speech Sig Proc*1979,**ASSP-27:**768â€“781.Mayyas K:

**Performance analysis of the deficient length LMS adaptive algorithm.***IEEE Transactions on Signal Processing*2005,**53:**2727â€“2734.

## Acknowledgements

No outside funding was received for this study.

## Author information

### Authors and Affiliations

### Corresponding author

## Additional information

### Competing interests

The authors declare that they have no competing interests.

## Authorsâ€™ original submitted files for images

Below are the links to the authorsâ€™ original submitted files for images.

## Rights and permissions

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## About this article

### Cite this article

Ciaccio, E.J., Biviano, A.B., Whang, W. *et al.* A new LMS algorithm for analysis of atrial fibrillation signals.
*BioMed Eng OnLine* **11**, 15 (2012). https://doi.org/10.1186/1475-925X-11-15

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/1475-925X-11-15