You are on page 1of 4

Simplified Matching Pursuit as a New

Method for SSVEP Recognition

Marcin Koodziej, Andrzej Majkowski, and Remigiusz J. Rak

Institute of Theory of Electrical Engineering Measurement and Information Systems
Warsaw University of Technology
Warsaw, Poland

AbstractIn the article we present a new method of feature interesting method of signal analysis. The main stage of this
extraction from EEG signal for SSVEP recognition, called a method is to search a dictionary of a large number of basis
simplified Matching Pursuit (sMP). The method has been tested functions (so called atoms) in order to obtain the best match
on SSVEP for stimulation frequencies close to each other - 5, 6, 7, with formed at each step residual signal. This method is quite
8Hz. Its effectiveness has been verified and compared with complex computationally, but it enables a detailed quantitative
commonly used for this purpose FFT method. sMP enables description of a signal. According to the authors, using precise
effective detection of SSVEP with an accuracy of 98%. but at the same time large and often redundant dictionaries is
not necessary for the correct recognition of SSVEP potentials.
Keywordssteady state visually evoked potentials; SSVEP;
electroencephalography; EEG; brain-computer interface; BCI;
So, the authors tried to simplify the MP analysis to make it more
feature extraction; matching pursuit; MP convenient to use for SSVEP recognition. The resulting
algorithm was named the simplified Matching Pursuit (sMP).
In brain-computer interfaces (BCI) based on Steady State
Visually Evoked Potentials (SSVEP) [1,2] there is implemented According to our assumptions the proposed method should
an analysis of brain response to flickering light. LEDs are most enable the recognition of SSVEP coming from stimuli of a very
commonly used as the sources of light [3]. Such BCI solutions close frequencies. In order to develop an effective feature
are very popular, because they do not require a long user extraction method, the basic neuropsychological knowledge
training [4]. A very important element of all BCI systems are about SSVEP was used [1,2,3,5]. That is:
proper feature extraction methods from the EEG signal. For x SSVEPs are localized in visual cortex area. This
BCI based on imagining movement (ERD/ERS) and on visual assumption enables to precisely select the most useful
potentials (SSVEP) the feature extraction from EEG signal is EEG channel or to create a new signal as a superposition
often performed in frequency domain (e.g. Fourier transform or of signals from visual cortex region.
wavelet analysis) [4,5,6,7,8]. Considering DFT, one must pay
attention to the problem of frequency resolution. In particular, x SSVEP are periodic and include a few harmonics for
it is very important for the detection of SSVEP caused by periodic stimuli of rectangular shape.
stimuli of closely spaced frequencies. In practice frequency x The greatest SSVEP amplitude occur at a stimulus
resolution of DFT can be effectively improved only by using a frequency f and the two consecutive harmonics.
wider time window, which extends the time of analysis.
Another problem is nonstationary nature of EEG signal. In this The proposed sMP method is based on the definition of
case, Short-Time Fourier Transform (STFT) or Discrete Matching Pursuit (MP) algorithm [19,20]. MP is an iterative
Wavelet Transform (DWT), that enable time-frequency procedure, where in the first step an atom is chosen from a
analysis, are helpful [9,10]. Also more advanced, but at the dictionary of basis functions, which gives the largest dot
same time more computationally complex, methods are used. product with the signal. In the next step, another atom is
An example is Empirical Mode Decomposition (EMD) matched to the residue of the signal remaining after subtracting
[11,12,13], which is used to estimate the power by computing the result obtained in the previous iteration from the signal. The
the inner product of SSVEP and normalized complex-sinusoid end result of the MP algorithm is the signal representation
signals. Another example is Hilbert transform [14]. This which is a sum of the components chosen from the dictionary,
transform is used to compute SSVEP phases after spatial taking into account the best matches to signal residuals. The MP
filtering with Minimum Energy Combination (MEC) method. method uses a large number of basis functions (atoms), such as
It needs a shorter data length than Fourier transform. Canonical sinusoidal functions, wavelet functions, etc., which by
Correlation Analysis (CCA) is as well very promising definition constitute a redundant set. As a result, accurate
[15,16,17]. It is an effective method for computing the relation dictionary search is a time consuming and computationally
between two multi-variable data sets. Only the first maximum complex process.
coefficient is used. Matching Pursuit (MP) [18,19] is a very

