Keywords

1 Introduction

Steady-state visual evoked potentials (SSVEP) are electroencephalogram (EEG) components that are generated over the visual cortex in response to periodically flicking visual stimuli. They are elicited in response to flicker frequencies greater than 4 Hz [9] and the SSVEP amplitude is modulated by visual spatial attention provided by the user [11]. Further, the SSVEP response is in-phase with the target frequencies and contains other harmonics. Due to its properties, relatively high signal to noise ratio (SNR) and ease of implementation, SSVEP has been studied increasingly for application in non-invasive brain-computer interfaces (BCI) [6].

SSVEP based brain-computer interfaces requires very low training and exhibits high information transfer rates (ITR) compared to other BCI modalities [13]. A classical SSVEP-BCI system consists of flickering target stimuli placed at different locations. The user selects the target by gazing over it and intended target is extracted by analysing the acquired EEG for components corresponding to the flicker frequency [12]. Extracting low noise SSVEP components from a given EEG data segment is a basic and crucial step in SSVEP detection methods. The band limiting of the acquired data is useful in eliminating noise outside the desired SSVEP frequency range. But, the filtering does not remove the noise embedded in the desired range. Hence, to achieve higher SSVEP SNR, a number of spatial filtering techniques employing linear signal models have been proposed.

Common spatial filtering techniques used in SSVEP based BCIs include hardware-based methods like best bipolar combination (BCC) and multivariate data analysis (MVA) algorithms like principal component analysis (PCA), minimum energy combination (MEC), maximum contrast combination (MCC), and partial least squares (PLS) spatial filter [7]. Even though BCC provides considerable improvement in SNR, the selection of the optimal electrode pair need to be done through an exhaustive search for every individual user. The PCA is an unsupervised method that exploits the common information between the input EEG channels to maximize the variance of the reconstructed data and disregards the SSVEP source model [4].

Other MVA methods are supervised linear signal models that use a simple SSVEP model consisting of sine-cosine signals as target data for improving the EEG signal components. The MEC and MCC spatial filters try to minimise the SSVEP noise or maximise SNR by computing the signal and noise components using ordinary least squares (OLS) regression method. The OLS has several shortcomings as it fails when the inter-channel correlation increases (multicollinearity) and it further assumes that the target SSVEP model as fixed [3]. Recently, a PLS spatial filter has been proposed that overcomes the disadvantages of MEC and MCC by efficiently dealing with highly correlated channels. The PLS tries to maximise the covariance between the EEG and SSVEP model and considers the target SSVEP model to contain error, thus providing a robust estimate. Among the reported spatial filters in the literature, MCC and PLS have been shown to achieve the highest performance [8].

In this study, we propose an orthonormalized partial least squares (OPLS) spatial filter that rewards the channels that better model the information contained in the features of the SSVEP target space. In PLS spatial filter, the input and output spaces with very high variance are overemphasized even if the correlation between them in the projected data is not significant. The OPLS is a variant of PLS which overcomes this disadvantage by minimizing the mean squares error (MSE) instead of the covariance and not considering the variance of the target (pure sine-cosine) space. The proposed method is evaluated by comparing its SSVEP detection performance in terms of accuracy with classical SSVEP spatial filters such as PLS and MCC using EEG data collected from ten subjects. Further, statistical tests are performed to depict the improvement achieved using OPLS method.

2 Methods

2.1 Spatial Filtering

Spatial filters for SSVEP based BCI try to find projections of the EEG data that are “maximally aligned” with the SSVEP model. Consider the EEG data (\( Y\in \mathbb {R}^{N \times N_y} \)) obtained using ‘\( N_y \)’ electrodes and each channel contains data of length ‘N’. Given the EEG data segment of small time window (‘\( l_w \)’), the different filters maximize a particular objective function to preserve the SSVEP components with improved SNR. The solution to these problems in general consists of finding the transformation matrix (\( W\in \mathbb {R}^{N_y \times N_l} \) where \(N_l < N_y\)) that acts as a linear operator and is given by,

