Determination of Ocular Artifacts in the Clinical EEG Software by a Peripheral Device

: The occurrence of physiological artifacts generated by eye movements in electrical brain activity (electroencephalography, EEG) is a well-known problem in clinical practice. In order to increase the accuracy of the detection of eye movements during EEG examination, additional elec-trooculogram channels (electrooculography, EOG) with a standard PC keyboard are used. The EOG technique is not always comfortable for patients. Another issue is that the use of EOG channels in the EEG examination leads to the prolongation of time required for patient preparation. To solve these problems, we developed a new peripheral device suitable for the indication of common ocular artifacts in EEG. The obtained differences between the recommended methods (i.e., EOG, PC keyboard) and our new device have been presented using RMSE (root mean square error). The presented equipment can be used either during EEG examination or after registration of EEG signals in order to indicate the ocular artifacts. Furthermore, this device is compatible with the EEG software used in clinical practice.


Introduction
In spontaneous electroencephalogram signals (EEG data) of healthy adults, eye movements (i.e., eyes open and closed, look up and down, look right and left) or blinking are the most common source of physiological artifacts. For that reason, in clinical practice, the use of the electrooculography (EOG) technique during EEG examination is recommended [1,2]. The amplitude of the ocular artifacts is much higher than the amplitude of EEG signals and depends on the type of eye movements and the patient health status. In the case of healthy subjects between the ages of 20 and 60 years, it usually does not exceed 300 mV, with the maximum at the pre-frontal region of the head, and decreases with the distance from the EOG channels [3] (pp. 71-115). Furthermore, the degree of ocular potential propagation across the scalp is dependent on the properties of the subject's skull, scalp, and neural tissue. The voltage at a scalp site tends to be inversely related to the square of the distance from the eyes, with the effect of the ocular artifact decreasing rapidly towards posterior locations [4]. Hence, the ocular artifacts are also visible in the occipital region. The main problem with the analysis of EEG data is a proper detection of the EOG artifacts in EEGs, because some of them are very similar to the brain signals [3] (pp.   [5] (pp. 107-117).
Over the past few years, many methods have been developed for the detection and removal of the ocular artifact from EEG data. The most popular methods are based on regression, filtering, wavelet transform, blind source separation techniques, or use of the eye-tracker-based correction method [4,[6][7][8][9][10][11][12][13]. To increase the detection of artifacts, the mentioned methods can be combined [14][15][16]. In the presented methods, the elimination of potentials considered as physiological artifacts takes place by applying a criterion formulated on the basis of the properties of EEG signals in the time or frequency domain. On the basis of the adopted threshold value of amplitude, duration, or frequency range of the selected signal, automatic detection, classification, and elimination of selected potentials are carried out. The work of [17] presents a method of removing eye artifacts using factor analysis. Correlation analysis of EEG fragments and additionally recorded EOG signals were proposed for the detection of artifacts. Potentials with the maximum value of the correlation coefficient are removed. In the work of [18], the amplitude criterion was used to detect eye artifacts and artifacts resulting from head movements. The detection of eye artifacts is possible thanks to the comparison of the EEG recorded through 19 channels with the EOG channels. Based on the established amplitude threshold, artifact detection is performed. Another paper [19] proposed a system of detection and elimination of eye and muscle artifacts from EEG signals as well as those resulting from patients' movements using the adaptive filtration method. In this solution, the recording of extracerebral potentials is carried out by means of sensors located in the places where these artifacts are generated. The recorded physiological artifacts and EEG signals are fed to the adaptive filter input, where the process of elimination of selected extracerebral potentials takes place.
Unfortunately, most of them still require the use of additional EOG channels. It is worth noting that the use of EOG channels leads to the prolongation of the time required for patient preparation, which may be undesirable especially in the case of children and patients with some disorders (e.g., Alzheimer's disease, schizophrenia, Parkinson's disease). There are also solutions where there is no need for additional EOG channels. In the presented works, only selected eye artifacts are eliminated-in particular, blink artifact. In a further paper [20], the proposed solution can remove blink and muscular artifacts in real time without the need for any extra electrode. The FPGA implementation based on the Haar function is presented. The next proposition is a method for the removal of all movement artifacts (e.g., physiogical and technical) from the EEG signals in the context of sports health using smart wearable Internet of Things technology [21]. The movement artifacts are removed using an ECG as a reference signal and the BEADS baseline filtering algorithm for trend removal. In the presented solution, all extracerebral signals, regardless of origin (i.e., technical, physiological), are removed. The next proposition is an automated system for real-time EEG processing comprising the low complexity 4D CORDIC and the FastICA algorithm used as a blink and muscle artifact removal technique [22]. The hardware architecture of the presented system was designed and tested on Spartan-6 and Virtex-7 FPGA. In [23], a method based on discrete wavelet transform and the FastICA algorithm is shown. In this case, the automatic process of eliminating the eye blink artifact uses the fact that it is generated in the theta, i.e., 4-7 Hz and mu, i.e., [8][9][10][11][12] Hz wave bands.
In clinical practice, the distinction between the ocular artifacts and brain signal should be conducted by the visual analysis of the raw EEG data in the time domain [1]. It is commonly known that visual analysis is the most reliable method of clinical EEG interpretation. For the correct interpretation of EEGs, the EOG channels are still used, where one pair of electrodes should record horizontal eye movements (HEOG) and a second pair of electrodes should record vertical eye movements (VEOG). Generally, the measurement of eye movement activity requires at least two electrodes placed above and on the left or right side of the chosen eye [2]. In some cases, as many as six electrodes placed around the eyes are used. During the EEG examination, an EEG technician uses a standard computer keyboard to indicate all artifacts, where the chosen keyboard shortcut typically corresponds to a single EOG artifact [24,25]. Usually, for indication of all noncerebral components in EEG software by a computer keyboard, the keys associated with letters, numbers, or function keys are used [24,25]. In the case of the TWin 4.3 software [24], the blink artifact is not defined. For that software, the list of keyboard shortcuts consists of the following ocular artifacts: eyes open (F4), eyes closed (F5), look up (F6), look down (Shift+F6), look left (Shift+F10), look right (Shift+F8), and blinking defined only as five eye movements (F7). The same situation applies to NeuroSoft software [25]. However, the observation of the patient behavior (e.g., blinking) and simultaneously finding a proper keyboard shortcut on the computer keyboard may lead to incorrect denoting of the ocular artifacts. It is worth noting that, in [24], some of the keyboard shortcuts require pressing and Electronics 2021, 10, 108 3 of 12 holding two keys simultaneously (e.g., Shift+F6-look down, Shift+F8-look right). Hence, in order to increase the accuracy of recognition of the typical artifacts generated by eye movements during the EEG examination, a new peripheral device was developed [26][27][28].

The New Device
The proposed equipment is an external peripheral device designed for clinical and research use. This device can operate either in real time during the registration of electroencephalograms or during post-processing data analysis. The presented device allows for the indication of eight common ocular artifacts in EEG data by the use of assigned keys, which are appropriately arranged on the front panel. The front panel of this keyboard is presented in Figure 1. shortcut on the computer keyboard may lead to incorrect denoting of the ocular artifacts. It is worth noting that, in [24], some of the keyboard shortcuts require pressing and holding two keys simultaneously (e.g., Shift+F6-look down, Shift+F8-look right). Hence, in order to increase the accuracy of recognition of the typical artifacts generated by eye movements during the EEG examination, a new peripheral device was developed [26][27][28].

The New Device
The proposed equipment is an external peripheral device designed for clinical and research use. This device can operate either in real time during the registration of electroencephalograms or during post-processing data analysis. The presented device allows for the indication of eight common ocular artifacts in EEG data by the use of assigned keys, which are appropriately arranged on the front panel. The front panel of this keyboard is presented in Figure 1. Based on observation of the patient behavior during EEG recording, the following ocular artifacts can be chosen by pressing a proper key on the new keyboard: eyes open or closed (OPEN and CLOSED keys); vertical eye movements, i.e., look up or down (UP and DOWN keys); and horizontal eye movements, i.e., look right or left (R and L keys). Moreover, for eye blinks defined as a rapid closing and opening of the eyelid, two keys are available: BLINK associated with the one movement and BLINKING.
The presented device consists of an operator panel connected to a microcontroller. In addition, a mode selector switch is attached to the microcontroller input, through which a set of output signal codes appropriate for the cooperating software used in a given EEG laboratory is selected. Figure 2 shows a block diagram and the structure of the proposed device. It is worth adding that the computers used to perform the EEG test, depending on the software installed, may have three modes of operation, i.e., three types of codes for peripheral device keys: letter, number, or function keys. The selection of the operating Based on observation of the patient behavior during EEG recording, the following ocular artifacts can be chosen by pressing a proper key on the new keyboard: eyes open or closed (OPEN and CLOSED keys); vertical eye movements, i.e., look up or down (UP and DOWN keys); and horizontal eye movements, i.e., look right or left (R and L keys). Moreover, for eye blinks defined as a rapid closing and opening of the eyelid, two keys are available: BLINK associated with the one movement and BLINKING.
The presented device consists of an operator panel connected to a microcontroller. In addition, a mode selector switch is attached to the microcontroller input, through which a set of output signal codes appropriate for the cooperating software used in a given EEG laboratory is selected. Figure 2 shows a block diagram and the structure of the proposed device. shortcut on the computer keyboard may lead to incorrect denoting of the ocular artifacts. It is worth noting that, in [24], some of the keyboard shortcuts require pressing and holding two keys simultaneously (e.g., Shift+F6-look down, Shift+F8-look right). Hence, in order to increase the accuracy of recognition of the typical artifacts generated by eye movements during the EEG examination, a new peripheral device was developed [26][27][28].

The New Device
The proposed equipment is an external peripheral device designed for clinical and research use. This device can operate either in real time during the registration of electroencephalograms or during post-processing data analysis. The presented device allows for the indication of eight common ocular artifacts in EEG data by the use of assigned keys, which are appropriately arranged on the front panel. The front panel of this keyboard is presented in Figure 1. Based on observation of the patient behavior during EEG recording, the following ocular artifacts can be chosen by pressing a proper key on the new keyboard: eyes open or closed (OPEN and CLOSED keys); vertical eye movements, i.e., look up or down (UP and DOWN keys); and horizontal eye movements, i.e., look right or left (R and L keys). Moreover, for eye blinks defined as a rapid closing and opening of the eyelid, two keys are available: BLINK associated with the one movement and BLINKING.
The presented device consists of an operator panel connected to a microcontroller. In addition, a mode selector switch is attached to the microcontroller input, through which a set of output signal codes appropriate for the cooperating software used in a given EEG laboratory is selected. Figure 2 shows a block diagram and the structure of the proposed device. It is worth adding that the computers used to perform the EEG test, depending on the software installed, may have three modes of operation, i.e., three types of codes for peripheral device keys: letter, number, or function keys. The selection of the operating It is worth adding that the computers used to perform the EEG test, depending on the software installed, may have three modes of operation, i.e., three types of codes for peripheral device keys: letter, number, or function keys. The selection of the operating mode is done manually by the user. The state of the three-position operating mode switch is read by the microcontroller, so the microcontroller software determines from which Electronics 2021, 10, 108 4 of 12 group of codes to select and send information to the computer. The device operates by reading the status of the buttons located on the front panel. After taking into account the status of the operating mode selection switch, the information is transmitted through the microcontroller to the system that adjusts the microcontroller output signal to the PC keyboard signal standards. Then, the information is sent to the PC about the button press in accordance with the PC input standard. The microcontroller's program reads the status of the buttons periodically. If a button press corresponding to an observed physiological artifact of ocular origin is detected, the program determines, according to the position of the mode selector switch, the appropriate button code for this artifact, and the resulting electrical waveforms are taken by the PC as information about the button pressed. After pressing the selected button located on the front panel of the presented device, the display of the cooperating PC will show information about the type of the selected ocular physiological artifact. Thus, after pressing the button marked with, e.g., R symbol, the EEG record displayed on the monitor screen will present the marked eye artifact responsible for horizontal right movement, and after pressing the button marked with, e.g., UP symbol, the EEG record will present the marked eye artifact responsible for vertical upward movement. Table 1 presents a list of the keyboard shortcuts used in the proposed device for NeuroSoft and TWin software. The proposed device cooperates with all clinical EEG systems, because of using the three-position selector switch for selecting the proper code values used in standard keyboard codes (i.e., function keys, letters, numbers). The choice of the switch position depends on the type of EEG software available in a hospital. The presented equipment can be connected with a computer by two types of connectors, PS/2 or USB, and is visible to common operating systems as an additional keyboard.

Materials and Methods
The applicability of this new device was tested using the Neuron-Spectrum-5 EEG system and Grass Technologies system. In order to confirm the effectiveness of the proposed device, 20 registrations of EEG records for each EEG system were made. In both cases, the EOG channels were used. All EEG examinations were carried out on one of the authors of this paper according to the recommendations presented in [1,5] (pp. [19][20][21][22][23][24][25][26][27]. The duration of each examination in accordance with the applicable standards was 30 min [1]. The EEG data were collected at a 200 Hz sampling rate from 21 electrodes positioned according to the international 10-20 system with the unipolar montage in bandwidth (0.5-35) Hz with the EOG channels (X1-X6) and a reference electrode placed at the right earlobe (A2). For registration of EEG data and EOG signals, sintered bridge electrodes with gold pin (SBELEK7-GVB) and silver/silver chloride cup electrodes (SC22-626-GVB), respectively, were used. Moreover, a disposable silver/silver chloride electrode with a snap button (CDES003545-GVB) attached to the forehead was used as a ground. For the indication of all ocular artifacts by new device in EEG software (i.e., TWin, NeuroSoft), the following keys associated with numbers (i.e., position 3 of the selector switch) were used: eyes open (1), eyes closed (2), look up (3), look down (4), look left (5), look right (6), blink (7), and blinking (8).
Registration of EEG records took place with closed and open eyes. During EEG examination, the following commands were given: eyes open and closed. The rest of the ocular artifacts were spontaneous (i.e., horizontal and vertical eye movements, blink, blinking). No activation methods (i.e., photostimulation, hyperventilation) were used during the examinations. In the next step, by pressing a proper key on the new device or PC keyboard, an artifact was marked by the one vertical line.
Differences between artifacts marked by our device, a standard PC keyboard, and signals registered by EOG channels were measured by the root mean square error (RMSE). Determination of the RMSE values required the second pressing of the chosen PC keyboard key and an appropriate key from the new device at the end of each artifact. One ocular artifact of each type was randomly selected from each EEG examination.

Results
Examples of using our new device are shown below. Figure 3 presents a set of normal EEG data affected by the ocular artifacts with indications of these noncerebral waves, where X1-X6 are EOG electrodes (i.e., X1/X2-up left eye/right eye, X3/X4-down left eye/right eye, X5/X6-corner left eye/right eye). Figure 4 shows the lengths of the 20 randomly selected ocular artifacts of each type (i.e., eyes open, eyes closed, horizontal and vertical eyes movements, blink) determined using EOG channels, PC keyboard, and the new device. All blinking artifacts were omitted from the analyses because of their different lengths, i.e., some of the blinking artifacts consist of three, four, or even six movements of the eyelids. Usually, the duration of blinking artifact is changing during the EEG examination even for one subject. However, in the TWin software, a blinking artifact only with a precisely defined length (i.e., eye blink 5 times) has been assigned to the function key-F7 [24]. Furthermore, a blink artifact is also not defined in TWin software; therefore, the analysis was performed only in NeuroSoft software. All results are presented below.
In Figure 4, the occurrence of the variability of artifact length is presented. The obtained results confirm the significant differences between the lengths of artifacts marked using our device and the standard PC keyboard. Moreover, it was observed that, in the case of spontaneously generated artifacts (i.e., horizontal and vertical movements or blink), these differences are much greater than for eyes open and closed.
The occurrence of differences between the artifacts' length registered in EOG channels and marked using the new device was verified by the analysis of the root mean square error values. For PC keyboard, the analyses were also prepared. The results are presented in Figure 5.
The presented analysis shows that the RMSE values in the case of using the new device oscillated between 0.02% and 18%, whereas for the PC keyboard, the RMSE varied in the range of 14% to 57%. In both cases, the RMSE values depend on the type of artifacts. The degree of similarity is lowest for spontaneously generated artifacts. In addition, the choice of EEG clinical software was also important. In TWin software, pressing a combination of 2-3 PC keyboard keys simultaneously is required, thus the RMSE has greater value. The Table 2 summarizes the mean values of the RMSE.   Figure 4 shows the lengths of the 20 randomly selected ocular artifacts of each type (i.e., eyes open, eyes closed, horizontal and vertical eyes movements, blink) determined using EOG channels, PC keyboard, and the new device. All blinking artifacts were omitted from the analyses because of their different lengths, i.e., some of the blinking artifacts not defined in TWin software; therefore, the analysis was performed only in NeuroSoft software. All results are presented below.
In Figure 4, the occurrence of the variability of artifact length is presented. The obtained results confirm the significant differences between the lengths of artifacts marked using our device and the standard PC keyboard. Moreover, it was observed that, in the case of spontaneously generated artifacts (i.e., horizontal and vertical movements or blink), these differences are much greater than for eyes open and closed.
The occurrence of differences between the artifacts' length registered in EOG channels and marked using the new device was verified by the analysis of the root mean square error values. For PC keyboard, the analyses were also prepared. The results are presented in Figure 5.  The presented analysis shows that the RMSE values in the case of using the new device oscillated between 0.02% and 18%, whereas for the PC keyboard, the RMSE varied in the range of 14% to 57%. In both cases, the RMSE values depend on the type of artifacts. The degree of similarity is lowest for spontaneously generated artifacts. In addition, the choice of EEG clinical software was also important. In TWin software, pressing a combination of 2-3 PC keyboard keys simultaneously is required, thus the RMSE has greater value. The Table 2     The presented results confirm that the proposed new device may substitute the EOG channels. However, differences between artifacts marked by our device and signals registered by EOG channels were observed, i.e., the mean values of RMSE lie between 0.004 and 0.126.

Discussion
In clinical practice, the use of EOG electrodes during EEG registration is recommended for better identification of noncerebral components. However, the identification of ocular artifacts based only on EOG channels in the case of abnormal low-voltage EEG data might be impossible [3] (pp. 297-306). It should be mentioned that the ocular artifacts such as eye movement or blinks artifacts occur in the delta range 0-4 Hz [3] (pp. 169-195) [5] (pp. 107-117). Moreover, frontal intermittent rhythmic delta activity or isolated monomorphic frontal slow waves have the same wave duration, like eye flutter, opening, or closure [5] (pp. 107-117). On the other hand, blinks are more similar to isolated slow waves. It is commonly known that the occurrence of delta activity in EEG data may provide clinically useful information about brain damage, some pathological conditions (e.g., brain tumor, Alzheimer's disease), or psychiatric diseases (e.g., schizophrenia, depression) [3,5]. For these reasons, proper detection of ocular artifacts during EEG examination is very important. However, preparing EEG examination with EOG channels, especially for patients with some mental disorders or children, may be difficult. The use of additional EOG channels may be not comfortable for the epileptic patient, especially during the activation procedures (i.e., hyperventilation, photic stimulation). Taking all these problems into consideration, we developed a new peripheral device. The common ocular artifacts can be indicated during EEG examination correctly based only on observation of the patient behavior. Hence, the problem with searching the proper key associated with ocular artifact on the standard keyboard was solved. Moreover, using our device instead of the EOG shortens the time of patient preparation for the examination.
The prepared analysis shows that the use of our device during routine EEG examinations does not require additional EOG channels. Moreover, using our device in the case of a lack of EOG channels gives the possibility to mark artifacts more precisely than using standard PC keyboard keys. The obtained significant differences result (i.e., the RMSE for the new device and PC keyboard) from the need to search for and then press a combination of two to three PC keyboard keys simultaneously.
Moreover, the effectiveness of the presented solutions is usually confirmed either in the case of analyses of only EEG data recorded in a selected small control group, e.g., [21], or in a group of patients representing a specific disease entity, e.g., autism spectrum disorder [23]. The main reason these methods should not be used is the need to test the alpha and beta hold responses in the EEG recording after eye opening and closing. In addition, when analyzing EEG recordings, it is worth checking the degree of symmetry of the artifacts in both hemispheres of the brain and their synchronism. Differences in the amplitudes of individual artifacts indicate visual impairment, which, in the case of EEG tests, is additional, but not essential diagnostic information. In turn, the occurrence of a unilateral artifact delay in a given hemisphere of the brain means problems with the conduction of the visual pathway resulting from the existence of, e.g., a brain aneurysm or other lesions. Such information is the reason for further diagnosis of the patient. Hence, eye type artifacts should not be removed from the EEG, but only marked.
Additionally, it should be noted that clinical practice includes methods of eliminating eye artifacts. Generally, a routine EEG examination lasts about 30 min and consists of a resting and activation test. For the first 20 min, the resting examination is recorded with the eyes closed, which is a way to eliminate blinking or horizontal and vertical movements. However, eye movements may occur, which are visible in the EOG records. If eye artifacts are still being recorded with eyes closed, the patient gets their eyes covered with plaster or a temporary pressure on the eyeballs using thumbs is applied. In the activation test, during which a patient with open eyes is subjected to hyperventilation and photostimulation, it is not possible to eliminate the artifacts. For this reason, it is recommended to use the additional EOG channels, which may be replaced by our device.