Part VII: Health, Biosignals, and Wearable AI
Chapter 30: PPG and Wearable Cardiovascular Sensing

PPG physics and the pulse waveform

"I was promised a heartbeat. Instead I got a green light staring into a wrist, counting how much blood got in the way."

A Literal-Minded AI Agent

Prerequisites

This section rests on the measurement view of Chapter 2: a sensor reports a projected, biased proxy of the quantity you actually care about. It uses the sampling and bandwidth vocabulary of Chapter 3, and the amplitude and band anchors for biosignals introduced in Chapter 28. No optics or physiology background is required; the physics you need is built here. Amplitudes, wavelengths, and timings are engineering anchors for sizing pipelines, not clinical diagnostic thresholds.

The Big Picture

Photoplethysmography (PPG) is the sensor behind almost every wrist, finger, and ear heart-rate reading on Earth. Its principle is almost embarrassingly simple: shine light into skin, measure how much comes back, and watch that number pulse as arterial blood surges in with each heartbeat. But the gap between that one-line idea and a trustworthy cardiovascular signal is where this entire chapter lives. The returned light is dominated by things you do not care about (skin, bone, static tissue, venous blood) and only a tiny fraction ripples with the pulse. Extracting that ripple, and reading the shape of each beat rather than merely counting it, is what turns a photodiode into a window on the circulation. Get the physics wrong and every downstream model, heart rate, blood oxygen, blood pressure, stress, inherits a distorted substrate it can never fully repair.

The optical principle: light, blood, and Beer-Lambert

A PPG sensor is two components facing skin: a light-emitting diode (LED) and a photodetector. Light enters the tissue, scatters and is absorbed, and a fraction reaches the detector. The single most important absorber in the optical path is hemoglobin inside red blood cells, so when the volume of blood in the illuminated tissue rises, more light is absorbed and less returns. That is the whole trick: the detected intensity is an inverse proxy for local blood volume, and blood volume oscillates with the cardiac cycle.

The governing physics is the Beer-Lambert law, which says light attenuates exponentially with the concentration and path length of an absorber. For a detector intensity \(I\) against an incident \(I_0\),

$$ I = I_0 \, \exp\!\left(-\sum_i \varepsilon_i \, c_i \, d_i\right), $$

where \(\varepsilon_i\) is the molar absorptivity of absorber \(i\), \(c_i\) its concentration, and \(d_i\) the path length through it. Real tissue is a strong scatterer, so this equation is an idealization rather than a literal model (scattering lengthens and randomizes the path), but it captures the load-bearing intuition: the pulsatile change in arterial blood path length \(d\) drives a small, time-varying change in \(I\). A wearable does not solve this equation; it exploits the fact that only the arterial term changes on the sub-second timescale of a heartbeat, while everything else is effectively constant.

Two geometries exist. In transmission mode the LED and detector sit on opposite sides of thin tissue (a fingertip, an earlobe), and light passes through; this gives a strong, clean signal and is the classic clinical pulse-oximeter arrangement. In reflectance mode the LED and detector sit side by side and read backscattered light; this works anywhere there is skin (wrist, forearm, temple) and is what every smartwatch uses, at the cost of a weaker, motion-prone signal.

Key Insight

The PPG signal is a large baseline plus a tiny pulse riding on top of it. Decompose the detected intensity into a DC component (the slowly varying floor set by skin, bone, muscle, and venous blood) and an AC component (the pulsatile ripple from arterial blood). The AC part is typically only 0.1 to 2 percent of the DC part. Every heart-rate estimate you will ever compute lives in that 1-percent ripple, which is why the useful engineering quantity is not raw intensity but the normalized perfusion index \( \mathrm{PI} = \mathrm{AC}/\mathrm{DC} \). Normalizing by DC cancels the constant tissue absorption and the LED brightness, so the same beat looks comparable across skin, sensors, and drive currents. Miss this decomposition and you will chase baseline drift instead of pulses.

Choosing a wavelength: why smartwatches glow green

Look at the back of a fitness watch and you see green light; look into a clinical pulse oximeter and you see red and infrared. The difference is not branding, it is physics. Hemoglobin absorbs green light (around 530 to 570 nm) far more strongly than red or infrared, so a green LED produces a larger pulsatile contrast, a bigger AC-to-DC ratio, at the wrist. Green light also penetrates shallowly, reaching the dense capillary bed just under the skin surface and being less perturbed by deeper motion of tissue and venous blood, which makes it more robust to the arm swing of a runner. That motion robustness is exactly why reflectance wearables favor green, and it is developed as its own engineering problem in Section 30.6.