$$\begin{aligned} \widehat{Y}=YW \end{aligned}$$
(1)

Here, \( N_l \) is the number of reconstructed channels in the resulting signal, \( \widehat{Y} \). The SSVEP model that is used commonly across all the spatial filters consists of sine and cosine components of a target frequency and its harmonics. The reference signal (\( X\in \mathbb {R}^{N \times ({2 \times N_h})} \)) obtained from SSVEP model with columns equal to twice the number of harmonics (\(2 \times N_h\)) is given by,

$$\begin{aligned} X=\left( \begin{array}{c} \sin (2\pi f_m t)\\ \cos (2\pi f_m t)\\ .\\ .\\ \sin (2N_h \pi f_m t) \\ \cos (2N_h\pi f_m t) \end{array} \right) \end{aligned}$$
(2)

Here, ‘\( f_m \)’ is the target frequency ‘m’ and ‘t’ is the time vector of length ‘N’. The PSDA is used as the common feature extractor across all the methods in this study. Once the filtered signals are obtained, the detection score (feature) is computed for all the target frequencies, \( f_m \) and is given by,

$$\begin{aligned} T (f_m)= \left( \frac{1}{N_l N_h}\right) \sum _{l=1}^{N_l} \sum _{h=1}^{N_h} {\widehat{P}_{h,l}} \end{aligned}$$
(3)

where \( {\widehat{P}_{h,l}}=\Vert {{X^t_h}{\hat{Y_l}}}\Vert ^2 \) is the signal power of the target frequency, ‘\( N_h \)’ and ‘\(N_l\)’ filtered channel. The following sections describe the PLS spatial filter followed by the proposed OPLS and MCC and in all the descriptions the EEG data (‘Y’) is assumed to be mean centred.

2.2 Partial Least Squares (PLS)

Partial least squares (PLS) is a MVA technique that allows comparison of multivariate explanatory (input) and response (output) variables, to establish a linear relationship between them. Here, the EEG data (‘Y’) is considered as the input variable and the SSVEP reference (‘X’) as the output variable. This regression model is as given in (1). The PLS extracts the latent variables that accounts for the maximum covariance between the EEG data and SSVEP model signals [8]. This is achieved by obtaining projections with orthonormality constraint that maximize the objective function given by,

$$\begin{aligned} \begin{aligned} maximize:&~Tr\{ W_{y}^TC_{yx}W_{x} \} \\ subject~to:&~W_{y}^TW_{y}=W_{x}^TW_{x}=I \end{aligned} \end{aligned}$$
(4)

where, \(W_{y}\) and \(W_{x}\) are the projection vectors of input and output space respectively. The solution to the above objective function is achieved via an iterative procedure known as SIMPLS [3]. Here the variables are decomposed into the form,

$$\begin{aligned} \begin{aligned} Y = TP^T+E \\ X = UQ^T+F \end{aligned} \end{aligned}$$
(5)

where, T and U are score vectors, P and Q are loading vectors and E and F are residuals respectively. Here the score matrices T and U are the latent variables that maximize the covariance and are obtained by computing the linear transformation of the explanatory and response variables. Each column of the score vectors known as the factors are computed one after another iteratively by minimizing the residuals E and F (via SIMPLS algorithm). The dimension of the score matrices dictates the dimension of the reconstructed data. The linear relationship between the input and the output variables is given by the transformation vector in-terms of T and U as,

$$\begin{aligned} B_{pls}=Y^{T}U(T^{T}YY^{T}U)^{-1}T^{T}X \end{aligned}$$
(6)

The estimation of target variable via the PLS regression is given by,

$$\begin{aligned} \widehat{X}=YB_{pls} \end{aligned}$$
(7)

Once \(\widehat{X}\), the reconstructed EEG data, is obtained, the detection score, \( T_{pls} \) is found via power spectral density analysis (PSDA). The target frequency (\( F_{pls} \)) is detected as,

$$\begin{aligned} F_{pls}= \max _{m} \left( T_{pls} (f_m)\right) \end{aligned}$$
(8)

