chapter 4 wavelet transform-genetic algorithm...

16
102 CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM DENOISING TECHNIQUE 4.1 INTRODUCTION This chapter introduces an effective combination of genetic algorithm and wavelet transform scheme for the denoising of electrocardiogram (ECG) signals, corrupted by non-stationary noises, using genetic algorithm (GA) and wavelet transform (WT). The wavelet theory denoising has been widely exploited in the noisy ECG filtering. Several wavelet denoising ECG signal algorithms were developed, each exploring a particular parameter; the wavelet function, threshold calculus and level decomposition. Xiao-Ping Zhang et al (1998) proposed a new adaptive denoising method based on stein’s unbiased risk estimate (SURE) and on a new class of thresholding functions. Unlike the standard soft-thresholding function, these functions have continuous derivatives. The new thresholding functions do the similar manipulations as the standard soft thresholding function and they make it possible to search for optimal thresholds using gradient based adaptive algorithms. This method is very effective in adaptively finding the optimal solution in mean square error (MSE) than that of conventional wavelet shrinkage methods. An effective technique for the denoising of electrocardiogram signals corrupted by non stationary noises (Ercelebi 2004) is based on a

Upload: others

Post on 26-Mar-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

102

CHAPTER 4

WAVELET TRANSFORM-GENETIC ALGORITHM

DENOISING TECHNIQUE

4.1 INTRODUCTION

This chapter introduces an effective combination of genetic

algorithm and wavelet transform scheme for the denoising of

electrocardiogram (ECG) signals, corrupted by non-stationary noises, using

genetic algorithm (GA) and wavelet transform (WT). The wavelet theory

denoising has been widely exploited in the noisy ECG filtering. Several

wavelet denoising ECG signal algorithms were developed, each exploring a

particular parameter; the wavelet function, threshold calculus and level

decomposition.

Xiao-Ping Zhang et al (1998) proposed a new adaptive denoising

method based on stein’s unbiased risk estimate (SURE) and on a new class of

thresholding functions. Unlike the standard soft-thresholding function, these

functions have continuous derivatives. The new thresholding functions do the

similar manipulations as the standard soft thresholding function and they

make it possible to search for optimal thresholds using gradient based

adaptive algorithms. This method is very effective in adaptively finding the

optimal solution in mean square error (MSE) than that of conventional

wavelet shrinkage methods.

An effective technique for the denoising of electrocardiogram

signals corrupted by non stationary noises (Ercelebi 2004) is based on a

Page 2: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

103

second generation wavelet transform and level-dependent threshold estimator.

Here, the wavelet coefficients of ECG signals were obtained with lifting-

based wavelet filters. A lifting scheme is used to construct second-generation

wavelets and is an alternative and faster algorithm for a classical wavelet

transform. Numerical results comparing the performance of this method with that

of the nonlinear filtering techniques (median filter) demonstrate consistently

superior denoising performance of this method over median filtering.

Kania et al (2007) were investigated the application of wavelet

denoising in noise reduction of multichannel high resolution ECG signals. In

particular, the influences of the selection of wavelet function and the choice of

decomposition level on efficiency of denoising process were considered and

whole procedures of noise reduction were implemented in the Matlab

environment. The Fast Wavelet Transform was used. The advantage of used

denoising method is that the noise level decreasing in ECG signals, in which

noise reduction occurs by averaging and has limited application.

Manikandan and Dandapat (2007) proposed a novel Wavelet

Energy based diagnostic distortion (WEDD) measure to assess the

reconstructed signal quality for ECG compression algorithms. WEDD is

evaluated from the Wavelet coefficients of the original and the reconstructed

ECG signals. For each ECG segment, a Wavelet energy weight vector is

computed via five-level biorthogonal discrete wavelet transform (DWT).

WEDD provides a better prediction accuracy and exhibits a statistically better

monotonic relationship with the Mean Opinion Score(MOS) ratings than

wavelet based weighted percentage root mean square difference measure

(WWPRD), PRD and other objective measures.

Prasad et al (2008) proposed a shrinkage method based on a New

Thresholding filter for denoising of biological signals The efficacy of this

filter is evaluated by applying this filter for denoising of ECG signals

Page 3: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

104

contaminated with additive Gaussian noise. The performance of this filter is

compared with that of hard and soft thresholding filters using Mean Square

