A LabVIEW Instrument Aimed for the Research on Brain- Computer Interface by Enabling the Acquisition, Processing, and the Neural Networks based Classification of the Raw EEG Signal Detected by the Embedded NeuroSky Biosensor

The Brain-Computer Interface (BCI) is a scientific field aimed at helping people with neuromotor disabilities. Among the current drawbacks of BCI research is the need for a cost-effective software instrument for simple integration with portable EEG headsets, the lack of a comparative assessment approach of various techniques underlying recognizing the most precise BCI control signal –voluntary eye-blinking, and the need for EEG datasets allowing the classification of multiple voluntary eye-blinks. The proposed BCI research-related virtual instrument accomplishes the data acquisition, processing, features extraction, and the ANN-based classification of the EEG signal detected by the NeuroSky embedded biosensor. The developed software application automatically generated fifty mixtures between selected EEG rhythms and statistical features. The EEG rhythms are related to the time and frequency domains of the raw, delta, theta, alpha, beta, and gamma. The extracted statistical features contain the mean, median, standard deviation, route mean square, Kurtosis coefficient, mode, sum, skewness, maximum, and range = maximum-minimum. The results include 100 EEG datasets to classify multiple voluntary eye-blinks: 50 datasets with 4000 recordings and 50 with 800 recordings. The LabVIEW application determined the optimal ANN models for classifying the EEG temporal sequences corresponding to detecting zero, one, two, or three volun-


