You are on page 1of 4

Student Conference on Research and Development (SCOReD) 2003 Proceedings, Putrajaya, Malaysia

Expert System for Characterization of Electroencephalography (EEG)


Signals to Detect Sleep Onset
F. A. Hamid', A. Hussain', 'A. Mohamed', M. A. Mohd Alii,
B. Yeop Majli;', R. A. AI?, and A. S. Mohamed4
'EESE Dept., Faculty ofEngineEririf;g& 'Institute of Microengineering and Nanoelectronics
Universiti Kebangsaan Malaysia, 43600 UKM Bangi
Selangor Dam1 Ehsan, Malaysia
4
Dept. o f Othorhinolaryngology& 'Dept. o f Medicine
Faculty o f Medicine, Universiti Kebangsaan Malaysia
56000 Cheras, Kuala Lumpur, Malaysia
e-maiI:
imah~v1si.cne.ukni.n~~~ aini(ii2eiie.~IkIn,iny,azah~~cug.~~kni.mp,
mam@enq.ukm.my & burliau(iilenq.iikmmy

Abstract- This paper describes the development of an simple calculation. No filtering was apphed to the data
approach that uses expert system to differentiate various during recording. The subjects were seated in a sound-
stages of sleep: i.e. from awake state to stage I1 sleep. An controlled room with dim lighting and air-conditioner
expert system that performs sleep staging using the unit switched on for providing extra comfort to the
' characteristics analysis of the human sleeps. subjects.
electroencephalography (EEG) signals is presented. The
' Kappa PC expert system shell, the frequencies and Subjects were also asked to abstain from taking
waveforms characteristics of the EEG signals were used excessive caffeine and naps on the day prior to testing.
in the implementation ofthe sleep on set detection. Additionally, they were asked to reduce their sleep
during the night prior to testing so that subjects will be
Keywords deprived from their sleep. Eighteen electrodes are
Driver drowsiness, sleep onset, expert system, placed over the scalp and connected by wires to an EEG
electroencephalography. machine. Surface electrodes are placed at specific
locations on the subjects scalp as recommended by
I. INTRODUCTION lnternationnl Electrocnc~pphalograpli~arid Clinical
Neurophysiology (SEEGCN).
Driver drowsiness is an important risk on the roads in
which it is one of the main factors leading to accidents The system is known as the '10-20 System' since it is
or near-missed accidents, This fact has been proven by derived by 10% and 20% measurements relative to four
many studies that have established links between driver scalp landmarks [3]. The signals from the brain are very
drowsiness and road accidents. Therefore, it is crucial to small (measured in pV) and therefore, amplification is
develop methods so as to reduce risks of accidents due required before the electrical signals are displayed and
to drowsiness. stored. To classify the EEG signals, the power spectral
density (PSD)is extracted for values within the range of
Presently, several studies have tried to model the the delta, theta, alpha and beta waves i.e. from 0.5 to 30
behavior of drowsy driver by establishing links between Hz.
drowsiness and certain parameters related to vehicle as
well as the driver [I] &[2]. Sleep onset detection can be No pre-filtering or artifact removal was applied to the
used to prevent driver drowsiness that gives major data. Fig. l(a) shows the EEG signal as recorded by the
implication in transportation system safety. EEG signal MEDELEC machine while Fig. 1 (b) depicts the I second
has been found to be the mast predictive and reliable duration of the single channel plot for T5-01electrode.
indicator of detecting the onset of sleep [ 11. In Fig. l(c) and (d), the Fast Fourier Transform (FFT)
plot and PSD plot are shown, respectively.
Therefore, it is important to understand the
characteristics of EEG signal in order to determine
when the drowsiness begins.

LL. EXPERIMENTAL SETUP

In this work, the data from three normal persons aged


between 23 and 31 years were recorded using sampling
rate of 256 Hz. Subjects were requested to perform
brain-related activities such as reading and p e r f o d n g

0-7803-8 173-4/03/$17.00 02003 IEEE.


5

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on July 29,2010 at 14:54:21 UTC from IEEE Xplore. Restrictions apply.
111. DESIGN AND IMPLEMENTATION

Expert system is a field of Artificial Intelligence (AI)


that combines information from previous experiences so
that it can replace the expert role in the form of updated
information based on the expert knowledge [4].Due to
its long-list of advantages, we decided to adopt it for
solving the problem in classifying the EEG signals. The
developed object-oriented expert system characterizes
the EEG signals so that the sleep onset can be detected.
The KAPPA-PC expert system shelf has been used since
it has in-house reasoning models and mechanisms to
help speed up the expert system development [SI.The
results from the expert system are displayed graphically
using a window interface.

Initial work involves the conceptual design of the expert


system for characterization of the EEG signaIs to solve
the sleep on set detection that can be related to driver
drowsiness problem. An object-oriented approach is
I \
used to develop the d e s since it allows greater
I 4
I
I \ flexibility in the overall design of the system. Rules are
I
I
, simple means of representing knowledge and are used
for reasoning with the data in the objects. Ten rules
were constructed, part of the rules are listed below in
Fig. 2,

RULE 1:
I f Data:Max-Freq *
13 And
Dnta:Max-Frcq 30;
Then (Ce1Beta:Betn = beta;
AppcndToList(
CharacterizatianOfEEG:ElectrodeBeta,
Chnracterization0fEEG:Electrode ):
reset2( );};

RULE 7:
If Data:Max_Freq +8 And
Data:Max-Freq < 13;
Then (GelA1pha:Alpha =alpha;
AppendToList(
CharacterizatioaOfEEC:ElcctrodcAIpha,

. Charncterlzntion0fEEG:Electrode ):
reset2( );};

i
RULE 10:
ir
LengthList( Charncterizatian0fEEC:ElectrodeOther ) 5
LengthList( Charscterization0EEG:ElectrodeAlpha )
And LengthList( Characterization0l'EEC:ElectrodeOther
) > LengthList( Characterization0fEEEC:ElectrodeTheta)
And LengthList( Chnrncterizntion0lEEC:ElectrodcOthcr
1'
LengthList( Charactcrization0CEEG:ElcctrodeBeta) And
LengthList( Charaetcrization0lEEG:EfectrodcOther) >
LengthList( Charaeterization0lEEG:EtectrodeOther);
Then DisplayTextt Transcriptl, "DATA IS OUT OF
FREQUENCY RANGE." );

Fig. 1. (a) Recorded EEG signal, (b) single channel plot Fig. 2. Part of the rules for EEG classification
from TS-01, (c) FFT plot, and (d) PSD plot task

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on July 29,2010 at 14:54:21 UTC from IEEE Xplore. Restrictions apply.
YES INTRODUCTION
INTRODU CTIQN 9

INOIWDUAL NO

IYES I
CHOO5
ELECTRODE
TESTING

INDlVlDUAL
TESTING
(USING R U L E 1 - 5 )
I . I

OUTPUT

Fig. 3. Flowchart of the designed expert system

IV.THE DEVELOPED SOFTWARE


Which type of analysis you want to proceed?
The flowchart of the developed software system, which ESINolE C H A N i h i k N A L W I 3 -
is self-explanatory, is shown in Fig. 3. The window
interface for the main program is shown in Fig. 4(a). p-miJ"EwTmt
Upon starting this program, user needs to load a data
and later has an option to either run a sequent of
analysis interactively on the entire data using Single (c)
Channel Analysis or perform it automatically at one go Fig. 4.Window interface (a) Main Menu (b) Input Data
using Overall AnaIysis. Fig. 4(b) shows a dialog prompt and (c) Analysis option
for data loading while Fig. 4(c) shows a dialog prompt
for the analysis options.

Fig. 5 . Single channel analysis window interface

There are 18 electrode channels to choose from and


detail analysis will be performed upon request. The
location of each electrode is given in the montage view
of Fig. 5. Pressing the 'ANALYSE' button will trigger
the analysis and the ES software will prompt the result

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on July 29,2010 at 14:54:21 UTC from IEEE Xplore. Restrictions apply.
of the EEG signal anatysis in terms of its brain wave classify the EEG signal correctly according to its
type. The brainwave type, its quantity and duration will frequency range. Typically, EEG signals can be
then be tested against the rules to determine the subject categorized according to the frequency bands, which are
awakehleep condition. Table 1 lists the frequency range made of beta, alpha, theta and delta waves. As the
of various brainwave types, its category and the subject brainwave changes from beta (highest frequency band)
awakehleep conditions accordingly. to delta (lowest frequency band), the sleep onset can be
determined.
Changes of the subject brain state can be observed by
performing analysis on every consecutive input data. V. ACKNOWLEDGEMENT
The level of drowsiness can be determined by looking at
various types of brainwaves activities and the way they The authors gratefdly acknowledge the financial
change from one state to another. For instance, as the support of the Malaysian Ministry of Science,
brainwave descends from beta to alpha, alpha to theta Technology and Environment (MOSTE) and UKM for
and finally from theta to delta indicate that the subject financing this project under IRPA code 03-02-02-
brain state has changed from the, alert to drowsy state 0017/SR0003/07-03. A special acknowledgement goes
and finally fall asleep. In this work, drowsiness is said to Encik Anuar Ithnin of HUKM for his technical
to occur when the brainwave descends from beta to assistance during and after data recording.
alpha, which is defined as the onset of sleep Table 2
lists. VI. REFERENCES

Table 1. Fre uenc ide for brainwave classification [l] La1 S.K.L. and Craig A. “A critical review of the
Frequency Name Frequency correspond to the following psychophysiology of driver fatigue.”BioIogical
ran e Hz Psychology. 2001.55: 173-194.
0.5 - 4 Delta
-Sleep/Dreaming
-Picsent during transition to drowsiness and [2] Robert D. Peters, Esther Kloeppel, Elizabeth
during slccp. Alicandri, Jean E. Fox, Maria L. Thomas, David R.
-Drowsy/ Idling ’ Thome, Helen C. Sing, and Sharon M.
-Low level of alertness during drowsiness.

T
Balwinski. ”Effects of Partial and Total Sleep
-Present during an alen and relaxed state.
-Occur during wakerulness, panicularly over Deprivation On Driving Perfomnce.”(onIine)
the occipital cortex. l~M://www. tfhrc.~ov/htmianfac/sleep/slee~web.htm
-Appears markedly ai eye closure nnd (1 1 Nov. 2002).
decreases at eye opening. 133 Frances M. Dyro. “The EEG Handbook”. United
-Highly stteouated during attention
-
Occur while performing. reaction-time
States of America. 1SBN:OJ16-20019-0. 1989.
motor rask. [4] John Durkin, ”Expert Systems Design And
-Increased of alertness, arousal and Development”, Englewood Cliffs, NJ: Prentice-
Iexcitement. Hall, 1994.
[SI Intellicorp Inc. “Kappa-PC 2.4 Online Manual”. .
United States of America: Microsoft Corp, 1998.
Table 2 kleep stage and its characteristics [63 Sydney Louis, MD. 2001.’Woml EEG
Characterization Waveforms. E-Medicine,”(odine)

t- Drowsy
-Alert.
-Low-amplitude EEG.
-Fait eye movements.
-Movement andlor technical artifacts.
-Presentof slow eye movements
with occipital alpha rhythm.
-A decrease in the amplitude and/or frequency of
the alpha
rhythm.
S
October 2002).
I

[7] K.Hirvonen, J. Basan, V. Hakkinen, A. Varri, P.


(7

Loula.”The detection of drowsiness and sleep onset


periods from ambulatory recorded polygraphic
data.” Electroencephalography and cIinical
Neurophysiology, 1997. 102:132-137.
-Low-amplitudeactivity at the central and
aosterior EEG
channels.
-Theta activity in the central EEG (Non-REM).
Stage 2 -Sleep spindles and K-complexes detecled, theta
and delta activity prominent in the central EEG.

IV. CONCLUSION

An expert system for characterization of EEG signal to


perform sleep onset detection has been developed using
object-oriented programming principles. The Kappa-PC
expert system shell has been chosen to achieve the goal.
The developed expert system is able to diagnose and

. . ..I .
. .. . 8

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on July 29,2010 at 14:54:21 UTC from IEEE Xplore. Restrictions apply.

You might also like