**Abstract**

Wavelet transform filters the signal without changing the pattern of the signal. The transformation techniques have been applied to the continuous time domain signals. The chapter is devoted to the study of the EEG (ElectroEncephaloGram) Signal processing using Haar wavelet transform and Maximal overlap discrete wavelet transform (MODWT) for the analyzing of Epilepsy. Haar transform returns the approximation coefficients and detail coefficients. Detail coefficients are generally referred to as the wavelet coefficients and are a highpass representation of the input. In this chapter, with the help of Haar transform, the detailed coefficients of the input signal have been analyzed for the detection of Epilepsy. Maximal overlap discrete wavelet transform filters the noise coefficients of the input signal in each and every level, and it has displayed the filtered output signal.

**Keywords:** EEG, Haar, MODWT, wavelet transform, epilepsy

#### **1. Introduction**

EEG Signal processing is essential for the diagnosis of brain disorders. The brain EEG signal that has been acquired from the EEG equipment consists of noise disturbances such as eye ball movement, muscle contractions etc., where the particular brain signal cannot be analyzed without any filtration techniques. Due to the presence of noise coefficients in the input signal, the transformation techniques have been applied to the input signal. Haar transform and maximal overlap discrete wavelet transform are the transformation techniques that supported for the filtration of the noisy coefficients from the input EEG signal.

The transformation techniques that have been applied to the brain signal filtered the noise coefficients without disturbing the peak values of the input signal. With the help of peak points, it is possible to represent the presence of Epileptic seizure. Epileptic seizure is the brain disorder and it can be analyzed based on the sudden increase of the sudden increase in the input signal. For the analyzation of actual input signal, the transformations such as Haar transform and Maximal

Overlap Discrete Wavelet Transform (MODWT) has not been disturbed the peak points of the actual brain signal and filtered the noise coefficients efficiently.

#### **2. Literature survey**

Ozaydin and Alak have explained speech enhancement using maximal overlap discrete wavelet transform where they demonstrated the application of the Maximal overlap discrete wavelet transform in speech signal processing [1]. The analyzation algorithm was performed using Matlab platform. Rahul Kher et al. have presented a paper on signal processing techniques for removing high frequency noise from ECG signals with matlab platform.

Kumar and Joshi describe MODWT Based Time Scale Decomposition Analysis of BSE and NSE Indexes Financial Time Series, Where they concluded that MODWT based time scale decomposition analysis gives better results than the Fourier transform based spectral analysis [2]. Hostalkova et al. have been analyzed the multi-dimensional biomedical image de-noising using Haar transform, where the results are represented in numerical and graphical forms using three-dimensional visualization tools [3]. Ali Hajjaji et al. have published a paper regarding the Combination of Haar Wavelet and Karhunen Loeve Transforms for Medical Images Watermarking, and developed a novel watermarking method to embed the patient's data into the corresponding image or set of images used for the diagnosis [4]. Sun and Meinl stated a new waveletbased denoising algorithm for high-frequency financial data mining [5]. Ghosh and Chaudhuri have been explained about the Fractal Investigation and Maximal Overlap Discrete Wavelet Transformation (MODWT) based Machine Learning Framework for Forecasting Exchange rates. Zitong Zhang et al. have analyzed different Wavelet Methods, Filters, and Lengths for Functional Brain Network Construction [6, 7].

#### **3. Related work**

#### **3.1 Haar wavelet transform**

In discrete form, Haar wavelets are related to a mathematical operation called the Haar transform. The Haar transform serves as a prototype for all other wavelet transforms. Haar wavelet is a sequence of rescaled square-shaped functions which together form a wavelet family or basis. The technical disadvantage of the Haar wavelet is that it is not continuous, and therefore not differentiable. The advantage of Haar transform advantage is it can be used for analyzation of signals with sudden transition and for localized feature of signals. The orthogonal property of the Haar function helps to analyze the frequency components of input signal. The Haar wavelet's mother wavelet function can be represented as,

$$\psi'(t) = \begin{cases} \mathbf{1} & \mathbf{o} \le t \le \mathbf{1}/2 \\\ -\mathbf{1} & \mathbf{1}/2 \le t \le \mathbf{1} \\\ \mathbf{o} & \text{otherwise} \end{cases} \tag{1}$$

