eindhoven university of technology master segmentation

50
Eindhoven University of Technology MASTER Segmentation, autoregressive modelling and clustering of the EEG Vos, A.A. Award date: 1992 Link to publication Disclaimer This document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Student theses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the document as presented in the repository. The required complexity or quality of research of student theses may vary by program, and the required minimum study period may vary in duration. General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain

Upload: others

Post on 19-Dec-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Eindhoven University of Technology MASTER Segmentation

Eindhoven University of Technology

MASTER

Segmentation, autoregressive modelling and clustering of the EEG

Vos, A.A.

Award date:1992

Link to publication

DisclaimerThis document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Studenttheses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the documentas presented in the repository. The required complexity or quality of research of student theses may vary by program, and the requiredminimum study period may vary in duration.

General rightsCopyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright ownersand it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.

• Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain

Page 2: Eindhoven University of Technology MASTER Segmentation

FACULTEIT DER ELEKROTECHNIEK

TECHNISCHE UNIVERSITEIT

EINDHOVEN

VAKGROEP MEDISCHE ELEKTROTECHNIEK

SEGMENTATION,AUTOREGRESSIVE MODELLING

AND CLUSTERINGOF THEEEG

by A.A. Vos

Rapport van het afstudeerwerk

uitgevoerd van juni 1991 tot en met april 1992

in opdracht van Prof. Dr. Ir. J.E.W. Beneken

onder leiding van Dr. Ir. P.J.M. Cluitmans en Ir. N.A.M. de Beer

\J ~ ~ 1\