978-1-5090-1288-6/16/$31.00 2016 IEEE 346 TSP 2016

For SSVEP recognition, it seems reasonable to limit the
dictionary only to necessary, carefully selected atoms that best
describe considered potentials. The authors have proposed
creation of a dictionary D containing only sinusoidal functions
of frequencies fk=kf (for k=1,2,3) with a phase shifts (for
m=1,2,3M, where M is the number of basis functions with
different phase shifts). Thus, for each stimulation frequency
three dictionaries   were defined, one for each of the
harmonics. Each dictionary contains sine functions:


where: k is the harmonic number 1, 2 or 3; n depicts the

consecutive samples of the base signal in the range 0 to N,
denotes the phase of the sinusoidal signal. Each dictionary
contains M sinusoidal functions, which differ only in phase:


A signal SN, selected by a rectangular window of N samples

width, is compared with basis functions. A scalar product

is used to compare signal SN with selected basis functions
 from  dictionary: Fig. 1. The SN signal and the best matching basis functions for frequencies 5,
6, 7, 8Hz with properly selected phases: C5max=0.12, C6max=0.35, C7max=0.04,
The sMP method requires only a few dictionaries containing
After making comparisons for the dictionary   we get M several basis functions. The basis functions are created only for
values of corresponding to correlation of basis functions the frequencies of SSVEP stimuli. By significantly reducing the

 and analyzed signal . The maximum of them, number of basis functions in dictionary, in comparison to the
regarded as a feature for classification, is interesting for us. It is standard MP method. As a result, the sMP method has a much
defined as: lower computational complexity compared to the MP. Thanks
to this, sMP method is suitable for on-line EEG signal analysis.
Therefore, for each  
dictionary we are able to define Five users, at the age of 23, 25 31, 42, and 46 participated
 value. These values can be interpreted as indicators of in the experiment. Users sat comfortably in a chair. Users were
asked to observe a green LED and try to reduce the number of
the best match of SN signal to function described by movements of the head, jaw, eyes in order to minimize the
specific frequency value. As a result, we are able to identify the number of artefacts. The LED of a 1cm diameter was placed at
frequencies of SSVEP stimuli. a distance of about 1 meter from the eyes of a person. Users
The proposed algorithm can be described as follows: were informed of the start of the experiment. Each stimulation
(5, 6, 7 and 8Hz) was exposed separately for 30 seconds. After
x Create dictionaries of atoms (sinusoidal signals with the 0.5 minute break the frequency of stimulation was changed
frequencies f, 2f and 3f and different phase shifts). to another. All sessions took place at the same time of the day
x Search every dictionary   calculate correlation to avoid circadian influences on the measurements.
between individual atoms   and SN signal and EEG signals were recorded using g.USBAmp with 16 active
 electrodes. The electrodes were placed according to the
find the value.
international 10-20 system at positions: O2, AF3, AF4, P4, P3,
x On the basis of knowledge of  specify the the F4, Fz, F3, FCz, Pz, C4, C3, CPz, Cz, Oz, O1. The signals were
frequency f, which corresponds to SSVEP. recorded with sampling frequency 256Hz, using a Butterworth
bandpass filter (0.1-100Hz) and notch filter (48-52Hz, to
As an example in Fig. 1 there are presented the SN signal and correct a technical artefact from the power network).
the four basis functions (with frequencies respectively 5, 6, 7,
8Hz, and proper phase shifts) from   dictionaries that best fit IV. RESULTS
to it. The obtained values of cross-correlation for best matching, The aim of the experiment was to test the usefulness of the
basis functions and SN signal, were respectively: C5max=0.12, proposed simplified Matching Pursuit method to recognize
C6max=0.35, C7max=0.04, C8max=0.42. Thus, the maximum was SSVEP of very close frequencies 5, 6, 7, 8Hz. For
obtained for the signal of 8Hz base frequency.