2.3 Orthonormalized Partial Least Squares (OPLS)

The orthonormalized PLS algorithm [15] is a variant of PLS method which tries to minimize the mean square error (MSE) by maximizing the objective function given by,

$$\begin{aligned} \begin{aligned} maximize:&~Tr\{ W_{y}^TC_{yx}C_{yx}^{T}W_{x} \} \\ subject~to:&~ W_{y}^TW_{y}=I \end{aligned} \end{aligned}$$
(9)

where \(W_{y}\) corresponds to optimal regression parameters. Unlike PLS, the OPLS method does not take into account the variance of the SSVEP references [2]. A novel property of OPLS is that the optimal projections obtained are such that the it rewards the EEG latent variables that better predict the variance of the target SSVEP model. Intuitively, this means that we are more interested in approximating the actual SSVEP response signals instead of a projection of it (namely the reference signals). Due to this, the OPLS can be seen as a potential alternative to other SSVEP spatial filters. The projection matrix \(B_{opls}\) is obtained similar to PLS procedure [3]. Similarly, the detection scores (\(T_{opls}\)) are computed and target frequency (\(F_{opls}\)) is identified as depicted in (8).

2.4 Maximum Contrast Combination (MCC)

MCC algorithm is designed to find the linear combination of the EEG channels that maximizes the SNR of the desired signals [1, 5]. The noise component is obtained by projecting the EEG data orthogonal to the SSVEP reference signals and is given by,

$$\begin{aligned} \tilde{Y}= Y-XA_{LS}=Y-XC_{xx}^{-1} C_{xy}^{-1} \end{aligned}$$
(10)

where, \( A_{LS}=P_{opt}= \left( X^T X\right) ^{-1}X^T Y \). The weight matrix (\( W_{mcc} \)) that maximizes the SNR is obtained by minimizing the constrained optimization problem given by,

$$\begin{aligned} \min _{W_{mcc}} \frac{ \Vert {Y} W_{mcc} \Vert ^2}{ \Vert \widetilde{Y} W_{mcc} \Vert ^2} = \min _{W_{mcc}} \frac{W_{mcc}^T {Y}^T {Y} W_{mcc}}{W_{mcc}^T \widetilde{Y}^T \widetilde{Y} W_{mcc}} \end{aligned}$$
(11)

The solution to the above problem is obtained by decomposing the matrix, \((\widetilde{Y}^T \widetilde{Y})^{-1} {Y}^T {Y}\). The resulting eigenvectors corresponding to ‘n’ largest eigenvalues make up the columns of the weight matrix \( W_{mcc} \) (contributing to 90\(\%\) of total data variance). Once the detection score (\( T_{mcc} \)) is computed from the reconstructed channels, the frequency of interest (\( F_{mcc} \)) is detected as,

$$\begin{aligned} F_{mcc}= \max _{m} \left( T_{mcc} (f_m)\right) \end{aligned}$$
(12)

2.5 Data Acquisition

The EEG data for the study was obtained from ten subjects (denoted as S1 to S10) with normal vision using a eight electrode (Oz, Pz, O1, O2, PO3, PO4, PO7 and PO8) setup based on extended 10–20 electrode configuration (shown in Fig. 1a). An analog front end with ADS1299 and Arduino Uno based on OpenBCI system was employed to sample the EEG data at 250 Hz and transmit in real time to PC [14]. The visual stimuli and EEG data storage was managed using Processing® language. The recorded data was filtered between 2 to 40 Hz and Offline analysis was performed using MATLAB®.

Fig. 1.
figure 1

Illustration of (a) the electrode placement for EEG recording and (b) the on-off stimulus design.

