## 3 Methods  
### Data Augmentation  
The method of data augmentation applied by us is based on the spectral analysis of the EEG signal. First, the spectral representation of EEG signals is built on the basis of previously recorded signals for stimulations with frequencies 5, 6, 7, and 8 Hz. The data augmentation procedure for each of the EEG signal channels is independent. The \(S\) signal recorded for each electrode is split into 1 s \(S_{m}\) windows. For the data recorded in the experiment, the sampling frequency is _fs_ = 256 Hz. A window width of \(N\) = 256 samples was used, and the window was shifted with a small overlap of \(o\) = 10 samples. This made it possible to create a large number of \(M\) time windows. Then, for each \(S_{m}\) window, a spectral analysis was performed using discrete Fourier transform (DFT) [40]:  
\[X_{k}=\sum_{n=0}^{N-1}\left(S_{m}\right)_{n}e^{-\frac{2\pi}{N}kn} \tag{1}\]  
The spectral analysis enables the determination of the amplitudes of individual frequencies, which range from 0 to _fs_/2 Hz. The number of samples, \(N\) = 256, allowed for the acquisition of a frequency resolution of the signal equal to 1 Hz. As a result of the DFT analysis, we obtained the sets \(P_{k}=\left\{X_{k1},\ X_{k2},\ X_{k3},\ \ldots,\ X_{kM}\right\}\) representing the amplitude values for the frequencies \(k\) = 0..._fs_/2 Hz. The \(P_{k}\) sets were used to generate new EEG signals. The augmentation algorithm enables the creation of a new artificial EEG signal with any number of \(L\) samples. The algorithm to create an artificial EEG signal is as follows:  
1. Create a new zero-time vector \(S_{a}\) of length \(L\). This vector corresponds to the newly generated EEG signal for time samples from 0 to \(L\times T-T\) (with step \(T\)).
2. In a loop, for each value of frequency \(k\) = 0 to _fs_/2, perform the following: 1. Choose an \(A_{r}\) value randomly from the range \(\langle-0.82;0.82\rangle\), 2. Choose a \(\varphi_{r}\) value randomly from the range \(\langle-2\pi;2\pi\rangle\) 3. Choose a \(P_{kr}\) element randomly from the \(P_{k}\) set 4. Update vector \(S_{a}\) according to the formula: \[S_{a}=S_{a}+\left(P_{kr}+A_{r}\right)\sin(2\pi kt+\varphi_{r}),\] where \(t\) is a vector of time samples 3. Add a vector R of length \(L\) to the vector Sa containing values chosen randomly from the range \(-\epsilon\) to \(\epsilon\), where \(\epsilon\) = \(\langle-1.84\times 10^{-8};1.84\times 10^{-8}\rangle\) The result is a vector \(S_{a}\) corresponding to the newly generated EEG signal. Particular attention should be paid to the ranges from which the values \(A_{r}\), \(\varphi_{r}\), and \(\epsilon\) are to be chosen. The typical values of the parameters were selected based on observations and were \(A_{r}\) = \(\langle-0.82;0.82\rangle\), \(\varphi_{r}\) = \(\langle-2\pi;2\pi\rangle\), and \(\epsilon\) = \(\langle-1.84\times 10^{-8};1.84\times 10^{-8}\rangle\), respectively.  
To obtain the augmented signal, the first 20 s of the recorded real EEG signals were used. As a result of data augmentation, we obtained 90,000 examples per class for each user (S01-S05), totaling 360,000 examples. Out of these, 10% were designated as validation data. Consequently, the CNN training set comprised 324,000 examples, while the validation set included 36,000 examples. Only the generated data were utilized for training the CNN. However, to evaluate the network's performance, the last 10 s of the real recorded EEG signals were used. The method itself does not limit the number of examples that can be generated. From several hundred real EEG examples, it is possible to generate several thousand artificial examples. The morphology of the generated EEG signals is distinct,