**3.1. Power spectral analysis**

8 Atrial Fibrillation

AEG

ABS

AVC

ICA

AEG II

ABS

AVC

ICA

Figure 6.

(a)

(b)

**3. Frequency analysis of AF**

Note how ABS does not distort the resulting signal in this latter case [31].

II

0 1 2 3 <sup>4</sup> Time (seconds)

5

5

0 1 2 3 <sup>4</sup> Time (seconds)

**Figure 6.** (a) From top to bottom, Lead II of an organized AF ECG shown for reference, the corresponding epicardial atrial electrogram (AEG), result of ventricular reduction with average beat subtraction (ABS), adaptive ventricular cancellation (AVC) and independent component analysis (ICA). (b) This panel plots the same information as panel (a) for a disorganized AF ECG.

The results provided by ICA in separating the atrial activity from ventricular contamination in AEGs are considered as better than those provided by ABS or AVC regarding how the atrial waveforms are preserved and the amount of ventricular residue removed [31], see

When an atrial activity signal is available after QRST cancellation, the power spectral analysis door can be opened for the purpose of locating the dominant atrial frequency. This will be the first aspect to be addressed in this section. However, it is well known that the fibrillatory waves present time-dependent properties that may be blurred through a basic spectral analysis. As a consequence, when more detailed information and robust spectral estimation are needed, time-frequency analysis may be the way to go. In this respect, concepts like the The computation of power spectral analysis on the atrial activity signal is the most common approach to determine the DAF [7]. Basically, the technique consist of locating the largest spectral peak within the power spectrum. The spectrum is usually defined as the discrete Fourier transform of the autocorrelation function of the signal. In this case, the signal is the atrial activity which is divided into shorter, overlapping segments, where each segment is subjected to proper windowing, e.g., using commonly the Welch's method [35]. Finally, the desired power spectrum is obtained by averaging the power spectra of the respective segments.

Primarily there exist two ways to compute the power spectral density of a discrete signal. First, estimate its autocorrelation function and then take its Fourier transform. Second, compute the Fourier transform of the signal and, next, square its magnitude to obtain the periodogram. Normally, the second way is the most commonly applied because of the great computational efficiency of the fast Fourier transform algorithm [36].

Depending on prior information about the signal, spectral estimation can be divided into two categories: nonparametric and parametric approaches. Nonparametric approaches explicitly estimate the autocorrelation function or the power spectral density of the process without any prior information. On the other hand, parametric approaches assume that the underlying random process has a certain structure, for example, an autoregressive (AR) model, which can be described using a small number of parameters and estimate the parameters of the model [37]. A widely used nonparametric estimation approach is the periodogram, which is based on the fast Fourier transform (FFT). A common parametric technique is maximum entropy spectral estimation, which involves fitting the observed signal to an AR model [36].

The raw periodogram is not a statistically stable spectral estimate since there is not much averaging on its computation. In fact, the periodogram is computed from a finite-length observed sequence that is sharply truncated. This sharp truncation effectively spreads the original signal spectrum into other frequencies, which is called spectral leakage [37]. The spectral leakage problem can be reduced by multiplying the finite sequence by a windowing function before the FFT computation, which reduces the sequence values gradually rather than abruptly. In order to reduce the periodogram variance, averaging can be applied. This modified algorithm is called Welch's method, which is the most widely used in nonparametric spectral estimation [35]. In order to increase the number of segments being averaged in a finite-length sequence, the sequence can be segmented with overlap; for example, 50% overlap can duplicate the number of segments of the same length [35]. Segment length can be considered as the most important parameter in AF spectral analysis since it determines the estimation accuracy of the DAF by restricting spectral resolution. It is advisable that the segment length is chosen to be at least a few seconds so as to produce an acceptable variance of the power spectrum [1, 2].

With respect to the surface ECG lead selection for AF power spectral analysis, this lead use to be V1. This is because lead V1 contains the fibrillatory waves with largest amplitude and, therefore, the associated DAF peak will be the largest in this lead [12]. As an example of

165

Applications of Signal Analysis to Atrial Fibrillation

http://dx.doi.org/10.5772/54199

**Figure 8.** Spectrogram of a one minute atrial activity signal computed with a 128 point FFT using a 2.5 seconds window

information is needed [39]. The DAF is known to be influenced by autonomic modulation and its variations over time have been studied in terms of the effects of parasympathetic and sympathetic stimulation as well as with respect to circadian rhythm. It has been shown that

The simplest way to apply time-frequency analysis to AF recordings consists of dividing the continuous-time atrial signal into short, consecutive and overlapping segments. Next, each of the segments will be subjected to spectral analysis. The resulting series of spectra reflects the time-varying nature of the signal [36, 39]. The most common approach to time-frequency analysis is the nonparametric, i.e., Fourier-based spectral analysis applied to each AF segment. This operation is known as the short-time Fourier transform (STFT) [41]. In this approach, the definition of the Fourier transform is modified so that a sliding time window defines each time segment to be analyzed. As a result, a two-dimensional function will be obtained in which the resolution in time and frequency will always have to be a trade-off compromise between both domains [37]. In the same way as with the periodogram, the spectrogram of a signal can be obtained by computing the squared magnitude of the STFT [41], thus making it possible to get a PSD representation of the signal in the time-frequency domain. An example on how an AF spectrogram looks like is shown in Figure 8, where three surface ECG leads are shown for comparison. As can be appreciated, the DAF trend presents great similarities but, also, some differences between leads. However, remark that the spectrogram frequency resolution cannot be better because of the time

Because of the conflicting requirements between time and frequency resolution needed to be satisfied by the STFT, other techniques for time-frequency analysis have been proposed [42]. Basically, while the STFT depends linearly on the signal, these new techniques depend quadratically, thus providing much better resolution. One of the most successfully applied time-frequency distribution to AF recordings is the cross Wigner-Ville distribution (XWVD). Its selection was considered primarily because of its excellent noise performance for signals

AF frequency decreases during the night and increases in the morning [40].

length. Surface leads V1 to V3 are shown for comparison [39].

window length selected.

**Figure 7.** Example of AF power spectral analysis. (a) Surface ECG lead V1 from a patient in AF ready to be analyzed. (b) Atrial activity extracted from lead V1. (c) Atrial activity power spectral density. (d) and (e) Right and left atrium invasive recording PSDs of a different patient in which a notable frequency contrast between both atria was observed. (f) Surface lead V1 PSD of the patient in (d) and (e) proving how power spectral analysis can be useful in the study of AF [7].

power spectral analysis of AF, Figure 7 plots several situations related to this analysis. Firstly, the left panel shows the traditional procedure for AF spectral analysis, where the original ECG in AF is presented in Fig. 7.a. Next, the extracted atrial activity after QRST cancellation can be observed in Fig. 7.b. Finally, the power spectrum associated to that activity is shown in Fig. 7.c. In this example, the atrial activity signal was downsampled to 100Hz and processed with a Hamming window [38]. Next, a 1024-point FFT was applied and the PSD was displayed by computing the squared magnitude of each sample frequency. Remark that the frequency axis use to be traditionally expressed in Hz but, in some studies, clinicians prefer to express the fibrillatory frequencies in beats per minute (BPM). Furthermore, the right panel of Fig. 7 shows how AF power spectral analysis of the surface ECG is able to show the difference in the right and left atrial frequency. Hence, Fig. 7.d shows the right atrium invasive recording PSD, whereas Fig. 7.e plots the left atrium PSD. Finally, Fig. 7.f shows the PSD associated to the analysis of surface lead V1 from the same patient [1].

#### **3.2. Time-frequency analysis**

As demonstrated previously, power spectral analysis reflects the average signal behavior during the analyzed time interval, the robust location of the DAF being the main goal with clinical interest. However, this analysis may not be able to characterize temporal variations in the DAF. From an electrophysiological point of view, there are solid reasons to believe that the atrial fibrillatory waves have time-dependent properties, since they reflect complex patterns of electrical activation wavefronts. Therefore, it is advisable to employ time-frequency analysis in order to track variations in AF frequency when more detailed

10 Atrial Fibrillation

(a)

(d)

(e)

(f)

**Figure 7.** Example of AF power spectral analysis. (a) Surface ECG lead V1 from a patient in AF ready to be analyzed. (b) Atrial activity extracted from lead V1. (c) Atrial activity power spectral density. (d) and (e) Right and left atrium invasive recording PSDs of a different patient in which a notable frequency contrast between both atria was observed. (f) Surface lead V1 PSD of

power spectral analysis of AF, Figure 7 plots several situations related to this analysis. Firstly, the left panel shows the traditional procedure for AF spectral analysis, where the original ECG in AF is presented in Fig. 7.a. Next, the extracted atrial activity after QRST cancellation can be observed in Fig. 7.b. Finally, the power spectrum associated to that activity is shown in Fig. 7.c. In this example, the atrial activity signal was downsampled to 100Hz and processed with a Hamming window [38]. Next, a 1024-point FFT was applied and the PSD was displayed by computing the squared magnitude of each sample frequency. Remark that the frequency axis use to be traditionally expressed in Hz but, in some studies, clinicians prefer to express the fibrillatory frequencies in beats per minute (BPM). Furthermore, the right panel of Fig. 7 shows how AF power spectral analysis of the surface ECG is able to show the difference in the right and left atrial frequency. Hence, Fig. 7.d shows the right atrium invasive recording PSD, whereas Fig. 7.e plots the left atrium PSD. Finally, Fig. 7.f shows the PSD associated to the analysis of surface lead V1 from the same patient [1].

As demonstrated previously, power spectral analysis reflects the average signal behavior during the analyzed time interval, the robust location of the DAF being the main goal with clinical interest. However, this analysis may not be able to characterize temporal variations in the DAF. From an electrophysiological point of view, there are solid reasons to believe that the atrial fibrillatory waves have time-dependent properties, since they reflect complex patterns of electrical activation wavefronts. Therefore, it is advisable to employ time-frequency analysis in order to track variations in AF frequency when more detailed