Error and Signal to Noise ratio (SNR). The New Thresholding filter is

significantly more efficient than Hard and Soft filters in denoising the signals.

It embodies the features of both Hard and Soft filters.

Alfaouri and Daqrouq (2008) proposed a new approach based on

the threshold value of ECG signal determination using Wavelet Transform

coefficients. Electrocardiography has had a profound influence on the practice

of medicine. The ECG signal allows for the analysis of anatomic and

physiologic aspects of the whole cardiac muscle. This method is compared

with Donoho's method for signal denoising where in better results are

obtained for ECG signals by this algorithm.

Sumithra and Thanuskodi (2009) proposed a new thresholding

algorithm called trimmed thresholding algorithm. However, the soft

thresholding is best in reducing noise but worst in preserving edges and hard

thresholding is best in preserving edges but worst in de-noising. Motivated by

finding a more general case that incorporates the soft and hard thresholding to

achieve a compromise between the two methods, the trimmed thresholding

method is proposed to enhance the speech from background noise.

Umamaheswara Reddy et al (2009) proposed a new thresholding

technique for denoising of ECG signal. This new de-noising method called as

improved thresholding de-noising method could be regarded as a

compromising between hard- and soft-thresholding de-noising methods. The

advantage of the improved thresholding de-noising method is that it retains

both the geometrical characteristics of the original ECG signal and variations

in the amplitudes of various ECG waveforms effectively.

Mahesh et al (2010) proposed a wavelet denoising algorithm. This

method implemented Haar and Daubechies wavelets are on speech signals

Page 4: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

105

and performance is evaluated. Haar wavelet is not suitable for speech

denoising application. As Haar is not smooth when compared to other

wavelets, it has limitations when applied to non stationary signal such as

speech. Higher order Daubechies can be used and are found to be suitable for

the work done. Also soft thresholding is better than hard thresholding.

Sayed and Ei-Dahshan (2010) proposed an effective hybrid scheme

for the denoising of electrocardiogram signals corrupted by non-stationary

noises using genetic algorithm (GA) and wavelet transform. Selection of a

suitable wavelet denoising parameter is critical for the success of ECG signal

filtration in wavelet domain. Therefore, in this noise elimination method, the

genetic algorithm has been used to select the optimal wavelet denoising

parameters which lead to maximize the filtration performance.

Efficient selection of wavelet denoising parameters, such as

wavelet function, threshold function (method), and threshold selection rules

are critical to the success of signal denoising. Usually, these parameters are

selected empirically; which leads to low noise elimination performance. So

the contribution of this work is to introduce an evolutionary optimization

method based on the Genetic Algorithm to search the wavelet denoising

parameters in order to obtain the optimal ECG signal filtration efficiency. The

efficiency performance of our scheme is evaluated using percentage root

mean square difference and signal to noise ratio.

4.2 APPLICATIONS OF WAVELET TRANSFORM IN ECG

SIGNAL

The wavelet transform is a powerful and promising method for time

and frequency signal analysis. A signal is decomposed into building blocks

that are well represented in time and frequency. In the search for significant

features of the ECG signal, it is filtered using wavelet filtering based on the

wavelet transform.

Page 5: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

106

While the set of decomposition functions of the Fourier transform

are the functions of sin(k 0t) and cos(k 0t) only, the set of decomposition

functions of the wavelet transform are wider and different sets of

decomposition functions are used. Virtually all wavelet systems have these

very general characteristics. Where the Fourier transform maps a one-

dimensional signal to a one-dimensional sequence of coefficients, the wavelet

transform maps it into two dimensional arrays of coefficients. This allows

localizing the signal in both time and frequency. The concept of the wavelet

transform is usually introduced by the resolution concept to define the effect

of changing scale.

The application of wavelet noise suppression requires the selection

of different parameters. The wavelet noise reduction performance of the ECG

signal is conditioned by three processing parameters named “wavelet

denoising parameters”, namely

Type of wavelet basis function ,

Thresholding function ,

Threshold selection rules ,

4.3 SELECTION OF THE WAVELET

This is the most interesting question for most of the users. The

wavelet has one or two parameters. Because wavelets have so many

constraints, that are not associated with the signal, but more with math and

calculation limitations, it is virtually impossible to blindly select a wavelet.

