## 7 Deploying EEG within IoT 5G Environment
### EEG Sensing Network  
The primary objective of the sensing network is to gather data and extract pertinent features. In the example illustrated in Figure 8, a headset is employed for capturing raw EEG data. The data are then processed to extract features from various dimensions, including time, frequency, and electrode location, to discern the emotional state of the subject. Feature extraction can be conducted either at the sensing node or on the IoT edge processor. Once the raw EEG signal data are successfully transmitted through the medium, they are forwarded to the IoT cloud. Generally, the EEG sensing network involves steps such as EEG signal acquisition, pre-processing, and feature extraction [70]. This process includes selecting an appropriate EEG sensor, determining the optimal sensor placement, establishing the data sampling rate, and signal quantization. The collected EEG signals are preprocessed to eliminate artifacts and normalized using baseline data. Signal processing techniques like principal component analysis (PCA) and wavelet transforms are then applied to extract features from the EEG signals [114].  
Following the transmission of EEG data to the cloud, the next steps typically involve data storage and analysis, integral to delivering a personalized EEG monitoring service. Utilizing Bluetooth technology, the sensor data can be linked to various devices such as mobile phones, laptops, or computers. Subsequently, a secure data packet is created, facilitating the transfer of data to a cloud-based platform backed by a high-performance computing center. Within the IoT cloud, the signals undergo analysis, and the derived real-time information is relayed back to the initial device or directed to the owner's mobile phone, wearable device, or laptop, based on the user's preferred device selection [24; 44].  
Figure 8: An example of an IoT-based EEG monitoring system.  
To enhance the classification accuracy of the signal and the individual's physical state, advanced EEG signal processing algorithms are employed. Moreover, the analyzed EEG data can be archived or utilized for further processing in applications like detecting sleep state disorders, emotion recognition, and various other aspects pertinent to optimizing human well-being. Beyond analysis, the cloud can also offer additional services, including user behavior monitoring and general health and lifestyle management [115].  
Various wireless networking options are available for transmitting raw EEG signal data from devices to the cloud for processing and analysis. As detailed in Table 4, Wi-Fi employs radio waves to connect devices over short to medium distances, ensuring high data transfer rates without data loss. Bluetooth, utilizing low-energy radio frequency, facilitates connections over short distances of up to 30 feet but typically has lower data transfer rates compared to Wi-Fi. Zigbee technology, also using low-energy radio frequency, connects devices over distances up to 230 feet. It is often chosen for applications needing lower data transfer rates, and its minimal power requirements make it suitable for battery-operated devices.