2.2 Wavelet Transform
2.2.3 Wavelet Filter Banks for ECG Signal Decomposition
In this subsection, we briefly describe signal decomposition and reconstruction techniques. A more detailed description of these can be found in wavelet references [184–187]. The dyadic wavelet transform is im-
Aj+1
Down-sampling LPD Filter
HPD Filter
Aj+1
Up-sampling Coefficients of HF Components
Coefficients of LF Components
LF Comp.
HF Comp.
Approximation Coefficients
Detail Coefficients
HPR Filter
LPR Filter Dj+1
Aj
g
h
2
2
Dj+1
Aj
2
h'2
g'(a) (b)
Figure 2.1: Subband filtering scheme for single level decomposition. (a) Analysis (Decomposition) struc- ture: low-pass decomposition (LPD) and high-pass decomposition (HPD) filters. (b) Synthesis (Recon- struction) structure: low-pass reconstruction (LPR) and high-pass reconstruction (HPR) filters.
plemented using a multiresolution pyramidal decomposition technique. An attractive feature of the wavelet series expansion is that the underlying multiresolution structure leads to an efficient discrete-time algorithm based on a filter bank implementation. In particular, using the scaling functionφ(t)and the wavelet function ψ(t), one can define the Aj(k)and Dj(k)coefficients as Aj(k) =hx(t),φj,k(t)i,Dj(k) =hx(t),ψj,k(t)iand Aj(k) =Aj+1(k)+Dj+1(k). The jthscale coefficients (Aj) are filtered by two finite impulse responses of low- pass and high-pass digital filters with coefficientshandg, respectively. After this operation, down-sampling gives the next coarser, j+1 scaling coefficients (Aj+1) and wavelet coefficients (Dj+1). This process is il- lustrated in Fig. 2.1(a), where↓2 denotes a down-sampling operation by a factor of 2. In Fig. 2.1(b), the synthesis or reconstruction process is shown. The filters used in the synthesis or reconstruction structure are low-pass (h0) and high-pass (g0) synthesis filters. From the MRA technique, the decomposed signals at scale 1 are A1(k)and D1(k), where A1(k) is the smoothed or approximated version of the original signal A0(k)and D1(k)is the detailed representation of the original signal A0(k)in the form of wavelet transform coefficients. They are defined as A1(k) =∑∞n=−∞h(n−2k)A0(n)and D1(k) =∑∞n=−∞g(n−2k)A0(n)where handgare the associated filter coefficients that decompose A0(k)into A1(k)and D1(k), respectively. The next higher scale decomposition is based on the signal A1(k). The decomposed signal at scale 2 is given by A2(k) =∑∞n=−∞h(n−2k)A1(n)and D2(k) =∑∞n=−∞g(n−2k)A1(n). Higher scale decompositions are performed in the same way as described above. The implementation of the multiresolution signal decom- position technique is shown in Fig 2.2. After the signal A0(k)is filtered by hand g, it is decimated by a factor of two. The resulting signal fromhis A1(k), a smoothed version of the original signal A0(k)because
Original Signal
A1(k)
A2(k) First level decomposition
Down-sampling LPD Filter
HPD Filter
Second level decomposition D1(k)
Ao(k) D2(k)
g
h
g
h
2
2
2 2
Figure 2.2: Signal decomposition structure. Decomposition of A0(k)into 2 scales. h=low-pass decomposi- tion filter; g = high-pass decomposition filter; A1(k)and A2(k)are the approximate coefficients of the signal A0(k)at level 1 and 2, respectively. D1(k)and D2(k)are the detail coefficients at level 1 and 2, respectively.
the filterhhas a low pass frequency response. The filtered signal D1(k)is a detailed version of A0(k)and contains higher frequency components, i.e., sharp edges, transitions, and noises. In other words, signal D1(k)contains the details that have been removed from signal A1(k). Signal D1(k)is called the wavelet transform coefficient at scale one. The time resolutions of A1(k)and D1(k)are now half that of A0(k)due to the decimation by a factor of two. As a result, if x(n) has N sample points for the entire observation time, then signals A1(k)and D1(k)will have N/2 sample points for the same observation period. At each decomposition level, the length of the decomposed signals is half of the length of the signal in the previous stage.
The efficiency of wavelet analysis stems from its fast pyramid algorithm. The algorithm has two struc- tures. The forward algorithm (decomposition structure) is used to compute the discrete wavelet transform (DWT). The backward algorithm (reconstruction structure) is used to compute the inverse DWT (IDWT).
The decomposition and reconstruction structures are illustrated schematically in Fig. 2.2 and 2.3, respec- tively. The forward algorithm uses linear filters, low- and high-pass to decompose the signal into low- and high-frequency components, and also combines these filters with down-sampling operations (which accounts for the algorithms speed). The backward algorithm simply inverts the process, by combining an upsampling process with linear filtering operations. The original ECG signal passes through two com- plementary filters and emerges as two signals (low-pass and high-pass components). The decomposition
Original Signal
A1(k)
Up-sampling D2(k)
A2(k)
First level reconstruction Second level reconstruction
LPR Filter HPR Filter
D1(k)
Ao(k)
2
h'2
g'2
h'2
g'Figure 2.3: Signal reconstruction structure. h’=low-pass reconstruction (LPR) filter; g’ = high-pass recon- struction (HPR) filter; A1(k)and A2(k)are the approximate coefficients at level 1 and 2, respectively. D1(k) and D2(k)are the detail coefficients at level 1 and 2, respectively. A0(k) is the original or approximated signal.
process can be iterated with successive low frequency components being decomposed in turn, so that one signal is broken down into many lower-resolution components as shown in Fig. 2.4. In reference to Figs.
2.2 and 2.3, the decomposition and reconstruction processes are described as follows. For each decompo- sition level, the LF and HF signal coefficients are obtained using the decomposistion filters {h}and {g}. This process is repeated depending upon the number of decomposition levels desired. Fig. 2.4 illustrates the analysis part of a five-level decomposition scheme using subband coding.
Reconstructing the HF (or LF) component at level 5 from the detail (or approximation) coefficient vector is performed by upsampling the coefficient vector at level 5 and convolving the result with the high-pass (or low-pass) reconstruction HPR (or LPR) filter. The synthesis structure for a five-level decomposition is shown in Fig. 2.5. The reconstruction structure can be represented by the synthesis filter bank as a cascade of filters that can be used to extract signal synthesized at different levels of resolution. Successive details {Dj(n);j=1,2,3,4,5}and approximations{Aj(n);j=1,2,3,4,5}of the original signal are shown in Fig.
2.5. The multiresolution signal decomposition (MSD) technique decomposes a given signal into its detailed and smoothed versions. The BW 9/7-tap wavelet filters are used to calculate the detail signals. The high- frequency information of the signal is contained in D1(n)and lower components are observed in D5(n). The effects of high-frequency noise are produced at small scales as shown in Fig. 2.5. The effects of baseline
Level1
Level1
Level3
Level4
Level 5
Original signal
(Detail coefficients)
0 0
1
2
2
0 0 1
2
1 2
2
2 3
3
1
2
3
( A , ) ( , )
( , ) ( A , )
1
( , ) ( A , )
2
( A , ) 3
1: A D
2: A D
3: A D
4: A
d
d
d
Conv g downsample y
d
downsample y Conv g
d
downsample y Conv g
d
Conv g downsa
d
Level y
Level y
Level y
Level y
o o
o o
o o
o
34
2 4 2
4 5
4
( , )
( , )
( A , ) 4
D
5: A D
d
d
mple y
downsample y Conv g
Level y
d o
o o
(Approximation coefficients)0
1
2
2
0 1
2
1 2
2
2 3
3
0
1
2
3
(A , ) ( , )
0
( , ) (A , )
1
( , ) (A , )
2
(A , ) 3
1: A A
2: A A
3: A A
4: A
a
a
a
Conv h downsample y
a
downsample y Conv h
a
downsample y Conv h
a
Conv h downsa
a
Level y
Level y
Level y
Level y
o o
o o
o o
o
34
2 4 2
4 5
4
( , )
( , ) (A , )
4
A
5: A A
a
a
mple y
downsample y Conv h
Level y
a o
o o
A
1A
2A
3A
4A
5D
5D
4D
3D
2D
15 5 4 3 2 1
W C =[ A D D D D D ]
A
0High-frequency signal decomposition Low-frequency signal decomposition
Figure 2.4: Five-level wavelet decomposition of simulated ECG signal. WC is the wavelet coefficients vector. Approximation coefficients: A5,A4,A3,A2and A1. Detail coefficients: D5,D4,D3,D2and D1.
drift are mainly at large scales as shown in A5(n)of Fig. 2.5. A5(n)contained low-frequency information such as baseline drift, P/T waves of the original signal. As the level of detail information Dj(n)is added to the reconstruction, the approximation resembles the original signal. Therefore, the WT is a suitable tool to analyze the ECG signal which is characterized by the patterns (QRS complexes, ST segment, P, T and U waves) with different frequency content. The progressive quality/resolution of the reconstruction is observed from the approximation signals shown in 2.5. The reconstruction of these approximation and detail
−2 0 2
−2
−1 0 1
−0.5 0 0.51
−0.5 0 0.5
−0.2 0 0.2
−0.1 0 0.1
−0.5 0 0.5
−2 0 2
−2 0 2
A5(n) D5(n)
D4(n) D3(n) D2(n) D1(n)
x4(n) x3(n) x2(n) x1(n) x0(n)=x(n) x(n)
A4(n) A3(n) A2(n) A1(n) A0(n)
−
+
+ + +
+
e(n)
Figure 2.5: The synthesis (reconstruction) structure for a five-level decomposition of the test ECG signal.
signals are obtained using the wavelet coefficients{A5, D5, D4, D3, D2}. Half of the wavelet coefficients are discarded. Therefore, by using the wavelet transform it is possible to achieve a good compression of a signal. This is done by performing the wavelet analysis on the ECG signal and disregarding non-significant coefficients. Experiment shows that the low-frequency shapes in the signal is the most important for perfect reconstruction. Some of the major observations on the ECG signal and the MSD of the ECG signal are given below for the point of signal compression:
(i) In general, ECG is a nonstationary signal whose waves and segments have time varying character- istics. These waves and segments may be localized in time domain. The PQRST morphology may change subject to physiological variations due to the patient and to corruption due to noise sources.
Two types of the ECG signals can be seen that are regular PQRST morphology ECG signal and irreg- ular ECG signal such as ventricular fibrillation (VF) and ventricular tachycardia (VT). We can know the degree of importance of the local waves, segments and noises affecting the ECG signal using the efficient MSD technique.
(ii) The high-frequency components of the local waves and different QRS complex morphologies are
reflected in the higher subbands which have larger dimensions and these components are localized in the higher subbands. The coefficients due to spikes of the PQRST morphology are essential for perfect reconstruction and hence these coefficients are referred as significant coefficients and the errors due to these coefficients are referred as significant errors.
(iii) The low-frequency components of the waves such as P, T and U, and ST segments are observed in lower subbands. Since the durations of these local waves are larger as compared to the durations of the spikes/notches appeared in the PQRST complexes, wavelet coefficients look to be distributed within the smaller subband dimensions.
(iv) The power line and muscular noises, baseline wandering and motion artifacts affecting the ECG signal also appear at different frequency bands, thus having different contribution at the various subbands.
The high frequency noises can be seen in the higher subbands that do not exist in lower subbands.
This phenomenon is shown in Fig. 2.5. The low-frequency baseline artifact is reflected in the lower subbands that can be seen in A5(n)of the figure. The coefficients due to noise are referred as insignif- icant coefficients and their errors are referred as insignificant errors.
(v) Amplitude distribution of the significant and insignificant coefficients over the scales depends on the type of the wavelet filters used for the MSD technique and the signal contents. The selection of the mother wavelet determines the amplitude distribution and the signal representation. Set of statistical features can be used to detect and characterize the signal contents in time and frequency planes.
(vi) The visual quality of the reconstruction x2(n)shown in Fig. 2.5 without contribution of the details D2(n)and D1(n), provides a better data reduction, is upgraded as compared to original signal. How- ever, diagnostic accuracy may be degraded if the coefficients of the higher subbands are set to zero.
(vii) The low-frequency shape components are decorrelated at the lower subbands. The decomposition process results in small coefficients in the lower subbands which are essential for the preservation of the shapes of the small local waves.
(viii) Larger subband dimension contains a few significant coefficients and smaller subband dimension contain a few insignificant coefficients. These properties can be exploited so as to achieve a high compression gain with the preservation of all clinical information.
The DWT provides a representation of the signal on wavelet coefficients partly localized in time and frequency and is not redundant. Processing of the wavelet coefficients may allow their representation on a smaller number of bits than needed for representing the original signal. Therefore, a major role of any compression approach is to retain significant coefficients available across the subbands and to code the retained coefficients with less error so that all the clinical features are faithfully preserved. Many approaches
reported in the literature retain the significant coefficients according to a criterion specific for the application.
In the following section, we discuss the coding schemes reported for wavelet coefficients of the ECG signal.