Wavelet Time-frequency Analysis of Electro-encephalogram (EEG) Processing

This paper proposes time-frequency analysis of EEG spectrum and wavelet analysis in EEG de-noising. In this paper, the basic idea is to use the characteristics of multi-scale multi-resolution, using four different thresholds to wipe off interference and noise after decomposition of the EEG signals. By analyzing the results, understanding the effects of four different methods, it comes to a conclusion that the wavelet de-noising and soft threshold is a better conclusion.


INTRODUCTION
Electro-encephalogram (EEG) is the electrical activity of brain cell groups in the cerebral cortex or the scalp surface.The mechanism of EEG is a complex random signal within the brain activities, it is in the cerebral cortex of the synthesis of millions of nerve cells.Brain electrical activity is generated by electric volume conductor (the cortex, skull, meninges, and scalp).It reflects the electrical activity of brain tissue and brain function.Different state of mind and the cause of the cerebral cortex in different locations reflect the different EEG.Therefore, the electro-encephalogram contains plentiful physical, psychological and pathological information, analyzing and processing of EEG both in the clinical diagnosis of some brain diseases and treatments in cognitive science research field are very important.
EEG has the following characteristics [1][2][3][4][5] : ① EEG signal is very weak and has very strong background noise, the average EEG signal is only about 50gV, the biggest 100gV; ②EEG is a strong non-stationary random signal; ③nonlinear, biological tissue and application of the regulation function will definitely affect the eletro-physiological signal, which is nonlinear characteristics; ④EEG signal has frequency domain feathers.
As the EEG of the above characteristics, Fourier transformation and short time Fourier transformation analysis of EEG can not analyze it effectively.Therefore, this paper represents time-frequency analysis and wavelet transformation.The basic idea of wavelet transformation is similar to Fourier transformation, is using a series of basis function to form the projection in space to express signal.Classical Fourier transformation expanded the signal by triangulation of sine and cosine basis, expressed as arbitrary functions with different frequencies the linear superposition of harmonic functions, can describe the signal's frequency characteristics, but it didn't has any resolution in the time domain, can not be used for local analysis.It brought many disadvantages in theory and applications.To overcome this shortcoming, windowed Fourier transformation proposed.By introducing a time localized window function, it's improved the shortage of Fourier transformation, but the window size and shape are fixed, so it fails to make up for the defection of Fourier transformation.The wavelet transformation has good localization properties in time and frequency domain and has a flexible variable time-frequency window [6][7][8][9] .Compared to Fourier transformation and windowed Fourier transformation, it can extract information more effectively, using dilation and translation characteristics and multi-scale to analyze signal.It solved many problems, which the Fourier transformation can't solve [11,12] .Therefore, section II proposed time-frequency analysis of EEG spectrum and section III proposed EEG de-noising of the wavelet analysis method.The basic idea is to use the characteristics of multi-scale and multi-resolution, using four different thresholds to remove interference and noise decomposition of the EEG signals, final results show the de-noised signal.

II. TIME-FREQUENCY ANALYSIS
Time-frequency analysis is a nonlinear quadratic transformation.Time-frequency analysis is an important branch to process non-stationary signal, which is the use of time and frequency of joint function to represent the non-stationary signal and its analysis and processing.

A. Spectrogram
Spectrogram is defined as the short time Fourier transform modulus of the square, that is, . It is real, non-negative quadratic distribution, with the following properties: (1) time and frequency shift invariance; (2) frequency resolution as with the short time Fourier transform limited; (3) there is interference; Spectrogram can be more clearly seen the emergence of some short transient pulse in the EEG signal.

B. Time-frequency Analysis in Signal Processing
EEG is a brain electrical activity of non-invasive method.Fourier transformation and the linear model have been widely used to analyze the pattern of EEG characteristics and non-transient EEG activity, but only for stationary signals' spectrogram analysis.It is not appropriate to transient spontaneous EEG and evoked potential, which are non-stationary signal.Therefore, it's necessary to use time-frequency analysis.
EEG often has some short transient pulse, which contains some important pathological information, and some belong to interference.As the EEG is highly non-stationary, using time-frequency analysis toolbox tfrsp function to analyze the spectrum is a good way.

III. WAVELET TRANSFORM ATION
Wavelet transformation is a time-scale analysis method and has the capacity of representing local characteristics in the time and scale (frequency) domains.In the low frequency, it has a lower time resolution and high frequency resolution, the high frequency part has the high time resolution and lower frequency resolution, it is suitable for detection of the normal signal, which contains transient anomalies and shows their ingredients.

