- 📋 Project Overview
- 🎯 Project Objectives
- 🛠️ Technical Implementation
- 🚀 Getting Started
- 📋 Menu Options
- 📁 Project Structure
- 🔬 Signal Processing Theory
- 📊 Results & Analysis
This project implements digital signal processing techniques to filter real electrocardiographic (ECG) signals for improved readability and automatic processing. The system applies high-pass and low-pass filters to remove noise and artifacts from ECG recordings, making them suitable for subsequent peak detection and classification tasks.
- Osaid Nur - 1210733
- Salah Sami - 1210722
- Waleed Rimawi - 1211491
The main goals of this project are to:
- Data Visualization: Display and analyze real ECG signals sampled at 360 Hz
- Signal Filtering: Apply digital filters to improve signal quality
- Filter Analysis: Analyze filter characteristics including frequency response and zero-pole plots
- Comparative Analysis: Compare different filtering approaches and their effects
- Original Signal Display: Visualize raw ECG1 and ECG2 signals
- Real-time Column Integration: Time axis generation for proper signal representation
- Interactive Plotting: High-quality matplotlib visualizations with customizable parameters
- High-Pass Filter (HPF): Removes baseline drift and low-frequency noise
- Low-Pass Filter (LPF): Eliminates high-frequency artifacts and muscle noise
- Cascaded Filtering: Apply multiple filters in sequence for enhanced signal quality
- Frequency Response Analysis: Visualize filter magnitude response
- Zero-Pole Plot Generation: Analyze filter stability and characteristics
- Transfer Function Computation: Mathematical representation of filter behavior
Transfer Function: H_HP(z) = (-1/32 + z^-16 - z^-17 + z^-32/32) / (1 - z^-1)
Type: IIR (Infinite Impulse Response)
Purpose: Baseline drift removal, DC component elimination
Transfer Function: H_LP(z) = (1 - 2z^-6 + z^-12) / (1 - 2z^-1 + z^-2)
Type: IIR (Infinite Impulse Response)
Purpose: High-frequency noise suppression, anti-aliasing
pip install numpy matplotlib pandas scipyData_ECG_raw.xlsx- Contains ECG1 and ECG2 signal dataDSP_project.py- Main application script
- Clone the repository:
git clone https://github.com/yourusername/Filtering-of-ECG-Signals.git
cd Filtering-of-ECG-Signals- Install dependencies:
pip install -r requirements.txt- Run the application:
python DSP_project.pyThe interactive application provides the following options:
-
Display Original Signals 📊
- View raw ECG1 and ECG2 recordings
- Analyze signal characteristics before filtering
-
Filter Frequency Response 📈
- Visualize HPF and LPF magnitude responses
- Understand filter behavior in frequency domain
-
Zero-Pole Analysis 🎯
- Plot filter zeros and poles
- Assess filter stability and performance
-
Single Filter Application 🔧
- Apply HPF or LPF to individual signals
- Compare filtered vs. original signals
-
Cascaded Filter Analysis 🔄
- Apply HPF→LPF or LPF→HPF sequences
- Analyze order-dependent filtering effects
Filtering-of-ECG-Signals/
├── DSP_project.py # Main application script
├── Data_ECG_raw.xlsx # Raw ECG signal data
├── Project Report.pdf # Detailed technical report
├── Project_Description.pdf # Project requirements and specifications
├── README.md # Project documentation
└── requirements.txt # Python dependencies
- Sampling Rate: 360 Hz
- Signal Components:
- P-wave, QRS complex, T-wave
- Baseline drift (< 0.5 Hz)
- Muscle artifacts (> 100 Hz)
- Power line interference (50/60 Hz)
- High-Pass Filtering: Removes baseline wander and respiratory artifacts
- Low-Pass Filtering: Eliminates high-frequency noise and EMG interference
- Cascaded Approach: Combines both filters for optimal signal conditioning
- HPF Effectiveness: Successfully removes baseline drift while preserving ECG morphology
- LPF Characteristics: Maintains clinical ECG features while suppressing noise
- Order Independence: HPF→LPF vs. LPF→HPF comparison reveals filtering sequence effects
- SNR Improvement: Quantifiable enhancement in signal-to-noise ratio
- Morphology Preservation: Clinical ECG features remain intact
- Computational Efficiency: Real-time processing capability