The most general-purpose usable wavelet is Daubechies. The Haar wavelet is

actually a differential operator. The Daubechies1 equals Haar.

Page 6: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

107

As mentioned, the wavelets have one primary parameter. This

parameter defines two things: region of support and the number of vanishing

moments. The region of support means, how long the wavelet is. This will

affect the localization capabilities. The longer the wavelet, the larger the part

of the time series that will be taken into account for calculating the amplitude

at any time position. And more averaging will occur, similar to that in DFT.

The number of vanishing moments is always the same as the region of

support level. The number of vanishing moments defines the order of the

polynomial that will be ignored if present in the time series.

The attention of researchers has gradually turned from frequency-

based analysis using Fourier transforms to scale-based analysis using wavelet

transforms when it started to become clear that an approach measuring

average fluctuations at different scales might prove less sensitive to noise.

Based on experimental results, any one kind of wavelet has to be chosen for

usage. The mother wavelet DB1 (Daubechies One) may be used because its

detail coefficients indicate sharp changes in a signal indicating transition state

(acceleration or deceleration) and implement it. To segment a signal

automatically using wavelets, an algorithm may be developed and

implemented. The different wavelet families make different trade-offs

between how compactly the basis functions are localized in space and how

smooth they are. Within each family of wavelets are wavelet subclasses

distinguished by the number of coefficients and by the level of iteration.

Wavelets are classified within a family most often by the number of vanishing

moments.

4.4 DIFFERENT FAMI LIES OF WAVELETS FUNCTION

Several families of wavelets have proven to be useful. Some

wavelet families are Meye (meyr), Mexican hat (mexh), Morlet (morl),

Page 7: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

108

Gaussian (gaus1-gaus8), Symlet (sym1-sym45), Coiflet (coif1-coif5),

Daubechies (db1-db45), and Biorthogonal (bior1.1-bior1.5 and bior2.2-

bior2.8 and bior3.1-bior3.9). In this proposed method the following four

wavelet transforms namely Harr, Daubechies (db1-db45), Symlet (sym1-

sym45) and Biorthogonal (bior1.1-bior1.5 and bior2.2-bior2.8 and bior3.1-

bior3.9) are chosen.

4.5 THRESHOLD SELECTION RULES

The choice of the thresholding functions and threshold values plays

an important role in the global performance of a wavelet processor for noise

reduction. Threshold selection Rules are based on the underlying model.

There are mainly four threshold selection rules.

1. Rigrsure

Threshold is selected using the principle of Stein’s Unbiased Risk

Estimate (quadrature loss function). One gets an estimate of the risk for a

particular threshold value t. Minimizing the risks in t gives a selection of the

threshold value.

2. Sqtwolog

Fixed form threshold yielding minimax performance multiplied by

a small factor proportional to log (length(s)). It is usually equal to sqrt (2* log

(length (s)))

3. Heursure

Threshold is selected using a mixture of first two methods. . As a

result, if the signal-to-noise ratio is very small, the SURE estimate is very

noisy. Hence, if such a situation is detected, the fixed form threshold is used.

Page 8: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

109

4. Minimaxi

This method uses a fixed threshold, chosen to yield minimax

performance for mean square error against an ideal procedure. The minimax

principle is used in statistics in order to design estimators. Since the de-noised

signal can be assimilated to the estimator of the unknown regression function,

the minimax estimator is the one that realizes the minimum of the maximum

mean square error obtained for the worst function in a given set.

4.6 GENETIC ALGORITHM APPROACH IN FITNESS

FUNCTION

GA works with a set of candidate solutions called a population.

Based on the principle of ‘survival of the fittest’, the GA obtains the optimal

solution after a series of iterative computations on its operators: the

reproduction, the crossover, and the mutation. The size of the population and

the probability rates for crossover and mutation are called the control

parameters of the genetic algorithm. GA generates successive populations of

alternate solutions that are represented by a chromosome, i.e. a solution to the

problem, until acceptable results are obtained based on the fitness function.

The fitness function has to provide some measures of the GA’s

performance in a particular environment and assess the quality of a solution in

the evaluation step. The objectives of denoising are to suppress effectively the

noise and restore the original ECG signal. A common goal of optimization in

ECG noise suppression is to minimize the mean square error between the

original ECG signal and the denoisy version of this ECG signal, and so the

