# Automating Stimulation Frequency Selection for SSVEP-Based Brain-Computer Interfaces
## 5 Experimental Evaluation
### Coefficients Analysis Application  
We used the C++ programming language and the Qt library version 5.14 to create an application with a graphical user interface. With the help of this application, it is possible to analyze the calculated coefficients and generate a list of optimal photostimuli frequencies for each subject. The app's appearance is shown in Figure 9.  
This application consists of two sections. In the first section, located on the left, the user specifies the necessary input data used for analyzing the coefficients and generating a list of recommended stimulation frequencies. In the second section, located on the right, the user can view the results of the coefficient analysis performed according to the input parameters specified by them. Thus, in the upper part of this section, the user can view detailed information about any stimulation frequency for which coefficients have been calculated. In particular, this will allow the user to find out which criteria led to the exclusion of a particular frequency from the recommended list. The corresponding values that did not pass any criteria are colored in red. In the lower part of this section, there is a final list of recommended frequencies presented in the form of a table. Each row of the table is sorted in descending order of the stimulation frequency rating. Figure 8: Discomfort coefficient values for subject 3. Figure 7: Average theta–beta ratio for males and females. When starting to use the application, it is necessary to specify the path to the file with the coefficients calculated in MATLAB for each stimulation frequency (in the left part of the application). Then, the user must provide a set of criteria for selecting stimulation frequencies in the corresponding sections. The list of selection criteria available for setting was chosen in such a way that the user can adapt the behavior of the application to their goals and tasks. For example, the user can specify occipital leads for which the coefficient analysis needs to be performed. We added this feature to the application for the reason that a subject's individual response to the presented frequencies may appear not only in the reaction level of the occurring SSVEP potential but also in the location of this response among the occipital electrodes. For example, in the previous section, in the phase of calculating the basic coefficients for subject 3, the vast majority of optimal coefficients were at the O2 and Oz electrodes, while the values for the O1 electrode were lower. However, this is not a strict rule and is highly dependent on subject differences. Thus, even in the case of subject 3, an example can be given where the highest response was found on electrode O1; it can be seen in Figure 5 for photostimulus frequencies of 15 Hz (for the coefficient \(K_{fa}\) calculated for the fundamental frequency) and 16 Hz (for the coefficient \(K_{fa}\) calculated for the second harmonic). This allows for determining the rating of each frequency and identifying the most suitable EEG channel for searching for SSVEP potential at any stimulation frequency. If necessary, the user can specify the exact number of frequencies recommended by the application, depending on the requirements of the BCI, or leave this section disabled to turn off the frequency number limitation. In the following sections, the user needs to set the minimum permissible threshold values for the \(K_{sp}\) and \(K_{o}\) coefficients proposed in this article. Establishing minimum acceptable thresholds for these coefficients provides fine control over how the application prioritizes certain frequencies. For example, setting the \(K_{o}\) coefficient threshold closer to one and decreasing the \(K_{sp}\) coefficient threshold will cause the application to prioritize stimulation frequencies with the most stable threshold overshoot  
Figure 9: Main window of the developed application. of SNR.