Biomedical Engineering / ECG Powerline Notch Filter
FREE TO EXPLORE
LABORATORY 17 · BIOMEDICAL ENGINEERING

ECG Powerline Notch Filter lab report

A worked ecg powerline notch filter lab report with sample observation tables, regression plots, calculations, and error analysis.

WORKED EXAMPLE · BENCHMARK OBSERVATIONS

A complete example laboratory report.

Simulated demonstration data.

This report illustrates formal biomedical engineering data reduction, transducer calibration tares, and physiological parameter estimation. Replace its observations with your own experimental telemetry when preparing a biomedical engineering laboratory report submission.

Student: __________________Student ID: __________________Course: __________________Date: __________________Partner: __________________Instructor: __________________

1. Title and aim

IIR Digital Notch Filter Design & 50/60 Hz Powerline Interference Removal. Design and implement a second-order IIR notch filter (Q = 30) to suppress 60 Hz hum from corrupted ECG telemetry while preserving diagnostic ST-segment and QRS morphology.

2. Abstract

Six controlled biomedical engineering observations were evaluated across standardized settings Noise P_in = 0.1 mV² to Noise P_in = 1.1 mV² for IIR Digital Notch Filter Design & 50/60 Hz Powerline Interference Removal. An ordinary least-squares linear regression yielded an empirical Notch Filter Power Transmission k_n of 5.0000 ratio (difference from theoretical reference = 0.0000%). The empirical telemetry conclusively validates the fundamental biomedical engineering formulation with R² = 1.000000. The investigation demonstrates stable physiological response, transducer linearity, and reproducible telemetry across all clinical test conditions with negligible residual variance. Data acquired through the virtual biomedical workbench exhibit strict adherence to established biopotential, constitutive biomechanical, hemodynamic, or diagnostic imaging governing equations, confirming the dimensional and similitude assertions of the curriculum.

3. Apparatus and fixed settings

4. Theory and graph choice

In clinical electrophysiology, 50 Hz or 60 Hz powerline interference is the most pervasive electromagnetic contaminant obscuring biopotential telemetry (ECG, EEG, EMG). Radiated by AC power cabling, fluorescent lighting ballasts, and hospital equipment, powerline interference manifests as a sharp sinusoidal artifact superimposed on microvolt biopotentials. While differential instrumentation amplifiers and Right Leg Drive circuits attenuate a large fraction of common-mode hum, residual common-mode-to-differential conversion caused by electrode impedance imbalances necessitates digital filtering in the digital signal processor (DSP). To eliminate 60 Hz hum without distorting critical clinical features—such as the sharp high-frequency QRS peak or subtle low-frequency ST-segment elevations diagnostic of acute myocardial infarction—a specialized second-order Infinite Impulse Response (IIR) digital notch filter is synthesized via bilinear transformation. The transfer function places conjugate complex zeros on the unit circle at z = exp(±j · 2π · f_0 / f_s) and matching poles at r · exp(±j · 2π · f_0 / f_s) with radius r = 1 - (π · BW / f_s), establishing a sharp notch (Q = f_0 / BW = 30). In this laboratory investigation, synthesized ECG signals corrupted by controlled 60 Hz interference are processed through the digital notch filter to quantify power attenuation and verify linear power suppression.

P_out = k_n · P_in = 0.0050 · P_in

The governing physiological relationship was linearized into the standard regression coordinate form y = mx + b. Here, the independent coordinate x represents Input interference power P_in (mV²), and the dependent coordinate y represents Output residual power P_out (μV²). The gradient m directly determines Notch Filter Power Transmission k_n, while the intercept b accounts for baseline null offsets, pre-stress tares, or reference thresholds. Linear transformation allows robust parameter estimation via ordinary least squares without non-linear solver instability or convergence traps. Plotting transformed observation pairs displays sensor sensitivities, elastic moduli, hemodynamic resistances, or acoustic attenuation coefficients directly as linear slopes. This linear graphical formulation provides an immediate visual check of homoscedasticity, linearity, and potential sensor saturation, biological yield, or non-linear compliance.

5. Method

  1. Compute second-order IIR notch coefficients for f_0 = 60.0 Hz, f_s = 500 Hz, Q = 30: b = [1, -2·cos(ω_0), 1], a = [1, -2·r·cos(ω_0), r²] with r = 0.9874; load into DSP memory.
  2. Input pure clean 1.0 mV ECG waveform without noise; confirm that filter passband causes zero visible attenuation or phase distortion of the QRS complex.
  3. Superimpose 60.0 Hz sinusoidal hum to establish an input noise power P_in = 0.10 mV² (amplitude ~0.45 mV peak-to-peak).
  4. Run real-time biquad filtering and compute FFT power spectral density at 60 Hz; log residual output power P_out in μV².
  5. Increment 60 Hz interference power through 0.30, 0.50, 0.70, 0.90, and 1.10 mV², recording residual output power P_out at each step.
  6. Plot residual output power P_out against input interference power P_in, performing linear regression to evaluate the power transmission ratio k_n.

6. Observations and calculation table

All biomedical observations use strictly controlled 64-bit IEEE 754 precision buffers. Residuals are computed relative to the ordinary least-squares regression line.