MSE has been chosen as the fitness function. Given an original signal x (n),

consisting of N samples, and a reconstructed approximation to this signal

)(ˆ nx , the MSE is given by

Page 9: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

110

2

1

1ˆMSE ( ) ( )

N

n

x n x nN

(4.1)

4.7 ECG GA-WAVELET BASED DENOISING

Consider an ECG signal corrupted by standard white Gaussian

noise. The GA was used to search for the optimum wavelet denoising

parameters for ECG signal noise elimination problems. The proposed GA-

wavelet based denoising is shown in Figure 4.1 and can be explained in the

following steps.

Step 1. The inputs for the proposed technique are noisy ECG signal and

wavelet denoising parameters

Step 2. Set the proper wavelet thresholding denoising parameter ranges for

ECG signal and construct the objective functions, including the

mean square error.

Step 3. Optimize the wavelet denoising parameters using GA, by means of

selection, crossover and mutation a satisfied termination criteria is

reached (according to the noise suppression performance) and

select the optimal denoising parameters.

Step 4. Perform a 1-D discrete wavelet transform for the noisy ECG signal

to get all the wavelet coefficients.

Step 5. Threshold the noisy coefficients in ECG signal with the optimal

thresholds and get the modified new ECG components.

Step 6. Reconstruct the denoising ECG signal.

Page 10: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

111

Figure 4.1 The GA-wavelet denoising technique

Table 4.1 shows the denoising results of ECG signal obtained using

the GA-wavelet denoising technique for Input SNR: 0–45 dB. Here the

decomposition level is chosen as 3 for all the methods. Among the chosen

wavelet functions (Harr, Daubechies (db1-db45), Symlet (sym1-sym45) and

Biorthogonal (bior1.1-bior1.5 and bior2.2-bior2.8 and bior3.1-bior3.9)) and

the selection rules (Rigrsure, Sqtwolog, Heursure and Minimaxi), one which

provides the best performance in terms of SNR and PRD for the soft threshold

method and proposed method are tabulated. For instance, as seen the

Table 4.1, for input SNR of 10 dB, GA selects the wavelet function

Daubechies6 and Rigrsure for soft threshold method that gives the output

SNR of 23.23 dB and Biorthogonal 3.9 and Rigrsure for proposed method to

give output SNR of 16.75 dB.

Page 11: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

11

2

Table 4.1 The performance of denoising the ECG signals in terms of SNR and PRD

Output SNR (dB) Improvement SNR (dB) PRD % Wavelet Function Threshold Selection

Rule Input

SNR

(dB)Soft

Threshold

Method

Proposed

Method

Soft

Threshold

Method

Proposed

Method

Soft

Threshold

Method

Proposed

Method

Soft Threshold

Method

Proposed

Method

Soft

Threshold

Method

Proposed

Method

0 16.67 9.87 16.67 9.87 14.65 38.77 Harr Biorthogonal 3.9 Sqtwolog Minimaxi

5 20.82 11.8 15.82 6.8 9.09 32.22 Biorthogonal 3.9 Biorthogonal 3.9 Sqtwolog Rigrsure

10 23.23 16.75 13.23 6.75 6.89 20.04 Daubechies6 Biorthogonal 3.9 Rigrsure Rigrsure

15 28.18 25.2 13.18 10.2 3.89 10.24 Biorthogonal 3.9 Biorthogonal 3.9 Minimaxi Minimaxi

20 31.77 34.6 11.77 14.6 2.57 3.59 Biorthogonal 3.9 Biorthogonal 3.9 Rigrsure Heursure

25 37.01 42.2 12.01 17.2 1.40 1.74 Biorthogonal 3.9 Biorthogonal 3.9 Heursure Rigrsure

30 41.11 48.4 11.11 18.4 0.87 0.96 Biorthogonal 3.9 Biorthogonal 3.9 Rigrsure Rigrsure

35 45.41 55.2 10.41 20.2 0.53 0.49 Biorthogonal 3.9 Biorthogonal 3.9 Rigrsure Sqtwolog

40 49.52 61.5 9.52 21.5 0.33 0.27 Biorthogonal 3.9 Biorthogonal 3.9 Rigrsure Sqtwolog

45 53 67.1 8 22.1 0.22 0.16 Biorthogonal 3.9 Biorthogonal 3.9 Heursure Sqtwolog

Page 12: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

113

It is observed from the Table 4.1, improvement in SNR obtained increases for

the proposed method than that of soft threshold method as the input SNR

increases that is from the input SNR value of 20 dB in the Table 4.1.

4.8 RESULTS AND DISCUSSION

This section presents the simulation performed to verify the

effectiveness of the proposed method. The performance of the proposed

modified method on the basis of two performance measures; 1) Percent root

