## EEG Analysis

#### Introduction

The electroencephalogram (EEG) recording is a useful tool for studying the functional states of the brain and for diagnosing certain neurophysiological states and disorders. In quantitative EEG analysis the properties of measured EEG are quantified by applying power spectral density (PSD) estimation for selected representative EEG samples. The sample for which the PSD is calculated is assumed to be at least nealry stationary. If EEG is nonstationary, which is usually the case in real recordings, it should be modelled as an output of time-varying system.

#### Quantitative EEG Analysis

In quantitative EEG analysis the spectral contents of measured EEG can be quantified by various parameters obtained from the power spectral density (PSD) estimate. Typically several representative samples of EEG are selected and an average spectrum is calculated for these samples. Traditionally EEG is divided into four bands: δ (0 - 3.5 Hz), θ (3.5 - 7 Hz), α (7 - 13 Hz) and β (13 - 30 Hz). PSD estimates can be calculated by either nonparametric (e.g. methods based on FFT) or parametric (methods based on autoregressive time series modelling) methods.

#### Time-varying EEG Analysis

In the analysis of nonstationary EEG the interest is often to estimate the time-varying spectral properties of the signal. A traditional approach for this is the spectrogram method, which is based on Fourier transformation. Disadvantages of this method are the implicit assumtion of stationarity within each segment and rather poor time/frequency resolution.

A better approach is to use parametric spectral analysis methods based on e.g. time-varying autoregressive moving average (ARMA) modelling. The time-varying parameter estimation problem can be solved with adaptive algorithms such as least mean square (LMS) or recursive least squares (RLS). These algorithms can be derived from the Kalman filter equations. Kalman filter equations can be written in the form

where θ is the state vector of ARMA parameters, φ includes the past measurements, C denotes for covariance matrices and K is the Kalman gain matrix. All these adaptive algorithms suffer slightly from tracking lag. This can however be avoided by using Kalman smoother approach.

Here we demonstrate the ability of several time-varying spectral estimation methods, with an EEG sample recorded during a eyes open/closed test. This test is a typical application of testing the desynchronization/synchronization (ERD/ERS) of alpha waves of EEG. The occipital EEG recorded while subject having eyes closed shows high intensity in the alpha band (7-13 Hz). With opening of the eyes this intensity decreases or even vanishes. It can be assumed that EEG exhibits a transition from a stationary state to another. One such transition from desynchronized state to synchronized state is presented below.