The 2 × 2 Haar matrix that is associated with the Haar wavelet is,

$$H\_{\mathbf{z}} = \begin{bmatrix} \mathbf{1} & \mathbf{1} \\\\ \mathbf{1} - \mathbf{1} \end{bmatrix}$$

*EEG Signal Denoising Using Haar Transform and Maximal Overlap Discrete Wavelet… DOI: http://dx.doi.org/10.5772/intechopen.93180*

It requires only additions and there are many elements with zero value in the Haar matrix, so the computation time is short. Input and output length are the same. However, the length should be a power of 2, i.e. N= *<sup>K</sup>* 2, . *K N*∈ It can be used to analyze the localized feature of signals. Due to the orthogonal property of the Haar function, the frequency components of input signal can be analyzed. The equation of the Haar transform is *<sup>T</sup> B HAH n nn n* = , where *An* is a *n* × *n* matrix and *Hn* is n-point Haar transform. Haar matrix consists of only real elements and it can be defined as non-symmetric matrix.

#### **3.2 Maximal overlap discrete wavelet transform (MODWT)**

The MODWT is a linear filtering operation that transforms into coefficients related to variations over a set of scales. It is used to inspect the scale-dependent signal behaviors. The MODWT is a time shift-invariant method, where a translation in the signal results in a translation of wavelet coefficients by the same amount. The MODWT is different and has several advantages when compared to DWT and it improves the alignment of the decomposed wavelet and scaling coefficients at each level with the original time series. This is the transform that aligns the wavelet coefficients at each time interval with the original signal. So, it is easy to analyze the localized signal variation with respect to scale and time. MODWT can be used to obtain scale based additive decomposition and a scale based energy decomposition.

The function f(x) is a linear combination of scaling function and wavelet function where *j* 0 is the number of levels of the decomposition. The output is the combination of detailed and scaling coefficients. The detailed coefficients are produced by the transform at each level but the scaling coefficients are produced at the final level

$$\mathbf{f}(\mathbf{x}) = \sum\_{K=\mathbf{o}}^{N-1} \mathbf{C}\_{k} \mathbf{2}^{-\frac{j\_{\mathrm{o}}}{\frac{\pi}{2}}} \mathbf{o}\left(\mathbf{2}^{-j\_{\mathrm{o}}} \,\middle|\,\mathbf{x} - k\right) + \sum\_{j=1}^{j\_{\mathrm{o}}} f\_{j}\left(\mathbf{x}\right) \tag{2}$$

$$f\_{/}\left(\mathbf{x}\right) = \sum\_{k=0}^{N-1} d\_{j,k} \mathbf{z}^{\frac{-j}{2}} \,\mu\left(\mathbf{z}^{-j} \,\mathbf{x} - k\right) \tag{3}$$

MODWT returns the N-many coefficients { *<sup>k</sup> c* } and ( *j N* <sup>0</sup> ∗ ) many detailed coefficients { *dj k*, } of the expansion. The MODWT partitions the energy across the scaling coefficients and various scales.

$$\left\|\mathbf{x}\right\|^{\mathbf{z}} = \sum\_{j=\mathbf{1}}^{j} \left\|\left|w\_{j}\right\|\right\| \left\|\mathbf{\hat{z}} + \left\|\left|v\_{j\_{\circ}}\right\|\right\| \mathbf{\hat{z}}\right\|\tag{4}$$

Where x is the input data, *wj* are the detail coefficients at scale j and *<sup>j</sup> v* <sup>0</sup> are the final level scaling coefficients.

#### **4. Results and discussions**

#### **4.1 Haar wavelet transform**

**Figure 1** represents Haar approximation of EEG signal where the noise present in the signal has been removed by the Haar transformation effectively without changing the peak values of the original signal.

Haar transform has been filtered the detailed coefficients of the original signal where the detailed coefficients are shown in **Figure 2**.

Maximal overlap discrete overlap transform filters the input signal based on the number of levels where in each and every level the transform able to remove the noise coefficients present in the signal. **Figure 3** represents the output of Maximal overlap discrete wavelet transform. **Table 1** explains about the parameters of the signal like mean, standard deviation and variance and **Table 2** represents the parameters of the signal using daubechies external phase wavelet.
