Summary of ECG Filtration and Normalization in MATLAB | MATLAB Digital Signal Processing
The video provides a tutorial on ECG signal filtration and normalization using MATLAB, focusing on Digital Signal Processing techniques applied to physiological data.
Key Technological Concepts and Procedures:
- Loading ECG Data:
- The ECG data is sourced from the PhysioNet open-source dataset.
- Data is loaded from a local file (
100.dat
) using MATLAB’sfopen
,fread
(with 16-bit integer format), andfclose
functions. - Sampling frequency (Fs) is 360 Hz.
- A time vector is created based on the sampling rate and signal length for plotting.
- Raw ECG Signal Visualization:
- The raw ECG waveform is plotted for a 5-second segment to avoid clutter and improve interpretability.
- Bandpass Filtering:
- A Butterworth bandpass filter is applied to remove noise outside the typical ECG frequency range.
- Passband frequencies are set between 5 Hz (low cutoff) and 15 Hz (high cutoff).
- MATLAB’s built-in
butter
function is used to compute filter coefficients. - The filter is applied using
filtfilt
for zero-phase filtering to avoid phase distortion.
- R-Peak Detection:
- Normalization of ECG Signal:
- The amplitude of the filtered ECG is normalized to a range of -1 to 1.
- Normalization formula:
Normalized = 2 × (signal - min(signal)) / (max(signal) - min(signal)) - 1
- This standardizes the signal amplitude for easier analysis and comparison.
- Plotting Normalized Signal:
- The normalized ECG signal is plotted for visualization.
- The tutorial suggests using global variables to avoid repeating code for plotting multiple segments.
- Additional Notes:
- The presenter briefly mentions simulating ECG signals using sine wave functions but does not delve into details.
- Code snippets are made available on the presenter’s website with a link provided in the video description.
- Viewers are encouraged to ask questions in the comments.
Summary of Tutorial Features:
- Step-by-step guide to load, filter, and normalize ECG signals in MATLAB.
- Use of PhysioNet dataset for real patient ECG data.
- Application of Butterworth bandpass filter to isolate ECG frequency components.
- Detection of R-peaks using peak-finding algorithms.
- Normalization of signal amplitude for standardized output.
- Visualization of raw, filtered, and normalized ECG signals.
- Mention of simulation techniques for synthetic ECG generation.
Main Speaker/Source:
- The tutorial is presented by an unnamed MATLAB instructor or content creator who demonstrates the MATLAB code live and explains each step in detail.
Notable Quotes
— 03:02 — « What the band pass filter do is basically remove the noise in our ECG signals, so the lower frequency which we need to bypass is five Hertz and the maximum we require is 15 Hertz, so that's the basic range of the ECG signals. »
— 05:36 — « If you normalize the amplitude, it would look like this, where all the parting is between minus one to one. »
— 06:13 — « The normalization of the amplitude of the filtered ECG signals ranging from -1 to 1, we can simply input the filtered signal minus the minimum value divided by the maximum value minus minimum value, multiplied by 2 and minus 1. That's a basic formula for normalization. »
— 07:21 — « If you want to simulate your own ECG, you can use some kind of functions like this, apply a sine wave and simply plot the functions. »
— 07:43 — « I will just put that code into my website and put a link in the description so you can check that out. If you have any question you can reach me out in the comments as well. »
Category
Technology