The visual stimuli consisted of four on-off stimulus targets (8.57, 10, 12, and 15 Hz respectively) presented against a dark background with a centeral fixation point using a LCD screen (shown in Fig. 1b). The screen had a 60 Hz refresh rate and was placed 50 cm from the subject. Each session consisting of five trails begins with the subject at rest and looking at the fixation point. At the start, a visual cue is presented to the subject to gaze at a target stimuli for 10 s. Once the highlight is removed the subject is advised to move to the central fixation point for 5 s. Likewise, all the target frequencies are cued one after another which depicts a single trial. Each session of recording consists of five continuous trials. A single low artifact session (devoid of avoidable artifacts such as electrode displacements, prolonged eye closure and high levels of power line interferences) was selected and used for analysis of the detection performance of the algorithms.

Fig. 2.
figure 2

Accuracies obtained for MCC, PLS and Orthonormalized PLS (represented as OPLS) spatial filters with PSDA as the feature extractor across window lengths of 1 s to 5 s for all ten subjects (S1 to S10).

3 Results and Discussion

The detection metrics for each of the algorithms discussed in the Methods section were computed from the selected EEG data for each subject across the window length of 1 s to 5 s in steps of 1 s with a 25\(\%\) overlap. The EEG data is mean centred and the classification accuracies were calculated by creating a confusion matrix. Since the target frequencies were mainly in the lower frequency range (<25 Hz), the algorithms were evaluated for two harmonic case only [8].

Fig. 3.
figure 3

Averaged accuracies obtained from MCC, PLS and OPLS spatial filters for two harmonic case, H = 2 (\( f_m \) and \( 2f_m \)) and window lengths of 1 s to 5 s. The standard deviation from mean accuracy is depicted using error bars.

The accuracy across all ten subjects for MCC, PLS and OPLS spatial filters with PSDA as the feature extractor across window lengths of 1 s to 5 s is depicted in Fig. 2. PSDA was used across all the methods under comparison as a common feature extractor to analyse them uniformly. Overall, the detection accuracies was seen to improve as the window length increased. The OPLS provided a more efficient and improved detection performance in terms of accuracy compared to both MCC and PLS across all the subjects. The Averaged accuracy across the ten subjects depicted in Fig. 3 which provides a insight into the stability of the algorithms to inter-subject variability. The standard deviation from mean accuracy is depicted using error bars. Similar to Fig. 2, the mean detection accuracy of OPLS was highest across the methods. The figures also confirms that OPLS can achieve consistent and stable higher detection accuracies compared classical spatial filters such as MCC and PLS.

Two way repeated measures ANOVA was used to examine the differences in accuracies depending on detection method used and window lengths. The Greenhouse Geisser correction was made if the data did not conform to the sphericity assumption. The post-hoc paired t-tests (Bonferroni corrected) were used to compare the significance of difference accuracies across detection methods for various window lengths [10, 13]. The Two way ANOVA found significant differences in accuracies due to both methods factor (F(2,18) = 62.98, p < 0.001) and window length (F(4,36) = 462.98, p < 0.001) but there was no significant interaction effects. The results of the post-hoc tests can be seen in Table 1 which depicts the consistent performance of OPLS compared to PLS and MCC.

By designing a spatial filter that minimizes the MSE instead of maximizing the covariance between EEG and SSVEP model, higher detection accuracy has been achieved. The OPLS is shown to provide statistically significant improvement in the detection performance compared to conventional SSVEP spatial filters such as MCC and PLS. Further, the orthonormalized PLS improves upon the advantages of PLS algorithms such as tolerance to multicollinearity and uniquely weighs the features that provide better approximation of the SSVEP model.

Table 1. Post-hoc paired t-test (Bonferroni’s corrected) of differences in detection accuracies between MCC, OPLS and PLS for window lengths from 1 s to 5 s

4 Conclusion

We have proposed, orthonormalized PLS (OPLS) as a novel spatial filter for extracting SSVEP from the noisy EEG data. To demonstrate the superior performance of the proposed method, MCC and PLS were used for comparison using a common feature extractor (PSDA). The result showed that minimizing the MSE between the EEG data and SSVEP references rather than maximizing covariance improves the detection accuracy significantly. The method provides efficient performance across subjects and statistically significant improvement in accuracies across window lengths relative to the methods under comparison. Hence, the OPLS can be considered for a robust and calibration less way of extracting SSVEP features with high SNR.