Introduction
Brain-Computer Interface is a multidisciplinary research field, which comprises achievements in related scientific and technical areas: artificial intelligence, computer science, mechatronics [1][2][3], signal processing, neuroscience, and psychology [4]. Beyond its various applications in non-clinical fields (digital games, sleep avoidance, mental states monitoring, advertisement, and business), the fundamental aim of a brain-computer interface system is related to helping people with neuromotor disabilities who cannot communicate with the outside environment by using natural paths, such as muscles and peripheral nerves. These patients have suffered a cerebral vascular accident or severe injuries to the spinal cord, so that they have lost the ability to move their upper and lower limbs. Other reasons which provoked their impairments are related to awful diagnosis: amyotrophic lateral sclerosis or locked-in syndrome. An innovator solution able to provide an alternative way of regaining their independence and confidence is the Brain-Computer Interface (BCI). BCI is a thought-provoking field with a rapid evolution because of its applications based on brain-controlled mechatronics devices (wheelchairs [5][6][7][8], robot arm [9][10], robot hand [11], mobile robots [12], household items [13] and intelligent home design [51], and support vector machines [52] for getting high accuracy of discriminating between various types of eye-blinks (voluntary, involuntary, short, long, simple, and double) aimed for the achievement of highly performant brain-computer interfaces. Table 1 shows a summary including the acquisition, processing, extracted features, classifier of some of the papers aimed for voluntary eye-blinking that did not involve amplitude thresholding. An artificial multi-layer neural network with backpropagation → input layer (48 neurons), three hidden layers, one output layer (1 neuron); Activation functionbinary sigmoid; traincgb, traincgf, traincgp, trainrp, traingda reported low performance traingdx and trainlm reported high performance [51] Raw EEG Signal EEG data analysis in the time domain A coefficients matrix based on the following variable parameters: the window size (number of samples) of the analyzed signal, thresholding the coefficients, and decomposition level A multi-resolution analysis The temporal location and the duration measurement of each eye blinking occurrence Certain thresholds and the decomposition level Continuous wavelet transform (CWT)designing an ad-hoc mother wavelet [52] Raw EEG Signal Certain filters orders A moving window in the time domain Correlation thresholds

Not applicable
Unsupervised novel approach Eye-blink fingerprint Both the novice and experienced researchers focused on a particular BCI application so that they established fixed, rigid, and restrictive thresholding, statistical and artificial intelligence-based research methods for the detection and counting of multiple voluntary eye-blinks. Currently, the BCI-related scientific literature does not prove any recent evidence or proposal of a flexible, versatile, customizable EEG research software solution aimed for further investigation, comparative analysis, and performance evaluation of the results obtained to classify the multiple voluntary eye-blinks. Table 2 shows a summary, including the software, hardware, task, application, and the availability of a dataset related to the papers aimed for voluntary eye-blinking classification that did not involve amplitude thresholding.  [53] proposed in 2000 as a free-of-charge solution enabled general-purpose brain-computer interface systems research. BCI2000 is a standalone development instrument that integrates neuronal biopotentials, signal analysis techniques, EEG data acquisition equipment, and communication protocols. Nevertheless, BCI2000 is not updated anymore to incorporate the necessary functionalities required by the newest NeuroSky EEG portable headset released in 2018. Therefore, currently, there is no evidence that BCI2000 is still applicable for the acquisition, processing, and classification of the raw EEG signal detected by the embedded sensor of the cost-effective NeuroSky Mindwave Mobile portable headset.
OpenViBE software platform [54] proposed in 2010 as an open-source development solution allowed the design, implementation, testing, and use of complex paradigms underlying a brain-computer interface system. OpenViBE proved to be a valuable research tool, especially for the experimentation of advanced BCI paradigms involving P300, SSVEP (Steady State Visually Evoked Potentials), Motor Imagery, and Virtual Reality based neurofeedback. These versatile features are provided only by the expensive EEG portable headsets: OpenBCI, OpenEEG, and Emotiv. Although the OpenViBE covers Neu-roSky functionality, according to their forum, the most recently released version of Neu-roSky Mindwave Mobile is possibly not compatible with their software platform anymore. Therefore, the customizable use of OpenViBE general-purpose software platform is not straightforward for enabling young researchers to integrate the functionality of microcontroller-based boards such as Arduino and Raspberry Pi that are frequently necessary to develop experimental BCI prototypes. Moreover, to benefit from all the outstanding features of OpenViBE, it is necessary to have solid programming skills.
EEGLAB Matlab-based software platform [55] created in 2000 as an open-source toolbox for analyzing the EEG signals can also contribute to developing a brain-computer interface system. Although EEGLAB provides advanced EEG processing techniques, it does not include machine learning-based methods for classifying the raw EEG signal to get commands for a BCI application.
The development of the proposed research virtual instrument is based on the State Machine design pattern so that it enables the running of the following sequences:

•
Manual and automatic mode for the EEG signals acquisition; • The EEG signal processing and the preparation of temporal sequences for EEG dataset; • The generation of training and testing EEG dataset based on multiple mixtures between the selected EEG signals and the extracted features; • The training of models based on the Artificial Neural Networks (ANN) through the EEG signal classification process by setting specific values for hyperparameters or searching the optimized ones; • The testing phase of the trained model is based on Artificial Neural Networks (ANN) so that it will be possible to measure the accuracy and precision of the classification process.
Reviewing the current scientific literature shows that very few articles [49], [51][52] deliver EEG datasets consisting of the specific patterns corresponding to simple, double, or triple voluntary eye-blinks. Such EEG datasets covering eye-blinking are necessary for testing the performance of the EEG data processing-based algorithms to remove artifacts and evaluate the accuracy of the recognition of multiple voluntary eye-blinks used as control signals in brain-computer interface applications. Therefore, a significant contribution brought by this paper is consisting of delivering a large number of 100 EEG datasets aimed for the assessment of 50 different machine learning-based models accomplishing the classification of the following four states: no eye blink detected, one eye-blink detected, two eye-blinks detected and three eye-blinks detected.
Thus, 50 EEG training datasets (format .csv) contain 4000 recordings: 1000 -No Eye-Blink; 1000 -One Eye-Blink; 1000 -Two Eye-Blinks and 1000 -Three Eye-Blinks. The 50 EEG datasets contain 50 different mixtures representing 50 possible combinations between the selection of ten EEG rhythms and ten statistical features.
The ten EEG rhythms are the time and frequency domain of raw, delta, theta, alpha, beta, and gamma. The ten statistical features are: mean, median, route mean square, standard deviation, Kurtosis coefficient, mode, sum, skewness, maximum value, and range = maximum-minimum.
The 50 EEG datasets provided the training of the 50 classification models (format .json) based on neural networks delivered by the current research. In addition, there resulted in 50 EEG testing datasets (format .csv), each containing 800 recordings: 200 -No Eye-Blink; 200 -One Eye-Blink; 200 -Two Eye-Blink and 200 -Three Eye-Blinks. The EEG training and testing datasets have a similar content related to the values resulting from combining different EEG rhythms and statistical features.
Regarding the structure of the current paper, Section 2 provides some detailed insights about the materials and methods necessary to develop the LabVIEW application, Section 3 shows the obtained results, and Section 4 analyzes the outcomes by comparing them with previous similar achievements. Finally, Section 5 comprises some conclusions about the overall project work and highlights the future research directions.

LabVIEW graphical programming environment
This paper proposes a BCI research-related virtual instrument developed in the Lab-VIEW graphical programming environment [56], which provides efficient solutions for helping researchers, professors, students, and engineers in their projects and related activities. LabVIEW proved successful results regarding developing virtual instruments for the automation of industrial processes, data acquisition, signal analysis, image processing, interactive simulations, command, and control systems, testing and measurement systems, and education. Moreover, LabVIEW enables the possibility to create versatile applications based on artificial intelligence or machine learning techniques by taking advantage of various toolkits containing valuable functions. Therefore, LabVIEW offers the benefit of allowing rapid and straightforward communication with several acquisition devices, hardware systems aimed for data processing and actuators. The programming language underlying LabVIEW is called 'G,' introduced in 1986 by Jeff Kodosky and James Truchard. The software applications developed by using LabVIEW are called 'virtual instruments' (vi). The graphical user interface designed in LabVIEW is known as the Front Panel. It can include various appealing elements, such as controls (input variables) of different types (numerical: knobs, dials, meters, gauges, pointer slides; Boolean: push buttons, slide switch, toggle switch, rocker button; string: text boxes) and indicators (output variables) of different types (numerical: waveform graphs, charts, XY graphs; Boolean: LEDs). Like in procedural programming languages, LabVIEW offers the advantage of using data structures, for example, arrays and clusters. The source code implemented in LabVIEW consists of the Block Diagram, allowing various structures and functions to design compact, maintainable, scalable, and robust programming paradigms. The most frequently used structures are while loop, for loop, and switch case. Some useful functions are Bundle by Name, Build Array, and Search and replace string. The programming paradigms are State Machine, Producer/Consumer, Event Handler, or Master/Slave.
The independent use of the proposed virtual instrument aimed for BCI research on a different computer is possible either by installing the resulted standalone application or by running the executable file with the help of the LabVIEW Runtime Engine package.

NeuroSky Mindwave Mobile -Second Edition (released in 2018)
The single embedded sensor of NeuroSky Mindwave Mobile (second edition, released in 2018) headset [57] enabled the detection of the EEG signal, thanks to advanced functionalities offered by the ThinkGear chipset. These features are available by accessing the 'NeuroSky' LabVIEW toolkit, which includes various functions allowing: the acquisition of raw EEG signal, the extraction of the EEG rhythms (delta: 0 -3 Hz, theta: 4 -7 Hz, alpha: 8 -12 Hz, beta: 13 -30 Hz and gamma: > 30 Hz), the measurement of attention and meditation level and the calculation of eye-blinking strength. NeuroSky headset has only an embedded sensor placed on the forehead (FP1 location according to the 10-20 International System) or the frontal cerebral lobe of the user. Likewise, the headset contains a clip representing the reference or the ground necessary to close the electrical circuit and should be attached to the earlobe. Moreover, the second version of NeuroSky Mindwave Mobile headset distinguishes by the other releases through its design, providing a flexible arm to get a comfortable placement on the user's forehead and achieve samples in higher precision of the EEG bio-potentials. Likewise, the NeuroSky chipset increases the accuracy of the EEG signal due to its embedded advanced filters aimed for noise reduction. The technical features give further benefits: the sampling rate is equal to 512 Hz, the bandwidth range is from 0.5 to 100 Hz, it supports SPI and I2C interfaces, and its resolution is equal to 16 bits. According to scientific literature [58][59], the NeuroSky Mindwave headset was a preferred choice in the research due to its inexpensive cost and good results regarding the high accuracy of the acquired EEG signal.

An overview of the proposed LabVIEW application based on a State Machine paradigm involving the acquisition, processing, and classification of the EEG signal detected from the embedded sensor of Neurosky
The main original contribution of this paper is the proposal of a novel research approach on the development of a portable brain-computer interface system. An original LabVIEW application addresses this challenge by implementing several custom virtual instruments aimed to integrate the following three stages: the acquisition, the processing, and the classification of the EEG signal detected from the embedded sensor of the Neuro-Sky Mindwave Mobile headset.
The proposed LabVIEW application is consisting of a State Machine paradigm accomplishing the following functionalities ( Figure 1): • Manual Mode of data acquisition for displaying the EEG signal (raw, delta, theta, alpha, beta, and gamma) both in time and frequency domain; • Automatic Mode of data acquisition for recording the EEG temporal sequences associated with particular cognitive tasks necessary for the preparation of the EEG datasets; • Processing the obtained EEG temporal sequences by the extraction of statistical features and the assignment of proper labels corresponding to each of the four classes: 0 -No Eye-Blink; 1 -One Eye-Blink; 2 -Two Eye-Blinks and 3 -Three Eye-Blinks; • The automatic generation of a series of EEG datasets based on the proposed mixtures between the EEG signals (raw, delta, theta, alpha, beta, and gamma) in time and frequency domains and the extracted statistical features (arithmetic mean, median, mode, skewness and others); • The training of a neural networks model either by setting specific hyperparameter or by searching the optimized hyperparameters applied on each EEG dataset delivered from the previous stage; • The evaluation of each trained neural networks model by running it to classify another EEG dataset that can be delivered by using a similar procedure as previously described regarding the proposed mixtures between EEG signals and statistical features. The selection of the corresponding virtual button accomplishes each of the above functionalities by opening the tab or graphical windows consisting of customized settings and options. Moreover, each of these tabs comprises a button for returning to the main Configuration graphical window shown in Figure 2.

The manual mode of data acquisition and the EEG signal processing
A significant function, included by the LabVIEW NeuroSky toolkit and used to develop the application presented in this paper, is the 'ThinkGear Read -MultiSample Raw (EEG).' This function enables the raw EEG signal acquisition and returns an array containing a specific number of numerical values. The input parameter 'Samples to Read' should specify this number by assigning a numerical value 512, 256, 128, 64, or other. The 'Samples to Read' parameter does not have the same meaning as the 'Sampling Frequency.' According to technical specifications, in the NeuroSky chipset, the sampling frequency is a fixed value, established to 512 Hz, referring to the acquisition of 512 samples in one second. Therefore, setting 'Samples to read = 512' results in a single buffer or 1D array containing 512 numerical values. Otherwise, by setting 'Samples to read = 256', there are returned two buffers or 2 x 1D arrays, each of them containing 256 numerical values. In LabVIEW, a 1D array is a matrix with one dimension, meaning either one row and many columns or one column and many rows. Other functions that allow the communication between LabVIEW and NeuroSky headset were linked ( Figure 3): 'Clear Connections,' 'Create Task,' 'Start Task,' 'Signal Quality,' 'Read MultiSample Raw,' and 'Clear Task.' 'Clear Connections' is used to reset all previous connections. 'Create Task' is used for the initial settings of serial data transfer: port name, baud rate, data format. Start Task' is used to start the connection or to open the communication port. 'Signal Quality' is used to display the value characterizing the percentage of signal quality. 'Read MultiSample Raw' is used to acquire an array of samples of EEG raw signal. 'Clear Task' is used to close the connection or the communication port. Further, according to Figure 4, the output array of numerical values returned by the 'Read MultiSample Raw' function is used to input the 'Build Waveform' function. In addition, two parameters (t0 = current time in hours, minutes, seconds, and milliseconds and dt = time interval in seconds between data points) are necessary to obtain the appropriate data format to apply a filter for the extraction of a particular range of frequencies, which can be graphically displayed. The 'Get Date/Time' function facilitates calculating the 't0 = Current time' parameter. The 'dt = time interval' is given by the division of 1 to 512, taking into account 'Samples to Read = 512'. The output of the 'Build Waveform' function is passed through the 'Filter' function so that it results in a particular sequence of signal frequencies extracted from the entire range representing 0 -512 Hz. According to Figure 5, the configuration of the 'Filter' is the following: filter type = Bandpass; lower cut-off = 14 Hz (for beta EEG rhythm); upper cut-off =30 Hz (for beta EEG rhythm); option = infinite impulse response (IIR); topology = Butterworth; order = 6. Two of the previously mentioned parameters -lower cut-off and upper cut-off -should be customized depending on the frequency range of the EEG rhythms: delta (0.1 -3.5); theta (4 -7.5); alpha (8 -13) and beta (14 -30). Another type of filter, called Highpass, extracts the gamma (upper cut-off = 30) EEG rhythm. The output of the 'Filter' function is an array of samples or numerical values represented on a Waveform Chart.  Figure 6) needs the output of the 'Filter' function to allow the calculation of some parameters, including the highest amplitude and frequency of a single tone or a specified frequency range. The format of the output given by the 'Tone Measurements' function is 'dynamic data.' Therefore, it is necessary to convert it to double-precision numerical data. Parallel to these programming sequences, the 'Spectral Measurements' function ( Figure 7) follows after the 'Filter' function. Accordingly, a Waveform Graph displays the power spectrum of each EEG rhythm (delta, theta, alpha, beta, and gamma) extracted from the raw EEG signal by using the 'Filter' function. Likewise, the 'Spectral Measurements' LabVIEW function can perform the following features: averaged magnitude spectrum and phase spectrum on a specific signal. The selector of the case structure is a button consisting of a Boolean control with two states: true and false. Those three functions are linked to each other to get output signals that are graphically displayed, depending on the state of the button corresponding to a certain EEG rhythm: delta, theta, alpha, beta, gamma, or raw signal.
Overall, five case structures represent the five EEG rhythms, which can be activated or deactivated by pressing those buttons. Therefore, the user can select specific EEG rhythms displayed on either the Waveform Chart corresponding to the time domain (that is, the output of the 'Filter' function) or the Waveform Graph, associated with the frequency domain (that is the output of the 'Spectral Measurements' function). A while loop includes all the five case structures. The while loop also contains the same network of functions previously described regarding displaying the raw EEG signal. Using the 'while loop,' the LabVIEW application runs in manual mode until occurring an exit condition.

Figure 8. The settings and description corresponding to 'Spectral Measurements Express VI' included by the 'Signal Analysis Express VIs' LabVIEW palette
Considering that the State Machine design pattern is underlying the Block Diagram, the transition between states or different sequences should be quick and straightforward. Therefore, by pressing the 'Config' button, the exit condition is fulfilled so that the running of the manual mode of data acquisition (Figure 9) stops. The application continues to run in the 'Configuration' state, where the user can select another option: automatic mode of EEG data acquisition or features extraction or training neural networks model.

The automatic mode of the EEG signal acquisition
The LabVIEW programming sequence necessary to implement the automatic mode of EEG signal acquisition has similar content to that needed for the manual mode EEG data recording, presented in the previous section. Nevertheless, there are some differences, and an important particularity is related to implementing another state machine design pattern for the simulation of a virtual chronometer ( Figure 10) able to calculate and display both the elapsed and remained time. Therefore, if the user selects 'Automatic' mode, then he/she should set the following initial parameters: 'Target Time' (hours, minutes, and seconds) meaning the duration of EEG signal acquisition, 'Time Interval' and the number of samples -'Samples to read.' The time interval is associated with the frequency rate of triggering a warning sound, indicating that the user should execute a specific mental task related to the research conducted in the Brain-Computer Interface scientific field. For instance, if 'Time Interval = 2 (seconds)', the user will hear a warning sound from 2 to 2 seconds, which indicates him/her when it is the right moment to execute a voluntary eye-blink. In this case, performing eye-blinks is considered a mental task because it is an artifact across the acquired EEG signal, and it can be precisely detected and categorized as a robust control signal.  Figure 11 shows the proposed experimental paradigm or the algorithm underlying the automatic mode of EEG data acquisition. If the 'Target Time = 80 (seconds)', 'Time Interval = 2 (seconds) and 'Samples to Read = 512', then it will result in 80 temporal sequences of EEG signals, each of them having a length equal to 1 second of recording or it is equivalent with the acquisition of 512 samples. Each second will result in a 1D array or a set of 512 samples for every one of the 12 EEG signals (both time and frequency domain).

Figure 11.
A diagram representing the block instructions underlying the implementation of Data Acquisition in the Automatic Mode -first view showing all the steps leading to obtaining the raw EEG signal (time and frequency domain) and extracting the EEG rhythms (gamma, beta, alpha, theta, and delta) Accordingly, when the chronometer stops, indicating the finish of the EEG signal acquisition in automatic mode, 12 x 2D arrays will be returned. They consist of six types of EEG signals in the Time Domain ( Figure 12) plus six types of EEG signals in Frequency Domain (FFT -Peak - Figure 13): raw, delta, theta, alpha, beta, and gamma. A 2D array is a matrix containing 80 rows (temporal sequences) and 512 columns (512 samples).

The preparation of the EEG temporal sequences
Before applying the EEG acquired data preparation algorithm, every one of 12 x 2D arrays contains: N rows and 'Samples to Read' Columns = 80 rows and 512 columns → 80 temporal sequences of 512 elements. Table 3 shows every one of the 12 x 2D arrays (both time and frequency domain of raw, gamma, beta, alpha, theta, delta) before the preparation of the EEG data. After applying the algorithm of preparation of the EEG acquired data, every one of 12 x 2D arrays contains: 'N divided by Time Interval' rows and 'Time Interval multiplied by Samples to Read' Columns = 40 rows and 2 x 512 columns = 40 rows and 1024 columns → 40 sequences of 1024 elements. Table 4 shows every one of the 12 x 2D arrays (both time and frequency domain of raw, gamma, beta, alpha, theta, delta) after the preparation of the EEG data. Further, it results in the extraction or calculation of features (for example: mean, median, standard deviation) from every one of the 40 sequences, each of them containing 1024 elements.
The algorithm of preparation of the acquired EEG data includes three stages. The first stage is related to using the predefined 'Read Delimited Spreadsheet VI' to read each of the 12 x 2D arrays containing 40960 samples corresponding to the EEG rhythms previously saved .csv files. The second stage consists of implementing a customized VI aiming at converting each of the 12 x 2D arrays into 12 x 3D arrays, the third dimension results from the separate extraction of two rows or two sequences composed of 1024 samples. The third stage is related to the implementation of another customized VI to achieve the conversion of each of the 12 x 3D arrays into 12 x 2D arrays by removing the third dimension because the previously extracted two rows or two sequences should form a single row or a single sequence and all the resulted rows/sequences determine a 2D array.

The label assignment for each EEG temporal sequence by visually checking the graphical display in time and frequency domains
After the preparation of EEG data is finished, according to Figure 14, the user can manually set the label for each EEG temporal sequence by visually checking the graphical display in time and frequency domains. Figure 14 shows the options and settings related to checking the raw EEG signal. Other tabs / graphical windows with similar content assess each EEG rhythm (delta, theta, alpha, beta, and gamma). Therefore, a numerical index can be incremented or decremented by implementing original LabVIEW programming functions to switch between the EEG temporal sequences. Then, by selecting the corresponding virtual button, the user can insert the label associated with the currently displayed EEG temporal sequence. To remove a wrong value inserted by mistake, the user can select the button allowing the deletion of that label.
Further, each label saved in a numerical array generates the EEG datasets aimed for training and testing a neural network model. Using the 'Statistics Express VI' included by the 'Signal Analysis Express VIs' LabVIEW functions palette, it results in the calculation of the statistical features. They determine the content of the EEG datasets stored for each EEG temporal sequence. According to Figure 15, there result in the following statistical features: arithmetic mean, median, mode, the sum of values, root mean square (RMS), standard deviation, variance, Kurtosis, skewness, maximum, minimum, and range (maximum-minimum). As previously stated, the working principle of the proposed LabVIEW application is applied to classify multiple voluntary eye-blinks, although it provides the benefit of processing and recognizing various EEG patterns associated with other cognitive tasks. This way, the user should set the label of an EEG temporal sequence to one of the following values: 0 (if no eye-blink was detected), 1 (if one eye-blink was detected), 2 (if two eyeblinks were detected), and 3 (if three eye-blinks were detected) displayed in Figure 16.

The generation of training and testing EEG dataset
Multiple mixtures between the selected EEG signals and the extracted features are necessary to generate the training and testing EEG dataset. The boxes from the top side of Figure 17 represent 12 x 2D_arrays, each of them containing 40 rows and 1024 columns or 40960 samples. Also, these boxes represent: • 6 x 2D arrays for Time Domain -Waveform_Y_Data of Raw, Gamma, Beta, Alpha, Theta, and Delta; • 6 x 2D arrays for Frequency Domain -FFT_Peak of Raw, Gamma, Beta, Alpha, Theta, and Delta. Figures 17-19 show the graphical diagrams explaining the process of the EEG dataset generation.
The first customized subVI, called 'Process 2D arrays_Sequences', was developed to insert all the 12 x 2D_arrays into one 3D array, whose structure includes: 12 pages corresponding to the 12 EEG signals, 40 rows associated to the 40 temporal sequences, and 1024 columns related to the 1024 samples.
The second customized subVI, called 'Process 3D_Array_Signals_SubVI', was implemented to extract only those 2D arrays corresponding to the previously selected signals by using the checkboxes. Therefore, the resulting 3D array comprises pages equal to selected signals, 40 rows, and 1024 samples. The third customized subVI, called 'Process 3D Array_Signals_Highlighted_SubVI', was created to enable feature extraction by calculating the specified statistical measurements against the previously selected signals. Thus, by adding a new dimension, the resulted 4D array is consisting of: a certain number of volumes equal to the number of selected signals, 40 pages corresponding to the 40 temporal sequences, a certain number of rows equal to the number of the extracted features, and one column related to the single value of each feature.   The fourth subVI, called 'Process 4D Array_Signals_Highlighted_Features_Extracted' (Figure 20), was developed to re-organize and reduce the dimensionality of the obtained data by the generation of one 3D array that is comprising of: 40 pages associated with the 40 temporal sequences, a certain number of rows equal to the number of the selected signals and a certain number of columns equal to the number of the extracted features.
The fifth subVI, called 'Process 3D Array_Signals_Highlighed_Features_Extracted', was implemented as a final stage of re-organization and reducing the dimensionality of the obtained data by the generation of a 2D array that is consisting of 40 rows corresponding to 40 temporal sequences, a certain number of columns involving the number of selected signals and the number of the extracted features. The generated 2D array included numerical elements that converted to String type. Then, a .csv file representing the training/testing dataset stores the 2D array_ Signals_Highlighted_ Features_Extracted ( Figure  21) of string elements. The .csv file is consisting of a table with 11 columns (Sequence; Mean_Raw; Mean_Alpha, Mean_Beta; Median_Raw; Median_Alpha; Median_Beta; RMS_Raw; RMS_Alpha; RMS_Beta; Label) and 40 rows.

Training a NN model for the EEG Signals classification by setting certain hyper-parameters
This phase involves applying the generated dataset to the classification process based on artificial neural networks (NN). Using the default subVIs included by the 'Analytics and Machine Learning' (AML) toolkit [60] results in the classification process.
'Aml_Read CSV File. vi' is used to open the CSV file and read the training dataset. 'Load Training Data (2D Array).vi' is used to load the dataset for training the model. 'Normalize. vi' is used to normalize the training data with the 2-Score or Min-Max Method. Normalization is related to scaling each value of the training dataset in the specified range. The 'Normalize. vi' has two parameters: one shot and batch.
'Initialize Classification Model (NN).vi' initializes the parameter of the classification algorithm: neural networks (NN). The user should set a specific value for every hyperparameter: the number of hidden neurons, the hidden layer type (Sigmoid, Tanh or Rectified Linear Unit functions), the output layer type (Sigmoid or Softmax function), the cost function type (Quadratic or Cross-Entropy function), tolerance and max iteration.
According to the AML LabVIEW toolkit [60], the 'hidden layer type' is related to the activation function applied to the neurons from the hidden layer type. Table 5 defines the available activation functions. According to Table 6, Sigmoid and Softmax are the two activation functions available in the neurons regarding the' output layer type.' Tables 7 shows the mathematical formulas for the supported cost functions type.
Tolerance or max iteration parameter value constitutes the criteria determining training stops or fitting the neural networks model. The tolerance specifies the training error, and the max iteration specifies the maximum number of optimization iterations. The default value for tolerance is 0.0001. The default value for max iteration is 1000.

Funtion type Definition Description
Sigmoid x -the activation value of the hidden neuron Tanh ( ) = tanh ( ) x -the activation value of the hidden neuron ReLU ( ) = max (0, ) x -the activation value of the hidden neuron Table 6. Information about the available activation functions determining the output layer type set as a hyper-parameter included by the 'Analytics and Machine Learning' LabVIEW toolkit

Funtion type Definition Description
Sigmoid x -the activation value of the output neuron x -the activation value of the output neuron  Likewise, the user can set the 'Cross-Validation Configuration,' which is an input cluster containing the following elements: a Boolean control called 'enable' (used to enable or disable cross-validation in training model), number of folds (defining the number of sections that this VI divides the training data into) and metric configuration (average method: micro, macro, weighted or binary).
'Train Classification Model. vi' is used to train a classification model. 'Aml_save Model to JSON.vi' is used to save the model as a JSON file. It converts the trained model to a JSON string to save the trained model to a file.
According to the documentation of the AML LabVIEW toolkit, by enabling the 'Cross-Validation Configuration,' confusion matrix and metrics are returned as output values of the 'Train Classification Model. vi'. The default number of folds is 3, meaning that the test data consists of one section and the training data comprises the remaining sections. The metric configuration parameter determines the evaluation metric in crossvalidation-the neural networks models trained by the proposed LabVIEW application involved 'weighted metric configuration' type. Figure 22 shows the entire structure of the previously described AML functions used to enable the setting of hyperparameters for training the neural networks model. Figure  23 shows the graphical user interface of this LabVIEW programming sequence.

Training the NN model for the EEG Signals classification by searching the optimal hyperparameters
All the information presented in the above section -Classification by setting the parameters -are also applicable to the current section -Classification by searching the optimal parameters. Nevertheless, there is a single exception related to the 'Initialize Classification Model (NN).vi.' According to Figure 24, the user should specify multiple values for each hyper-parameter to the 'Train Classification Model. vi' could use a grid search to find the optimal set of parameters. This technique is underlying the training of the neural networks models from the current research paper because it is more reliable, efficient, and straightforward by enabling the option 'Exhaustive Search' to determine those metrics (accuracy, precision, recall, and F1 score) with all the possible mixtures between hyperparameters. It will result in a mixture including the optimal hyper-parameters necessary to get the highest values for the metric specified in the 'Evaluation Metric' parameter. If the option 'Random Search' was enabled, the 'number of searchings' parameter indicates testing only some possible mixtures between hyper-parameters.
Moreover, the graphical user interface from Figure 24 displays the number of correctly/incorrectly detected samples/temporal sequences, calculated by taking into account the mathematical formulas for the metrics described in Table 8.
The current research analyzed 50 generated artificial neural network-based models, and each of them needed a training time interval between 1 and 3 hours.   The following behavior is initially applicable: whenever the previous phases related to the classification process are running, it results in different values for the evaluation parameters of the NN model: accuracy, precision, recall, and F1 score. These parameters vary due to using a 'Random Number' function included in a subVI contained by the 'Train Classification Model. vi'. The training dataset is normalized and randomly distributed in subsets by using the 'Random Number' function. At the initialization of the model, it results in the configuration of the total number of subsets. One of these subsets is aimed for the pre-training phase, while the others are for the pre-testing phase. These phases are preceding the obtaining of the trained classification model. After running each training session, removing the 'Random Number' function will result in the same evaluation parameters. Keeping the exact configuration of the model should be accomplished to get identical results after running each training session.
The LabVIEW application presented in this paper provides flexibility by implementing a novel method that allows a button with two logical states, called 'Riffle Data,' to activate or deactivate the 'Random Number' function. Thus, the LabVIEW application can interactively enable or disable the random generation of the normalized EEG data. Therefore, it is necessary to implement some modifications in the subVIs provided by the 'Analytics and Machine Learning' toolkit. These changes are necessary to make the 'Riffle Data' button available in the main LabVIEW application, outside the subVI where it originally belonged. The updates are related to certain object-oriented programming concepts in LabVIEW explained in the below paragraphs.
The 'Analytics and Machine Learning. lvlib' should be accessed, which is the library of functions contained by the LabVIEW Toolkit. Then, the developer should open the following structure of folders: Classification/Data/2D array/Classes/AML 2D Array.lvclass, to find the 'AML 2D Array. ctl'. This element needs modification by adding a boolean control corresponding to the 'Riffle Data' button. This modification influences the 'aml_Read Data. vi' and 'aml_Write Data. vi' containing a typedef control called 'data.' The developer should add the 'data' typedef control to the 'Riffle Data' button. Further, the developer should open the following structure of folders ( Figure 25): Classification/Data/Common/subVIs, to find out the 'Load Training Data (2D array).vi'. A 'Bundle by Name' function is necessary for this virtual instrument to add the 'Riffle Data' Boolean control (button) as a new input element to the 'data' cluster. This button should be available in the main application, as shown below, outside of the subVI implementing its functionality.  'Riffle Data' is a wired input terminal to the connector pane of the previously mentioned virtual instruments. Accordingly, the developer can select the 'Riffle Data' button from the Front Panel of the LabVIEW application. If the button is enabled, the 'Random Number' function is deactivated so that the training data is not randomized. If the button is disabled, the 'Random Number' function is activated to randomized the training data.

The deployment/testing of the trained Neural Networks classification model
The LabVIEW programming sequence underlying this phase consists of specific virtual instruments presented in this section. First, 'aml_Read CSV File. vi' is used to open and read data and labels from the .csv file containing the testing EEG dataset. Secondly, the developer calls the 'aml_Read Model from JSON.vi' to open and read the trained Neural Networks classification model. Thirdly, 'Load the test data file (2D Arrays).vi' is necessary to load or extract the data and labels in a format appropriate for the deployment of the model. Fourthly, 'Deploy Feature Manipulation Model. vi' aims to preprocess the testing data by applying a trained feature manipulation model. Fifthly, 'Deploy Classification Model. vi' handles the classification of the testing dataset by applying the trained classification model and returning the predicted labels of input data. Sixthly, 'Evaluate Classification Model. vi' plays an essential role in assessing the classification model by comparing the predicted labels with initially set labels of the input data. Finally, it will result in evaluation metrics (accuracy, precision, recall, and F1 score) for the trained and tested neural networks model.

Results
The proposed research virtual instrument aims to acquire, process, and classify the EEG signals corresponding to neuronal patterns elicited by different cognitive tasks. The eye-blink is considered an artifact across the EEG signal, but it can also be considered a precise control signal in a brain-computer interface application. A simple spike pattern that increases and decreases the biopotential characterizes the voluntary eye-blink resulting from an ordinary effort. Therefore, if it does not require a higher amplitude or a strong effort, then the voluntary eye-blink is associated with a general pattern that could be easy to detect even by visual checking of the EEG signal.
Thus, the classification of multiple voluntary eye-blinks is a testing method of the working principle underlying the proposed BCI research related virtual instrument based on the processing of the EEG temporal sequences consisting of multiple mixtures between several EEG rhythms (raw, delta, theta, alpha, beta, gamma) in Time and Frequency Domains and certain statistical features (mean, median, RMS, standard deviation, mode, the sum of values, skewness, Kurtosis coefficient, maximum and range = maximum-minimum).
During the experiments conducted in the current research work, there resulted in 4000 temporal EEG sequences from a single subject (female, 29 years). The duration of each session of EEG data acquisition was 1 minute and 20 seconds. For example, during every period equivalent to 80 seconds, at each time interval of 2 seconds, the subject had to accomplish one of the following four tasks: avoid the voluntary eye-blinks, execute one voluntary eye-blink, perform two voluntary eye-blinks and achieve three voluntary eyeblinks.
The results of the current research paper consist of 25 sessions of EEG data acquisition, each of them including 40 EEG temporal sequences. A session of EEG data acquisition set to 80 seconds corresponds to recording a series of 40 EEG temporal sequences. Therefore, there resulted in 25 x 40 = 1000 EEG temporal sequences for each of the four classes: 0 -No Eye-Blink Detected; 1 -One Eye-Blink Detected; 2 -Two Eye-Blinks Detected and 3 -Three Eye-Blinks Detected.
In fact, for the training dataset generation, the subject has been involved in 4 x 25 sessions of EEG data acquisition, enabling the recording of the 4 x 25 x 40 = 4000 EEG temporal sequences corresponding to the previously mentioned four classes.
Otherwise, for the generation of the testing dataset, the subject has been involved in 4 x 5 sessions of EEG data acquisition, enabling the recording of the 4 x 5 x 40 = 800 EEG temporal sequences corresponding to the previously mentioned four classes. The duration of each session of EEG data acquisition was 80 seconds. Figure 27 shows the previously described general structure. Both training and testing datasets include a column that is assigned the labels. Therefore, by visually checking the graphical representation of each EEG temporal sequence, the corresponding label is assigned. Moreover, if the initial aim was to get 40 sequences associated with a specific class (for example, one eye-blink), it mistakenly resulted in only 35 correctly executed sequences. Other correctly five sequences acquired during another session kept as an alternative replaced the remained wrongly five sequences. Another original application achieved automatic replacement by implementing customized programming sequences in LabVIEW.
Firstly, each generated dataset allowed the initializing, configuring, and training of a specific machine learning (ML) based model to associate the labels with a series of features. Then, it should be able to classify a new input correctly.
Secondly, another generated dataset allowed the testing and validation of the previously obtained model deployed on testing data, including labels initially set. The evaluation of the model is related to the comparative analysis between the estimated labels (calculated by the model) and the initially set labels (included by the testing dataset). It will also result in the following evaluation metrics: accuracy, precision, recall, and F1 score.
The following paragraph clearly describes all the steps necessary to get the results corresponding to the achievements mentioned above. 1. Select Button that enables the EEG Data Acquisition in Automatic Mode. 2. Make the initial settings: Duration of Acquisition = 1 minute and 20 seconds; Time Interval = 2 seconds; Samples to Read = 512. Note: It will result in a .csv file representing the training dataset comprised of 40 temporal sequences, each of them containing 1024 samples. The feature extraction will be running on the 12 x 2D arrays (12 x 40 rows x 1024 columns).
Note. The output consists of 12 x 2D arrays → 6 x 2D arrays are related to EEG Signals (raw, delta, theta, alpha, beta, gamma) in Time Domain and 6 x 2D arrays are related to EEG Signals in Frequency Domain -FFT Peak. 3. Start the EEG Data Acquisition in Automatic Mode. 4. According to visual and auditory indicators, from 2 to 2 seconds, the user should execute one eye-blink. Note: Thus, at the end of the acquisition, 40 temporal sequences will be returned, each of them including the EEG signal pattern of an eye-blink. 5. Wait until Duration of Acquisition = 1 minute and 20 seconds, and the EEG Data Acquisition in Automatic Mode is over. 6. Select Config Button to return to the main window of the LabVIEW application, then select the Button that enables the extraction of features and the generation of the EEG dataset. 7. Select the Tab corresponding to the graphical displaying of each temporal sequence of the EEG Data acquired in the Automatic Mode. Visually analyze every one of the 40 EEG patterns and associate to it the appropriate Label -1 for Eye-Blink Detected. 8. Select the Tab corresponding to the configuration of multiple mixtures between selected signals and extracted features to generate the EEG Training Dataset and save it to a .csv file. 9. There will result in 50 multiple mixtures, and for every one of them, the EEG signals (Table 9) and the corresponding statistical features can be both manually or automatically selected. 10. Set 'First Index = 0' so that in the resulted .csv file, the rows can be counted starting from 0 (zero). 11. Deselect Label Button so that the first row from the resulted .csv file should contain the corresponding names or description of columns. 12. Set a correct path for saving the .csv file representing the Training Dataset.
Note  Only the six signals in the time domain All the ten statistical features 3 Only the six signals in the frequency domain All the ten statistical features 4 Raw All the ten statistical features 5 Delta All the ten statistical features 6 Theta All the ten statistical features 7 Alpha All the ten statistical features 8 Beta All the ten statistical features 9 Gamma All the ten statistical features 10 FFT Peak Raw All the ten statistical features 11 FFT Peak Delta All the ten statistical features 12 FFT Peak Theta All the ten statistical features 13 FFT Peak Alpha All the ten statistical features 14 FFT Peak Beta All the ten statistical features 15 FFT Peak Gamma All the ten statistical features 16 Raw, delta, theta All the ten statistical features In the end, it will result in 50 .json files.
Note. The path's name automatically incremented as follows: model_1; model_2; …… model_50. 23. Select the 'Classification' Button to initialize, configure and train every one of the 50 neural networks-based models obtained based on every one of the 50 training datasets. Note. As mentioned previously, it was selected the tab corresponding to run the Lab-VIEW based functions from 'Analytics and Machine Learning' toolkit that allow the searching of the optimal hyper-parameters (number of hidden neurons, hidden layer type, output layer type, cost function type) for every one of the 50 multiple mixtures. Table 10 consists of complete results regarding the generation of hyper-parameters and evaluation metrics for every 50 models based on neural networks. Therefore, the significance of the abbreviations corresponding to column headings is the following: Atraining dataset, B -number of hidden neurons, C -hidden layer type, D -output layer type, E -cost function, F -number of input neurons, G -average method, H -accuracy, I -precision, J -recall, K -F1 score, L -correctly detected sample and M -incorrectly detected samples.
The above-presented steps are necessary to generate 50 .csv files corresponding to 50 training sets or 50 multiple mixtures of selected EEG signals and extracted features to initialize, configure and train 50 models (saved as .json files) based on artificial neural networks techniques. There resulted in also 50 .csv files describing the content of the 50 training sets. Each training set is consisting of 4000 temporal sequences, based on the following assignments: 1000 sequences corresponding to Label -0 (No Eye-Blink Detected), 1000 sequences associated with Label -1 (One Eye-Blink Detected), 1000 sequences related to Label -2 (Two Eye-Blinks Detected) and 1000 sequences linking to Label 3 (Three Eye-Blinks Detected).
Further, it is necessary to deploy the previously obtained 50 neural networks models (.json files) on different 50 testing datasets saved as 50 .csv files. The structure of the 50 testing datasets is the same as the structure of the 50 training datasets.
In the end, as shown in Table 11, it results in the evaluation metrics (accuracy, precision, recall, F1 score) corresponding to the deployment of every one of the 50 neural networks-based models.

Discussion
The targets of analyzing the previously described results are the following: -To identify which of the available ten EEG rhythms are associated with getting NN models with the highest accuracy in the training or testing phases; -To identify which of the available ten statistical features are associated with getting NN models with the highest accuracy in the training or testing phases; -To identify which hyper-parameters are associated with getting NN models with the highest accuracy in the training or testing phases; -To identify how many correctly/incorrectly samples are detected by the NN models with the highest accuracy in the training or testing phases.
According to Table 10, the first highest accuracy of a neural networks-based model is 0.99 for uploading the 19 th training dataset. According to Table 9, this training dataset comprises the three EEG rhythms (raw, beta, and gamma) and all the ten available statistical features. The hyper-parameters characterizing the NN model with the first highest accuracy of 0.99 are the following: number of hidden neurons = 20; hidden layer type = Tanh; output layer type = Softmax; cost function = Cross-entropy; number of input neurons = 30; average method = Weighted. Additionally, from the Total = 4000 samples, 3942 samples were correctly detected, and 58 were incorrectly detected.
According to  According to Table 10, the third-highest accuracy of the neural networks-based models is 0.95 for uploading the three training datasets numbered as follows: the 3 rd , 47 th, and 50 th . According to Table 9, these training datasets are composed of the following groups of selected EEG rhythms: -3 rd and 47 th = only the six signals in the frequency domain; -50 th = Raw, Delta, Theta in the frequency domain.
According to According to Table 11, the first highest accuracy of a neural networks-based model is 0.97 for uploading the four testing datasets numbered as follows: the 1 st , 2 nd , 30 th, and 36 th . The groups of selected EEG rhythms and the extracted statistical features composing these testing datasets are described above to the 1 st , 2 nd , 30 th, and 36 th training datasets. The above paragraphs described the hyper-parameters characterizing the corresponding NN models.
In addition, regarding the NN models that reported a testing accuracy of 0.97, from a Total = 800 samples, the number of correctly/incorrectly detected samples is as follows for the below datasets: According to Table 11, it results that the second-highest accuracy of a neural networks-based model is 0.96 for uploading the five testing datasets numbered as follows: the 17 th , 19 th , 35 th , 37 th, and 45 th . The groups of selected EEG rhythms and the extracted statistical features composing these testing datasets are described above to the 17 th , 19 th , 35 th , 37 th, and 45 th training datasets. The above paragraphs described the hyper-parameters characterizing the corresponding NN models.
In addition, regarding the NN models that reported a testing accuracy of 0.96, from a Total = 800 samples, the number of correctly/incorrectly detected samples is as follows for the below datasets: According to Table 11, it results that the third-highest accuracy of a neural networksbased model is 0.95 for uploading the six testing datasets numbered as follows: the 16 th , 18 th , 24 th , 28 th , 44 th, and 46 th . The groups of selected EEG rhythms and the groups of extracted statistical features composing these testing datasets are described above to the 16 th , 18 th , 24 th , 28 th , 44 th, and 46 th training datasets. The above paragraphs described the hyperparameters characterizing the corresponding NN models.
In addition, regarding the NN models that reported a testing accuracy of 0.95, from a Total = 800 samples, the number of correctly/incorrectly detected samples is as follows for the below datasets: -16 th = 763 correctly detected samples and 37 incorrectly detected samples; Taking into account the previous analysis, the same 20 neural networks-based models reported almost similar highest accuracy values both in the training phase (0.99; 0.97; 0.95) by uploading datasets consisting of 4000 recordings each and in the testing phase (0.97; 0.96; 0.95) by uploading datasets consisting of 800 recordings each. Table 11 summarizes the above discussion about results consisting of complete information related to the top 20 neural networks-based models. Therefore, the significance of the abbreviations corresponding to column headings is the following: A -NN model, Bnumber of hidden neurons, C -hidden layer type, D -output layer type, E -cost function, F -number of input neurons, G -average method, H -training accuracy, I -testing accuracy, J -selected EEG signals, K -extracted statistical features. Further, to determine the first high-performance NN models from the top 20, the sum of the correctly detected samples obtained at the training phase and the correctly detected samples at the testing phase was calculated and displayed in Table 12. Then, taking into account that the maximum sum of correctly detected samples is 4800 (4000 samples for the training phase and 800 samples for the testing phase), it results in the overall accuracy of the top 20 NN models.
Thus, the NN model that reported the highest accuracy of 98.13% was trained and tested by uploading a dataset comprising all the possible mixtures between the raw, beta, and gamma EEG rhythms and all the ten statistical features. Accordingly, the maximum number of correctly detected samples was 4710 out of 4800.
The significance of the abbreviations corresponding to column headings from Table  12 is the following: A -NN model, B -selected EEG signals, C -extracted statistical features, D -correctly detected samples at training the NN model, E -correctly detected samples at testing the NN model, F -total number of correctly detected samples, G -accuracy. The results obtained by the current research confirm, bring complete information, reveal new insights, add improvements, and thoroughly explore the stages underlying the classification of voluntary eye-blinking also addressed in other scientific articles: [47], [48], and [50]. According to the paper [47], the extracted features were: maximum amplitude, minimum amplitude, and the Kurtosis coefficient. According to the paper [48], the extracted features were: Kurtosis coefficient, maximum amplitude, and minimum amplitude. According to the paper [50], the extracted features were: minimum value, maximum value, median, mode, and standard deviation.
The future versions of the presented LabVIEW-based virtual application for BCI research should also include additional features, such as average power spectral density, average spectral centroid, and average log energy entropy, addressed by [61]. These features were extracted from alpha and beta EEG rhythms, previously analyzed in time and frequency domains to classify three mental activities: quick math solving, do nothing (relax), and playing a game [61]. Moreover, an extensive comparative analysis could complete the current discussion about research regarding the values of statistical features and EEG rhythms associated with each of the four detected states: no eye-blink, one eye-blink, two eye-blink, and three eye-blink. Regarding the content of the 19th dataset, a comparison is possible between the values of Mean_Raw, Mean_Beta, and Mean_Gamma. A separate set of values is corresponding to each of the four previously described states. In the same way, there can be determined and compared the values of Median_Raw, Median_Beta, and Median Gamma and all the other statistical features corresponding to the four different states of voluntary eye-blink classification.
In contrast with the current research that analyzes various mixtures between the selected EEG signals and the extracted statistical features, as well as different architectures of NN models, the papers [47], [48], and [50] focuses on the experimentation of a single method of features extraction and a specific classification technique that is considered optimal.
The paper [47] proposes a binary classifier based on Probabilistic Neural Network (RBF = Radial Basis Function). The EEG signal was acquired at 480 Hz sampling frequency, filtered by applying Butterworth Band Pass, detrended, normalized, and segmented into windows with 480 samples each.
The paper [48] reports the neural networks with the highest performance: R=0.8499 for FFBP (Feed-forward backpropagation) and R=0.90856 for CFBF (Cascade-forward Backpropagation).
Regarding the paper [50], the authors designed an artificial multi-layer neural network with backpropagation, taking into account the following structure: input layer containing 48 neurons based on the extraction of 6 features, three hidden layers, and one output layer including only one neuron. The used activation function is the binary sigmoid.
Moreover, the current paper reported higher values for accuracy than those from the previous scientific articles [47], [48], and [50]. Nevertheless, due to the execution of experiments during pandemic restrictions, both training and testing datasets from this paper were obtained based on the raw EEG data acquisition from a single subject, which could be a limitation that can influence the overall results. Therefore, the plan is to implement and assess an updated version of the presented BCI research-based virtual instrument by involving several healthy or disabled subjects of different categories, including age, profession, psychological traits, and intellectual background.
Otherwise, the current paper's advantage is the convenience of using the most affordable portable EEG headset with only one embedded biosensor for quick set-up and efficient neuronal biopotentials monitoring. The other scientific articles [47], [48] and [50] present experimental activities that involved the following EEG expensive devices: a wireless biomedical monitor, called BioRadio with four channels [47]; RMS EEG 32 Super System with two Ag-AgCl electrodes [48] and OpenBCI Cython with eight channels [50].
Nevertheless, the future version of the presented virtual instrument related to BCI research should be updated to handle more EEG channels to classify complex mental activities efficiently. Moreover, the aim is to use, as much as possible, the most inexpensive portable EEG headsets, for example, Muse and Emotiv Insight, to ensure the simple-touse working principle and availability for the researchers with minimal experience related to the Brain-Computer Interface field. Although using a commercial portable headset seems to be the most straightforward solution there is still necessary to implement a customized communication protocol enabling the EEG data acquisition in a user-friendly software environment, such as LabVIEW.
Overall, the proposed solution aims for BCI research in the beginning stage by proving a standalone, simple to use virtual instrument with a user-friendly graphical user interface accomplishing all the necessary fundamental functions: EEG data acquisition, processing, features extraction, and classification.

Conclusion
This paper proposed a BCI research-related LabVIEW virtual instrument to acquire, process, and classify the EEG signal detected by the embedded sensor of NeuroSky Mindwave Mobile headset, second edition. The artificial neural network-based techniques facilitated the classification process by using the versatile functions included by the 'Analytics and Machine Learning' toolkit. Its functionality was customized to remove the randomization of EEG data.
The new approach described in this paper is consisting of original programming sequences implemented in LabVIEW. The LabVIEW application aims to recognize EEG signal patterns corresponding to different cognitive tasks efficiently. This paper presented the classification of multiple voluntary eye-blinks.
The application developed in the current research is consisting of different states. The first one allows the manual and automatic acquisition mode. The second one enables the processing of the EEG raw signal. The third one is related to preparing the 50 EEG training datasets with 4000 recordings each and 50 EEG testing datasets with 800 recordings each based on the generation of 50 multiple mixtures. Thus, there result in 50 multiple selections between ten EEG rhythms and ten statistical features. The selected EEG rhythms include time-domain: raw, delta, theta, alpha, beta, gamma, and frequency domain -Fast Fourier Transform with Peak parameter applied on the same signals. The extracted statistical features are the following: mean, median, route mean square, standard deviation, Kurtosis Coefficient, mode, summation, skewness, maximum, and range = maximumminimum.
The use of the LabVIEW application developed in the presented work resulted in automatically identifying the most relevant multiple mixtures. Further, the training EEG datasets facilitated the initialization, configuration, and obtaining the 50 artificial neural networks (ANN) based classification models. After that, the trained ANN models are deployed on the testing EEG datasets to result in evaluation metrics, such as accuracy and precision. The final phase is a comparative assessment to determine the highest values of accuracy reported by the training of the top 20 ANN models (0.99; 0.97; 0.95) and the testing of the same 20 ANN models (0.07; 0.96; 0.95). Accordingly, it analyzed the corresponding mixtures between the selected EEG rhythms and the extracted statistical features underlying the datasets used for training and testing the 20 ANN models. Also, the hyperparameters were listed to generate the top 20 ANN models reporting the highest accuracy. Determining the maximum sum of the correctly detected samples in the training and testing phases resulted in the high-performance ANN model with an accuracy equal to 98.13% that can correctly recognize 4710 out of 4800 samples.
Future research directions are related to further improvements regarding the Lab-VIEW-based system's assessment by enabling different EEG signal patterns classification. Furthermore, the intention is to add more types of signals and more significant features. Likewise, other versatile applications of Brain-Computer Interface will surely need more flexibility achieved by the execution of training processes based on Supported Vector Machines or Logistic Regression models. Therefore, a future BCI-related research project should also consider the 'Analytics and Machine Learning' LabVIEW toolkit, including these two methods.