Elementary Time Frequency Analysis of EEG Signal Processing

EEG analysis is used as a tool for medical diagnosis of various diseases related to brain like epilepsy, dementia, brain disorders like stress etc. To identify such neural disorders it is essential to process these signal because of the non-stationary behavior. The time frequency analysis of EEG signals provide the correct visualization of EEG signals to extract the various rhythms of frequencies like alpha, beta, gamma waves. The Wavelet transform is used to carry out the time frequency analysis of EEG signal. Wavelets are used to analyze the EEG signals correctly. Their applications include seizure analysis, modeling of neuron potentials etc. To perform these applications it is necessary to perform the mathematical operations on EEG signal by windowing, filtering and then finally reconstruction.


Introduction
EEG is a tool used to study the brain activities.The need to develop the EEG as a tool is used for detecting the various brain disorders like stress, epilepsy, dementia etc. EEGs are use to identify the neural activities of the brain.These neural activities are diagnosed by multiple-electrode EEG machines which are placed according to the standard montages.The EEG signals are time domain signals but these signals provide other information related to brain in frequency domain with imaging tools to visualize topographies.The time frequency analysis of EEG signal is performed using Wavelet transforms to visualize the signals correctly.Modeling and localization of EEG signals is important to obtain the correct information about these signals after capturing through EEG electrodes.The exact monitoring of patients is required for real time applications provided by EEG sequences.The major information is extracted by the sleeping brain and therefore sleep EEG is carried out.[10].
EEGs are basically non-stationary signals.The analysis of stationary signals is easy and can be easily represented in time or frequency domain.The frequency domain analysis is performed out using discrete Fourier Transform (DFT), discrete cosine transform (DCT) etc.But these tools for analysis has an disadvantage that spectrum of the signals is degraded due to short term windowing analysis and fixed transforms.Parametric estimation methods of EEG signals like Auto-regression (AR) models have an advantage over DCT of correct representation of frequency domain analysis but has disadvantage of improper estimation of model parameters since the measured signal is of very limited length.EEG signals are statistically non-stationary signals.
Because there are many abnormal events occurring while capturing EEG signals.[1] EEG signals are statistically non-stationary signals.
Because there are many abnormal events occurring while capturing EEG signals the analysis of EEG signals become important.During this analysis frequency domain parameters are incorporated over the specified interval and do not calculate the individuality of the signal correctly.Therefore, time frequency analysis is needed.In short, to analyze the EEG and extract the correct frequency components and rhythms time frequency analysis is worked out.
The paper is divided as follows: Section -II depicts the basic EEG and placement of electrodes as per the

EAI Endorsed Transactions
on Pervasive Health and Technology international standard.Section -III examines the Wavelet transform and need for time frequency analysis of EEG signals.Section -IV describes the results obtained and Section -V represents the conclusion.

EEG Recording
EEG analysis and recording procedure for patients is shown below in figure 1. EEG is done on 24 channel RMS EEG machine with 10-20 electrode system.The figure 2 shows the placement of electrode.24-recording electrodes including ground and system reference for EEG recording for patients are used; these electrodes were located according to 10-20 electrode system as follows: Fp1, Fp2, F7, F3, Fz, F4, F8, A1, T3, C3, Cz, C4, T4, A2, T5, P3, Pz, P4, T6, O1, and O2.The 10-20 electrode placement system and its three dimensional top view and side view is shown in figure .3.

EEG Rhythms
To treat with EEG signals and to extract the correct and useful information from the EEG diagnosis, the rhythmic activities of EEG is to be considered.Clinical EEG wave forms amplitude that is typically between 10 and 100 v and at a frequency range of 1Hz to 100Hz.EEG is classified into the following five rhythms according to their frequency bands.
(1) Alpha ( ) wave: this regular wave is present in healthy adults while they are conscious comfortable, and eyes closed.It arises at a frequency range of 8Hz to 13Hz with a normal voltage range of around 20 v to 200 v. waveform is mostly pragmatic in the posterior region of the head.
(2) Beta ( ) wave: the frequency of waves ranges from 13Hz to 30Hz, and voltage range is 5 v to 10 v. waves appear with additional excitation of the central nervous system, boost with awareness and alertness.
waves are observed in the parietal and frontal region of the scalp.
(3) Theta ( ) wave: the frequency range of wave is 4Hz to 7Hz.This waveform is important during sleep, stimulation in older children and adults, exciting stress, and idling.wave is recorded across the temporal and parietal region of the scalp with an amplitude range of 5 v to 10 v.This wave has been linked to activities such as focusing, awareness, psychological effort, and stimulation processing.[2].
(4) Delta ( ) wave: the lowest frequency of wave is less than 3.5Hz, and its voltage ranges from 20 v to 200 v.
wave occurs during deep snooze, in newborn, and with serious organic brain diseases.This waveform can be recorded frontally in adults and posteriorly in children.
(5) Gamma( )wave: the frequency of wave ranges from 30Hz to 100Hz.This waveform is recorded in the somatosensory cortex in the case of cross model sensory processing, during short-term memory to distinguish matter, sounds, perceptible impression, and in pathological case because of cognitive decline.[2].
The recorded EEG needs successive stages of processing the signal to extract important indications from the EEG signal of stress patients, and these indications reflect brain medical