Table 1. Six simulated observations; x and y represent transformed biomedical metrics.
No.Input Interference Power P_in (mV²)Residual Output Power P_out (μV²)Input interference power P_in (mV²)Output residual power P_out (μV²)Fitted yResidual
10.10.00050.10000.00050.0005-0.0000
20.30.00150.30000.00150.0015-0.0000
30.50.00250.50000.00250.0025-0.0000
40.70.00350.70000.00350.00350.0000
50.90.00450.90000.00450.0045-0.0000
61.10.00551.10000.00550.0055-0.0000

Download the sample observations (CSV) ↓

7. Worked calculation for one observation

For input Noise P_in = 0.1 mV²: Measured Residual Output Power P_out = 0.0005 μV². Transformed biomedical coordinates: independent x = 0.1000, dependent y = 0.0005.

8. Graph, gradient and final calculation

-2.500e-04-0.020.000.290.000.600.000.910.011.22Input interference power P_in (mV²)Output residual power P_out (μV²)

Circular markers represent empirical biomedical observations. The solid line represents the ordinary least-squares linear fit.

x̄ = 0.6000; ȳ = 0.0030
Σ(x − x̄)² = 0.7000
Σ(x − x̄)(y − ȳ) = 0.0035
m = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)² = 0.00500000
b = ȳ − mx̄ = 8.674e-19
y = 0.0050 · x + 8.674e-19 ⟹ Target Notch Filter Power Transmission k_n = 5.0000 ratio (theoretical = 0.0050)

9. Uncertainty and comparison

Percentage difference = |estimate − theoretical value| / |theoretical value| × 100 = 0.0000%.

For n = 6 observations, Σresidual² = 2.692e-36; s² = Σresidual²/(n − 2). Gradient standard error = √[s²/Σ(x − x̄)²] = 9.805e-19. Intercept standard error = √[s²(1/n + x̄²/Σ(x − x̄)²)] = 6.769e-19.

Propagating the fit parameters yields a fit standard error of 9.805e-16 ratio, with an ideal coefficient of determination R² = 1.000000.

In biomedical engineering experimentation, clinical telemetry, and medical device verification, empirical uncertainties originate from physiological biological variability, electrode-skin electrochemical polarization, transducer thermal drift, amplifier analog-to-digital quantization noise (64-bit IEEE 754 precision), and fluid boundary layer fluctuations. The ordinary least-squares regression across n = 6 standardized test intervals yields unbiased minimum-variance estimators for both slope and intercept. Because the underlying bioinstrumentation, continuum biomechanics, hemodynamics, and imaging physics adhere strictly to conservation of mass, momentum, charge, and electromagnetic principles, residual dispersions are tightly bounded, yielding an ideal coefficient of determination R² ≥ 0.999999 and validating the theoretical formulation. Furthermore, systematic errors—including amplifier common-mode rejection offsets, sensor cable movement artifacts, hydrostatic fluid leveling offsets, and specimen hydration boundaries—are corrected according to medical instrumentation protocols (Webster, Bronzino, and ISO standards). Standard deviations are propagated using first-order multivariate Taylor expansions (delta method) across transformed physiological coordinates. Residual diagnostics confirm homoscedasticity across the entire operational clinical window without systematic non-linear bias.

10. Result and discussion

Notch Filter Power Transmission k_n = 5.0000 ratio
Theoretical reference value: 5.0000 ratio

The empirical laboratory observations provide rigorous quantitative verification of IIR Digital Notch Filter Design & 50/60 Hz Powerline Interference Removal. In biomedical engineering, medical instrumentation, biomechanics, and artificial organs, physical systems are governed by Maxwell equations, Navier-Stokes fluid mechanics, Hookean continuum elasticity, and biphasic mixture theories. Across all six observation trials, the empirical slope m = 0.0050 confirms the theoretical model with near-zero residual variance. Furthermore, comparison with established medical engineering benchmarks (Webster, Bronzino, Fung, and Winter) underscores vital clinical design principles including patient electrical safety, biocompatibility, transducer signal-to-noise ratio, fatigue longevity, and hemodynamic shear preservation. Residual analysis confirms homoscedastic dispersion without systematic non-linear patterning, validating the underlying model assumptions. Confidence intervals calculated via asymptotic standard errors align with theoretical quantiles, indicating that finite-sample distortions remain negligible under controlled test conditions. The experimental protocol confirms the robustness of the methodology across varying physiological operating states.

11. Precautions and limitations

The linear power transmission model applies across the tested linear range (P_in ≤ 1.1 mV²). Evaluated using a second-order IIR digital notch filter centered at f_0 = 60.0 Hz with sampling frequency f_s = 500 Hz and 3 dB notch bandwidth BW = 2.0 Hz (Q = 30). Input 60 Hz interference power is varied from 0.1 to 1.1 mV².

12. Conclusion

This laboratory investigation quantitatively verified the mathematical formulation and physical behavior of IIR Digital Notch Filter Design & 50/60 Hz Powerline Interference Removal. Through rigorous tracking across six observation points, we confirmed an empirical Notch Filter Power Transmission k_n of 5.0000 ratio matching the theoretical reference 5.0000 ratio within 0.0000% error. The investigation demonstrates why this biomedical engineering method serves as an indispensable cornerstone in modern clinical patient monitoring, implant design, and diagnostic systems. The verified scaling laws and parameter estimates demonstrate the practical efficacy of physiological modeling and biomedical engineering principles.