# Automating Stimulation Frequency Selection for SSVEP-Based Brain-Computer Interfaces
## 5 Experimental Evaluation
### Pre-Processing and Descriptive Statistics  
After obtaining the records from all participants, we used the MATLAB software package, version r2022b, for technical computing tasks. We utilized a band-pass filter with a bandwidth frequency range of 3 to 49 Hz to preprocess the EEG signals. Despite the fact that the occipital electrodes used in our calculations showed less prominent artifacts, such as EOG artifacts compared to frontal electrodes [53], we filtered out any activity in the frequency range up to 3 Hz. Additionally, due to the functioning of the notch filter used during the recording stage of the EEG signals, the frequency range of 45-55 Hz was unsuitable for our calculations; therefore, we suppressed all frequencies above 49 Hz. Then, for each of the channels of occipital leads O1, O2, and Oz, we performed a procedure of extracting fragments of the EEG signal with photostimulation. Each fragment consisted of a 10 s interval before the presentation of the photostimulus, a 60 s fragment recorded during the presentation of the photostimulus, and a 20 s fragment after the end of the presentation of the photostimulus. Thus, for each participant, we obtained 21 \(\times\) 3 EEG signal fragments of 90 s each. We carefully checked all obtained fragments for the absence of any artifacts that would prevent further computations. Finally, for each fragment, we calculated all the coefficients described in Section 4. Thus, Figure 3 represents the dependence of the reaction speed coefficient \(K_{sp}\) on the photostimuli frequency for subject 3. This chart is presented for the fundamental and second harmonics of the stimulation frequencies for all occipital leads. It is important to note that, in our case, due to the effect of the notch filter, the results of calculating the second harmonic coefficients for frequencies beginning from 45 to 55 Hz do not provide any useful information and are not taken into account by us, since this frequency range was affected by the filter. Figure 3: Reaction speed coefficient values for subject 3. As can be seen from the figure above, subject 3 demonstrates the best response speed (close to one) for photostimuli frequencies from 13 to 25 Hz, according to the \(K_{sp}\) coefficients calculated for the fundamental and second (excluding 23 Hz and above) harmonics (O2 and Oz leads). It can also be noted that for the \(K_{sp}\) coefficient, calculated for the second harmonic, photostimuli frequencies from 6 to 9 Hz can also be characterized as good in terms of the speed of response (O2 lead). For this subject it can be seen only for the second harmonic, but not for the fundamental. This once again emphasizes the importance of considering the response at multiples of frequencies. Tables 1 and 2 present the results of calculating the \(K_{sp}\) coefficient in the Oz lead for all subjects who participated in the experiment. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Frequency (Hz)** & **Subj 1** & **Subj 2** & **Subj 3** & **Subj 4** & **Subj 5** & **Subj 6** & **Subj 7** & **Subj 8** \\ \hline
5  
As can be seen from the data presented in Tables 1 and 2, each subject's reaction speed is highly individualized. Thus, subject 7 demonstrates extremely high \(K_{sp}\) coefficient values at all presented photostimulus frequencies for both the fundamental and second harmonics. In contrast, subject 6 showed some of the worst results, up to a complete absence of response at the fundamental (Table 1, frequencies 6, 10, and 11 Hz) and second (Table 2, frequencies 10, 16, 18, and 20 Hz) harmonics. This once again emphasizes the need for an individual approach to each user when selecting stimulation frequencies in BCIs. Figure 4 represents the dependence of the threshold, overcoming coefficient \(K_{o}\) on the photostimuli frequency for subject 3. This chart is presented for the fundamental and second harmonics of the stimulation frequencies for all occipital leads.