# ML-Based Maintenance and Control Process Analysis, Simulation, and Automation--A Review
## 2 Materials and Methods
### EEG Database  
EEG databases store brainwave data from users interacting with their systems and can be integrated with BCIs for predictive maintenance applications. In practice, operators can use BCI systems to monitor machines while their brain signals are stored in an EEG database and analysed for real-time decision-making. For example, an operator using a BCI system can detect subtle signs of problems with a machine, and their EEG signals provide early warnings of system anomalies. These brainwave patterns are compared with pre-existing data in the EEG database to identify similar patterns associated with potential equipment failures. Through continuously analysing these signals, the BCI system can trigger preventive maintenance alerts before a failure occurs. Machine learning models can also be trained using the EEG database to improve predictive algorithms, increasing the accuracy of maintenance predictions. This application improves operational efficiency by reducing human error and providing intuitive hands-free control in complex maintenance environments. We used an off-the-shelf database made available in the EDF file format (the European data format) [[[https://www.physionet.org/content/eegmmidb/1.0.0/#files-panel](https://www.physionet.org/content/eegmmidb/1.0.0/#files-panel)]([https://www.physionet.org/content/eegmmidb/1.0.0/#files-panel](https://www.physionet.org/content/eegmmidb/1.0.0/#files-panel)), accessed on 24 July 2024]. Figure 7: Applied bibliometric analysis procedure. We tried to find as recent studies as possible, but their dates of creation did not vary much. Often, they reported the results of signal analysis from patients with Alzheimer's disease and similar neurodegenerative conditions. The data are presented in groups, so-called events--a window of 231 samples--for all 64 channels, with 32 blocks for left-hand movement, 32 for right-hand movement, and 52 for the resting state between these movements. The signal sampling rate was 160 Hz for 64 channels. The data included 109 test cases, where individual actions were performed, such as opening and closing the eyes, clasping the hands or feet, and imagining these movements. Each signal intake lasted 120 s and was repeated 3 times. Data were captured by an EEG cap with 64 channels (Figure 8) at a frequency of 160 Hz in a 10-10 system (excluding electrodes Hz, F9, F10, FT9, FT10, A1, A2, TP9, TP10, P9, and P10). Given the large number of time samples for data nos. 88, 92, and 100, these were discarded. The number of samples shown differs from the others (i.e., from 321). The data were filtered and normalised to better fit model learning. Artefacts were already filtered out of the data used in this study and, thus, the signal was clean. After normalisation, the differences in the range of motion-related and static signal values were very large. The signal was cut into fragments, and depending on the signal under study, there were different motion-signal-group-to-noise ratios. Given the characteristics of the data, standard normalisation was used. The data were prepared using the MNE library in Python. Each signal record had sectors where the action of clenching and opening the right or left hand occurred and the time of inactivity was marked. Each signal was placed in a data group related to rest; left-hand clenching and opening; and right-hand clenching and opening. The division of the signal varied; for example, in the first set, there was a ratio of 52 parts for the inactivity signal, 32 for the left-hand signal, and 32 for the right-hand signal. The array appeared in a three-dimensional format with the following dimensions: the number of data, the number of channels, and the number of samples, i.e., 52, 64, and 321, respectively. Figure 8: Headset electrode distribution. Based on the ratio of the resting signal to the signal resulting from activity, the left and right hands were combined and labelled with the same value.