Full text
RESEARCH ARTICLE Exploiting Task Constraints for Self- Calibrated Brain-Machine Interface Control Using Error-Related Potentials Iñaki Iturrate 1,3 *, Jonathan Grizou 2 , Jason Omedes 3 , Pierre-Yves Oudeyer 2 , Manuel Lopes 2 , Luis Montesano 3 1Chair in Brain-Machine Interface (CNBI) and Center for Neuroprosthetics (CNP), École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland, 2Flowers Team, a joint Inria—Ensta ParisTech lab, Bourdeaux, France, 3Instituto de Investigación en Ingeniería de Sistemas (I3A), Universidad de Zaragoza, Zaragoza, Spain *[email protected]h Abstract This paper presents a new approach for self-calibration BCI for reaching tasks using errorrelated potentials. The proposed method exploits task constraints to simultaneously calibrate the decoder and control the device, by using a robust likelihood function and an adhoc planner to cope with the large uncertainty resulting from the unknown task and decoder. The method has been evaluated in closed-loop online experiments with 8 users using a previously proposed BCI protocol for reaching tasks over a grid. The results show that it is possible to have a usable BCI control from the beginning of the experiment without any prior calibration. Furthermore, comparisons with simulations and previous results obtained using standard calibration hint that both the quality of recorded signals and the performance of the system were comparable to those obtained with a standard calibration approach. 1 Introduction The field of brain-computer interfaces (BCI) has witnessed largely successful applications in different contexts such as the control of assistive devices or communication restoration [1]. However, their impact has been limited to in-lab applications due to intrinsic limitations of the technology. The brain signals used in BCI have a high variability caused by factors such as non-stationarities [2], task-dependent variations [3], and large subject specificity [4]. To solve these problems, most applications rely on an initial calibration phase that needs to be frequently repeated due to the changing nature of the brain signals. This calibration process is a tedious and time consuming part in most BCI applications that hinders their deployment. First, it impedes an out-of-the-box use of the BCI both in assistive or leisure scenarios. Second, it increases the cost in professional and medical applications such as those carried out in hospitals. Third, calibration is an overload that affects the usability of the system in the long term and, therefore, the introduction and acceptance of such systems. PLOS ONE | DOI:10.1371/journal.pone.0131491 July 1, 2015 1/15 a11111 OPEN ACCESS Citation: Iturrate I, Grizou J, Omedes J, Oudeyer P- Y, Lopes M, Montesano L (2015) Exploiting Task Constraints for Self-Calibrated Brain-Machine Interface Control Using Error-Related Potentials. PLoS ONE 10(7): e0131491. doi:10.1371/journal. pone.0131491 Editor: Mikhail A. Lebedev, Duke University, UNITED STATES Received: March 11, 2015 Accepted: June 1, 2015 Published: July 1, 2015 Copyright: © 2015 Iturrate et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Data Availability Statement: The source code of the proposed algorithm is available under a GNU GPL license and can be found, together with the data recorded, at https://github.com/flowersteam/self_ calibration_BCI_plosOne_2015. Funding: This work has been partially supported by INRIA, Conseil Regional d’Aquitaine and the European Research Council grant EXPLORERS 24007 (JG, PYO, ML); by the Spanish Ministry of Science via DPI2011-25892, and by Diputacion General de Aragon-FSE grupo T04 (JO, LM); and by Swiss National Centres of Competence in Research
Previous works have aimed at minimizing and/or simplifying the calibration phase. For instance, in motor imagery [1], the supervised and unsupervised adaptation of classification parameters has shown to avoid inter-session recalibration [5] and to increase the BCI performance [6]. Other approaches have tried to limit the calibration time by using clustering methods in the feature space [7]; ensembles of classifiers built from very large datasets [8]; intersubject generalization by using a pool of subjects to initialize the classifier [9–11]; or even by generating artificial training datasets via resampling [12]. Despite their successful results, these methods aim at reducing the calibration phase rather than completely removing it. On the other hand, free-calibration BCIs (i.e. plug-and-play BCIs) remain scarce as they need to achieve BCI control together with a real-time, transparent, and unsupervised calibration executed in parallel. For these approaches, the main idea is to exploit redundancy or task constraints to limit the possible space of brain signals decoders to a tractable one. In non-invasive BCI, Kindermans et al. have thoroughly shown that such kind of BCI is feasible for P300 spellers [13,14]. In this approach, the self-calibration speller exploits the multiple repetitions of P300 stimuli and context information of the task, namely word constraints and grammar rules. Similarly, Orsborn et al. have also achieved control from scratch for reaching tasks in an invasive brain-machine interface [15,16]. They initialized the decoder to a random behavior and updated it during online control using the assumption that the targets should only be reached following a straight line. This paper presents a new approach and an online study of a self-calibration method for BCI control applications based on error potentials [17,18]. The key insight of this protocol is that the task to be solved provides constraints that can be exploited to simultaneously calibrate, in an unsupervised fashion, the BCI while controlling the device. With respect to our preliminary works, the current study proposes an alternative algorithm that does not suffer from the limitations of [19], namely failures due to overconfident estimates. Furthermore, it shows the applicability to online scenarios of the planning techniques described and evaluated in [20]. The method has been evaluated online in a reaching task over a discrete grid. Results of eight subjects show that the performance of the system was above that obtained using a standard BCI calibration method in terms of time required to reach the intended goal and in the number of goals achieved for a fixed amount of time. Furthermore, after a certain time, the system is indeed calibrated without incurring any overhead in the long term. 2 Methods 2.1 Experimental Protocol The usability of the self-calibration approach was tested under an experimental protocol demonstrated in a prior work [18]. The protocol consisted of a 5 × 5 squares grid, a virtual cursor, and a goal location (see Fig 1). The cursor performs five different instantaneous actions: move one position up, down, left, right; and a goal-reached action, represented as concentric circumferences (see Fig 1b). The time between two actions (inter-action interval) was random within the range [3,3.5] s. The role of the subjects was to assess the cursor actions as correct when the cursor performed (i) a movement towards the goal position, or (ii) a goal-reached action over the goal position; or as incorrect otherwise (see Fig 1c). These assessments generated the associated evoked potentials for both correct and error conditions (i.e., error-related potentials, ErrP [21]). Note that the goal position was known by the user, but it was unknown by the device. The users were instructed not to move their eyes during the cursor actions, and to restrain blinks only to the resting periods. The experiment duration was fixed to 500 actions performed by the device, with rest intervals every 10 actions. Every time the device reached a target, the target was changed to a different position, with the sequence of target positions the same for all Self-Calibrated Brain-Machine Interface Control Using Error Potentials PLOS ONE | DOI:10.1371/journal.pone.0131491 July 1, 2015 2/15 (NCCRs) "Robotics," and by the “EPFL Fellows” fellowship programme co-funded by Marie Curie, FP7 Grant agreement no. 291771 (II). Competing Interests: The authors have declared that no competing interests exist.
the subjects. The total length of the experiment was around 50 minutes. For more details about the protocol, please refer to [18]. Eight subjects (mean age 28±1.55 years) participated in the experiments after the protocol was approved by the Institutional Review Board of the University of Zaragoza. All participants were asked to read and sign an informed consent form to participate in the study. The participants were seated on a comfortable chair one meter away from a computer screen that displayed all the information related to the experiment. For the executed experiments we used an unsupervised self-calibration approach (c.f. section 2.5) to simultaneously train the errorrelated potentials (ErrP) [21] classifier and solve the task (i.e., reach the target position). The data recorded during the experiments is publicly available, and can be downloaded from https://github.com/flowersteam/self_calibration_BCI_plosOne_2015. 2.2 Data recording and feature extraction EEG signals were recorded from 16 fronto-central active electrodes using a gTec system, with the ground on AFz and the reference on the left earlobe. EEG data were digitized with a sampling frequency of 256 Hz, power-line notch filtered, and band-pass filtered at [1,10] Hz. The data acquisition and online processing was developed under a self-made BCI platform. In this work, ErrP features were extracted from channels Fz, FCz and Cz within a time window of [200, 800] ms downsampled by a factor of 8 (being 0 ms the action onset), forming a vector of 57 features [17]. (a) (b) (c) Fig 1. Experimental protocol. (a) Experimental protocol. The protocol showed a 5 × 5 grid with a virtual cursor (green circle) and a goal location (shadowed in red). (b) The cursor could perform five different actions (from top to bottom, move one position up, down, left, right, or performing a goal-reached action). (c) Correct actions (i.e. optimal policy) from each state for the goal exemplified in (a). Extracted from [18] with permission. doi:10.1371/journal.pone.0131491.g001 Self-Calibrated Brain-Machine Interface Control Using Error Potentials PLOS ONE | DOI:10.1371/journal.pone.0131491 July 1, 2015 3/15
2.3 Supervised decoding of error potentials Before describing the self-calibration method for error-based control, we briefly describe here the supervised approach [17,18] which will be later extended to an unsupervised setting. The decoding of the EEG signals is done using a Gaussian classifier. The signals are modeled using an independent multivariate normal distribution for each class (i.e. correct denoted as cor error as w)[ 4,22], N(μ c ,S c ), N(μ w ,S w ). θ k denotes the set of parameters of each class {μ k ,S k } where k2{c,w}. The covariance matrices S c and S w are shrinked (λ= 0.5) to avoid overfitting when using a large number of features compared to the training number of samples [23]. The probability of a label given a signal is obtained using the Bayes’rule: pðl¼jje;yjÞ¼ pðejl¼j;yjÞpðl¼jÞ Pk¼c;wpðejl¼k;ykÞpðl¼kÞð1Þ where erepresents the features extracted from the brain signal, j2{c,w} is one of the two classes to be decoded. As we do not have a priori knowledge on the user intended assessment of the action, we assume all labels are equi-probables, i.e. 8k,p(l=k) = 0.5. In this supervised setting, an estimation of the parameters ^ yis obtained using a set of pairs of signals and labels prior to the actual use of the brain signals. 2.4 Error-potential based control Once trained, the decoder of the previous section can be used to control a device based on the user’s assessment of the behavior of the device [18]. The control task is modeled as a Markov decision process (MDP). An MDP is defined by a triplet (s,a,r) where s2Sand a2Arepre- sent the states and actions, and rrepresents the reward. Actions modify the state of the system according to the corresponding transition model p(s0js,a). In our grid world protocol, the state represents the cell in the grid and p(s0js,a) is simply a deterministic transition up, down, left, right, or performing a goal-reached action from the current state saccording to the action a. The reward function encodes the task, in our case it assigns positive reward to the goal state and zero reward to the others. Given this reward function, it is possible to compute the optimal policy (i.e. a function that gives you the action to execute at each state) that maximizes the accumulated reward. Under the assumption that the user follows optimal policies, the ErrP detector can be used to identify the user intended task ξ=tamong a finite set of tasks t=1,...,T. Note that this assumption does not contradict the fact that we also assume a non-informative a priori for the labels, as the latter will vary among optimal policies and will depend on the planner. The rationale of the algorithm is the following: the actions of the device that agree with the optimal policy will not generate error responses, while those that do not follow the policy will. This can be implemented as a recursive filter to identify the task based on the signals eobtained when executing action ain state s: pðx¼tje;s;a;^ yÞ/pðejs;a;^ y;x¼tÞpðx¼tÞð2Þ where pðejs;a;^ y;x¼tÞneeds to take into account the probability of each possible class k given the target ξ=t, the current state sand the action aexecuted by the machine: pðejs;a;^ y;x¼tÞ¼X k¼c;w pðejl¼k;^ yÞpðl¼kjs;a;x¼tÞð3Þ The previous estimate simply assigns a higher likelihood to those tasks with whom the brain signals are more coherent. Fig 1c shows the optimal policy for a given task, that is, the actions Self-Calibrated Brain-Machine Interface Control Using Error Potentials PLOS ONE | DOI:10.1371/journal.pone.0131491 July 1, 2015 4/15
that should not generate error potentials if this is the user’s intended task. The posterior distribution is then used to control the device to the most likely goal using a planning algorithm or greedy heuristic (see [18] for further details). 2.5 Self-calibration control This section presents a self-calibrated algorithm that eliminates the need of calibration prior to the control task. This is a self-calibration approach since it estimates θin an unsupervised manner during operation. Self-calibration control can be achieved by exploiting the structure of the task space, namely the labels that the optimal policy of each task assigns to each state-action pair. These learned labels can be used to train a decoder for each possible task. The remaining question is how to select among the different tasks. For this purpose, we define the following pseudo-likelihood function [20]: PðDMjx¼tÞY M i¼1 pðeijsi;ai;x¼t;DiÞð4Þ ¼Y M i¼1X k¼w;c pðeijl¼k;x¼t;DiÞpðl¼kjsi;ai;x¼tÞ:ð5Þ where D M represents the history of triplets {a i ,s i ,e i } up to time M. The pseudo-likelihood is built using a leave-one-out cross-validation strategy to evaluate the likelihood p(e i js i ,a i ,ξ=t, D −i ) of each signal e i based on a model learned with all the other signals and corresponding actions and states denoted by D −i . For a given target hypothesis ξ=t, the labels associated to the signals in D −i can be estimated (i.e. p(l=kjs i ,a i ,ξ=t)), enabling the training of a target-spe- cific classifier for each task ξ=t. In a nutshell, Eq 5 assigns higher likelihood to tasks in which their optimal policies match the labels predicted with the model learned with D −i . As detailed in [20], the underlying assumption is that the subject is coherent throughout the experiment, providing similar signals for the same set of labels. The pseudo-likelihood is computed from two terms. p(l=kjs i ,a i ,ξ=t) represents the probability distributions of the labels according to a task, the executed action, and the current state. This term only depends on what action is correct at each state according to task ξ=t. The other term, p(e i jl=k,ξ=t,D −i ), represents the likelihood of the signal given the label provided by the task and the previous history. In principle, one could use directly the same likelihood model as in Eq 3, with θestimated from D −i . However, such a model results in very fast convergence and a high sensitivity to outliers (e.g. incorrect assessments by the user). In order to improve the robustness of the method, we propose to marginalize out θusing a non-infor- mative (Jeffrey’s) prior (see [24], page 88). The resulting likelihood function is a t-student distribution with heavier tails: pðejl¼k;x¼t;DiÞ¼tndejmk; Skðnþ1Þ nðndÞ ð6Þ where μ k and S k are the corresponding empirical mean and covariance matrix, nis the number of signals, and dis the dimensionality of a signal feature vector. As in the calibrated case, the device can use the task estimates to select the next action greedily according to the corresponding optimal policy [18]. However, this strategy is prone to fail during the initial stages due to the large uncertainty introduced by the lack of calibration. To alleviate this difficulty, we incorporate this uncertainty in the decision making and use a lookahead planning based on [20]. Self-Calibrated Brain-Machine Interface Control Using Error Potentials PLOS ONE | DOI:10.1371/journal.pone.0131491 July 1, 2015 5/15
Unlike the calibrated case, we do not only have uncertainty on the tasks but also on the signal models. Indeed, each task is associated with a different set of signal-label pairs leading to a different classifier. Hence our agent must collect data to discriminate between tasks but also to understand the structure of the signal in the feature space. These two sources of uncertainty can be unified as a measure of uncertainty on the signal space, as described in [19], which can be approximated on the label space through a sampling procedure [20]. The agent will then target areas of higher uncertainty, to reduce it by collecting more evidence in these areas. To do so, the uncertainty is computed for each state-action pair and used as a reward function to be maximized by the agent (using value iteration [25]). The system follows the optimal policy for this reward function and switches to a pure exploitation of the task, ignoring the uncertainty, after reaching the desired confidence level (see section 2.6.2). 2.6 Practicalities We now describe some implementation details that were used in the experimental evaluation of the method. The code is available under a GNU GPL license and can be found at https:// github.com/jgrizou/lfui. 2.6.1 Power information. One critical difficulty of learning from unlabeled signals is for cases where the signals can be interpreted in a symmetric way. In other words, it is possible to obtain the same likelihood by switching the labels. Such misinterpretation is possible in environments with symmetric properties (see [20] for reaching tasks and [13,14] for a speller). For the domain of our experiments the symmetries can be disambiguated using the goal reached action, but, in general, symmetric tasks (e.g. opposite corners) will be hard to discriminate and might produce an inconsistent agent behavior. Prior information about the differences in power between correct and error signals can be used to increase the robustness of the method—helping to remove world symmetries (e.g. equal likelihood for models with symmetric labels). In single trial classification power spectral information results in lower performance than temporal features, but their combination produces more robust detectors [26]. However, in our case it is possible to exploit the fact that EEG signals associated to the error class have on average higher power than the ones associated to the correct class. This information is added to the pseudo-likelihood model of Eq 5 as follows. The average power information of each class is computed as the weighted mean of the signals’power. The weights are the probabilities of the label given the signal and the class parameters pkðx¼tÞ¼PM i¼1pðl¼kjei;ykÞeT iei PM i¼1pðl¼kjei;ykÞ:ð7Þ with θ k the corresponding parameters of each class k, and the power computed as the inner product of e i . The pseudo-likelihood is multiplied by the ratio of the power associated to the error class over the power of the correct class: PðDMjx¼tÞ¼PðDMjx¼tÞpwðx¼tÞ pcðx¼tÞ;ð8Þ which assigns, given two symmetric labeling, higher probability to the one where the average power of error signals is larger. 2.6.2 Identifying the goal. A practical issue when running this algorithm is to decide when the task has been successfully identified. This decision has to take into account the uncertainty about the task. We use a thresholding method and define as W t the minimum of pairwise Self-Calibrated Brain-Machine Interface Control Using Error Potentials PLOS ONE | DOI:10.1371/journal.pone.0131491 July 1, 2015 6/15
normalized likelihood between tasks ξ=tand all other tasks: Wt¼min x21;...;Tnftg PðDMjy;x¼tÞ PðDMjy;x¼tÞþPðDMjy;x¼xÞð9Þ When it exists a task ξ=tsuch that W t exceeds a threshold β2[0.5, 1] we consider that it is the one the subject has in mind. Once a task is identified with confidence, the device switches to a greedy policy following the optimal one to reach the estimated goal. Once there, it starts a new task. At this point the device can use the ErrP signals of the previous task as prior information. Indeed, it assigns to the signals the labels of the optimal policy of the identified task. Note that this prior information is used by the device for all the subsequent error potentials and it results on faster task identification since the classifier parameters are better estimated from the beginning [20]. In fact, when tasks are correctly identified, the resulting classifier is equivalent to a calibrated one trained with a similar number of ErrP signals. 2.7 Self-calibration control analysis Firstly, the recorded potentials during the online experiment were studied to assess whether their characterization was similar to those obtained in previous works. Notice that, contrary to classical calibration approaches where the error ratio remained fixed [17,18], the error ratio in our approach could not be fixed due to the exploration algorithm and the unsupervised nature of the problem. For this analysis, signals for each condition (error and correct movements performed by the device) were grand averaged for the time window [−200, 1000] ms, where 0 ms represents the action onset. Secondly, the self-calibration online task was analyzed with the following metrics: number of steps to reach the first target; total number of (incorrect or correct) targets reached during the whole experiment (500 steps) and number of correct and incorrect targets reached. To evaluate the learning progress during the first target, the instantaneous error rate was computed as a moving average over the last 10 actions. Finally, we compared the quality of the labels acquired by the self-calibration approach with the one that would be obtained using a supervised calibration method. Note that, when the device reaches an incorrect target, some signals are incorrectly labeled (those corresponding to states whose optimal action differ from the intended target). To this end, we computed the percentage of labels estimated correctly by the self-calibration approach and the ten-fold accuracy obtained using these labels, and compared it to the ten-fold accuracy obtained with ground-truth labels. Thirdly, the proposed approach was compared with standard calibration procedures. In order to perform this comparison, the important factors to analyze are the quality of the signals acquired, and the labels quality learned from the self-calibration procedure. In principle, if both the signals acquired and labels learned are equivalent to those of a standard calibration, the performance of the system should also be equivalent. To this end, we took advantage of the overlap of three subjects between the current work and our previous work where the protocol was the same but following a classical supervised calibration [18]. For this analysis, we compared first the quality of the EEG signals in terms of grand averages (error minus correct grand averages); as well as the accuracies obtained during the online control phase following the standard calibration versus the accuracy obtained during the self-calibration session. Finally, we performed an offline analysis to compare the self-calibration online results with a standard calibration using the same signals acquired during the online experiment. The number of calibration trials required for each subject was estimated by splitting the dataset into a training set formed by 300 trials, and a test set composed of the remaining ones (200). Then, a Self-Calibrated Brain-Machine Interface Control Using Error Potentials PLOS ONE | DOI:10.1371/journal.pone.0131491 July 1, 2015 7/15
classifier was trained using an incremental number of trials from the training set and evaluated on the test set. This process was repeated ten times shuffling the order of the trials. The number of trials required for calibration was selected as the one for which the accuracy reached a plateau for at least five consecutive trials. Once a classifier was trained using the computed number of trials, the ErrP-based control algorithm (see subsection 2.4) was run using the remaining data available. These simulations were run 100 times for each subject to extract the task metrics comparable to those obtained in the self-calibration approach (number of steps needed to reach first target and number of reached targets). 3 Results 3.1 EEG results Fig 2 shows the grand-averaged signals obtained during the online experiments. Error and correct assessments generated different evoked responses posterior to the device actions. The difference between error and correct potentials appeared on fronto-central locations at around 400 and 600 ms, where the error potential exhibited significantly larger positive and negative peaks respectively (unpaired t-tests, p <110 −6 ). These evoked responses were in line with previous experiments using error potentials [17,18]. 3.2 Online self-calibration results Table 1, left shows the results obtained during the online experiments. On average, users were able to reach 6.88 correct targets in the 500 steps of the experiment. However, users also reached an average of 1.50 incorrect targets, significantly greater than zero (one-sample t-test, t 7 = 3.55, p= 0.009). Whereas users needed 165 steps on average to reach the first target, subsequent targets were reached after 60 ± 24 steps on average across subjects. Note that the first target needed a substantially larger amount of data to converge due to the uncertainty not only on the target to reach, but also on the decoder of brain signals. Fig 3 shows the evolution of the ratio of errors within the last ten movements of the device until reaching the first target. The results for each subject show a clear decreasing trend in the percentage of errors significant for all the subjects (p<0.001) with an average correlation of r= 0.57±0.17. Expectedly, these results show that the error rate was variable throughout the experiment. Nonetheless, the negative tendency also indicated that the system was able to iteratively learn the task even for the first target using completely unsupervised data. Regarding the Time (ms) -200 0 200 400 600 800 1000 Amplitude (uV) -5 0 5 Fz Time (ms) -200 0 200 400 600 800 1000 Amplitude (uV) -5 0 5Cz Time (ms) -200 0 200 400 600 800 1000 Amplitude (uV) -5 0 5 CPz Error Correct p<10-6 Fig 2. Grand-averaged signals for Fz, FCz and CPz channels. Red and blue lines represent averaged signals for the error and correct conditions respectively, where the movement onset is marked as time 0 ms. Statistical differences (unpaired t-tests, p-values <110 −6 ) between error and correct averages are marked by shadowed areas. doi:10.1371/journal.pone.0131491.g002 Self-Calibrated Brain-Machine Interface Control Using Error Potentials PLOS ONE | DOI:10.1371/journal.pone.0131491 July 1, 2015 8/15
labels quality, Fig 4a shows the ten-fold accuracy obtained with the ground truth labels, compared against the percentage of labels correctly learned by the self-calibration protocol. The results show an almost significant correlation between the two variables (r= 0.69, p= 0.06). Nonetheless, the ratio of labels correctly assigned was always higher than 90%, indicating that even for subjects with low accuracies (<60%), most of the labels are correctly estimated. Fig 4b shows the ten-fold accuracy obtained with ground truth labels versus the accuracy obtained with the labels estimated from self-calibration. Interestingly, there seemed to be two clusters of subjects: those who were not affected by the labeling quality composed of five subjects with very similar accuracies to the ones obtained with ground truth labels, even when not all the labels were correctly assigned; and other subjects where the labeling of the self-calibration Table 1. Task results. Online self-calibration Simulated standard calibration Subject Calib. trials Steps 1 st #Correct #Incorrect Calib. trials Steps 1 st #Correct #Incorrect S1 0 101 16 2 213 239.71 ±9.2 10.33 ±1.48 0.14 ±0.38 S2 0 131 9 1 246 286.73 ±14.75 5.50 ±0.93 0.03 ±0.22 S3 0 265 3 1 190 323.67 ±56.32 1.78 ±0.76 0.01 ±0.10 S4 0 232 2 2 101 336.98 ±75.50 0.59 ±0.71 0.10 ±0.33 S5 0 132 5 3 234 317.68 ±24.85 2.60 ±0.83 0.02 ±0.14 S6 0 142 10 0 300 340.31 ±15.08 4.62 ±0.81 0.09 ±0.29 S7 0 79 4 3 82 310.24 ±103.64 0.48 ±0.82 0.36 ±0.66 S8 0 240 6 0 252 290.47 ±12.7 5.91 ±0.70 0.05 ±0.22 mean 0.00 165.25 6.88 1.50 202.25 305.72 ±32.97 3.97 ±3.32 0.10 ±0.11 doi:10.1371/journal.pone.0131491.t001 20 40 60 80 100 120 0 20 40 60 80 100 Number of trials Percentage of errors (%) 20 40 60 80 100 120 140 0 20 40 60 80 100 Number of trials Percentage of errors (%) 10 20 30 40 50 60 70 0 20 40 60 80 100 Number of trials Percentage of errors (%) 50 100 150 200 0 20 40 60 80 100 Number of trials Percentage of errors (%) 50 100 150 200 250 0 20 40 60 80 100 Number of trials Percentage of errors (%) 50 100 150 200 0 20 40 60 80 100 Number of trials Percentage of errors (%) 20 40 60 80 100 0 20 40 60 80 100 Number of trials Percentage of errors (%) Subject 1 20 40 60 80 100 120 0 20 40 60 80 100 Number of trials Percentage of errors (%) Subject 2 Subject 3 Subject 4 Subject 5 Subject 6 Subject 7 Subject 8 r = -0.72 * r = -0.77 * r = -0.51 * r = -0.43 * r = -0.73 * r = -0.38 * r = -0.38 * r = -0.65 * Fig 3. Percentage of errors performed by the device during the last 10 trials, as a function of the number of trials (only during the first target). Additionally, the tendency line and the correlation value are also shown. doi:10.1371/journal.pone.0131491.g003 Self-Calibrated Brain-Machine Interface Control Using Error Potentials PLOS ONE | DOI:10.1371/journal.pone.0131491 July 1, 2015 9/15