preprocessing of the registered EEG signal a Common Average TABLE III. CLASSIFICATION ACCURACY FOR SMP FEAUTRE EXTRACTION
Reference (CAR) filter was used [5]. Next the new signal S was
determined as the sum of the signals registered at the electrodes Length of window [s]
O1, O2 and Oz. Time windows 1, 2, 3 and 4 seconds, Subject 1s 2s 3s 4s avgm
overlapping 50% were used. An exemplary distribution of S1 0,39 0,26 0,31 0,21 0,23
S2 0,32 0,32 0,32 0,30 0,25
 features for 8Hz stimulation, in consecutive 1 second
S3 0,30 0,29 0,34 0,33 0,25
time windows, are presented in Fig. 2. As we can see, the S4 0,27 0,31 0,35 0,33 0,25
highest feature values are for the dictionary   ( . S5 0,32 0,29 0,35 0,32 0,25
avgs 0,32 0,29 0,33 0,29

The authors also conducted experiments using only one

electrode O1, O2 or Oz to form the SN signal. In these cases, the
accuracy of classification was several percent lower.
From the viewpoint of the speed of the algorithm
particularly important is the number of basis functions in the
dictionary. The experiments showed that for the values of M>5
(more than five basis functions with different phase offsets )
the accuracy of signal classification did not improve
significantly. It meant that the proposed method searched only
among small number of basis functions, which significantly
reduced the time and complexity of calculations. In practice, it
meant that for 4 frequency stimulations it was sufficient to
search just 5x4 = 20 atoms! For calculations performed on a PC
computer with (Intel Core (TM) i7-2600K, CPU 3.40GHz,
Fig. 2. Distribution of  features for f=8Hz stimulation in consecutive RAM 8GB) using Matlab R2013a, average search time of 4
1 second time windows dictionaries with 5 basis functions for one-second window was
only 25sec. This allowed the application of the developed
Using the sMP method a series of experiments were carried algorithm in BCI operating in on-line mode.
out for five users. In the first place we wanted to check which
harmonics should be taken into account. The results of the The effectiveness of the proposed sMP method was
accuracy of the classification of SSVEP obtained for time compared with FFT algorithm and other methods. The accuracy
windows of different widths, using basis functions for the first, of classification in comparison with sMP method is presented
second and third harmonic are shown respectively in Tables I, in Table IV. The FFT algorithm, as the most commonly used,
II and III. Also averaged values for users (avgs) and for the was implemented by authors directly. For the other algorithms,
processing methods (avgm) are given. The results show that the there are included the comparison of the results obtained by
highest SSVEP classification accuracies were obtained for basis other research groups. For FFT algorithm time windows of 2,
functions constructed for the first or second harmonic. 3, 4, 5 and 6 seconds width overlapping in 50% were used for
feature extraction. Fast Fourier Transform was calculated for
TABLE I. CLASSIFICATION ACCURACY FOR SMP FEAUTRE EXTRACTION every window of EEG signal. Then, the spectral lines
METHOD K=1 corresponding to stimuli frequencies and their harmonics were
selected. Classification was performed using linear
Length of window [s]
Subject 1s 2s 3s 4s avgm
discriminant analysis (LDA). For classifier learning and testing
S1 0,68 0,84 0,92 0,98 0,85 10-fold cross validation test (10-CV) was used. In 10-fold
S2 0,44 0,62 0,68 0,78 0,63 cross-validation test, the original data set is randomly
S3 0,39 0,51 0,48 0,66 0,51 partitioned into 10 subsets (equal sized). Of the 10 subsets, a
S4 0,33 0,43 0,47 0,53 0,44 single subset is retained as the validation data for testing the
S5 0,64 0,77 0,89 0,87 0,79 model, and the remaining 9 subsets are used as training data.
avgs 0,49 0,63 0,68 0,76 The cross-validation process is then repeated 10 times, with
each of the 10 subsets used exactly once as the validation data.
TABLE II. CLASSIFICATION ACCURACY FOR SMP FEAUTRE EXTRACTION The results presented in Table IV indicate that for all 2 to 6
second windows better accuracies of classification were
Length of window [s] obtained for sMP than FFT method. For example, for the S1
Subject 1s 2s 3s 4s avgm user sMP gave classification accuracy 0.86 and FFT method
S1 0,44 0,55 0,59 0,64 0,55
only 0.68. The average classification accuracy for the sMP
S2 0,41 0,50 0,55 0,60 0,51
S3 0,28 0,29 0,38 0,42 0,34
method for all users and all windows was 0.77 and for FFT
S4 0,46 0,60 0,75 0,76 0,64 method - 0.48. This is a difference of 27%. Better results for
S5 0,46 0,82 0,89 0,96 0,78 sMP method as compared to FFT (for stimulation frequencies
avgs 0,41 0,55 0,63 0,67 close to each other - 5, 6, 7, 8Hz) may result from the limited
frequency resolution of the FFT.

TABLE IV. CLASSIFICATION ACCURACY FOR SMP AND FFT ALGOTITHMS [3] D. Zhu, J. Bieger, G. Garcia Molina, R.M. Aarts, A survey of stimulation
methods used in SSVEP-based BCIs, Computational Intelligence and
sMP FFT Neuroscience, 2010, art. no. 702357.
Subject Subject
lenght [4] Q. Liu, K. Chen, Q. Ai, S.Q. Xie, Review: Recent development of signal
S1 S2 S3 S4 S5 S1 S2 S3 S4 S5
processing algorithms for SSVEP-based brain computer interfaces,
2s 0,86 0,69 0,52 0,44 0,81 0,68 0,43 0,33 0,32 0,72
Journal of Medical and Biological Engineering, 34 (4), 2014, pp. 299-309.
3s 0,92 0,72 0,44 0,46 0,94 0,71 0,40 0,35 0,39 0,69
4s 0,91 0,82 0,67 0,55 0,94 0,69 0,37 0,38 0,35 0,66 [5] R.J. Rak, M. Koodziej, A. Majkowski, Brain-computer interface as
5s 0,95 0,84 0,72 0,45 0,97 0,63 0,38 0,29 0,29 0,79 measurement and control system - the review paper Metrology and
Measurement Systems, 19 (3), 2012, pp. 427-444.
6s 0,97 0,97 0,80 0,75 0,97 0,75 0,41 0,19 0,30 0,69
0,92 0,80 0,60 0,50 0,92 0,69 0,39 0,30 0,33 0,71 [6] G. R. Muller-Putz and G. Pfurtscheller, Control of an electrical
prosthesis with an SSVEP-based BCI, IEEE Trans. Biomed. Eng., 55:
2008, pp. 361-364.
It is difficult to compare other algorithms without their [7] P. F. Diez, V. A. Mut, E. M. Avila Perona and E. Laciar Leber,
direct implementation and testing. This is due to the use of Asynchronous BCI control using high-frequency SSVEP, J. Neuroeng.
Rehabil., 8: 39, 2011.
different stimulation methods. Researchers use stimuli of
[8] P. F. Diez, S. M. Torres Mller, V. A. Mut, E. Laciar, E. Avila, T. F.
different frequencies presented in different ways. Of great Bastos-Filho and M. Sarcinelli-Filho, Commanding a robotic wheelchair
importance are also predispositions of the users. For example, with a high-frequency steady-state visual evoked potential based brain
in [1] there were shown the classification results for five Medical Engineering & Physics, Volume 35, Issue 8, August 2013, pp.
subjects and frequencies 6, 7, 8 and 13Hz (DFT method). The 11551164
achieved classification accuracy for an individual user was [9] B. Yan, Z. Li, H. Li, G. Yang and H. Shen, Research on brain-computer
between 42.5% and 94.4%. In [11] we used a modified version interface technology based on steady state visual evoked potentials,
Proc.4thInt. Conf. on Bioinformatics and Biomedical Engineering, 1-4,
of empirical mode decomposition algorithm (EMD) for three 2010.
stimuli of frequencies 13,14,15Hz displayed on LCD monitor. [10] Z. Zhang, X. Li and Z. Deng, A CWT-based SSVEP classification
The average classification accuracy for 5 tested persons was method for brain-computer interface system, Proc.Int. Conf. on
94.47%. In [12] authors used EMD algorithm for 30,31,32,33 Intelligent Control and Information Processing, 43-48, 2010.
and 35Hz stimuli and achieved an average effectiveness of [11] P. L. Lee, H. C. Chang, T. Y. Hsieh, H. T. Deng and C. W. Sun, A brain-
84.63%. In [14] stimuli at all integer frequencies from 30 to wave-actuated small robot car using ensemble empirical mode
40Hz were presented. The use of the Hilbert transform and decomposition-based approach, IEEE Trans. Syst. Man Cybern. Syst.
Hum., 42, 2012, pp. 1053-1064.
MEC allowed the detection of SSVEP with efficiency from
71% to 94%. In [17] the accuracy for the original Canonical [12] C. H. Wu, H. C. Chang, P. L. Lee, K. S. Li, J. J. Sie, C. W. Sun, C. Y.
Yang, P. H. Li, H. T. Deng and K. K. Shyu, Frequency recognition in an
Correlation Analysis method was 78.11% (for 2.56s window SSVEP-based brain computer interface using empirical mode
length). As presented in [17], the accuracy of classification decomposition and refined generalized zero-crossing, J. Neurosci.
depends not only on the used algorithm but also on Methods, 196, 2011, pp. 170-181.
predisposition of a person. [13] C. H. Wu, H. C. Chang and P. L. Lee, Instantaneous gaze-target detection
by empirical mode decomposition: application to brain computer
VI. CONCLUSIONS interface, Proc.World Congress on Medical Physics and Biomedical
Engineering, 25, 2009, pp. 215-218.
In this paper a new method for creating EEG features in BCI [14] G. Garcia-Molina, D. H. Zhu and S. Abtahi, Phase detection in a visual-
based on SSVEP, named simplified Matching Pursuit, was evoked-potential based brain computer interface, Proc.18th European
presented. Experiments showed that the method enables to Signal Processing Conf., 2010, pp. 949-953.
identify SSVEP for very close frequencies of flickering light [15] G. Y. Bin, X. R. Gao, Z. Yan, B. Hong and S. K. Gao, An online multi-
with a good efficiency. The proposed method sMP performs channel SSVEP-based brain-computer interface using a canonical
much better (about 25% for all users) than widely used FFT correlation analysis method, J. Neural. Eng., 6, 046002, 2009.
analysis. Moreover, sMP algorithm has a relatively low [16] Z. L. Lin, C. S. Zhang, W. Wu and X. R. Gao, Frequency recognition
based on canonical correlation analysis for SSVEP-based BCIs, IEEE
computational complexity and according to the authors can be Trans. Biomed. Eng., 53, 2006, pp. 2610-2614.
successfully used to identify SSVEP. The proposed algorithm
[17] P. Poryzala, A. Materka, Cluster analysis of CCA coefficients for robust
has a low computational complexity and can be successfully detection of the asynchronous SSVEPs in braincomputer interfaces,
used in BCI working in on-line mode. Biomedical Signal Processing and Control, Volume 10, March 2014, pp.
REFERENCES [18] P. J. Durka, D. Ircha, K. J. Blinowska, "Stochastic time-frequency
[1] G.R. Mller-Putz, R. Scherer, C. Brauneis, G. Pfurtscheller, Steady-state dictionaries for matching pursuit," in Signal Processing, IEEE
visual evoked potential (SSVEP)-based communication: Impact of Transactions on , vol.49, no.3, Mar 2001, pp.507-510.
harmonic frequency components Journal of Neural Engineering, 2 (4), [19] P.J. Durka, Matching Pursuit and Unification in EEG Analysis, Artech
2005, pp. 123-130. House, ISBN 978-1-58053-304-1, 2007.
[2] G. Garcia-Molina, D. Zhu, Optimal spatial filtering for the steady state [20] S. G. Mallat and Z. Zhang, Matching Pursuits with Time-Frequency
visual evoked potential: BCI application 2011 5th International Dictionaries, IEEE Transactions on Signal Processing, December 1993,
IEEE/EMBS Conference on Neural Engineering, NER 2011, art. no. pp. 3397-3415.
5910512, 2011, pp. 156-160.