Добавил:
Sekretar
kiopkiopkiop18@yandex.ru
t.me/Prokururor I Вовсе не секретарь, но почту проверяю
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_5276_Библиотеки_им_академика_М_И_Перельмана
.pdf
73
In the ensemble classifiers, outputs of the 17 classifiers are fused together in order to
produce a single predicted character. Thus, the results of all binary classifiers were transformed
into a single result on the 36-class problem.
The classification method is based on K = 17 classifiers for which each classifier has
been trained on a subset of the training data. Each classifier assigns a real-valued score
,
k = 1,….,K to a post-stimulus vector
associated to a given row or column. After a number of
sequences J, we consider that the most probable row and column is the one that maximizes the
score:
(22)
where
is the post-stimulus vector associated to a given row or column during the j-th
sequence and
is the score of that row or column. Expanding this equation and referring to
Chapter 3 shows that:
(23)
which clearly exhibits the double averaging performed by the classifier. The first averaging is
applied in the data space: as sequences increase, signals from each row or column are averaged.
The second averaging is done in the classification score space. The latter procedure leads to a
more robust classification scheme since a classifier that assigns a bad score to a test data can be
corrected by other classifiers. Note that the idea of averaging SVM outputs over the sequences as
in Equations (22) and (23) has already been successfully applied in [48] (but without the
ensemble of SVM) and they yielded very interesting performances. However, since they use a
non-linear classifier, a Gaussian kernel SVM, their averaging does not boil down to signal
averaging as in our approach.

74
4.4 Proposed P300-based BCI System Experiments
4.4.1 Experimental Setup
After reviewing the literature and studying several paradigms used for testing the reliability and
usability of the P300 wave in different control applications, we decided to use two types of
paradigms that enable the user to interact with visual stimuli and evoke the P300 wave. The first
paradigm is similar to the one proposed by Piccione et al., [28] and Piccione et al., [30], with two
different stimulus shapes. The paradigm consists of a virtual environment surrounded by four
stimuli correspond to four directions. The first stimulus shape is the arrow shape as used in
Piccione studies and the second shape is the button shape as proposed by Rebsamen et al., [15]
(see figure 4.9.a and b). The second paradigm is similar to the paradigm presented by Kansaku et
al., [44] where an arrow inside a square with the name of its corresponding direction under it is
used as a stimulus and both the arrow and the name are flashed. The stimuli are placed in the four
corners of the virtual environment plane (see figure 4.10).
Participants were seated facing a computer screen with the headset mounted on the top of
their head (see figure 4.8). They were asked to control the movement of a virtual object (the blue
cubic) from a starting point to a goal-point (the red cubic, see figures 4.9 and 4.10) through a path
specified by the examiner. The initial distance between the starting-point and the goal-point
encompassed five discrete steps. The four stimuli (arrows. arrows inside squares, or buttons) were
flashed in random sequences, one stimulus at a time. As mentioned before, each stimulus
indicated one out of four possible directions (upward, rightward, downward, and leftward)
concerning the movement of the blue cubic. Participants had to pay attention to the stimulus
indicating the correct direction (i.e. target stimulus; probability of occurrence: 25%), but to ignore
the stimuli indicating the wrong directions (i.e. distracting stimulus; probability of occurrence:
75%). According to the path specified by the examiner, participants should move the blue cubic

75
first, along the horizontal meridian and, then, along the vertical meridian to reach the goal-point.
Each trial consists of flashing of a stimulus for 250 ms, 1250 ms of waiting time and the time of
data processing necessary for P300 recognition and the generation of feedback concerning the
movement of the blue cubic. The interval between the presentation of two arrows (inter-trial
interval: ITI) was set to 2.5 sec including the processing and classification process time in order
to achieve optimal on-line data processing. A session was defined as the sequence of trials
sufficient to permit the reaching of the goal-point.
Figure 4.8: Visual stimuli paradigm and experiment setup of the proposed BCI system
The GUI provides the user a panel that includes some buttons to control the experiment
steps. Also, the GUI enables the user to be guided and informed with the current and next
processes and the results through the experiment by a window in the top right side (see the figures
below). After users being experienced with the system, the control panel and the mentioned
window can be put in invisible status so they may not interrupt users.