~2..C G/-{ l{ JOi .5' )..~:3

'---' ~

c-/ 6o{;2.

DE FACULTEIT DER ELEKTROTECHNIEK VAN DE TECHNISCHE

UNIVERSITEIT EINDHOVEN AANVAARDT GEEN AANSPRAKELIJK­

HElD VOOR DE INHOUD VAN STAGE- EN AFSTUDEERVERSLAGEN

Page 3: Eindhoven University of Technology MASTER Segmentation

SAMENVATfING

Het doel van het in dit verslag beschreven onderzoek is het vinden van EEG parameters

die mogelijk correleren met diepte van anesthesie. Het werk is verricht binnen eenonderzoeksproject van de vakgroep Medische Elektotechniek aan de TechnischeUniversiteit Eindhoven dat tot doel heeft het ontwikkelen van technieken voorneurofysiologische grootheden ten behoeve van het kunnen bepalen van anesthesie diepte.

De analyse methode die hier voorgesteld is, deelt het EEG signaal eerst op in segmentenvan variabele lengte waarvan vervolgens een set parameters geextraheerd worden.

Daaropvolgend worden de verkregen parameter vectoren gegroepeerd om zo hetonderscheidend vermogen van de parameters in relatie tot diepte van anesthesie te kunnenevalueren.

Ben software pakket is ontwikkeld waarrnee methodes voor segmentatie, parameter­

extractie en clustering geevalueerd kunnen worden. Een adaptief segmentatie algoritme isgefmplementeerd dat gebaseerd is op detectie van lokale maxima in een meting voor de

"mate van stationariteit" in het EEG. Een recursief algoritme is gefmplementeerd voor hetextraheren van een set autoregressie parameters uit de verkregen EEG segmenten. Hetalgoritme berekent de kleinste kwadraten oplossing voor de autoregressie coefficientengebruikmakend van een voorwaartse en terugwaartse predictie van het signaal. Naaraanleiding van een literatuuronderzoek is een sequentieel "fuzzy" cluster algoritmeaanbevolen voor het evalueren van de bruikbaarheid van autoregressie coefficienten in het

herkennen van anesthesie-niveaus.

Page 4: Eindhoven University of Technology MASTER Segmentation

SUMMARY

The purpose of the research described in this report is finding EEG features that have

possible correlations with anaesthetic depth. The work was carried out within a research

project of the division of Medical Electrical Engineering at the Eindhoven University of

Technology that aims at the development of techniques for neurophysiological monitoring

of anaesthetic depth.

The EEG analysis method proposed here first divides the signal into variable length

segments of which a set of features are extracted. In a subsequent phase the resulting

feature vectors are clustered in order to evaluate the discriminating power of the features

with respect to levels of anaesthesia.

A software application was developed that enables evaluation of techniques including

segmentation, feature extraction and clustering. An adaptive segmentation technique has

been implemented that is based on the detection of local maxima in a "stationarity

difference measure" with respect to the EEG signal. A recursive algorithm for extracting a

set of autoregressive coefficients from the EEG segments has been implemented. The

algorithm is based on the least squares solution for the autoregressive coefficients using

forward and backward linear prediction. From a literature study, a sequential fuzzy

clustering algorithm is recommended for evaluating the usefulness of the autoregressive

coefficients in identifying levels of anaesthesia.

Page 5: Eindhoven University of Technology MASTER Segmentation

TABLE OF CONTENTS

SAMENVATIING

SUMMARY

1. INTRODUCTION 6

2. STATIONARITY ASPECfS IN EEG ANALYSIS 82.1 Introduction 82.2 Theoretical basis 82.3 Fixed-length segmentation 102.4 Variable-length segmentation methods 11

2.4.1 Segmentation with a prediction error measure 112.4.2 Segmentation with autocorrelation coefficients 122.4.3 Segmentation with a growing reference window 142.4.4 Segmentation with weighted features 152.4.5 Segmentation with a local maximum difference detection 16

2.5 Proposed segmentation method 172.5.1 Segmentation criterion 172.5.2 Window technique 182.5.3 Implementation 19

3. FEATURE EXTRACTION AND SELECTION IN EEG ANALYSIS 203.1 Introduction 203.2 Sets of features applied in EEG classifications 20

3.2.1 Time domain features 203.2.2 Autocorrelation coefficients 213.2.3 Frequency domain features 213.2.4 Autoregressive coefficients 22

3.2.4.1 Yule-Walker equations 233.2.4.2 The Burg method 24

3.2.5 Autoregressive moving average modelling 253.2.6 Kalman filtering 25

3.3 Feature selection techniques 263.3.1 Statistical approach 263.3.2 Selection with expert knowledge 263.3.3 Classifier-directed feature selection 273.3.4 Featureless pattern recognition 27

3.4 Proposed feature extraction method 27

Page 6: Eindhoven University of Technology MASTER Segmentation

4. CLASSIFICATION 304.1 Introduction 304.2 Parametric classifiers 304.3 Nearest neighbour classifiers 304.4 Cluster seeking 31

5. DEVELOPMENT OF AN EEG ANALYSIS TOOL 335.1 Introduction 335.2 Building the EEG analysis tool 33

5.2.1 Structured design method 335.2.2 Software development 345.2.3 Program portability 34

5.3 User interface 345.4 Preprocessing 35

5.4.1 EEG data collection 355.4.2 Filtering 36

5.5 Evaluation facilities for segmentation and feature extraction 36

6. CONCLUSIONS 376.1 Literature review 376.2 Evaluation tool 376.3 Test results 386.4 Future research 38

7. REFERENCES 39

APPENDIX A. ABBREVIATIONS 44APPENDIX B. MAIN MENU LAYOUT 45APPENDIX C. TEST RESULTS 46

Page 7: Eindhoven University of Technology MASTER Segmentation

1. INTRODUCTION

Before 1850 the use of ether and chloroform as anaesthetics for surgical procedures wasalready recognized and applied. However, till the end of the 19th century, no specialattention was paid to monitoring a patient's vital signs. Since then, the importance of

monitoring during anaesthesia has increased with the public demand for safety and

reliability.

Anaesthesia is in fact a highly complex combination of depression of different functions ofthe nervous system [Clu90]:

- depression of motoric functions (relaxation)- depression of sensory input processing (analgesia)

- depression of autonomic reflexes such as respiratory,circulatory and gastrointestinal reflexes and

- unconsciousness (amnesia and 'hypnosis').

These are the components of anaesthesia.

Anaesthetists try to establish and maintain an adequate depression of these components,

i.e., an adequate depth of anaesthesia. Too light anaesthesia might lead to awareness orrecall of intraoperative events by the patient, but if the patient is too deeply anaesthetized,it might cause permanent physiological damage or delayed recovery.

The main approach in improving monitoring anaesthetic depth is neurophysiologicalmonitoring that is under study in the "Anaesthetic Depth" project of the division ofMedical Electrical Engineering at the Eindhoven University of Technology. Research is

carried out on the development of quantitative measurement techniques for

neurophysiological parameters. One research field within the project iselectroencephalographic (EEG) analysis. EEGs are recordings of the spontaneous electrical

activity of the human brain cortex. It is known that changes in anaesthesia can cause

variations in the EEG.

The main goal of the study reported here is finding EEG features that have possiblecorrelations with anaesthetic depth. To derive reliable and representative features from the

EEG signal, it is important to pay adequate attention to the separation and detection of

various patterns in the signal. In other words, statistical properties of EEG epochs from

which features are to be extracted, should be taken into account in order to obtain an

accurate feature estimation. In this study emphasis is given to the first two steps within theproposed analysis method, that is, dealing with the statistical variability of the EEG and

the subsequent extraction of a set of representative features.

6

Page 8: Eindhoven University of Technology MASTER Segmentation

From a mathematical point of view, the EEG is a random signal that is locally stationary.Stationarity implies that the mean and variance as well as all other higher-order moments

do not change with time. In feature extraction methods the signal should, at least, be

assumed to be stationary in terms of the features to be derived. This way, the features areable to describe the signal accurately under all circumstances.

In chapter two theoretical aspects as well as several applications are discussed in order to

apply an EEG analysis method that meets 'stationarity assumptions'. In chapter threeseveral feature extraction methods are discussed in order to choose features that are

representative for the EEG during anaesthesia. The final step in the EEG analysis involves

clustering of the obtained feature vectors in order to investigate the discriminating powerof the feature set in relation to anaesthetic depth. In chapter four classification rules arereviewed briefly with clustering techniques in order to recommend a cluster method. Inchapter five the development of an analysis program is explained that is intended as a toolin the research on finding a relationship between EEG properties (features) and levels of

anaesthesia that can be determined quantitatively. It should be help in evaluating the

usefulness of a set of EEG features in identifying levels of anaesthesia. A segmentation

method (for dealing with the EEG's statistical variability) and a feature extraction methodare included in the program. In the future, a cluster algorithm can be inserted. Conclusionsfrom this study are presented in the final chapter 6.

7

Page 9: Eindhoven University of Technology MASTER Segmentation

2. STATIONARITY ASPECTS IN EEG ANALYSIS

2.1 Introduction

To derive features that describe an EEG signal during all the significant events of a

surgical procedure under general anaesthesia, a basic assumption is that the statistical

properties of the EEG do not change with time, i.e, that the EEG is stationary. This

assumption is rarely met. For example, from the study of McEwen and Anderson [Mce75]

it can be concluded that the variability within an EEG interval considerably increaseswhen the interval length is increased from 2 to 10 s.

Considering the signal in more detail, it can be noted that the EEG is a random signal that

has amplitude values between -200 and +200 V. The frequency can vary between 0.1 and

about 60 Hz. In the signal several 'rhythms' of different frequencies can be distinguished.

Additionally, the EEG can contain several artifacts, for example paroxysmal events

[Var88], ocular movement and muscle artifacts. During anaesthesia another artifact is the

influence of the surgery room's electrical machines on the EEG.

Several attempts have been made to deal with the randomness of the EEG for extracting

representative features. There are three basic approaches. The simplest approach is to cut

the signal into consecutive epochs of fixed length and then extract time-invariant features

from each epoch. A better approach is an adaptive segmentation technique that divides the

EEG in variable-length segments in order to ensure stationarity followed by feature

extraction. A third (computer-intensive) technique for dealing with the EEG's variability

that can be mentioned, is time-varying modelling. The latter approach can be interpreted

as a feature extraction method and it will be discussed in the next chapter (section 3.2.6).

In the following sections it is attempted to review the wide range of segmentation methods

for the EEG signal in order to apply a segmentation algorithm for EEGs under anaesthesia.

First, a theoretical contemplation about stationarity with some practical problems is given.

2.2 Theoretical basis

A random signal is said to be stationary in the strict sense, if its statistics are not affected

by a shift in the time origin. This means that mean, variance and all higher-order moments

do not change with time. Signals are called to be stationary in the wide sense if the mean

s(t1) and autocorrelation function R(t1,tJ of the signal set) are time-invariant:

and

s (t1 ) = srtr = constant

8

(2.2.1)

Page 10: Eindhoven University of Technology MASTER Segmentation

•R( tl' t 2 ) =R( t 1-t2 , 0) =R('t) =lim 21 JS( t) s( t+'t) dt (2.2.2)

T- T -.These conditions are sufficient for ensuring stationarity in practical cases such as EEGanalysis [Mic84].

Formulas (2.2.1) and (2.2.2) yield a mathematical basis for a segmentation criterion. Inother words, if there is a 'significant difference' between two subsequent signal intervals

in terms of mean or autocorrelation function, a "non-stationarity" has taken place.

The autocorrelation function given in formula (2.2.2) is a mathematical definition. Thelimit to infinity can only be estimated, since only a finite EEG recording is available.

Hence, in practice, a short-term autocorrelation function within a time interval [tl'~] is

calculated that is an estimation of the mathematical autocorrelation:

(2.2.3)

Similarly, a short-term mean is defined as

(2.2.4)

For a sampled signal So we obtain:

(2.2.5)

(where k =O,...,M-1 and M = number of autocorrelation coefficients)

and

(2.2.6)

Because R(k) is calculated over a finite interval, the number of terms that is averaged

depends on k. If k increases, the averaging time interval decreases and thus the reliability

of the estimation. This means that the interval length must be much larger than M.

In order to define an applicable segmentation criterion, a difference measure between two

subsequent signal epochs must be defined. This means that possibly weights for the short-

9

Page 11: Eindhoven University of Technology MASTER Segmentation

term mean and autocorrelation coefficients must be set. At the same time, the length of the

signal interval should be long for reliable estimation of the autocorrelation coefficients,

and short for the detection of small segments. Besides, the term "a significant difference"

should be worked out in more detail.

For EEG analysis applications other signal properties are also used for obtaining a

segmentation criterion. One often defines a segmentation criterion in terms of features thatare to be derived from the EEG in the next analysis phase.

2.3 Fixed-length segmentation

Fixed length segmentation of the EEG signal is the simplest method to deal with the

signal's variability. It is assumed that, in the determination of boundary locations between

two subsequent EEG patterns, an accuracy of the order of the length of the basic interval

itself (e.g. 2 s) is sufficient. This is, at the same time, the criticism of fixed-length

segmentation. Besides, it is noted that a pattern that is longer than the basic segment

length, will be split up into several segments that probably will be assigned to the same

group in a clustering phase.

In general, a major drawback of fixed-length segmentation is that the signal's properties

are not taken into account, while changes in signal properties do not produce epochs of

equal duration. Nevertheless, fixed-length segmentation is still applied in EEG analysis

methods. However, in many applications a fast Fourier transform is used for spectral

analysis which necessitates fixed-length intervals.

The segmentation method of Ozaki and Tong [Oza75] may be considered an intermediate

method between the fixed length segmentation methods considered thus far, and the

adaptive segmentation techniques that will be reviewed in the next section. They joined

successive nonoverlapping equal-length EEG intervals until a mathematical model "didn't

fit" the next interval. The "goodness-of-fit" was tested by applying the Akaike's

information content criterion (see [Mak75]). When the model didn't fit, the procedure

started again with a model of the current interval.

10

Page 12: Eindhoven University of Technology MASTER Segmentation

2.4 Variable-length segmentation methods

2.4.1 Segmentation with a prediction error measure

A more elaborate approach than fixed-length segmentation was suggested by Bodenstein

and Praetorius [Bod77]. The EEG will be split up into elementary patterns. They propose

that the EEG consists of 'quasi-stationary' segments on which transients may be

superimposed. Here, 'quasi-stationary' means that a segment may be considered to have

appreciably unvarying statistical properties.

The procedure is based upon autoregressive modelling of the EEG. Autoregressive

modelling yields a linear prediction of the next sample point of the signal. Let sn· denote

the prediction value of Sn by using p previous samples:

(2.4.1)

The coefficients ak are termed prediction coefficients. The prediction error is defined as

p

en = sn-s ; = E akSn-k ' ao=lk'=O

(2.4.2)

en is interpreted as a measure for the degree of "unexpectedness" of the value sn and this is

the basis of the applied segmentation criterion.

Bodenstein estimates the autoregressive coefficients (a1, ...,ap) of a reference window that is

positioned at the beginning of a new segment (see figure 2.1). The estimated coefficient

values are obtained as a result of the minimalization of the root mean square prediction

error. Using the calculated parameters, the prediction error en is computed according to

(2.4.2). With respect to the error signal en, a difference measure is calculated between a

fixed test window and a moving test window. The difference measure includes an

amplitude measure and a frequency measure. When the difference measure exceeds a

predefined threshold, a new segment boundary is set in the middle of the (current) moving

test window.

This method of boundary placement is rather inaccurate, as it could result in an error of

up to half the width of the moving test window. Besides, the algorithm is rather

complicated, while it could be simplified by applying a difference measure directly to the

signal rather than the linear prediction error.

11

Page 13: Eindhoven University of Technology MASTER Segmentation

e(tJ reference windowI (parameier eSllmaUon)

--)1

eN ---- -- ---------- ---- ------- - _l!l~~I.!'jt --- --)

1 fixed tesl window moving lesl window

--)1

figure 2.1 Segmentation by computing a linear prediction error

Various system parameters must be set: the autoregressive model order, the referencewindow length, the test window length and a threshold for segmentation. It is noted that,

to a large extent, the parameters are set empirically and it is not amenable to theoretical

evaluation.

In the analysis method autoregressive coefficients are also used as features. The

segmentation method may be interpreted as a technique to obtain stationary features ratherthan stationarity in a mathematical sense.

2.4.2 Segmentation with autocorrelation coefficients

In this method the defined segmentation criterion is derived from the first autocorrelationcoefficients of EEG data within a reference and a moving window. The segmentationmethod is developed by Michael. A detailed description can be found in [Mic84]. The

method will be discussed here briefly.

The difference in power spectrum between a reference window and a moving window is

used for the segmentation criterion. A difference d is defined as:

12

Page 14: Eindhoven University of Technology MASTER Segmentation

(2.4.3)

where Sr(oo) and Sm(oo) denote the power spectrum of respectively a reference window and

a moving window.

According to the Wiener-Khintchine theorem, the relationship between the power spectrum

S(oo) and the autocorrelation function R('t) for a real signal can be defined as:

•S(<a» ::: ...l..JR(~) cos (<a>~) en

2n -.or in a discrete case:

Sk ::: ...l..[R(O) + 2E R(k) cos (<a>k)]2n k=l

(2.4.3) and (2.4.4) yield for the difference criterion:

(2 •4 .4)

(2.4.5)

Integration results in

(2.4.7)

The first term of (2.4.7) could be interpreted as an energy distance measure dA and the

second term as a spectral distance measure dp• A normalized total difference measure dtolal

is defined as:

(2.4.8)

Since the EEG's power spectrum is limited (to about 60 Hz), dp can be calculated by

computing the first autocorrelation coefficients. TA is an energy threshold and Tp is a

frequency threshold. The segmentation criterion could be specified in "familiar" terms, as

a percent change in amplitude, in frequency or in both. TA and Tp are determined in such

a way that when dwta' exceeds the value 1.0, a boundary is assumed to be detected. Anadditional procedure is used to determine the exact position of the boundary. Mter a

segmentation has occurred, the length and the first nine autocorrelation coefficients of the

entire segment are stored to be used during clustering. The reference window is

repositioned at the beginning of the new segment and the procedure is repeated.

13

Page 15: Eindhoven University of Technology MASTER Segmentation

Because of the additional boundary placement procedure, better results were obtained incomparison with the method of Bodenstein. Besides, the method of Michael is simpler,since a difference measure is derived directly from the EEG signal. However, thecorrelation between the first autocorrelation coefficients is rather strong, so that theirinformation value is rather low.

________________________~I!(ipg )s[q

1reference window

t---------'1moving window

-)t

figure 2.2 Segmentation with a fixed and a moving window

2.4.3 Segmentation with a growing reference window

Appel [App83] introduced a segmentation method in which a reference window is growingbeside a moving window (see figure 2.3). Autoregressive modelling was applied to the

time series within respectively the reference window, the moving window and the

concatenation of the two. The autoregressive coefficients and the residual prediction errorenergies were computed for each time series.

The residual prediction errors E1,s-I' ES,s+L-l and E1,s+L-l of respectively the (growing)reference window, the moving window and the concatenation of the two were used for thesegmentation criterion. The segmentation criterion d was formulated as [App83]:

d= (5+£-1) lnE(l.S+L-l) - (5-1) In(E1 • S - 1 ) - (L) In (ES•S+L-1) (2.4.9)

This was used for both segmentation and (optimum) positioning of the boundary.

Three system parameters had to be adjusted in the proposed procedure, i.e, the order of the

autoregressive model, the moving window length and the threshold for the difference

measure. Some principles for parameter settings were given, but it was noted that heuristic

14

Page 16: Eindhoven University of Technology MASTER Segmentation

measures had to be used also.

An important advantage of this method in comparison with the previous methods is thefact that no procedure for the exact position of the segment boundaries is necessary. Onthe other hand, the presented method is more calculation intensive. Besides, the

segmentation algorithm is developed with respect to nonstationary stochastic time series ingeneral. The autoregressive modelling as a basis for the segmentation criterion should

perhaps be reconsidered with respect to the set of features to be extracted from an EEG

signal.

reference window

s(q ~!~~~ __)

I moving window

1 s s+L-l --)t

figure 2.3 Segmentation with a growing reference window

2.4.4 Segmentation with weighted features

Bankman and Gath [Ban87] used a segmentation criterion that is clearly based on the

features to be derived. They segmented and classified the EEG during anaesthesia. From

each segment nine features were derived and classified. During the segmentation phase thefeatures were also calculated of a reference and a moving window (see figure 2.2). Therelative difference dj for each feature is estimated as:

i=1, ... ,9 (2.4.10)

where Fr,i and Fm,i denote the ith feature of the reference and the moving window

respectively. A total difference measure d is calculated as:

15

Page 17: Eindhoven University of Technology MASTER Segmentation

(2.4.11)

(2.4.12)

where aj is a weight for the ith feature. When the difference measure exceeds a predefinedthreshold a new reference window is positioned at the beginning of a new segment.Otherwise the moving window is shifted and the difference is calculated again. Thecoefficients aj and the segmentation threshold were determined heuristically by using

simulated signals containing different combinations of three frequency components

according to the frequency distribution of the EEG during anaesthesia.

A major drawback of this method is the great number of parameters that needs to be setheuristically. Besides, the influence of short-time nonstationarities in the EEG is not taken

into account in the simulated signals and thus in the setting of the algorithm parameters.

2.4.5 Segmentation with a local maximum difference detection

Skrylev ([Skr84] referred to by [Bar8S] and [Var88]) introduced the idea of using two

equally long consecutive moving windows (Xl and X2; see figure 2.4), instead of areference and a moving window. By computing the Fast Fourier Transform (FFT) of both

windows the difference between the power spectra Xl(w) and X2(w) is observed by thefollowing equation [Kra91]:

G =max (.,) {~[;: ::: + ~ ::n -1} (0)0)

One expects that a change in stationarity manifests itself by the local maxima of the

difference measure. Formula (2.4.12) results in one G value. When the moving windows

are shifted one sample, new spectra are calculated and a second G value is obtained, etc.

Another window is used that slides along the G values for detecting local maxima. The

length of the latter window determines the "detailedness" of the segmentation: the shorter

the window length, the more maxima will be detected.

A major benefit of this segmentation method compared with previous methods is that the

(critical) segmentation threshold is not necessary. Due to the local maximum approach, a

more or less detailed segmentation and a less critical algorithm setting are obtained. Twosystem parameters need to be set: the length of the moving windows and the length of the

"maximum detection" window.

16

Page 18: Eindhoven University of Technology MASTER Segmentation

moving window Xl moving window X2

811dlng8(1) - - - - - - - - - - - - - - • - - - >

1

G

1

-->t

-->t

figure 2.4 Segmentation with two moving windows and a mutual difference measure

Varri used a simpler difference measure that includes an amplitude and frequency

measure. Besides, the relationship between this difference measure and the features that

are used in his application [Var88] is also more obvious. Two more coefficients needed to

be set: an amplitude and a frequency weight.

2.5 Proposed segmentation method

2.5.1 Segmentation criterion

Gasser ([Gas83] referred to by [Gev84]) notes that the real issue is not whether the

stationarity assumption is true, but whether a stationarity criterion is adequate for a

particular application. The same EEG segment mayor may not be considered stationary

depending on the signal's features that are used to characterize the process under

investigation.

With respect to this consideration, there should be a significant relationship between the

EEG properties that are used for a segmentation criterion on one hand and the set of

features that are subsequently derived from each segment on the other hand.

17

Page 19: Eindhoven University of Technology MASTER Segmentation

As will be explained in the next chapter, in the application proposed in this study

autoregressive coefficients will be used as features that represent the EEG segments and

enables classification of the EEG during anaesthesia. Therefore, autoregressive coefficients

should be used as a basis for the segmentation criterion.

2.5.2 Window technique

Another point that requires attention is the way to use windows. The use of a (fixed)

reference window at the beginning of a new segment is possibly too arbitrary, as (during

segmentation) comparisons are always made with reference to the beginning of thesegment (see figure 2.5). However, the difference between the last moving test window of

a segment and the (connecting) reference window of the next segment could have been

very small.

reference window moving window [new) referencewindow

segment boundary

-)t

figure 2.5 Difference measure with a fixed reference window and a moving window. The

difference between the moving window and the latter reference window could

have been very small but it is not taken into account.

This limitation is overcome by the paired moving window technique presented by Skrylev

[Skr84]. Segment boundaries are placed where two connected windows most differ in the

sense of the segmentation criterion. As a result, no complicated procedure for segment

boundary position is necessary, but they are exactly placed at the local maxima of the

difference measure. In addition, the (critical) setting of a segmentation threshold is

omitted.

18

Page 20: Eindhoven University of Technology MASTER Segmentation

2.5.3 Implementation

The paired moving window technique is implemented in an evaluation tool in order to beable to get an optimum algorithm setting. According to Gasser [Gas83], a suitablesegmentation criterion should hold a detection of change in autoregressive coefficientsbetween the moving windows, since these coefficients are also used for describing the

EEG segments. The detection of a parameter change should be accounted for in onemeasurement value. The windows are to be moved one sample and the autoregressiveestimate will be repeated resulting in a second difference measure. The parameter thatneeds to be adjusted is the autoregressive model order.

The previously discussed segmentation criterion results in a computationally complex

algorithm, because after each step of one sample two autoregressive models are estimated.It is decided to start first with a simple segmentation criterion that contains an amplitude

and a frequency difference measure. The frequency difference measure contains asummation of the absolute differences in value between two consecutive samples of the(digitized) EEG. This summation can be looked upon as a parameter that is related to themean frequency of the measured signal [Var88]. The total difference measure G applied tothe signal sn is now defined as:

where L is the length of one moving window and a and b are appropriate weights for the

amplitude and frequency measure respectively.

The proposed amplitude and frequency difference measure can be interpreted as basicproperties of the signal's power spectrum. Since the power spectrum can be calculated by

using the autoregressive coefficients, the amplitude and frequency measure can also be

seen as a (strong) reduction of the information in the autoregressive coefficients.

Therefore, it is noted here that the "allowance" of this reduction must be investigated moredetailed. When it appears that the segmentation criterion contains too little information, ithas to be modified.

19

Page 21: Eindhoven University of Technology MASTER Segmentation

3. FEATURE EXTRACTION AND SELECTION INEEG ANALYSIS

3.1 Introduction

The purpose of feature extraction is to find a measurable quantitative relationship between

levels of anaesthesia and the EEG signal. In connection with the segmentation methods

reviewed in the previous chapter, essential information should be derived from the EEG

segments in order to classify them. Single feature methods yield the extraction of one

feature of each segment. In [Th091] single features significantly correlated with

anaesthetic depth, but both the "within-patient" and the "between-patient" variability were

great. If a multiparametric method is applied, the classification accuracy may be increased.

At least, a set of features will lead to more information about the EEG epoch in question.

One method is taking a set of features that is expected to be representative for the

particular application. Another approach is listing a lot of possible features and applying a

feature selection technique that takes a small (optimum) number of them according to

some predefined criteria. In section 3.2 feature extraction methods according to the first

method are discussed. Section 3.3 deals with feature selection techniques.

3.2 Sets of features applied in EEG classifications

3.2.1 Time domain features

In early studies time domain analysis methods were quite popular; calculations were

simple and straightforward. More advanced applicable theory, however, was not available.

Features like maximum amplitude, mean and variance could be easily calculated with the

inefficient computers of the time. In 1970, Hjorth [Hj070] defined three normalized slope

descriptors (amplitude, mean frequency and frequency range) that are later used in

combination with other features as well (see for example [Ban87] and [Var88]). It is noted

that the Hjorth parameters also partly belong to the frequency domain.

20

Page 22: Eindhoven University of Technology MASTER Segmentation

3.2.2 Autocorrelation coefficients

Thomsen et al. extract the first eleven autocorrelation coefficients of 2-s EEG segmentssampled at 100 Hz and filtered with a 25 Hz antialiasing filter in the studies [Th087],[Th089] and [Th091] dealing with assessment of anaesthetic depth. The final featurevector that was used for classification of the EEG segments, consisted of ten normalizedautocorrelation coefficients and the root mean square (RMS) amplitude. Normalized

autocorrelation coefficients NR(k) were calculated according to:

NR(k) = R(k)R(O)

R(k) is calculated using (2.2.5). The RMS amplitude is calculated according to:

( 3 • 2 • 1 )

RMS = cy'R{OT (c for weighted feature) (3.2.2)

The autocorrelation coefficients as final features were also used by others (see for example

[Mic84]), but their use should be thoroughly reconsidered. When the EEG is sampled at100 Hz or some higher frequency, the information value of the first autocorrelation

coefficients is rather low, since they correlate strongly. Lowering the sample frequencycould diminish the correlation, but it must be high enough to keep a precise description ofshort-time nonstationarities in the EEG signal.

3.2.3 Frequency domain features

By frequency analysis many spectral features were calculated in EEG classification

studies. For example, the power contents of EEG frequency bands (rhythms) are oftenused as EEG descriptors. A popular method to display the results of spectral analysis is to

plot the frequency spectrum as a function of time. This technique is termed as compressedspectral array (CSA). An example is presented in figure 3.1.

One method for estimating spectral features is the fast Fourier transform (FFf). Moredetails about EEG spectrum evaluation and feature extraction with FFT can be found in

[VeI91].

The alternative method to FFT is autoregressive (AR) modelling that is based on linear

prediction [Wie49]. In AR modelling a mathematical model is fitted to the signal epochs.The power spectrum can be derived from the mathematical model (see for example

[lan81D. Therefore, autoregressive modelling is known as a parametric method. In

contrast, Fourier transformation techniques are termed as nonparametric methods, since the

spectrum is determined directly from the signal. The estimation of the mathematical model

21

Page 23: Eindhoven University of Technology MASTER Segmentation

will be described in more detail in the next section. A major advantage of autoregressivemodelling in comparison with FFT is that the segment lengths can be flexible. Besides, itis reported that the spectral performance is also better (for more details on the comparison

of both methods see [Bar85]).

as.8

a....

..... 7

1_.8 H.,U,,: as.8

figure 3.1 Compressed spectral array representation of five EEG epochs

3.2.4 Autoregressive coefficients

In many EEG analysis studies the coefficients of the underlying mathematical model in

autoregressive modelling are used as features for classifying the EEG (see for example[Ben91], [Cer85] and [Jan81]) . These autoregressive coefficients contain all the

(statistical) information for calculating the EEG's power spectrum and computing spectralfeatures. Besides, all the coefficients take part "at the same level" and thus no appropriateweight for each coefficient is needed.

Autoregressive modelling is based on the linear prediction theory that was presented in

1949 by Wiener [Wie49]. Since then, several algorithms have been developed forautoregressive coefficient estimates. In AR modelling, a mathematical model with order p

that is fitted to each EEG segment, can be defined as

(3.2.3)

where So is the signal's amplitude at sample time n and eo is the error that is made bypredicting the current sample with a weighted linear combination of previous samples.

Applying model (3.2.3) to each EEG segment involves the computation of the coefficients

a1,...,ap• Two basic approaches for computing the autoregressive coefficients will be

22

Page 24: Eindhoven University of Technology MASTER Segmentation

considered here briefly.

3.2.4.1 Yule-Walker equations

The Yule-Walker technique of estimating the model coefficients is based on finding a

least-square fit of the autoregressive model to the EEG segment in question. This is

achieved by finding those coefficient values for which the squared prediction error is

minimal. (3.2.3) can be reformulated as:

p

en = sn + a1 sn-l + ••• + apsn _p = sn + E alesn - lele-l

The total squared error Ep is

Ep is minimized by setting

(3.2.4)

(3.2.5)

(3.2.6)

From (3.2.5) and (3.2.6) we obtain the set of equations:

p

E aleE Sn-leSn-i = -E SnSn-i t l~i~ple=l n n

(3.2.7)

As the autoregressive modelling is applied to EEG segments, Ep in (3.2.5) is minimized

over a finite interval, say 1 :s; n :s; N. (3.2.7) then reduces to

where

p

E alecplei = -CPOi' l~i~plc=1

N

cP lei = E Sn-leSn-in"'l

(3.2.8)

(3.2.9)

Equations (3.2.8) are known as the Yule-Walker equations [Mak75]. It is noted from

(3.2.8) and (3.2.9) that also values of the signal So with -p+1 :s; n :s; 0 are included. This,

however, doesn't make sense if the model is to be fitted to interval 1 :s; n :s; N. In EEG

applications based on solving Yule-Walker equations, it is implicitiy assumed that the data

outside the observation interval are zero. If the interval includes one long data sample,

then this "null extension" is not harmful. However, if the data consist of many short

23

Page 25: Eindhoven University of Technology MASTER Segmentation

intervals to be modelled and the ratio of ends to data is high, the method discussed here

may cause significant inaccuracies.

Additionally, from Jansen's study [lan81] it may be concluded that the Yule-Walker

method should not be used as it often results in unstable models.

3.2.4.2 The Burg method

The Burg technique of estimating autoregressive coefficients, always produce stable

models ([Var88] and [Jan81n. The essential point of this method is that only the datawithin the interval is used.

The prediction error value en in (3.2.4) can be interpreted as the output of filter (1,a1,...,ap)

if the data series is passed through this filter in a forward direction. The average output

power is the squared prediction error that is to be minimized. If the time series is passed

through the filter in the backward direction, a backward prediction value bn is obtained.

Under the assumption of a stationary signal interval, the average output power is the same

for both passing directions and the autoregressive coefficients could also have been

estimated by minimalization of the squared backward prediction error [Bur75].

The Burg method implies that the autoregressive coefficients are computed by applying

both a forward and backward prediction error. The "end effect problem" of the Yule­

Walker approach will be avoided.

Considering time series {Sl,... ,SN} and model order p, a forward and backward prediction

error are defined as:

p p

f n = sp+n + E alcsp +n - lc = E alcsp +n - lc a o=llc=l lc-O

p P

bn = sn + E alcsn +lc = E alcsn +lc ' a o=lJc:l lc..O

(3.2.10)

(3.2.11)

with 1 s n s N-p.

To obtain estimates of the autoregressive coefficients a1,...,ap of time series {Sl,...,SN}, Burg

minimized the sum of the forward and backward prediction error energies:

(3.2.12)

A detailed description of a technique to minimize Ep in (3.2.12) is given in [Bur75].24

Page 26: Eindhoven University of Technology MASTER Segmentation

3.2.5 Autoregressive moving average modelling

An extension of autoregressive analysis is autoregressive moving average (ARMA)

technique. In this technique not only the signal itself is expressed as a linear combination

of its own immediate past but the error signal as well. The linear relationship of an

ARMA model of signal Sn and error en is:

(3.2.13)

Computational requirements increase because of the estimation of two sets of coefficients

even though the order (r+s) for an ARMA model is smaller than for an AR model for a

given accuracy [Bar8S]. As the stability requirements of the AR model are easily met and

coefficients are faster to calculate, AR analysis has been applied more often [Var88].

Further details on the comparison of AR and ARMA modelling can be found in [Boh73].

3.2.6 Kalman nItering

The classic linear prediction theory for stationary signals ([Wie49]) is modified by Kalman

[KaI60] so that it could also be used for nonstationary signals. The method is known as

Kalman filtering and was first introduced to nonstationary EEGs by Bohlin [Boh71].

Kalman filtering is a recursive technique ("tracking device") in which the autoregressive

model coefficients are updated continuously as a new sample becomes available. The

update is proportional to the difference between the new observation and the predicted

value given the present model coefficients. As a result, no preceding segmentation of theEEG signal is necessary, as opposed to previously (and later) described feature extractions.

The disadvantage of this method is the computational complexity, while it results in data

expansion rather than compression; with each sample new autoregressive coefficients are

calculated. An additional layer of processing should be required [lan91]; in EEG analysis

methods the estimated coefficients are averaged over fixed-length intervals (e.g. 1 s).

Besides, as the method uses past information for estimating new model coefficients, an

occurrence of a short-term nonstationarity in the signal influences the model coefficient

estimates for several seconds thereafter [lan81].

25

Page 27: Eindhoven University of Technology MASTER Segmentation

3.3 Feature selection techniques

The simplest solution in choosing features is to list possible features and take a small

number of them. However, usually it is better to assess the discriminating power of theselected feature somehow.

3.3.1 Statistical approach

A statistical method like principal component analysis (peA) selects those features that

maximize the amount of variance in the resulting feature vector ([Har76]). Unfortunately,

a small amount of residual variance could have been the key to distinguish some definedclasses. This drawback is even more serious if a linear transform technique is performed.A linear transform can be applied to reduce the number of final features. The variance in

some features that are unaccounted for in the transformation will be rejected. Generally,

statistical methods maximize some criteria, but the selected features may be irrelevant fordistinguishing clinical categories.

3.3.2 Selection with expert knowledge

If expert knowledge about what patterns are to be classified is available, it can be helpfulin selecting features. For example, various measures of the traditional EEG frequency

bands (delta band, theta band, alpha band and beta band; see table 3.1) have often been

used as features. However, heuristic features may be highly correlated with each other.

• lgna11 ••c

frequency........ (Hz)

8-4

delta

4 - •

theta

• - 12

alpha

12 - 31

table 3.1 Definition of BEG frequency rhythms (bands) (the applied frequency ranges canvary from one publication to another)

26

Page 28: Eindhoven University of Technology MASTER Segmentation

3.3.3 Classifier-directed feature selection

Another approach in feature selection is a 'closed loop' analysis in contrast with the 'open

loop' feature selection methods described above. The 'sensitivity' of the set of features

can be increased by using a classifier-directed feature extraction method. The classification

accuracy can be maximized. An often used algorithm is stepwise discriminant analysis

(SWDA). Features are selected one by one to evaluate the discriminating power and

intercorrelation of each feature [Jen77]. Methods such as SWDA that select features one at

a time have a major limitation: "the set of best features chosen one at a time is generally

not as good as the best set of features chosen in combination". This is known as the

Cover's paradox [Cov74].

As a matter of fact, this approach involves a supervised clustering technique, since the

classes are assumed to be known beforehand. In identifying levels of anaesthesia with

EEG features, however, we are interested in the usefulness of some selected features.

Therefore, the obtained feature vectors are to be grouped in an unsupervised fashion to

investigate the discriminating power of the features in relation to anaesthetic depth.

3.3.4 Featureless pattern recognition

The difficulties in choosing the best set of features have induced Gersch [Ger79] to argue

for 'featureless' pattern recognition. The difference between time series is calculated by a

Kullback-Leibler dissimilarity measure that is defined by Kullback [KuI58]. This measure

is a statistical number measure of the difference between two time series rather than a

property of an individual time series as a feature is. In an initial application a high

classification accuracy is obtained. However, it is not known whether this technique could

be useful in neurophysiological monitoring (see also [Gev80]). Also, the method has not

been reported to have been used by others.

3.4 Proposed feature extraction method

In literature, no EEG features are found that exceptionally well correlate with anaesthetic

depth. In many studies investigated EEG features show correlations with changes in

anaesthesia in initial applications, however, general applicable conclusions have not been

drawn yet. This can be partly motivated by the fact that a complete understanding of the

EEG generating mechanism and an explicit definition of "anaesthetic depth" is lacking.

With respect to these considerations, it is decided to describe the EEG, in a first

application, as accurately as possible under all circumstances during anaesthesia in order

to lose as little information as possible before classification. Later, redundant features

27

Page 29: Eindhoven University of Technology MASTER Segmentation

could be removed and possibly substituted for other features.

Since autoregressive coefficients are a basis for the calculation of the power spectrum andextraction of (spectral) features, they can be a good candidate for describing the EEGsignal in a general way. As can be concluded from section 3.2.4, the Burg method isclearly more accurate than the Yule-Walker approach for estimating autoregressive

coefficients. Besides, the Yule-Walker estimate is even not allowed to be used, since dataoutside an EEG segment are needed. In feature extraction studies, one aims at a

description of the data within the segments.

Marple [Mar80] developed a computationally efficient recursive algorithm that computesthe autoregressive coefficients according to the Burg method. The algorithm aims at theleast squares solution of the prediction error energy defined by Burg. The algorithm willbe outlined briefly.

The prediction error energy is minimized by setting its derivatives with respect to theautoregressive coefficients to zero. Substituting the forward and backward linear prediction

errors, one obtains (using (3.2.10) and (3.2.11» the set of equations:

(3.4.1)

where

N-p

r(i,j) = L (Sk+P-iSk+P-j + Sk+iSk+i)k"'l

The minimum prediction error energy Ep can be found to be

Expressions (3.4.1) and (3.4.3) can be combined in a matrix form as

(3.4.2)

(3.4.3)

r(O,O)

r (p, 0)

• r(O,p) 1a 1

. r (p,p) ap

28

=

o

(3.4.4)

Page 30: Eindhoven University of Technology MASTER Segmentation

The matrix in (3.4.4) may be decomposed into products of Toeplitz matrices!:

(3.4.5)

Matrix T is an (N-p)x(p+l) Toeplitz matrix of data samples,

8 p +1 8 p 8 1

8 p +2 8p +1 . . 8 2

T= (3.4.6)

8 N 8 N- 1 . 8 N-P

T denotes the transposed matrix of T. T denotes the reversed matrix of T:

8 1 8 2 8p +1

8 2 8 3 . . 8p +2

T I = (3.4.7)

8 N-P 8 N-P +1 . . 8 N

It is this special structure that allows a computationally efficient recursive algorithm to be

generated. Further details on the development of the algorithm can be found in [Mar80].

The autoregressive algorithm is implemented in a software tool in order to investigate its

usefulness in EEG analysis for identifying levels of anaesthesia. The development of the

software tool will be described in chapter five in more detail.

lA Toeplitz matrix is symmetric and the elements along anydiagonal are identical

29

Page 31: Eindhoven University of Technology MASTER Segmentation

4. CLASSIFICATION

4.1 Introduction

When feature vectors of EEG segments have been calculated, the discriminating power ofthe features has to be investigated. The vectors will be clustered according to some

classification rule. In this chapter classification rules with clustering techniques arereviewed briefly in order to implement (in future) a suitable clustering algorithm withinthe analysis tool.

4.2 Parametric classifiers

The Bayes' classifier is a statistical method in which the probability of a pattern (featurevector) belonging to a class Q is calculated. Misclassification is minimized in a statistical

sense. For more details see [Tou74].

Yunck discussed in [Yun80] classifiers based on the probability density functions fromeach class. These classifiers were significantly less effective than classifiers based on

nearest neighbour rules that will be discussed in section 4.3.

Another point of view is considering the EEG as a finite number of recurrent states.Changing from one state to another is associated with transition probabilities. A transition

probability model is indicated as a Markov model. The Markov model could be used for

estimating parameters in the Bayes' classifier or in rule-based automatic scoring systems.For more details see [Kem87].

4.3 Nearest neighbour classifiers

Varri [Var88] pointed out that the nonparametric 'k-nearest neighbour density' estimation

('k-NN' rule) is one of the most effective classifiers. k nearest distances are calculated ofeach cluster to the feature vector to be classified. The feature vector is classified to the

cluster with a majority of shortest distances. In case of a tie the choice is made randomly.

Yunk [Yun80] discussed classifiers based on the k-NN rule. Best results were obtainedwith a classifier in which statistical properties of the classes are included in the distance

measure. For each class Wi a covariance matrix ~ is calculated. ~ is defined as

(4.3.1)

Ej {.} denotes the expectation operator over the vectors x in class Wi and m j denotes the

30

Page 32: Eindhoven University of Technology MASTER Segmentation

mean vector of class wj and is defined as

(4.3.2)

The applied difference measure of the mean vector mj of class wj to vector a to beclassified is now defined as

(4.3.3)

Equation (4.3.3) is also known as the Mahalanobis distance measure and is a general formof the well-known Euclidean distance measure. The resulting classifier is a combination ofa parametric (statistical) classifier and a nearest neighbour classifier.

4.4 Cluster seeking

The aim of clustering is to investigate the discriminating power of the calculated EEG

features with respect to changes in anaesthesia. In EEG analysis studies dealing withassessment of anaesthetic depth, two basically different techniques are applied in obtaining

a grouping of feature vectors: hierarchical clustering and sequential fuzzy clustering. Sinceclusters are not known beforehand, these techniques are said to be "unsupervised".

In hierarchical clustering one merges the two nearest clusters by applying a distancemeasure. Merging is done step by step starting with the initial number of clusters andending with the number of clusters that is preferred in the particular study. The distance

measure that is applied, could be an Euclidean distance or a Mahalanobis distance. The

weakness of hierarchical clustering is the fact that, when two clusters are merged, they are

joined permanently and are a basis for later merges.

In sequential fuzzy clustering the feature vector can belong with "different degrees of

membership" to two or more clusters at the same time. Therefore, the position of the

vector in the feature space is determined more accurately than "rounding" it to the nearest

cluster. Besides, cluster centroids are updated continuously.

At the start, the first feature vector becomes the centroid of the first cluster. When the

distance of the second vector to the first one exceeds a predefined threshold, it becomes

the centroid of a second cluster. Otherwise, the centroid of the first cluster is updated as

the average of both vectors. This procedure repeats, however, when two or more clusters

have been created, a degree of membership of a new vector in each cluster is calculated

according to [Ban87]:

31

Page 33: Eindhoven University of Technology MASTER Segmentation

(4.4.1)

where dj is a (metric) distance measure (e.g. Euclidean distance measure) of the vector tothe centroid of cluster i, and n is the number of clusters at that moment. With each new

vector all centroids are updated taking the degree of membership into account.

Sequential fuzzy clustering enables the visualization of both "area's with many vectors"

and "outliers" in the feature space. Area's with many vectors will result in "heavy"clusters, while outliers result in single vector clusters. The preset clustering thresholdcontrols the number of final clusters and the cluster sizes: the lower the threshold, themore clusters will be formed with, generally, fewer vectors in each of them.

It appears that sequential fuzzy clustering imposes less strict "constraints" on vectorclustering than hierarchical clustering does and therefore it may be a better clusteringtechnique to start with. More details on the use of a sequential fuzzy clustering algorithm

can be found in [Ban8?] and [Gat80].

The two reviewed clustering techniques could be used to obtain a "natural" grouping ofthe feature vectors during a so-called "training" or "learning" phase of the EEG

classification. When some useful clusters have been found and new data is to be classifiedto those clusters, a classifier has to be defined. This is termed a test phase. At themoment, it is only desired to detect dissimilarities (learning phase) between feature vectorsobtained from the EEG during different stages of anaesthesia.

Besides, it is noted that neural networks become rather popular in pattern classification.They can be used for (unsupervised) clustering (Le., the training phase) and developing a

classifier for a subsequent test phase. Some neural network properties are: robustness, high

computation rates and the capability of adapting classification rules during a test phase dueto current input data. Lippmann reviewed many different adaptive classifiers that are basedon neural networks. More details on using neural networks in pattern classification can be

found in [Lip8?] and [Lip89]. They are beyond the scope of this report.

32

Page 34: Eindhoven University of Technology MASTER Segmentation

5. DEVELOPMENT OF AN EEG ANALYSIS TOOL

5.1 Introduction

The purpose of the analysis program is to enable research on the usefulness of a (new) set

of EEG features in identifying levels of anaesthesia. The application is meant to evaluate

the EEG segmentation, feature extraction and clustering. Researchers should be enabled toevaluate each part easily. Therefore, parameter settings can be adjusted and evaluated.

EEG analysis methods are partly developed using empirical research. It is probable that afuture user wants to adjust a particular analysis method or even substitute it for analternative method. The analysis tool should be built up conveniently so that all parts ofthe program can be modified or substituted without too much effort.

In first instance, the evaluation will be done by analyzing recorded EEGs. The applicationyields an off line EEG processing that is split up into two parts. First, segmentation and

subsequent feature extraction are to be carried out. Processing is done directly on the timesignal. Calculation results are written to a file. Secondly, a clustering technique can be

applied to the stored results. A general structure of the software tool is implemented in

which the aforementioned segmentation method and feature extraction are included. Infuture, a clustering algorithm can be inserted.

In the next sections the development of the EEG analysis tool is outlined briefly. A

detailed program description is in a separate text available at EH 3.03.

5.2 Building the EEG analysis tool

5.2.1 Structured design method

Easy adaptation possibilities can be provided by a "top-down structured design" of the

analysis tool (see [Som86]). This implies that the system is designed from a functional

point of view. At first, a main function is defined. Then, the main function is refined into

smaller functions resulting in a more detailed design, etc. This technique is applied to the

EEG analysis tool.

33

Page 35: Eindhoven University of Technology MASTER Segmentation

5.2.2 Software development

The software is developed according to the design concept (described above) in a top­down fashion. The top (first) level of the proposed design is worked out while the second

level is represented by empty blocks. The second level is then worked out by filling theempty blocks. This results in new empty blocks, representing the third level, etc.

H the lowest level has been worked out, functions that belong together to some extent

(level or task), are grouped together in a separate source file. For example, a file is createdthat takes care of the preprocessing of the EEG recordings.

A small task that is to be executed at several places in the program (for example, getting a

filename) is implemented at one place in a separate function. This results in "standardized"library files containing basic functions for the analysis tool. In addition, no "hard code"filenames or constants are used, since they may need alteration in future. Such identifiersare to be grouped together, where a future user can easily modify them.

Due to flexible and efficient memory management, memory for data arrays that are neededduring processing and that have a length, unknown beforehand, can be dynamically

allocated. Static memory allocation would result in data structures that are partly not inuse. Especially if data arrays become rather large, one should use the limited amount ofmemory efficiently. On the other hand, a clear program structure is greatly desired so that

sometimes a static memory allocation is more convenient.

5.2.3 Program portability

The last couple of years, all software implementations that are developed within the

Anaesthetic Depth project have been made in the programming language "C". The analysisprogram proposed here is also implemented in "C", as it could be combined conveniently

with previously or (future) developed programs. Besides, the ANSI standard for the "C"

programming language is applied as well as possible and a separate (external) graphicslibrary ([Med88a] and [Med88b]) is used for operating the monitor display.

5.3 User interface

Menus were made for entering application facilities and easy adjustment of parameter

settings. As the EEG processing is divided into two separate parts a main menu was made

for choosing. The main menu also provides the entrance to a help function that may be

developed in future due to complexity increase. The main menu layout is given in

appendix B.

34

Page 36: Eindhoven University of Technology MASTER Segmentation

If the first part is entered (time data processing) a subsequent menu provides the entrance

to two edit menus and a procedure for starting the EEG analysis. The edit menus provides

facilities for adjusting preprocessing and calculation settings respectively. The following

parameters are categorized as preprocessing settings: the sampling frequency, the

maximum EEG frequency and FIR filtering (yes/no; for further details see section 5.4.2).

In the second edit menu parameters can be adjusted that are inherent to the applied

segmentation method and feature extraction. At the moment, it consists of the lengths of

the moving windows and the difference window, weights for both the amplitude measure

and frequency and the order of the autoregressive modelling.

The latter set of parameters is crucial in the evaluation of the applied methods and will be

adjusted many times in order to obtain an optimum algorithm adjustment. Due to the

probably intensively repeated adjusting of the calculation settings the user is enabled to

save the settings, as he does not want to adjust the settings all over again at a next start.

5.4 Preprocessing

5.4.1 EEG data collection

The available EEG data within the Anaesthetic Depth project was acquired in clinical

sessions performed for auditory evoked potential (AEP) studies. AEP analysis is another

field of interest within the project; the influence of anaesthetics on AEPs is studied.

Evoked potential studies yield the recording of a patient's EEG while a sensory organ is

stimulated.

A sampling frequency of 5 kHz was used to record the stimulus evoked responses (see

[Clu90]). The EEG analysis tool proposed here is intended to evaluate analysis techniques

with respect to the raw EEG. Hence, we are only interested in the range 0 to about 100

Hz of the recording and a low pass filtering algorithm is necessary that will be explained

in the next section.

Measurements of different levels of anaesthesia sometimes required different settings for

the calibration and offset values. It implies a multiplication factor and deviation on zero

input that is used for calibration of the samples to proper units in micro-Volts. For this, a

record was kept for the calibration and offset values of each measurement.

35

Page 37: Eindhoven University of Technology MASTER Segmentation

5.4.2 Filtering

Since we want to analyze the raw EEG, only the frequency range from 0 to about 60 Hzis interesting. In other words, we would like to lower the sampling rate to an artificialsampling rate that is twice (or slightly more) the maximum significant EEG frequency(that is adjustable in the analysis tool, see section 5.3). As it is explained in [VeI91], dueto aliasing the high frequency components occurring in the stimulus evoked responses caninfluence the signal below a reduced sampling rate. Hence, before the sampling frequencyis lowered, the frequency components above the maximum significant EEG frequencyshould be removed from the data. For this, a finite impulse response (FIR) filter technique

is used. The filter that is applied, "smooths" the signal. The filter is defined by:

L

I = 1 r sn 2£+1 LJ n+k

k=-L

(5 • 1 )

in which sn is the input signal and rn is the output signal. The values rn represent theaverage value of sn around sample n. A detailed description of the applied FIR filteringalgorithm can be found in [VeI91].

5.5 Evaluation facilities for segmentation and feature extraction

As described previously, the analysis tool is intended for evaluating the applied EEGanalysis methods. Plotting the time signal and detected segment boundaries on a display

can be a help for evaluating the calculation settings of the segmentation algorithm (seealso appendix C).

Therefore the major part of the display area (a monitor screen) is reserved for the timedata of the EEG channels. The evoked potential system stores 2 channels of EEG so that

usually 2 channels will be analyzed and displayed. However, the number of channels to be

analyzed and displayed can be set by the user. The display area reserved for time data isautomatically divided with respect to the number of channels to be displayed.

Additionally, the number of seconds to be plotted on one screen can be set by the user.

The settings of the algorithms are stored in the header of the file in which the processingresults will be stored. This "result" file can be used as a primary source in the clustering

phase.

36

Page 38: Eindhoven University of Technology MASTER Segmentation

6. CONCLUSIONS

6.1 Literature review

The purpose of the study described in this report is to extract features from the EEG that

may significantly correlate with anaesthetic depth. On the basis of the reviewed literature,autoregressive coefficients are proposed as a set of features for describing the EEG duringsurgical intervention.

Theoretically, in autoregressive modelling it is assumed that the EEG signal is stationary.To meet this stationarity assumption an adaptive segmentation method is applied to thesignal. The method is based on the detection of local maxima of measures of difference

between two equally long consecutive windows sliding along the signal. The difference

measure consists of an amplitude and frequency measure.

The final step in the EEG analysis is a clustering phase by which the discriminating power

of the set of features in identifying levels of anaesthesia can be investigated. Based onfindings in the literature, a sequential fuzzy clustering algorithm is recommended, as no"crisp" assumptions are made with respect to the clusters that will be created. Therefore, itis probably the most suitable method to start with.

At the moment, an evaluation tool is developed in which the segmentation method and

autoregressive modelling are inserted.

6.2 Evaluation tool

The evaluation tool can be used for investigating the usefulness of the proposed analysismethods in identifying levels of anaesthesia.

The EEG analysis methods are partly based on empirical research and the algorithms need

some parameters to be set. Therefore, a menu structure was chosen for easy adjustment ofparameters. Evaluation of specific parameter settings is provided with a monitor display.

A hierarchical tool design is applied so that a well-structured program is obtained in whicha particular algorithm can be modified or substituted easily.

37

Page 39: Eindhoven University of Technology MASTER Segmentation

6.3 Test results

A few tests on the implemented segmentation algorithm have been carried out that will bedescribed here briefly.

With the segmentation algorithm the "detailedness" of the segmentation can be controlled.

If the length of the window is decreased that is used for detecting local maxima in

measures of difference between two consecutive windows sliding along the EEG, more

maxima (i.e., boundaries) will be detected. An example of this is explained in appendix C.

In addition, if the length of the two abovementioned consecutive windows is decreased, it

means that a measure of difference is based on fewer EEG samples and short-term

nonstationarities in the EEG will be less "smeared out". In appendix C it can be seen that

such a decrease also results in a more detailed segmentation. However, in general, the

boundaries don't coincide with previous ones.

When a more detailed segmentation is desired (e.g. due to an increase of the

autoregressive model order in the feature extraction phase) the length of the "maximum

detection" window must be set smaller. To obtain a reliable difference measure, the

length of the two consecutive moving windows must be taken long enough.

6.4 Future research

The program intended here is meant as a beginning of a more general analysis tool in

which several EEG analysis methods can be evaluated in relation to anaesthesia. To givedirection to this development, some extensions to consider could be:

the implementation of the proposed sequential fuzzy clustering algorithm. The

user-entrance to the clustering phase has already been provided in the program

structure. An important aspect to think about is the evaluation for the cluster

method.

the display of 'characteristic' calculation results. The values can now only be

reviewed in a result file. In particular, the autoregressive coefficients or prediction

errors could be displayed in order to obtain a better evaluation of the accuracy of

the autoregressive modelling.

adding (or substituting) other EEG properties to the feature vector. However, this

becomes only interesting when the segmentation method and the autoregressive

coefficients are thoroughly evaluated.

38

Page 40: Eindhoven University of Technology MASTER Segmentation

7. REFERENCES

[App83]

[Ban87]

[Bar85]

[Ben91]

[Bod77]

[Boh71]

[Boh73]

[Bur75]

[Cer85]

[Clu90]

Appel U, von Brandt A. "Adaptive sequential segmentation of piecewise

stationary time series". Information Sciences. vol.29, 27-56, 1983.

Bankman I, Gath I. "Feature extraction and clustering of EEG during

anaesthesia". Medical and Biological Engineering and Computing, 474-477,

juli 1987.

Barlow 1. "Methods of analysis of nonstationary EEGs, with emphasis onsegmentation techniques: a comparative review". Journal of Clinical

Neurophysiology, vo1.2, no.3, Raven Press, New York, 267-304, 1985.

Bender J, Schultz R, Schultz A, Pichlmayr I. "Identification of EEG patterns

occuring in anaesthesia by means of autoregressive parameters".

Biomedizinische Technik, vo1.36, 236-240, 1991.

Bodenstein G, Praetorius HM. "Feature extraction from the

electroencephalogram by adaptive segmentation". Proceedings of the IEEE,

vo1.65, no.5, 642-652, 1977.

Bohlin T. "Analysis of EEG-signals with changing spectra". IBM-Systems

Development Division, IBM Nordic-laboratory, Sweden TP 18.212, 1971.

Bohlin T. "Comparison of two methods of modelling stationary EEG

signals". IBM Journal of Research and Development, vo1.17, 194-205, 1973.

Burg 1. "Maximum entropy spectral analysis". Doctoral Thesis, Department

Geophysics, Stanford University, USA, 1975.

Cerutti S, Liberati D, Avanzini G, Franceschetti S, Panzica F.

"Classification of the EEG during neurosurgery, parametric identification

and kalman filtering compared". Journal of Biomedical Engineering,

vol.8, 244-254, 1985.

Cluitmans PJM. "Neurophysiological monitoring of anaesthetic depth".

Doctoral Thesis, Eindhoven University of Technology, The Netherlands,

1990.

39

\ ',j

v

Page 41: Eindhoven University of Technology MASTER Segmentation

[Cov74]

[Gas83]

[Gat80]

[Ger79]

[Gev80]

[Gev84]

[Har76]

[Hj070]

[Jan81]

[Jan91]

[Jen77]

Cover T. "The two best measurements are not the best two". IEEE

Transactions Syst. Man. Cybernetics, voI.SMC-4, 116-117, 1974.

Gasser T. "General characteristics of the EEG as a signal". EEG

informatics. A didactic Review of Methods and Applications of EEG Data

Processing, A Remond, Ed. New York: Elsevier, 37-55, 1977.

Gath I, Bar-On E. "Computerized method for scoring of polygraphic sleep

recordings". Computer Programs in Biomedicine, vol.11, 217-223, 1980.

Gersch W, Martinelli F, Yonemoto J, Low M. "Automatic classification ofelectroencephalograms: KL nearest neighbor rules". Science, vo1.205,

193-195, 1979.

Gevins AS. "Pattern recognition of human brain electrical potentials". IEEE

transactions on pattern an~sis-llnd machine intelligence, vol.2, no.5,

383-404, 1980. ((

'"Gevins AS. "Analysis or-the electromagnetic signals of the human brain:

milestones, obstacles and goals". IEEE transactions on biomedical

engineering, vol. BME-31, no.12, 833-850, december 1984.

Harman H. "Modem factor analysis". 3rd ed. Univ. Chicago Press, Chicago,

USA, 1976.

Hjorth B. "EEG analysis based on time domain properties".

Electroencephalography and clinical neurophysiology, vo1.29, 306-310,

1970.

Jansen B, Bourne J, Ward J. "Autoregressive estimation of short segment

spectra for computerized EEG analysis". IEEE transactions on biomedical

engineering, voI.BME-28, 630-638, 1981.

Jansen BH. "Quantitative analysis of electroencephalograms: is there chaos

in the future?". Internation Journal of Biomedical Computing, vo1.27,

95-123, 1991.

Jennrich R. "Stepwise discriminant analysis" Enslein et al (Eds.) Statistical

methods for Digital Computers, Wiley, New York, USA, vo1.3, 1977.

40

v

Page 42: Eindhoven University of Technology MASTER Segmentation

[KaI60] Kalman RE. "A new approach to linear filtering and prediction problems".

Transactions American Society of Mechanical Engineers, Series D, vo1.82, l/

1960.

[Kem87] Kemp B. "Model-based monitoring of human sleep stages". Doctoral Thesis,

University of Twente, The Netherlands, 1987.

[Kra91] Krajca V, Petranek S, Patakova I, Varri A. "Automatic identification of

significant graphoelements in multichannel EEG recordings by adaptive

segmentation and fuzzy clustering". International Journal of Biomedical

Computing, voI.28, 71-89, 1991.

[KuI58] Kullback S. "Information theory and statistics". Wiley, New York, USA,

1958.

[Lip87] Lippmann RP. "An introduction to computing with neural nets". IEEE

ASSP Magazine, 4-22, April 1987.

[Lip89] Lippmann RP. "Pattern classification using neural networks". IEEE

Communications Magazine, 47-64, November 1989.

[Mak75] Makhoul 1. "Linear prediction: a tutorial review". Proceedings of the IEEE,

voI.63, no.4, 561-580, April 1975.

[Mar80] Marple L. "A new autoregressive spectrum analysis algorithm". IEEE

transactions on acoustics, speech and signal processing, vol.ASSP-28, no.4, ./

441-454, August 1980.

[Mce75] McEwen JA, Anderson GB. "Modeling the stationarity and Gaussianity of

spontaneous electroencephalographic activity". IEEE transactions on Vbiomedical engineering, vol. BME-22, no.5, 361-369, September 1975.

[Med88a]

[Med88b]

Media Cybernetics. "HALO '88 Graphics Kernel System Library reference".

Silver Spring, Maryland, USA, 1988.

Media Cybernetics. "HALO '88 Graphics Kernel System - Language and

device reference". Silver Spring, Maryland, USA, 1988.

41

Page 43: Eindhoven University of Technology MASTER Segmentation

[Mic84]

[Oza75]

[Skr84]

[Som86]

[Th087]

[Th089]

[Th091]

[Tou74]

[Var88]

[VeI91]

Michael D. "Ein Echtzeitverfahren zur automatischen Segmentierung

stochastischer Signale in stationare Abschnitte und deren Klassifizierung am

Beispiel des Electroencephalogramms. Doctoral Thesis, Technicalq~p J~ M,',University of Munich, Germany, 1984. ("

Ozaki T, Tong H. "On the fitting of non-stationary autoregressive models in

time series analysis". Proceedings of 8th Hawaii international conference

on system sciences. University of Hawaii, Honolulu, 224-226, 1975.

Skrylev K. "A method of analysis of abrupt changes in the EEG rhythm"

(In Russian). Fisiol Chelovek (Human Physiol), vol.lO, 333-336, 1984.

Sommerville 1. "Software Engineering". Academic service, Addison Wesley,

1986.

Thomsen CE, Rosenfalck A, Ncjlrregaard Christensen K. "Monitoring of

anaesthetic level by EEG". lEEE/ninth annual conference of the engineering

in medicine and biology, 1252-1253, 1987.

Thomsen CE, Christensen KN, Rosenfalck A. "Computerized monitoring of

depth of anaesthesia with isoflurane". British Journal of Anaesthesiology,

vo1.63, 36-43, 1989.

Thomsen CE, Rosenfalck A, Ncjlrregaard Christensen K. "Assessment of

anaesthetic depth by clustering analysis and autoregressive modelling of

electroencephalograms". Computer Methods and Programs in Biomedicine,

vo1.34, 125-138, 1991.

Tou J, Gonzalez R. "Pattern recognition principles". Addison-Wesley,

Reading, MA, USA, 107, 1974.

Varri A. "Digital processing of the EEG in epilepsy". Licentiate Thesis,

Tampere University of Technology, Finland, 1988.

Velde M vd. "EEG analysis for monitoring of anesthetic depth".

M. Sc. Thesis, Division of Medical Electrical Engineering, Department of

Electrical Engineering, Eindhoven University of Technology, The

Netherlands, 1991.

42

Page 44: Eindhoven University of Technology MASTER Segmentation

[Wie49] Wiener N. "Extrapolation, interpolation, and smoothing of stationary time

series". Cambridge, MA: The Technology Press, and New York: John

Wiley, 1949.

[Yun80] Yunck T, Tuteur F. "Comparison of decision rules for automatic EEG

classification". IEEE transactions on pattern analysis and machine

intelligence, voI.PAMI-2, no.5, 420-428, 1980.

43

v

Page 45: Eindhoven University of Technology MASTER Segmentation

APPENDIX A. ABBREVIATIONS

AEPANSI

ARARMA

CSAEEG

FFfFIRpeA

RMS

auditory evoked potential

American National Standards Institute

autoregressive

autoregressive moving average

complex spectral array

electroencephalogram

fast Fourier transform

finite impulse response

principal component analysis

root mean square

44

Page 46: Eindhoven University of Technology MASTER Segmentation

APPENDIX B. MAIN MENU LAYOUT

EEGRNAL: softMare tool far Ilg analysis

+ Plot Datil (1)

Plot Cluster results (2)

Help (3)

Quit (4)

45

Page 47: Eindhoven University of Technology MASTER Segmentation

APPENDIX C. TEST RESULTS

In the next three pages a 5-s EEG epoch is plotted with different settings in the

segmentation algorithm. The parameters that are varied are the length of the twoconnected windows that slide along the EEG signal and the length of the "maximumdetection" window. The parameter values that are used, are given in table c.l.

page moving window maximum detection window

upper 40 30middle 150 30lowest 150 100

Table c.l. Parameter values2 that are used in the following pages. The settings are givenin number of samples.

From the middle and the lowest page, it can be concluded that extra boundaries are

detected when local maxima of difference measures are searched for with a smallerwindow. From the upper page, it can be noted that boundaries are located at other

positions, since other difference values have been obtained. Besides, a decrease of the

length of the connected moving windows results in a more detailed segmentation.

2The sample frequency is taken 100 Hz.

46

Page 48: Eindhoven University of Technology MASTER Segmentation

autoregressive modelling and clustering of

the EEG." (by A.A. Vas)

Page 49: Eindhoven University of Technology MASTER Segmentation

autoregressive modelling and clustering of

the EEG." (by A.A. Vos)

Page 50: Eindhoven University of Technology MASTER Segmentation

s(!)

o

___----,) -t (s)

,