Red and infrared are not obsolete; they are chosen for a different job. Oxygenated and deoxygenated hemoglobin have different absorption spectra in the red and infrared bands, and comparing the pulsatile absorption at two such wavelengths is precisely how blood oxygen (SpO2) is estimated. Green wins for a clean heart-rate pulse; red and infrared win when you need to separate two hemoglobin species. This wavelength-selection logic, and the two-wavelength ratio it enables, is the subject of Section 30.3. The takeaway for this section is that wavelength is a design lever: it trades pulse contrast, penetration depth, and chemical selectivity against one another.

In Practice: the wrist that loses the pulse on a cold morning

A wearables team ships a reflectance PPG watch with a green LED and notices a cluster of complaints: users report missing heart-rate readings on cold-weather runs. The physics explains it directly. Cold triggers peripheral vasoconstriction, the small vessels in the wrist clamp down, so the pulsatile arterial volume, and therefore the AC component, collapses. The perfusion index drops toward the noise floor, and the beat vanishes into baseline while the DC floor barely moves. The fix is not a better neural network; it is more optical power and a signal-quality gate that reports "low perfusion, no reading" rather than hallucinating a number. The lesson recurs throughout the chapter: a PPG model is only as honest as the perfusion index feeding it, which is why quality gating (Section 30.6) is not optional polish but a load-bearing stage.

Reading the pulse waveform: peaks, notch, and derivatives

Once you isolate the AC component you have the pulse waveform, and its shape carries more than heart rate. A single beat rises steeply from its foot (the diastolic minimum) to a systolic peak as the left ventricle ejects blood and the pressure wave arrives. It then falls, often interrupted by a small secondary bump, the dicrotic notch and following diastolic peak, produced as the aortic valve closes and a reflected wave returns from the periphery. The clarity of that notch is an index of arterial stiffness and vascular tone, and it is the morphological hook that cuffless blood-pressure methods lean on in Section 30.4.

Because the notch is a subtle inflection rather than a peak, it is often invisible in the raw waveform but obvious in the derivatives. The first derivative, the velocity plethysmogram (VPG), sharpens the timing of the upstroke; the second derivative, the acceleration plethysmogram (APG), resolves a characteristic sequence of waves conventionally labeled \(a, b, c, d, e\) whose relative amplitudes (for instance the \(b/a\) ratio) are classic vascular-aging features. This is a concrete instance of the feature-engineering discipline of Chapter 8: a hand-built derivative exposes structure a raw amplitude hides. The sampling constraint from Chapter 3 bites here, because differentiation amplifies high-frequency noise, so a clean APG needs both an adequate sample rate (typically 100 Hz or more for morphology, though 25 Hz suffices for bare heart rate) and the careful band-pass filtering of Chapter 6.

Table 30.1.1: Engineering anchors for a wrist reflectance PPG. Values are typical ranges for sizing pipelines, not clinical thresholds.
QuantityTypical valueWhy it matters
Pulse band0.5 to 4 Hz (30 to 240 bpm)Sets the band-pass for beat detection
AC / DC (perfusion index)0.1 to 2 percentThe entire usable pulse lives here
Green LED wavelength≈ 530 to 570 nmMax hemoglobin contrast, shallow, motion-robust
Red / infrared≈ 660 / 940 nmSeparates oxy- vs deoxy-hemoglobin (SpO2)
Sample rate25 Hz (HR) to 100+ Hz (morphology)Derivatives and notch need the higher rate
Dicrotic notchSecondary inflection in decayVascular tone; anchors cuffless BP

The program below synthesizes one physiologically plausible beat as a sum of Gaussians (systolic peak plus a smaller dicrotic wave), forms the AC-over-DC signal, and takes the second derivative to expose the notch that the raw trace barely shows. It makes the perfusion-index and APG ideas concrete before we filter real data in later sections.

import numpy as np

fs = 100.0                                   # samples per second
t = np.arange(0, 0.9, 1 / fs)                # one cardiac cycle, ~67 bpm

# systolic peak + smaller reflected (dicrotic) wave, on a large DC floor
systolic  = np.exp(-((t - 0.20) / 0.045) ** 2)
dicrotic  = 0.35 * np.exp(-((t - 0.42) / 0.060) ** 2)
ac = systolic + dicrotic                     # pulsatile arterial component
dc = 100.0                                   # static tissue floor (arb. units)
ppg = dc + 1.2 * ac                          # detected intensity (AC on DC)

