Wearable_Insight_Forum

 

Notifications
Clear all

An algorithm for calculating the heart rate from a photoplethysmography (PPG) signal.

5 Posts
2 Users
0 Reactions
31 Views
wearablemake
(@wearablemake)
Posts: 338
Reputable Member
Topic starter
 

The algorithm for calculating heart rate (HR) from Photoplethysmography (PPG) signals involves analyzing the signal’s characteristics, removing noise, and extracting periodic features to determine heart rate. Here’s a detailed explanation:

1. Principle of PPG Signals

  • PPG works by detecting changes in light absorption caused by blood flow variations in blood vessels.
  • A light source (typically red or infrared) is projected onto the skin, and the reflected or absorbed light is captured by a photodetector.
  • Blood volume changes synchronized with heartbeats generate a periodic waveform in the PPG signal.

2. Signal Preprocessing

PPG signals require preprocessing to remove noise and prepare the data for accurate heart rate calculation.

Key Steps:

  1. Noise Removal
    • Low-pass filter: Removes high-frequency noise.
    • High-pass filter: Eliminates baseline drift.
    • Band-pass filter: Extracts frequencies within the heart rate range (0.5–4 Hz).
  2. Signal Smoothing
    • Moving average or Gaussian filters are used to smooth the signal and reduce noise.
  3. Artifact Removal
    • Techniques like Wavelet Transform or Independent Component Analysis (ICA) mitigate distortions caused by motion or lighting changes.

3. Peak Detection

The heart rate is calculated by detecting peaks in the PPG waveform, which correspond to maximum blood volume during each heartbeat.

Key Methods:

  1. Threshold-Based Detection
    • Detect peaks based on signal derivatives and thresholding.
  2. Zero-Crossing Detection
    • Identify points where the signal derivative crosses zero to locate maxima and minima.
  3. Fast Fourier Transform (FFT)
    • Analyze the frequency spectrum to detect periodic peaks representing heart rate.
  4. Wavelet Transform
    • Use time-frequency resolution to identify peaks and analyze periodic patterns.

4. Heart Rate Calculation

  1. R-R Interval Measurement
    • Measure the time interval between successive peaks to compute heart rate.
    • Formula: HR (BPM)=60 / Average R-R Interval (seconds)
  2. Frequency Domain Analysis
    • Use FFT to find dominant frequency peaks representing the heart rate.
  3. Weighted Moving Average
    • Stabilize real-time HR fluctuations by applying a weighted average to recent measurements.

5. Motion Compensation and Advanced Features

PPG signals are prone to distortions from motion artifacts, skin conditions, and ambient lighting. Mitigation strategies include:

  1. Motion Artifact Removal
    • Use accelerometer data to correct for motion-induced distortions.
    • Apply adaptive filtering techniques for noise removal.
  2. Multi-Channel PPG
    • Combine signals from multiple PPG sensors at different locations to improve accuracy.

6. Applications and Benefits

  • Wearable Devices: Smartwatches (e.g., Apple Watch, Fitbit), fitness trackers.
  • Healthcare: Non-invasive heart rate monitoring, stress management, activity tracking.
  • Advantages: Simple hardware setup, real-time analysis, and widespread usability.

PPG-based heart rate algorithms rely on high-quality signal preprocessing, precise peak detection, and effective noise reduction, enabling accurate and reliable HR measurement in various conditions.


 
Posted : 20/01/2025 2:05 am
alejandro
(@alejandro)
Posts: 47
Eminent Member
 

Why is noise removal important in PPG signals?


 
Posted : 27/08/2025 12:56 pm
wearablemake
(@wearablemake)
Posts: 338
Reputable Member
Topic starter
 

PPG signals are easily affected by external factors such as skin movement, ambient lighting, and sensor contact. Failure to remove this noise can lead to false peak detection, resulting in results that differ from the actual heart rate.

Therefore, it’s essential to use low-pass, high-pass, and band-pass filters to retain only the pure signal corresponding to the heart rate band (0.5-4 Hz).


 
Posted : 27/08/2025 12:56 pm
alejandro
(@alejandro)
Posts: 47
Eminent Member
 

How is heart rate converted to actual beats per minute (BPM)?


 
Posted : 27/08/2025 12:57 pm
wearablemake
(@wearablemake)
Posts: 338
Reputable Member
Topic starter
 

Basically, the R-R interval (the time between two consecutive peaks) is measured and the average interval is used to calculate BPM.
The formula is HR (BPM) = 60 / Average R-R interval (seconds). For example, if the average interval is 0.8 seconds, 60 / 0.8 = 75 BPM.


 
Posted : 27/08/2025 12:57 pm
Share: