Skip to content
Giorgi Gogitidze

Engineering case study

ECG Denoising, QRS Detection, and Signal-Quality Testbench

Non-diagnostic synthetic testbench for configurable filtering, explainable QRS timing, robustness sweeps, and failure analysis.

  • Executed simulation
  • Automated test

Problem statement

Measure how filter bandwidth and detector sensitivity trade morphology preservation against robust beat timing under baseline drift, mains interference, broadband noise, motion-like contamination, and impulses.

A fixed-seed DSP experiment that injects controlled artifacts, compares two processing chains, and evaluates denoising and one-to-one detection metrics across 80 synthetic conditions.

80

Synthetic conditions

Five SNRs × four artifact sets × two mains frequencies × two configurations

0.9898

Mean aggressive F1

Synthetic one-to-one QRS detection only

0.8947

Worst aggressive F1

Lowest result across the fixed synthetic sweep

0.90 ms

Mean timing error

Aggressive configuration; synthetic reference peaks

Project scope

  • Deterministic 30-second, 250 Hz synthetic ECG with 35 known reference beats
  • Five input-SNR targets, four artifact selections, 50/60 Hz mains, and two processing configurations
  • Zero-phase offline filtering, derivative-square-integrate detection, RR metrics, and heuristic SQI
  • Educational, non-diagnostic study; no patient or public-record performance result is claimed

System or processing architecture

A synthetic generator provides the clean reference and exact event times. Controlled noise injection feeds configurable notch and Butterworth band-pass stages, optional smoothing, and an explainable QRS detector. A metric layer performs one-to-one peak matching, denoising comparisons, timing error, and signal-quality scoring.

My engineering contributions

  • Implemented deterministic ECG synthesis and controlled baseline, mains, motion-like, impulse, and broadband noise injection.
  • Built stable configurable filters with zero-phase and causal execution paths.
  • Implemented an inspectable derivative-square-integrate detector with refractory and peak-refinement logic.
  • Designed the 80-condition sweep, one-to-one metrics, failure-case visualization, workbook, notebook, and tests.

Important design decisions

  • Compared a balanced 0.5-35 Hz chain with a narrower aggressive 1-25 Hz chain instead of optimizing a single favorable configuration.
  • Used exact synthetic reference peaks to make precision, recall, F1, and timing error auditable.
  • Published a severe-motion failure case and kept public MIT-BIH evaluation separate until actually executed.

Engineering methods

  • DC removal, selectable 50/60 Hz notch, and SOS Butterworth band-pass filtering
  • Derivative, squaring, moving integration, robust thresholding, and refractory enforcement
  • One-to-one event matching within a 100 ms tolerance
  • SNR, RMSE, RR, heart-rate, timing, and heuristic SQI calculations
  • Fixed-seed factorial robustness sweep and explicit failure-case review

Selected evidence

Readable results, with context

Synthetic clean and noisy ECG, filtered waveform with detected R peaks, and integrated detector energy
Figure 1Representative 60 Hz, 10 dB synthetic condition showing the signal path and detected events.
Magnitude and phase responses for balanced and aggressive ECG filter configurations
Figure 2The aggressive chain trades retained bandwidth for stronger timing robustness in the synthetic sweep.
QRS F1 score versus target input SNR for balanced and aggressive ECG processing
Figure 3Fixed-seed robustness comparison across the all-artifact synthetic cases.
ECG detections and reference beats during severe motion-like contamination at minus five decibels
Figure 4Published failure case: motion-like slopes can create false detections and obscure true peaks.

Verification and testing

  • Tests check filter stability, output length and finiteness, random-seed reproducibility, invalid cutoffs, and detection on a known signal.
  • The run manifest records seed 20260922, 250 Hz sampling, 30-second duration, 35 clean beats, and 80 result rows.
  • CSV and workbook summaries are produced directly from the experiment table.
  • Filter-response, waveform, robustness, and failure figures preserve the synthetic and non-diagnostic context.

Honest limitations

  • All published performance values come from a synthetic generator, not patient recordings or a clinical study.
  • Zero-phase filtering uses future samples and is suitable for offline analysis, not direct real-time deployment.
  • The heuristic SQI is transparent but not clinically validated.
  • Public-record evaluation, causal-delay characterization, diverse morphology, and device-level acquisition remain future work.

Tools and technologies

  • Python
  • SciPy Signal
  • NumPy
  • pandas
  • Matplotlib
  • Digital filtering
  • Event detection

Skills demonstrated

  • Digital signal processing
  • Filter design
  • QRS detection
  • Testbench design
  • Metric design
  • Failure analysis

Continue in Embedded Electronics & Signal Processing