Time-Frequency Analysis of EEG signals
As stated, EEG signals are non-stationary.To extract the correct information from these signals it is necessary to perform the analysis.To perform the analysis EEG is considered as stationary signals for very short durations/intervals.EEG signal allocation is considered as Gaussian curve which calculates the mean and covariance for each segmented waveform.EEG signals are seen during the sleep, wakefulness, during eye blinking i.e.where the alpha rhythms are strong.There is a change in distribution of the signal and this can be measured by the Gaussian process.The non-Gaussian parameters can be estimated by skewness, kurtosis, negentropy and Kulback-Laiber (KL) distance.[1].
Skewness is a evaluation of equilibrium of the distribution and is defined as follows for real signals (1) Where µ and σ are mean and standard deviation respectively Kurtosis is measure to detect whether the data is sharp or even relative to the normal distribution.The kurtosis is defined for normal distribution as: The negentropy is defined as : Where ' )*+,, is a Gaussian random signal with covariance as x(n) and H(.) is differential entropy defined as: (4) Where .' is the signal distribution and negentropy is always non-negative.
The KL distance between two distributions p1 and p2 is defined as: While segmentation of EEG signals, the time frequency characteristics of the signals can be oppressed.This causes the variation measurements between the adjoining EEG frames.This is calculated based on autocorrelations for segment of length N defined as: [1] ; , = > 1 @ A ' / B = B ' / B = , 0, @ " 1 The windowing sequence using Hanning window is obtained for EEG segmented signal and auto-regressive based modeling of the signals is performed.The prediction error of the AR model [1] is defined as: Where p is the forecast order and L M = , k=1,2…p are the prediction coefficients.The main aim is to minimize the error between two samples/segments and windows of the EEG signal.
The segmented central spikes of the EEG signal is shown below in figure 4. The segmented EEG shows the frontal electrodes data, frontal and central and posterior and occipital montage.
The short time Fourier transform (STFT) over a sliding window [1] is performed as follows: Where n refers to the position of the window.The spectrogram is defined as: The windowing function is chosen properly for the estimation of power spectrum.For correct time resolution Hanning window of various durations of 1 and 2 msec duration is obtained.[1].

Wavelet Transform
The important parts and coefficients can be better focused the signal components of EEG in time-frequency gap.This is required to develop the need between time and frequency components.Therefore, the main aim of wavelet transform by Morlet window is to have clarity time relative to the sampling period of EEG.The continuous wavelet transforms are analyzed for this purpose.The Morlet continuous wavelet transforms is given as:

Z
is the analyzing vector, a(>0) is the scale parameter and b is the position parameter.This version is linear and is invariant under translational and dilations.Morlet's wavelet is a complex waveform defined as The above wavelet is divided into real and imaginary parts of sine and cos function; where b0 is constant.

Wavelet Transform using Fourier Transform
Consider the scalar product d c {Y Z " for continuous wavelets.If Z is band limited to half of the sampling frequency, the data can be properly sampled.The data at the decision j=1 is as follows: And d 2 can be computed from d c with discrete time filter with the frequency response H(ώ).
Therefore the coefficients at the next scale can be calculated as follows: The cut-off frequency is reduced by twice at each level [1], thereby allowing to reduce the number of samples.The Wavelet coefficients at the scale j+1 are And can be computed from Cj as follows: Where G is the discrete time filter:

Implementation
The following flowchart shows the implementation of time frequency analysis using Wavelet Transform for EEG signals.
The EEG signal is recorded as shown in figure 1  The reconstruction algorithm works as follows at low resolution: [1] [2] i.
Compute the fast Fourier transform of the signal ii.Set 'j' i.e. data resolution and Compute the FFT of the wavelet coefficients at scale 'j'(Equations ( 14) and ( 15) iii.Obtain the product of wavelet coefficients Wj by G. (G=filter) iv.Calculate the Inverse Fourier transform considering Wj and G v. Then perform j=j-1 and proceed for step3.

Results
The continuous wavelet transforms (CWT) is used to analyze how the frequency content of a signal changes over time.(CWT) is used to analyze signals jointly in time and frequency.
The figure 6 shows the wavelet transform and inverse Wavelet transform of the EEG obtained from patient Figure 7 shows the wavelet transform using Morlet window and its histogram analysis which provide the statistical data of mean, standars deviation, median etc for all sampled values of EEG signals.The EEG signal of 1200 msec duration is analyzed.This signal is sampled and windowed for each 200 msec duration.And then its continuous wavelet transform is calculated.The original signal for each sample is reconstructed using the stated algorithm.This provides the time frequency analysis and wavelet coefficients.certain requirements which are used for specific applications like seizure analysis, stress management etc.These are the future scope of the work wherein the EEG signal processing will be carried out.The time frequency analysis provides the statistical data of EEG signals which will be beneficial to classify the EEG signal.

Figure 5 .Figure 6 .Figure 7 . 5 Elementary
Figure 5. Flowchart of Implementation Elementary Time Frequency Analysis of EEG Signal Processing changes.The main stages of EEG signal processing are denoising, feature extraction, and classification.
2 EAI Endorsed Transactions on Pervasive Health and Technology 02 2018 -07 2018 | Volume 4 | Issue 14 | e4 [1] 2. The EEGs obtained contain lots of artifacts.Also EEGs are sonstationary signals.Therefore, to extract correct information from these EEGs signals and to carry out time frequency analysis windowing of the signals is carried out.For this Hanning window is used.Also Haar transforms are used to calculate the statistical analysis.Time frequency analysis is carried out using wavelet transforms using Morlet window.This is done for spectrogram calculations.Then wavelet transforms are analyzed using Fourier transforms.And lastly original EEG is reconstructed.This is done for all samples of EEG.[1].