A. The Basic Principle of Wavelet Transformation
Telescopic translation system { b a, type of a,b(including the subscript a,b) are called scale parameters and positional parameters respectively.Wavelet transformation of any function f(t) is called the inner product of function f(t) and wavelet function.
Wavelet transformation is a time-frequency analysis and reflected the state of function f(t) in the scale(frequency) and position(time).If the check scale is t a 2  , z j  , that is a dyadic wavelet transformation.Usually Mallat tower algorithm proposed discrete dyadic wavelet transformation calculation, discrete signal sequence of function f(t) is f(n) n=1,2…n, and its discrete dyadic wavelet transform is as follows:

B. Multi-resolution of Wavelet Transformation
Multi-resolution analysis decomposes the processed signal to the approximation signal and detail signal at different resolutions with orthogonal transformation.Multi-resolution analysis can express the following formula: Mallat tower algorithm can represent the original signal with detail signal in a series of different resolutions.The basic idea: The energy limited signal H j f approximating in the resolutions 2 j can be further decomposed into approximation H j-1 f, which is under the resolution2 j-1 , and the details D j-1 f in the resolution 2 j-1 and 2 j , the decomposition process are shown in Figure1.

C. Wavelet De-noising
Signal de-noising actually inhibit the useless part and restore the useful part.According to Mallat signal decomposition algorithm, it can remove the corresponding high-frequency of noise and low-frequency approximation of the relevant part of signal and then reconstruct to form the filtered signal [14,15] .
There are many types of wavelet functions, the article is using Daubechies wavelet function, wavelet decomposition using db signal.Daubechies wavelet is a compactly supported wavelets, the majority does not have symmetry.
This paper uses four different de-noising methods, including wavelet de-noising, the default threshold de-noising, soft threshold and hard threshold.In engineering technology, if the received signal is X(t), which generally contains two components: one is a useful signal S(t), through analyzing and studying of the signal, we can understand the nature of object; the other is the noise N(t), which has intensity spectrum distributing in the frequency axis, it is hindered us to understand and master the S(t).
To illustrate the extent of the problem, expressed as the limited noise signal: The basic purpose of signal processing is making the maximum extent possibility to recover the effective signal from the contaminated signal X i (t), maximum suppression or elimination of noise N i (t).If S ~is expressed as signal, which is processed after de-noising, TH is threshold value, wavelet transformation of X,S are expressed as X i (t)and S i (t) respectively, so the Donoho nonlinear threshold described as follows: (1) after wavelet transformation, signal X i (t), obtained as X; (2) in the wavelet transformation domain, threshold is processed in wavelet coefficients.
It can be seen that different threshold values are set at all scales, then the wavelet transformation coefficients compared with the threshold values, if less than this threshold, we think that the noise generated and set to zero, if more than, to retain its value, thus achieving the purpose of de-noising.Clearly, the crucial point is how to choose threshold value between preserving signal details and selecting the de-noising capacity, to some extent, it is directly related to the quality of the signal de-noising.
Generally, Th is taken as: Th =σ , also in the resolution of the wavelet transformation coefficients, taking a percentage of maximum value or absolute value as threshold.

IV. EXPERIMENTAL RESULTS
This is a spectrogram analysis of EEG data.From the experimental results, it can be seen that there were many time-domain waveform pulse signal, but we cannot determine the frequency range, we also cannot rule out the interference caused by transient pulse.From the EEG signal spectrogram, it can be seen mainly in the 10 Hz or so, but still not make sure the exact range.Therefore, we calculated this spectrogram as shown in Figure4 and Figure5 to show transient pulses existing in the 0.9s to 1.1s and 1.4s to 2.0s.So we can better extract the pathological information from the transient pulse signal.
Following the results of wavelet de-noising analysis, four de-noising methods are used in this paper.Figure6 is original EEG waveform, in order to comparing with the filtered signals.
Wavelet de-noising is the most important aspect in signal processing.From Figure7, it can be seen that EEG signals largely restore the original shape, and obviously eliminates noise cause by interference.However, compared with original signal, the restored signal has some changes.This is mainly not appropriate to choose wavelet method and detail coefficients of wavelet threshold.After de-noising with the default threshold, the signal is smooth, but may lose some useful signal components.
After hard threshold de-noising, the restored signal is almost the same with the original signal, it is indicated that hard threshold is not a good method.
Soft threshold de-noising eliminates noise effectively and has very good retention of the useful signal components.V. CONCLUSION In this paper, time-frequency analysis toolbox function tfrsp is used in analysis spectrogram of EEG.As can be seen from the spectrum and spectrogram, analyzing spectrogram can be known the specific time period of useful transient information.Thus, it can be very easy to extract useful diagnostic information through the analysis of pathological in medicine.There are four de-noising methods, including wavelet de-noising, default threshold, hard threshold and soft threshold, wavelet de-noising is to choose wavelet function db5 and the level of decomposition 3. To ensure signal without distortion, it is better to choose wavelet de-noising and soft threshold de-noising.So, they are widely used in signal processing.

2 
) type of the above formulas:h(k) and g(k) is the wavelet function j ,the conjugate orthogonal b(t) set the filter coefficients g(k)=(-1)h(1-k)g(k), C and D are called the approximation signal at scale parts and detail parts.When the original signal can be seen as an approximation of scale J=0, that is c(n)=f(n).Discrete signal decomposition by the scale j=1,2,3,r…j, get D 1 ，D 2 ，D 3 ，…，D j ，C j .

Figure 1
Figure 1 signal of different frequency band decomposition map

Figure 2 Figure 7
Figure 2 EEG time-domain waveform

Figure 10
Figure 8 the default threshold de-noised signal