perfusion_index = (ppg.max() - ppg.min()) / dc      # AC/DC
apg = np.gradient(np.gradient(ppg, t), t)           # 2nd derivative (accel.)

print(f"perfusion index = {100 * perfusion_index:.2f} %")
print(f"dicrotic notch near t = {t[np.argmax(apg[40:]) + 40]:.2f} s")
Listing 30.1. Synthesizing one PPG beat, computing its perfusion index (AC/DC), and using the acceleration plethysmogram (second derivative) to locate the dicrotic notch that is nearly invisible in the raw trace. The 1-percent-scale perfusion index and the notch that only the derivative reveals are the two facts that shape every real PPG pipeline.

As Listing 30.1 shows, the pulse is a small ripple whose most diagnostic feature is hidden until you differentiate. That is the recurring character of PPG: rich structure encoded in a faint, easily corrupted signal. It is worth contrasting with the electrical view of the same heartbeat in Chapter 29: the ECG times the heart's electrical command with millisecond sharpness, while the PPG measures the mechanical, hemodynamic consequence downstream at the wrist, blurred and delayed by the vasculature. The gap between those two timings (the pulse arrival time) is itself a signal, and it is what cuffless blood pressure exploits in Section 30.4.

The Right Tool

Hand-writing a full PPG front end, band-pass filtering, adaptive beat detection with refractory logic, per-beat amplitude and interval extraction, is roughly 120 to 160 lines of tuned signal-processing code. The heartpy library collapses it to two calls:

import heartpy as hp
filtered = hp.filter_signal(ppg, cutoff=[0.7, 3.5], sample_rate=fs,
                            order=3, filtertype='bandpass')
wd, measures = hp.process(filtered, sample_rate=fs)   # peaks, IBIs, BPM, HRV
Listing 30.2. heartpy.process returns beat locations, inter-beat intervals, heart rate, and basic HRV measures in one call, replacing roughly 140 lines of hand-tuned detection. It handles the drudgery; deciding whether its default thresholds suit your device's noise and your population remains your job.

The convenience is real, and so is the caveat: a detector tuned on clean fingertip PPG will over-report beats on a noisy, low-perfusion wrist trace during motion, so validate its peaks against a labeled subset and pair it with the quality gate of Section 30.6 before trusting the numbers.

Research Frontier

The frontier question is how much of the cardiovascular state a single-site PPG morphology actually encodes. Large self-supervised PPG models such as Apple's work on wearable representation learning, and PPG channels within multimodal wearable foundation models (Google's LSM line and the PaPaGei open PPG encoder among them), are trained on hundreds of thousands to millions of unlabeled hours to learn embeddings that transfer to heart rate, atrial fibrillation, and demographic and metabolic labels from the waveform alone. Public substrates behind this include the large PPG-DaLiA and WESAD wearable datasets and the MIMIC waveform archives. The open problem is generalization: a morphology model learned on one device, wavelength, and population can silently degrade on another, which is why the sensor-and-wearable foundation-model program of Chapter 20 treats device and skin-tone shift as first-class evaluation axes rather than afterthoughts.

Exercise

Modify Listing 30.1 to sweep the DC floor from 50 to 500 while holding the AC amplitude fixed, and plot the raw peak-to-peak amplitude of ppg against the perfusion index for each floor. In two or three sentences, explain why a beat detector that thresholds on raw amplitude would behave inconsistently across these floors, and why normalizing by DC (or by a running amplitude estimate) is the standard defense. Then state what physiological or optical change could move the DC floor on a real wrist without any change in the underlying pulse.

Self-Check

1. The AC component of a wrist PPG is often under 1 percent of the DC component. What does the DC part physically represent, and why is the ratio AC/DC (perfusion index), rather than raw intensity, the quantity pipelines normalize on?

2. Fitness watches use green LEDs but pulse oximeters use red and infrared. Give the physical reason each choice is correct for its job.

3. The dicrotic notch is often invisible in the raw pulse yet obvious in the second derivative (APG). Explain why differentiation exposes it, and name one cost that differentiation imposes on a noisy signal.

What's Next

In Section 30.2, we take this pulse from a laboratory curiosity to a population-scale screening tool: how consumer wearables from Apple and Fitbit turned irregular inter-beat intervals in the PPG waveform into atrial-fibrillation alerts, what the large virtual heart studies actually measured, and why turning a faint optical ripple into a medical notification demands the signal-quality discipline and honest evaluation this section has set up.