the patient in (d) and (e) proving how power spectral analysis can be useful in the study of AF [7].

(b)

(c)

**3.2. Time-frequency analysis**

**Figure 8.** Spectrogram of a one minute atrial activity signal computed with a 128 point FFT using a 2.5 seconds window length. Surface leads V1 to V3 are shown for comparison [39].

information is needed [39]. The DAF is known to be influenced by autonomic modulation and its variations over time have been studied in terms of the effects of parasympathetic and sympathetic stimulation as well as with respect to circadian rhythm. It has been shown that AF frequency decreases during the night and increases in the morning [40].

The simplest way to apply time-frequency analysis to AF recordings consists of dividing the continuous-time atrial signal into short, consecutive and overlapping segments. Next, each of the segments will be subjected to spectral analysis. The resulting series of spectra reflects the time-varying nature of the signal [36, 39]. The most common approach to time-frequency analysis is the nonparametric, i.e., Fourier-based spectral analysis applied to each AF segment. This operation is known as the short-time Fourier transform (STFT) [41]. In this approach, the definition of the Fourier transform is modified so that a sliding time window defines each time segment to be analyzed. As a result, a two-dimensional function will be obtained in which the resolution in time and frequency will always have to be a trade-off compromise between both domains [37]. In the same way as with the periodogram, the spectrogram of a signal can be obtained by computing the squared magnitude of the STFT [41], thus making it possible to get a PSD representation of the signal in the time-frequency domain. An example on how an AF spectrogram looks like is shown in Figure 8, where three surface ECG leads are shown for comparison. As can be appreciated, the DAF trend presents great similarities but, also, some differences between leads. However, remark that the spectrogram frequency resolution cannot be better because of the time window length selected.

Because of the conflicting requirements between time and frequency resolution needed to be satisfied by the STFT, other techniques for time-frequency analysis have been proposed [42]. Basically, while the STFT depends linearly on the signal, these new techniques depend quadratically, thus providing much better resolution. One of the most successfully applied time-frequency distribution to AF recordings is the cross Wigner-Ville distribution (XWVD). Its selection was considered primarily because of its excellent noise performance for signals

167

(a)

(b)

(c)

0 20 40 60

Applications of Signal Analysis to Atrial Fibrillation

http://dx.doi.org/10.5772/54199

time (s)

0 20 40 60

time (s)

0 20 40 60

time (s)

0

0 5

0

5

10

15

frequency (Hz)

20

25

10

15

frequency (Hz)

20

25

5

10

15

frequency (Hz)

20

25

0 20 40 60

0 5 10 15 20 25

frequency (Hz)

0 5 10 15 20 25

frequency (Hz)

0 5 10 15 20 25

frequency (Hz)

**Figure 11.** Illustration of the spectral profile technique for three one-minute recordings of atrial fibrillation. The left panel shows the logarithmic time-frequency distribution of the atrial signals. The middle panel shows the spectral profile in solid thick line, the conventional magnitude power spectrum in solid thin line and the fitted spectral line model in dashed line. Finally, the DAF trend is shown in the right panel.(a) Spectral profile for a rather organized AF. (b) Similar to (a) but with notably larger DAF

able to describe variations in the DAF as well as in the fibrillatory waves morphology are extracted. Hence, each spectrum is modeled as a frequency-shifted and amplitude-scaled version of the spectral profile. The transformation to the frequency domain is performed by using a nonuniform discrete-time Fourier transform with a logarithmic frequency scale. This particular scale allows for two spectra to be matched by shifting, even though they have

The spectral profile is dynamically updated from previous spectra, which are matched to each new spectrum using weighted least squares estimation. The frequency shift needed to achieve optimal matching then yields a measure on instantaneous fibrillatory rate and

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35

magnitude (normalized)

magnitude (normalized)

variations. (c) A noisy case with a very high DAF together with a large trend variation [44].

different fundamental frequencies and related harmonics [44].

magnitude (normalized)

time (s)

0 20 40 60

time (s)

0 20 40 60

time (s)

0

0 5

0

5

10

15

frequency (Hz)

20

25

10

15

frequency (Hz)

20

25

5

10

15

frequency (Hz)

20

25

**Figure 9.** Cross Wigner-Ville distribution of the same atrial activity signal presented in Fig. 8. As shown, frequency resolution has been improved notably [39].

that are long compared to the window length [43], but also because it reflected precisely the variations in the DAF [39]. In order to illustrate how the XWVD is able to improve time-frequency analysis in AF, Figure 9 shows the same analyzed lead as in Fig. 8 but, this time, computed via the XWVD. As can be observed, frequency resolution has been improved notably, thus allowing to follow subtle changes in the DAF that would remain masked under STFT analysis [39].

**Figure 10.** Block diagram of the spectral profile method for time-frequency analysis of atrial signals. Each new time slice, the time-frequency distribution is aligned to the spectral profile in order to find estimates of the frequency and amplitude. The spectral profile is then parameterized and updated [44].
