ECG Signal Generation with Noise Addition and Filtering

Resource Overview

This experiment involves generating an ECG signal, adding noise, and then applying filtering techniques. Starting from an ECG signal data table, we first process the original signal containing known noise through filtering to obtain a clean ECG waveform. We then intentionally add high-frequency and mid-frequency noise to simulate real-world conditions. The noisy signal is displayed and filtered again to demonstrate noise removal. Each time-domain signal is visualized alongside its corresponding frequency spectrum for analysis. Different filter types are implemented and compared throughout the process to evaluate their performance characteristics.

Detailed Documentation

This experiment focuses on generating electrocardiogram (ECG) signals, adding noise, and applying filtering techniques. As ECG signals represent crucial biological data, proper processing and analysis are essential. The implementation begins by generating an ECG signal data table containing both the base signal and inherent noise. To extract the clean ECG waveform, we first apply digital filtering using appropriate algorithms - typically implementing finite impulse response (FIR) or infinite impulse response (IIR) filters through convolution operations in the time domain or multiplication in the frequency domain after Fourier transformation. The filtering process effectively removes baseline wander and powerline interference, yielding a purified cardiac signal. Subsequently, we introduce artificial high-frequency and mid-frequency noise components to simulate realistic ECG recording conditions, often implementing this through additive white Gaussian noise (AWGN) models or specific frequency injection methods. The corrupted signal undergoes secondary filtering to demonstrate noise suppression capabilities. Throughout the process, we visualize both time-domain waveforms and their corresponding frequency spectra using Fast Fourier Transform (FFT) analysis, enabling clear observation of spectral changes at each processing stage. We experiment with various digital filters including low-pass, high-pass, and band-stop filters, comparing their performance using metrics like signal-to-noise ratio (SNR) improvement and mean squared error (MSE). Each filter type is implemented with carefully selected cutoff frequencies and filter orders to optimize noise removal while preserving important clinical features such as QRS complexes and ST segments.