Photoplethysmography (PPG)
Python 3.8+ · Teslasuit v4.5.6+ (XR5 recommended) · SDK 2.5.1+
What is PPG?#
Photoplethysmography (PPG) is a non-invasive optical technique that measures blood-volume changes in microvascular tissue: a sensor emits light into the skin and measures how much is absorbed or reflected by blood vessels. It is widely used in fitness and medical wearables to monitor heart rate and other cardiovascular parameters in real time. For the sensor details, sampling rate, and how the signal becomes metrics, see Concept: Biometry (PPG). This page focuses on how PPG data is exposed through the Python API.
PPG in the Teslasuit API#
PPG is part of the suit's biometry subsystem. A single PPG sensor in the upper-right sleeve produces the signal (see Concept: Biometry (PPG) for sensor specs). In the Python API this is accessed through the TsPPG class, which provides methods for streaming raw data, retrieving processed data (heart rate and HRV), and performing calibration.
Key features of the Teslasuit PPG subsystem#
- Raw data streaming: stream raw PPG data in real time for custom signal processing.
- Heart rate variability (HRV): time-domain, frequency-domain, and non-linear HRV metrics.
- Processed data: heart rate plus a validity flag on each value.
- Calibration:
calibrate()re-triggers the PPG processor calibration; it also runs automatically on start.
Description of PPG data#
The subsystem exposes processed HRV and heart-rate data plus the raw signal. The physiological meaning of these metrics is covered in Concept: Biometry (PPG); below are the fields you work with in the API.
HRV#
HRV is the variation in time between consecutive heartbeats, measured in milliseconds. Because it is calculated from many inter-beat intervals, a short buffering period follows sensor start-up before values become available.
HRV parameters and explanation#
- Mean inter-beat interval: the average interval between consecutive heartbeats, in milliseconds.
- SDNN: standard deviation of all normal-to-normal inter-beat intervals; overall variability.
- SDSD: standard deviation of the differences between successive inter-beat intervals; short-term variability.
- RMSSD: root mean square of successive inter-beat interval differences; a marker of parasympathetic (vagal) activity.
- SD1: short-term variability from the Poincaré plot, mathematically related to RMSSD.
- SD2: short- and long-term variability from the Poincaré plot.
- LF/HF (
hlffield): low-frequency to high-frequency power ratio; an index of autonomic balance.
See Concept: Biometry (PPG) for how these group into time-domain, frequency-domain, and non-linear families.
Heart rate#
Heart rate (HR) is the number of beats per minute, calculated from the interval between successive beats (the inter-beat interval, IBI).
Heart rate parameters and explanation#
- Heart rate (HR): beats per minute, calculated for every inter-beat interval.
- is_valid: a validity flag on each value. During movement, signal artifacts can make direct measurement unreliable, so an extrapolation algorithm estimates HR to keep the stream continuous; the flag shows whether a value is measured or extrapolated.
What to read next#
Explore these guides and resources to deepen your understanding and get the most out of Teslasuit PPG features:
Essential API references#
- PPG Subsystem API Reference: Technical documentation for using the Teslasuit PPG subsystem.
- Core Data Structures: PPG: Full descriptions of the data types and structures for PPG and HRV data.
Practical guides & examples#
- Read heart rate: Stream live heart rate from a PPG node.
- Measure HRV: Read the Mean inter-beat interval from the PPG sensor.
Deeper dives & broader concepts#
- Concept: Biometry (PPG): The full conceptual background, including the sensor, LED wavelengths, sampling rate, and calibration.
- Teslasuit Main Concepts: Go back to explore and understand the other Teslasuit subsystems and how PPG fits within the larger suite of technologies.