mean square difference and 2) Signal to noise ratio.

Case 1

A denoising technique for ECG signals is proposed based on

genetic algorithm and wavelet transform. The noise reduction of a signal

depends on the optimum value of the level of decomposition, the suitable

forms of wavelet family and the thresholding techniques. The original ECG

signal and the corrupted ECG with noise is shown in Figure 4.2. The noisy

signal is decomposed using DWT into wavelet coefficients. Thresholding

technique is applied and reconstructed using IDWT to obtain denoised signal.

Figure 4.3 and Figure 4.4 show the signal obtained using soft threshold and

proposed method (modified soft threshold method) respectively.

The percent root mean-square difference and the signal-to-noise

ratio SNR are used as measures of noise reduction performance. The PRD and

SNR (in dB) are calculated as follows by using the equations (2.49) and

(2.50) respectively,

N

n

N

n

nxnxnxPRD1 1

22)(/)(ˆ)(100 (2.49)

Page 13: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

114

N

n

N

n

nxnxnxSNR1 1

22

10 )(ˆ)(/)(log10 (2.50)

Case 2

This section represents the simulation of various parameters

performed to verify the effectiveness of the proposed method (modified soft

threshold) when compared with the soft threshold method. The improved

simulated result in signal to noise ratio (SNR) for proposed method is

represented in Figure 4.5. The output signal to noise ratio for proposed

method is initially low when compared with soft threshold method. When the

input SNR is above 20 dB, signal to noise ratio in the proposed method

increased when compared with the soft threshold method. Similarly the PRD

of proposed method initially increases and then decreases as input SNR

increases when compared with the soft threshold method as shown in

Figure 4.6. Finally the bar chart is plotted for signal to noise ratio for different

types of wavelet functions and threshold selection rules are plotted in

Figures 4.7 and 4.8.

Figure 4.2 (a) Original signal (b) The corrupted ECG with noise at input

SNR 20 dB

Page 14: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

115

Figure 4.3 The denoised ECG signal resulting from the soft threshold

technique ( = soft, = Rigrsure, = Biorthogonal 3.9)

Figure 4.4 The denoised ECG signal resulting from the modified soft

threshold (proposed method) technique ( = soft, = Heursure,

= Biorthogonal 3.9)

Figure 4.5 Comparision of signal to noise ratio for soft threshold and

proposed method (modified soft threshold method)

Page 15: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

116

Figure 4.6 Percent root mean square difference (PRD) for various methods

Figure 4.7 Signal to noise ratio for different types of wavelet function

Figure 4.8 Signal to noise ratio for different types of threshold selection

rule

Page 16: CHAPTER 4 WAVELET TRANSFORM-GENETIC ALGORITHM …shodhganga.inflibnet.ac.in/bitstream/10603/24839/9/09_chapter 4.pdf · second generation wavelet transform and level-dependent threshold

117

4.9 CONCLUSION

A denoising technique for ECG signals is proposed based on

genetic algorithm and wavelet transform. Selection of wavelet denoising

parameters is critical to the success of noise elimination process for the ECG

signal. For efficient selection of wavelet denoising parameters, besides

experience, GA is proposed to optimize the entire range set of wavelet

denoising parameters leading to an efficient ECG signal filtration. The noise

reduction of a signal depends on suitable forms of wavelet family and the

thresholding techniques. This varies for different kinds of input signals. In

spite of hard thresholding being the simplest method, soft thresholding can

produce better results than hard thresholding. This is because hard

thresholding may cause discontinuities in the signals. In this work, soft

thresholding is compared with a new thresholding algorithm called modified

soft thresholding in terms of SNR and PRD. Modified soft thresholding gives

better results than the soft thresholding. Taken into consideration that GA is a

powerful tool for parameters selection and optimization, therefore the

combination between the GA and wavelet transform makes this denoising

technique more powerful than the available systems.