76
(a)
(b)
Figure 4.9: Proposed Stimuli Paradigm-1: a) Paradigm-1.a: arrows; b) Paradigm-1.b: buttons

77
Figure 4.10: Proposed Stimuli Paradigm-2: arrows stimuli in the corners
The EEG was recorded at 128 Hz (in the headset it was recorded at 2048 Hz and then internally
downsampled) from the Emotiv headset. As we mentioned above, to be able to acquire EEG raw
data, we have to install the SDK of a research edition Emotiv epoc. The headset was set up in two
different positions: the default mount position and the reversed mount position. In the default
position, only the EEG from the ten electrodes shown in red dashed circles in figure 4.11.a is
recorded (F3, FC5, T7, P7, O1, O2, P8, T8, FC6, and F4). These electrodes may record some of
the P300 components. Referring to the literature as [6], the BCI competition III winner, O1 and
O2 electrodes 10-20 positions cover a part of the P300 active area. The electrodes were
referenced using AF3 and AF4 electrodes.
In the reversed position the EEG from the eight electrodes shown in red dashed circles in
figure 4.11.b is recorded (FC6, F4, P8, AF4, AF3, F3, P7, and FC5). These electrodes may
record some of the P300 components since they cover a part of the head central area which is
considered as the most active area for the P300 wave generation [46].

78
(a)
(b)
Figure 4.11: Emotiv headset experimental electrodes placement: a) Electrodes placement for the default
position; b) Approximated chosen electrodes placement for the reversed position.
The realtime access to the EEG signals was implemented with C++. The program uses
functions of Emotiv API and EmoEngine. The Emotiv API is exposed as an ANSI C interface
that is declared in three header files (edk.h, EmoStateDLL.h, and edkErrorCode.h) and
implemented in two windows DLLs (edk.dll and edk_utils.dll). For our application, we included
edk.h to use the Emotiv API and linked with edk.dll. The Emotiv EmoEngine refers to the logical
abstraction of the functionality that Emotiv provides in edk.dll. The EmoEngine communicates
with the Emotiv headset, receives preprocessed EEG and gyroscope data and manages user’s
application-specific settings. For more information about Emotiv API and EmoEngine, please
refer to [26].

79
Yes
Yes
Yes
No
Yes
No
C++ code
No
No
Yes
No
Yes
Matlab code (GUI)
Yes
No
No
Figure 4.12: Flow chart of EEG raw data acquiring process
Wait for 1.25 sec
Set start_flag to 0
Set read_flag to 0
Ready
Start
Define start_flag=1, read_flag =
1 and user_flag = 0.
Put these flags into Matlab
engine workspace and pen GUI
Read start_flag from Matlab
Set user_flag to 1 and put it in Mat.
Create Emo_event
Check Emo_Engine_connect
Set buffer size
Start Emo_state
Stop
Check if user added and ready
Get data from buffer
Put this data into Matlab
Flash stimulus for 25 ms
Get the EEG data corresponds
to the above time period and
feed it to the next stage.
Set read_flag to 1
Set read_flag to 0
Check read_flag
Check start_flag
Set start_flag to 1
Stop
Check read_flag
Check user_flag
1

