EEG Signal Processing for Emotion Recognition and Biomarker Extraction

Overview
This project was developed as part of my undergraduate studies in Electrical Engineering at the Universidad Tecnológica de Pereira, Colombia with the research group: "GRUPO DE INVESTIGACIÓN EN ANÁLISIS DE DATOS Y SOCIOLOGÍA COMPUTACIONAL (GIADSc)" under the project: "Caracterización de biomarcadores en registros EEG durante la ejecución de tareas de reconocimiento emocional para la búsqueda de alteraciones en procesos de cognición social relacionadas con patologías neurodegenerativas y neuropsiquiátricas" which focuses on the preprocessing and analysis of electroencephalography (EEG) signals collected during emotional recognition tasks. The primary goal was to identify biomarkers associated with alterations in social cognition, which may be linked to neurodegenerative and neuropsychiatric disorders.
Electroencephalography (EEG) measures electrical brain activity using electrodes placed on the scalp. These signals are high-dimensional, noisy, and complex, requiring advanced preprocessing techniques before meaningful analysis can be performed.In this project, I designed and implemented a complete EEG preprocessing pipeline using the EEGLAB toolbox (MATLAB), incorporating filtering, artifact removal, and Independent Component Analysis (ICA). This work represents a strong foundation in signal processing and data analysis, which I later build upon in my graduate studies in Human Language Technology.Project Goals
The main objectives of this project were:
- Preprocess raw EEG signals collected during emotional recognition experiments.
- Identify and remove physiological and technical artifacts.
- Improve signal quality and reliability.
- Prepare EEG data for feature extraction and classification tasks.
Dataset and Experimental Context

Figure 1. Electrodes/channels recorded in the EEG signals.
The dataset consists of EEG recordings from 70+ participants exposed to emotional stimuli, particularly facial expressions representing emotions such as happiness, sadness, fear, anger, and disgust.
Each recording contains multi-channel time-series data, capturing brain activity across different scalp regions.The analysis focused on comparing three stages:
- Raw EEG signals.
- Filtered EEG signals.
- Fully preprocessed EEG signals.
This comparison enabled both qualitative (visual) and quantitative validation of the preprocessing pipeline.
Technical Challenges
A central challenge in EEG analysis is the presence of artifacts (noise not generated by brain activity).
Physiological Artifacts
- Eye blinks (EOG).
- Muscle activity (EMG).
- Heart signals.
- Body movement.
Technical Artifacts
- Electrical interference (60 Hz noise).
- Equipment-related noise.
- Poor electrode connections.
These artifacts can distort neural signals and must be removed carefully without eliminating relevant information.
Technologies and Tools
The pipeline is implemented in MATLAB and EEGLAB for further use in classifiers in Python
- Signal processing techniques:
- Filtering.
- ICA.
- Blind Source Separation (BSS).
- Wavelet Transformation.
Project Breakdowmn
1. EEG Preprocessing Pipeline (EEGLAB)
I implemented a structured, end-to-end preprocessing pipeline using EEGLAB, consisting of:
- Importing EEG data.
- Assigning channel locations and references.
- Applying signal filtering.
- Detecting and interpolating bad channels.
- Removing large artifacts.
- Performing Independent Component Analysis (ICA).
- Rejecting noisy components.
This pipeline reflects standard practices in EEG research and ensures high-quality signal preparation.

2. Signal Filtering
Filtering was applied to remove:
- Baseline drift.
- Power line noise (60 Hz).
- High-frequency interference.
Techniques used:
- FIR filters.
- Spectral filtering.
- Wavelet-based approaches.
The goal was to preserve meaningful neural activity while eliminating irrelevant noise.
3. Independent Component Analysis (ICA)
Independent Component Analysis (ICA) was used to decompose EEG signals into independent sources, enabling:
- Separation of neural signals vs noise.
- Identification of artifact-related components.
Two approaches were explored:
- RUNICA.
- SOBI (Second-Order Blind Identification).
The SOBI algorithm was really effective for capturing temporally correlated artifacts.

Figure 3. Component activation.
4. Two-Stage Artifact Removal Strategy
The preprocessing approach was divided into two stages:
Stage 1: Physiological Artifact Removal
- Filtering and channel correction.
- No ICA applied.
- Visual validation of signal improvement.
Before:

Figure 4. EEG without physiological artifact removal.
After:

Figure 5. EEG with physiological artifact removal.
Stage 2: Technical Artifact Removal (ICA-based)
- Blind Source Separation (BSS)
- Removal of:
- Eye-related artifacts (EOG).
- Muscle artifacts (EMG).
- Electrical noise (60 Hz).
Before:

Figure 6. EEG without technical artifact removal.
After:

Figure 7. EEG with technical artifact removal.
This two-stage strategy improved both robustness and interpretability of the EEG signals.
Results and Outcomes
The preprocessing pipeline achieved:
- Significant noise reduction across channels.
- Improved signal clarity and stability.
- Clear distinction between raw vs processed signals.
Evaluation methods included:
- Visual inspection of EEG plots.
- Quantitative comparisons across preprocessing stages.
These results demonstrate that proper preprocessing is critical before any classification or modeling tasks.
Raw Signal:

Figure 8. Raw EEG signal.
Filtered Signal:

Figure 9. EEG signal filtered.
Fully Cleaned Signal:

Figure 10. EEG Signal after a full clean stage.
The complete thesis for this project can be accessed here: Download Full Thesis (PDF)
