Measurement and signal processing of EEG
Acquisition of EEG signals
In this study, the EEG signals of one of two subjects (two healthy 20’s young men) are measured while the subject is sitting in a chair as shown in Figure 1. The electrodes embedded in a head cap are positioned in the International 10-20 system of electrode placement. The cap is so worn that the position C
z
is right at the top of the subject’s scalp, and the cap is firmly held on the head with a belt passed through the subject’s chest. The embedded electrodes do not directly contact to the scalp of the subject. Instead, electrolytic gel is poured into the electrode holes with a special syringe to suppress the contact impedance between the electrodes and the scalp. The EEG signals over the contralateral sensorimotor area (C4 to A2) are measured. The signals are assumed to be corresponding to the movement of the subject’s left arm. Position C
z
(the top of the scalp) is used as ground, and the right wrist is used as body earth. The sampling frequency is 1 kHz. The EEG signals are amplified 10,000 times by an amplifier (g.BSamp, g.tec Co., Austria). Then, the signals are acquired through 12-bit A/D converters in a multi-functional interface board and further processed online on a PC running real-time operation system. In our case, shield room is not used in consideration of our BMI system which would be used in daily life. The extracted EEG signals are used to drive a one-joint robot arm like the subject flexing his elbow joint. The robotic arm is also controlled with real-time operation system.
Extraction of μ and β rhythms
Sensorimotor rhythms (SMRs) include an arch-shaped μ rhythm, usually with a frequency of 10 Hz (range 8 to 12 Hz), often mixed with a β rhythm (around 20 Hz, range 13 to 30 Hz) and a γ component (around 40 Hz) recorded over somatosensory cortices, most preferably over C3 and C4. The SMR is related to the motor cortex with contributions of somatosensory areas such as that the β component arises from the motor and μ component from the sensory cortex. SMR is blocked by movements, movement imagery, and movement preparation; thus, it is seen as ‘idling’ rhythm of the cortical sensory region. In this study, the μ and β rhythms in movement imagery and/or movement are used as the EEG features to control a robot arm. To extract such μ and β rhythms and further to control a robot arm with the extracted EEG features, STFFT is employed so that both of the spectra of the μ and β rhythms and the time information are obtained.
Here, we briefly describe the concept of STFFT. A complex Fourier series of function x(t) is defined as
(1)
By inner product over the interval [−T/2,T/2], the Fourier coefficients C
k
are defined by the formula
(2)
Further, the discrete Fourier transform about the discrete signal x
i
with sampling interval T
s
is expressed as
(3)
To the amplified and sampled sequence of N EEG signals x
n
(n=0,1,⋯,N−1), its discrete FFT (DFFT) is given as
(4)
where , X
k
is the obtained spectrum of x
n
, and k is the number of frequencies.
As aforementioned, STFFT is used in this study. The data x
n
to be transformed is divided into N blocks (saying, N windows, corresponding to time shift t) with an overlap to reduce artifacts at the boundary. Each block is discrete Fourier transformed, then the complex result is added to a matrix, which records magnitude and phase for each point in time and frequency. This process is repeated so that both the spectra and time information of the EEG signals are obtained. For example, let t=0,10,20,⋯, [ms], then
(5)
Shortening the window width will increase the time resolution, but it will increase the computation cost. The concept of the STFFT is shown in Figure 2 and one example of obtained spectra of μ rhythm by the STFFT is shown in Figure 3.
Task design for motion imagery and motion
In order to extract the features of the μ and β rhythms in motion imagery and/or motion, four different tasks are designed, in which the subject is asked to image to flex his nondominant arm (for example, left arm) but without real movement (only motion imagery) or to perform a real actually motion of flexing his elbow joint for holding up a dumbbell. The four tasks are so designed to generate the different EEG signals from relaxed idling task to excited motion task. When the subject is performing each task of motion imagery or actual motion, he is sitting in a chair wearing the head cap for EEG measurement. The chair height is adjusted to fit the subject’s height and let him feel comfortable.
The detail of designed each task is explained as follows.
Task 1: idling task
In this task, the subject just closes his eyes in relaxation state, and he is not doing and not thinking anything as shown in Figure 4 task 1.
This task is designed to get the subject’s EEG in idling (relaxed) state. It is expected to get the highest μ rhythm in all of four tasks. The results of STFFT for this task are shown in Figure 5, in which we find that μ rhythm is greatly appeared.
Task 2: gazing task
The subject is opening his eyes and continuously gazing at a marker at the endpoint of the robot arm as shown in Figure 4 task 2.
In this task, the subject just concentrates himself to gaze at the marker and is not doing and not thinking anything else. This task is designed to get the subject’s EEG when he opens his eyes and gazes at an object. The brain excitation degree of the subject in this task is higher than that in task 1. It is expected that his μ rhythms would be decreased or saying, suppressed, and the β rhythms would have changes accompanying the changes of μ rhythms in this task. Figure 6 shows the results of STFFT for this task 2. We find that μ rhythms are suppressed and there are a lot of noises as indicated by ‘A’ in other frequency bands that is probably caused by eye-blinking artifacts.
Task 3: motion imagery task
In this task, the subject is asked to continuously image to flex his left arm but not really perform an actual motion while he is gazing at the marker at the endpoint of the robot arm as shown in Figure 4 task 3.
This task is designed to get the subject’s EEG in motion imagery. It is expected that his μ rhythm would be further decreased in this task. Same as the purpose of task 2, the second purpose of this task is to see what happens to the subject’s β rhythm in motion imagery.
Figure 7 shows the results of task 3 with STFFT. We find that μ rhythms are suppressed but β rhythms are generated. This motion imagery task confirmed such a fact that motion imagery can really result in the changes of μ and β rhythms.
Task 4: motion task
In this task, the subject is actually holding a 4 kg dumbbell in 90° angle of his left elbow joint while he is still gazing at the marker at the endpoint of the robot arm as shown in Figure 4 task 4. Of course, to conduct the holding task of a dumbbell, the subject will first have an intent, or saying, image, to flex his left arm. This task is in fact a combination of motion imagery and real motion. In this paper, we simply define it as motion task.
This task is designed to get the subject’s EEG in motion task. It is expected that his μ rhythm would be suppressed to minimum and his β rhythm would be further increased. The results of this task with STFFT are shown in Figure 8. We find that μ rhythm is really suppressed and β rhythm is greatly generated as we expected.
Spectrum characteristics of each task and some remarks
As described above, tasks 1 to 4 are designed according to the degree of brain excitation with/without the existence of motion. It is expected that the spectrum of μ rhythm will decline and the spectrum of β rhythm will change, probably will increase, task by task.
Since the spectrum of β rhythm is much less than that of μ rhythm, the spectrum of EEG is normalized with the ratio X
r
=X(t)/X(max,t), where X(t) and X(max,t) are the spectrum and the maximum spectrum in the frequency band 1 to 30 Hz during the time interval t, respectively.
The EEG between C4 and A2 in each task is measured in 24 trials. The measurement time is 30 s, and the window width of STFFT (i.e. the analytical period) is 100 ms. The averages of the spectrum ratios (here, we sometimes still call it as power spectrum) in 24 trials for 30 s are shown in Figure 9. From this figure, we can find that μ rhythm greatly occurs in task 1 and it is really suppressed in other three tasks as we expected. On the other hand, the suppression extent of μ rhythms in other three tasks is not so gradually intensified as the degree of brain excitation is increased task by task. The differences among the spectra of the other three tasks indeed exist, but they are not obvious. This is different from our expectation, in which we expected that the suppression of μ rhythm would be gradually intensified as the increases of the brain excitation degree.
Meanwhile, we can also find that the β rhythm basically increases from tasks 1 to 4. This shows the fact that the spectrum in β band increases according to the excitation degree of the brain. In this study, these two features of μ and β rhythms are used to control the robot.
Experiments
The subjects are two young men. Before experiments, they gave the consent for the study, which was reviewed and approved by the Ethics Committee of our university. In order to get the EEG signals in motion imagery and/or motion, each subject who is wearing a head cap with embedded electrodes is asked to perform the defined four tasks, and his μ rhythm and β rhythm extracted from the EEG are used to control a robot arm.
Control approach
The flowchart of controlling a robot arm using EEG signals is shown in Figure 10. The EEG signals from the electrodes are amplified by an amplifier and input to a personal computer for A/D conversion via an interface board. Then, STFFT is implemented to the converted data series to obtain their spectra X(k,t) (k means frequency band and t indicates time). Further, μ rhythm (X(μ,t)) and β rhythm X(β,t) are extracted from the computed X(k,t). The target joint angle θ
d
of the robot arm is calculated according to the obtained spectra of μ rhythm(X(μ,t)) and β rhythm X(β,t) with the following formula,
(6)
where X(m a x,t) is the maximum spectrum in the frequency band 1 to 30 Hz during the time duration t, and K
μ
and K
β
are the weight coefficients for μ and β rhythms, respectively. Since the spectrum magnitudes of μ rhythm and β rhythm are different and the spectrum magnitude of β rhythm is much less than that of μ rhythm, the two different weight coefficients respectively for μ rhythm and β rhythm are necessary. Further, in the measured EEG signals, there are a lot of noises such as artifacts. These contaminated EEG signals in μ and β bands may lead to a sharp change of the target angle θ
d
. This would result in an abrupt movement of the robot arm. To prevent this, a 5-Hz low-pass filter is employed to smooth the output of the target angle θ
d
. Moreover, a threshold is set to the filtered target angle θ
d
to avoid frequently trivial motions of the robot arm. Finally, this target angle θ
d
is used as the command for position control of the robot arm.
Experimental procedures
The experimental procedures are basically same as the steps for four tasks described in Section ‘Task design for motion imagery and motion’, in which the subjects are asked to perform each task for 38 s. The EEG is measured between C 4to A 2 and the reference point is C
z
. The ground of the measurement system is right wrist. This ground is separated from the ground of the motor driving system to prevent the subject from the possible electrical shock. The angle of the robot arm is controlled to investigate the performance of each task. The experiment system is shown in Figure 11.