80
The stimulus display GUI, signal processing and machine learning algorithms were
implemented with MATLAB. The acquired EEG data is fed to these algorithms through Matlab
engine where it is included in the C++ file. Figure 4.12 shows the flow chart of the online EEG
data acquiring and handling process.
Three healthy subjects (S1 to S3), all males, between 32 to 40 years, participated in our
study. Note that no subject screening was conducted, and we used all the three volunteer subjects
throughout the study.
4.4.2 Experimental Schedule
The most widely used scheme in the P300-based BCI systems considers brain response to all
target stimuli is similar and thus using one classifier can sufficiently distinguish between target
and non-target P300 data. However, some studies such as [6] introduced the use of the ensemble
classifiers technique in the P300 speller system and showed that this scheme can improve the
efficiency of the system. In [6], the ensemble classifiers method was used for EEG data already
collected. Therefore, we decided to try initially the traditional method then try the ensemble
method and check for any results improvement.
The experiment schedule for each subject consists of two parts; training part and on-line
testing part. In the training part, the user has to follow a certain procedure as described in the next
section and several data sets will be collected to be later processed and used to train and validate
the classifier(s). In the on-line testing process, the user has to follow a similar procedure, but the
data for each stimulus’s intensification is directly processed and fed to the pre-trained classifier(s)
to make the decision of P300 existence or not to execute the corresponding object movement.

81
Training Process
First, for both methods the system needs to be trained for each subject (note that subjects can use
their previous training session’s information if they do not want to retrain the system). The user
can start the training session by clicking on the training button in the GUI. For the traditional
method, the training task is performed as follows:
The subject attends to one stimulus (an arrow or a button) for eight rounds.
In each round, the four stimuli are flashed randomly for 250 ms and followed by 2.25 sec of
waiting time.
After eight rounds the subject is paused for 2 sec, and then moves on to the next stimulus’s
rounds until he has gone through all the four stimuli.
Hence, training session contains 32 rounds of EEG, corresponding to 32 epochs of target data
and 96 epochs of non-target data.
For the non-target epochs we add 4 EEG recorded data sets corresponding to the non-control
or idle task where the user is relaxed and none of the stimuli is flashed, only the background
colors are available.
Consequently, the total number of non-target epochs is 100. Seventy five percent of the target
and non-target epoch’s EEG data sets are used to train the classifier (SVM or NN) to
discriminate between target and non-target P300 data. The other 25% of the sets are used to
validate or test the trained classifier through the training process.
For the ensemble classifiers method, the same scenario was followed while the number of rounds
is changed to 15.
Each stimulus training session contains 15 rounds of EEG corresponding to 15 epochs of
target data and 45 epochs of non-target data.

82
We add 4 EEG recorded data sets to non-target epochs of each stimulus and these sets
correspond to the non-control or idle task.
The total number of non-target epochs is 49.
We use four classifiers, a classifier for each stimulus EEG data. 75% of the target and non-
target epoch’s EEG data sets of each stimulus are used to train its corresponding classifier
(SVM or NN) and the other 25% of the sets are used for validation.
Preprocessing
Before learning a classification function and before validation, some preprocessing operations
were applied to the data. We follow the most used preprocessing operations specifically similar to
Piccione et al., [28] and they were applied in the order stated below.
Referencing and Zero Mean: first, all data of each electrode was centered to zero mean to
get rid of the DC component, then the average signal from the reference electrodes was used
for referencing electrodes data. In the default position reference electrodes were AF3 and
AF4 and in the reversed position were O1 and O2. The referencing system cuts down
common mode noise, in other words the electrical referencing system cuts down the mains
(60Hz, 120Hz,..etc) contribution by a whole heap.
Single trials extraction: Single trials of duration 1500 ms were extracted from the data.
Single trials started at stimulus onset, i.e. at the beginning of the intensification of a stimulus,
and ended 1500 ms after stimulus onset (250 ms of flashing and 1250 ms after flashing). Thus
192 sample points per channel are available after each stimulus to detect the presence or
absence of the P300 wave.
Filtering: Several digital filters were tried. We tried a 4
th
order band-pass Chebyshev Type I
filter, an elliptic bandpass filter, and an FIR filter from the open source EEGLab MATLAB
toolbox [24]. All filters functions were built in MATLAB toolboxes. The MATLAB
Соседние файлы в папке Библиотека им академика М.И. Перельмана
