# Fuzzy Tracking and Control Algorithm for an SSVEP-Based BCI System
## 3 Results and Discussion
### Comparison with CCA  
For comparison with the proposed approach, the CCA was selected as the baseline system [23]. For the \(m\)th stimulus frequency \(f_{m}\), a reconstructed reference signal set was formed using a series of sin-cosine waves, which can be written as follows:  
\[y_{m}=\left[\begin{array}{c}\sin\left(2\pi f_{m}t\right)\\ \cos\left(2\pi f_{m}t\right)\\ \vdots\\ \sin\left(2\pi Hf_{m}t\right)\\ \cos\left(2\pi Hf_{m}t\right)\end{array}\right], \tag{4}\]  
where \(t=\frac{1}{F},\frac{2}{F},\cdots,\frac{P}{F}\). \(H\), \(P\), and \(F\) are the number of harmonics, the number of points for an input signal, and the sampling rate, respectively. The number of harmonics, \(H\), was 4 in this experiment. The experimental results of the fifteen subjects are shown in Figure 7. The recognition rates were 94.49% and 96.97% for the baseline and the fuzzy approach, respectively. The recognition rate of the proposed approach for each subject was clearly higher than that of baseline. To examine the experimental results, a Wilcoxon's signed-rank test was adopted, and the two-tailed test \(p\)-value was approximately 0.002. Thus, at a signification level of 0.01, the results we obtained surely indicate that the recognition rate of the proposed approach is higher than that of CCA. Therefore, the proposed approach is an excellent solution for correctly recognizing the frequency response of the visual stimulation.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **TriaMF** & **TrapMF** & **GbellMF** & **GaussMF** & **Gauss2 MF** \\ \hline Recognition rate (\%) & 97.02 & 97.56 & 97.64 & 97.69 & 97.51 \\ The output range of defuzzification & 20.75 & 27.5 & 27.5 & 34.25 & 27.5 \\ The input range of fuzzification & 30 & 40 & 40 & 50 & 40 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Optimal recognition rates for different membership functions.  
Figure 7: Experimental results for different subjects.  
To analyze the effects of the visual stimulus frequency, the experimental results for different stimulus frequencies are shown in Figure 8. The results indicate that, when the stimulus frequency increased, the recognition rates were slightly degraded. To determine the cause, the normalized amplitude at the stimulus frequency, which reflects the SNR of the SSVEP, can be calculated as follows:  
\[P=\frac{\left|FFT\left(x\right)\right|}{\sum\limits_{x}\left|FFT\left(x\right) \right|}, \tag{5}\]  
where \(x\) is the preprocessed EEG data and \(FFT(x)\) is the fast Fourier transform of \(x\). \(\sum\limits_{x}\left|FFT\left(x\right)\right|\) denotes summing over the total frequency points of the spectrum; thus, the sum of the amplitude spectrum is normalized to one [24]. The results for one subject are shown in Figure 9. The peak of the stimulus frequency can be clearly identified for that subject. However, the SNR of the peak value for a high stimulus frequency is lower than that for a low stimulus frequency. Therefore, if the stimulus frequency is increased, the performance is degraded. For the proposed approach, the adverse effects can be reduced by automatically adapting the threshold for making the decision.