Electrocardiogram
Measuring Cardiac Response to Athleticism
Measuring Athleticism’s Impact on the Heart
I built and programmed a custom ECG to study how athletic conditioning affects heart rate and recovery. As a distance runner, I was curious how training level influences these performance-critical metrics.
Using surface electrodes, basic analog circuitry, and MATLAB signal processing, I developed a 1 ms–resolution ECG capable of capturing the full QRS complex and computing instantaneous heart rate in real time.
To validate performance across users, I tested the system on seven participants with varying fitness levels. Visualized recovery curves revealed clear differences in cardiovascular response based on athletic conditioning.
Highlights:
1ms Resolution
7 Individuals Tested
QRS Visualization
Timeline: Nov. 2023 - Dec. 2023
The Challenge
Designing a reliable ECG presented two core challenges: extracting a clean cardiac signal from a low-amplitude, noise-prone source and building a circuit stable enough for consistent measurements across users.
To reduce common-mode noise, I implemented a right-leg drive circuit and designed analog filters to isolate cardiac activity from environmental and motion artifacts. A high-pass filter (10 Hz cutoff) and low-pass filter (0.1 Hz cutoff) were used to suppress baseline drift and high-frequency noise while preserving the primary components of the heartbeat waveform.
ECG circuit design with labelled electrode positions & filters.
For data collection, three electrodes were placed on each participant (left chest, right chest, and right calf). Subjects sat still for 75 seconds to record a resting baseline, with ECG data streamed into MATLAB via a DAQ for visualization and processing.
Participants then ran on a treadmill for three minutes at a fixed speed to induce elevated heart rates. Immediately post-exercise, subjects were reconnected to the ECG and remained seated for ten minutes while recovery dynamics were recorded and analyzed in real time.
Subject connected to ECG for baseline measurements. The raw signal is transferred through the DAQ (blue box) to the computer.
The Solution
The raw ECG signals clearly captured cardiac activity, with resting datasets showing clean, well-defined QRS complexes and minimal noise.
Average heart rate was computed by counting R-wave peaks over one minute; and because these baseline recordings were stable, no additional filtering or instantaneous heart rate estimation was required.
Visualization of raw ECG data. Resting data is shown to the left, and depicts minimal noise. Active data is shown to the right, exhibiting high variability.
Post-run signals were significantly noisier due to motion artifacts and electrical interference, including prominent 60 Hz line noise, which was removed using a digital notch filter.
To estimate instantaneous heart rate, I squared the real component of the filtered signal to enhance peak contrast, used MATLAB’s findpeaks function to isolate R-waves, and computed heart rate as 60 seconds divided by the interval between successive peaks. Major outliers were manually removed to preserve physiological validity.
After calculating the instantaneous HR, the signal was further processed, and major outliers were manually removed.
When plotting instantaneous heart rate over time, recovery curves closely followed an exponential decay model (y = a * e^(-bx) + c). Each participant’s data was fit using MATLAB’s Curve Fitting Toolbox, enabling direct comparison of recovery dynamics across individuals.
The results revealed a clear physiological trend: less-conditioned students exhibited higher resting heart rates and slower recovery, while trained athletes returned to baseline significantly faster. This project validated the ECG’s ability to capture meaningful cardiovascular differences and demonstrated how signal processing can translate raw biosignals into interpretable physiological insights.
The approximate fits of each dataset here show how less athletic students not only have higher resting heart rates, but also reach higher active heart rates during the same degree of exercise.