Build notesBiomedical Signal Processing • Data Science2025

EEG Signal Analysis & Research

A biomedical signal processing project analyzing EEG frequency bands across rest and cognitive task conditions using Butterworth filtering and Welch power spectral density estimation.

Won’tNever claims clinical medical diagnostics and never operates on unfiltered noisy sensor data.
Role
Research Intern, Swaarogym Medical Devices (MNIT Jaipur)
When
2025 · Biomedical Research Project
Built with
PythonSciPy (signal)Welch Power Spectral DensityNumPyMatplotlibPandasButterworth Bandpass Filter
mnit.ac.in / swaarogym
RESEARCH CASE STUDY

EEG Signal Analysis & Research

A biomedical signal processing project analyzing EEG frequency bands across rest and cognitive task conditions using Butterworth filtering and Welch power spectral density estimation.

Dataset Subjects36
Filter Bandwidth1–40 Hz
Rhythms Isolated4 Bands

Why it exists

Electroencephalography (EEG) recordings capture rich microvolt-level electrical activity from scalp electrodes, but raw signals are heavily contaminated by environmental noise, power line interference (50/60 Hz), and ocular artifacts.

Extracting meaningful physiological indicators from noisy multi-channel signals requires rigorous digital signal processing pipelines: applying bandpass filters to isolate physiological rhythms and computing spectral power distributions across standard frequency bands.

This project was conducted during research work at Swaarogym Medical Devices (incubated at MIIC, MNIT Jaipur) to systematically analyze Theta and Beta rhythm dynamics during sustained mental tasks.

What it does

A signal processing pipeline that filters multi-channel EEG recordings, computes power spectral density across distinct frequency bands, and visualizes spectral ratio shifts.

  • Digital Bandpass Filtering: Applies 4th-order zero-phase Butterworth bandpass filters (1–40 Hz) and notch filtering to eliminate DC offset, baseline drift, and power line hum from raw scalp recordings.
  • Welch’s Power Spectral Density Estimation: Computes power spectra across scalp channels using Hann windowing and 50% segment overlap to minimize variance in spectral estimates.
  • Frequency Band Isolation: Extracts integrated spectral power across canonical EEG bands: Delta (1–4 Hz), Theta (4–8 Hz), Alpha (8–13 Hz), and Beta (13–30 Hz).
  • Theta/Beta Spectral Ratio Analysis: Calculates the Theta/Beta Ratio (TBR), an established research indicator in cognitive neuroscience used to track shifts between resting states and focused mental tasks.

What it won’t do

The research framework maintains strict scientific rigor and clearly defined non-clinical boundaries.

  • No Clinical Medical Claims: The project is purely an engineering analysis of frequency band power ratios for research and exploratory monitoring. It does not provide medical diagnoses or replace clinical EEG analysis.
  • Rejects Unfiltered Raw Epochs: Raw scalp electrodes suffer from high baseline drift and motion artifacts. The pipeline strictly discards segments exceeding physiological microvolt thresholds before spectral estimation.
  • No Thought or Speech Decoding: The system evaluates aggregate frequency band power across electrode groups. It does not and cannot decode private thoughts, language, or semantic content.

How it works

The signal analysis workflow follows established digital signal processing procedures in Python.

Artifact Filter (SciPy signal.butter / filtfilt)Executes bidirectional zero-phase 4th-order bandpass filtering between 1 and 40 Hz.
Spectral Estimator (SciPy signal.welch)Splits continuous channel recordings into overlapping Hann-windowed epochs to compute PSD.
Band Integrator (NumPy / Composite Simpson's Rule)Integrates area under PSD curves to determine absolute and relative power per rhythm band.
Spectral Visualizer (Matplotlib / Seaborn)Generates comparative power spectrum plots showing spectral shifts between task conditions.

Welch Method Parameterization: Spectral estimation uses window length of 256 samples with 50% overlap (128 samples) at 250 Hz sampling frequency, achieving an optimal compromise between frequency resolution (0.97 Hz bins) and variance reduction.

Zero-Phase Filtering: By applying filtfilt (forward-backward filtering), phase distortion is completely cancelled out, preserving the exact timing of rhythm transitions across scalp channels.

By the numbers

36Dataset Subjects
1–40 HzFilter Bandwidth
4 BandsRhythms Isolated
MNITIncubator Lab

What’s next

  • Real-Time Stream Processing: Adapting the SciPy Welch pipeline to operate over continuous ring buffers from open-hardware EEG headsets (e.g. OpenBCI Cyton).
  • Topographic Scalp Mapping: Generating 2D interpolated heatmaps showing spatial distribution of Theta/Beta power across standard 10–20 electrode coordinates.
Next build notesAegis Disaster Platform

Autonomous disaster management, live GDACS telemetry, and protocol-grounded RAG AI

Full-Stack • Autonomous Systems • RAG AIRead build notes