The Science of Your Rhythm

Technical Architecture · Physiological Modeling · AI Methodology

1. The Sensor Layer: Polar H10

Polar H10 chest strap heart rate sensor

The foundation of Your Rhythm Studio is medical-grade data acquisition. While consumer smartwatches use Photoplethysmography (PPG) — measuring blood volume changes via light — the Polar H10 captures the actual electrical potential of the heart (Electrocardiography).

Why ECG Beats PPG for Arrhythmia Detection

Wrist-based optical (PPG) sensors are convenient for tracking average heart rate during exercise, but they have fundamental limitations for cardiac monitoring:

  • No waveform: PPG measures blood volume changes, not electrical activity. It cannot see the P wave, QRS complex, or T wave — the morphological features needed to classify PVCs, PACs, and other arrhythmias.
  • Motion artifacts: PPG is severely degraded by wrist movement, making it unreliable during walking, gym sessions, or restless sleep. ECG chest straps are positioned close to the heart and are far more resistant to motion noise.
  • Averaging windows: Most PPG-based devices average heart rate over 5–10 second windows, smoothing out the very beat-to-beat variability that reveals ectopic events. The H10 streams every single R-R interval in real time.
  • Skin tone bias: Optical sensors are less accurate on darker skin tones due to light absorption differences. ECG electrodes measure electrical signals, which are unaffected by skin pigmentation.

This is why every clinical Holter monitor uses electrodes, not optics — and why the Polar H10 is the sensor of choice for serious cardiac analysis.

Clinical Validation

The Polar H10 is not just a consumer fitness device — it has been validated against clinical-grade equipment in multiple peer-reviewed studies:

  • HRV validation (2022): A study of 25 participants compared the H10 against a 12-lead clinical ECG during rest and incremental cycling. At rest, RR interval correlation was r = 0.95 (ICC = 0.95). During exercise, correlation remained r > 0.93. Bland-Altman bias for RR intervals was under 1 ms — effectively negligible.
  • Holter comparison in cardiac patients: A pilot study validated the H10 against Holter monitors in patients with atrial fibrillation, heart failure, and post-cardiac rehabilitation, confirming its accuracy in clinically vulnerable populations.
  • RR interval precision: Polar's own white paper reports the H10 detects RR intervals with an accuracy of 2 ms — sufficient for HRV analysis and ectopic beat timing.

Sources: Siegmund et al. (2022), Sensors; Gilgen et al. (2023), Europace; Polar H10 White Paper.

Full Sensor Specifications

ECG
130 Hz sampling, output in µV
Accelerometer
25 / 50 / 100 / 200 Hz, 2G / 4G / 8G ranges
HR + RR Intervals
1 Hz via standard BLE HR service
Connectivity
Bluetooth LE, ANT+, GymLink (5 kHz)
Battery
CR 2025, 400 hours lifetime
Dual Bluetooth
Two simultaneous BLE connections

ECG and accelerometer raw data are accessed via Polar's SDK using custom GATT characteristics — not available through standard fitness apps.

Standard ECG Morphology (P-QRS-T)
P QRS T Atrial Depolarization (P) Ventricular Depolarization (QRS) Repolarization (T)

The QRS Structure

The QRS complex is the most prominent feature of an ECG signal. It represents the rapid depolarization of the left and right ventricles. Because the ventricles contain more muscle mass than the atria, the QRS complex is much larger than the P wave.

Our detection pipeline focuses on the R-peak (the highest point) as a temporal anchor. We measure the QRS width (from the start of the Q-wave to the end of the S-wave) to distinguish between narrow-complex (supraventricular) and wide-complex (ventricular) events.

Technical Deep Dive: Signal Characteristics
  • Sampling Rate: 130 Hz native sampling. Each second of data contains 130 voltage measurements.
  • Lead Configuration: Single-lead (equivalent to Einthoven Lead I/II depending on strap placement).
  • Transmission: Bluetooth Low Energy (BLE) HRP profile for heart rate and a custom GATT characteristic for raw ECG streaming.
  • Bandpass Filter: 4th-order Butterworth bandpass (0.5–25 Hz) to remove baseline wander and high-frequency muscle noise while preserving QRS morphology.

2. Arrhythmia Detection Pipeline

Detecting an arrhythmia requires more than just an AI model. It involves a multi-stage pipeline that cleans, segments, analyzes, and then validates every single heartbeat.

The 6-Stage Detection Pipeline
1
Preprocessing: 0.5–40 Hz Butterworth Bandpass + Z-Score normalization.
2
R-Peak Discovery: Pan-Tompkins algorithm locates the heart's electrical anchors.
3
Morphology AI: 1D-CNN classifies the 1-second window around each peak.
4
Hybrid Timing Logic: 4-gate ectopic detector — prematurity check, compensatory pause, pair-sum validation, and return-to-baseline.
5
Pattern Recognition: Groups beats into sequences like Bigeminy, Trigeminy, or VT.
6
Rhythm Classification: Run-based AFIB detection — distinguishes atrial fibrillation from ectopic beats by counting consecutive irregular RR intervals.

Morphology vs. Timing

Arrhythmias are detected using two complementary methods:

  • Morphology (The Shape): The AI looks for "Wide and Bizarre" QRS complexes, which are the hallmark of PVCs (Premature Ventricular Contractions).
  • Timing (The Rhythm): Some events, like PACs (Premature Atrial Contractions), may look morphologically normal but appear "early" compared to the baseline rhythm. We use a 4-gate state machine to catch these: Gate 1 detects prematurity (≥20% early), Gates 2+3 validate the compensatory pause, and Gate 4 confirms return to baseline rhythm.

Distinguishing AFIB from Ectopic Beats

Atrial Fibrillation and ectopic beats both produce irregular RR intervals, but they are fundamentally different arrhythmias. Ectopic beats are isolated extra beats — 1 to 3 consecutive irregular intervals with a compensatory pause. AFIB is a continuous, chaotic rhythm — many consecutive irregular intervals with no compensatory pattern.

Our run-based AFIB detector classifies runs of consecutive irregular RR intervals:

  • 1–3 consecutive irregular beats: Ectopic (already detected by the 4-gate timing logic)
  • 3+ with alternating short-long pattern: Bigeminy or trigeminy (detected by pattern recognition)
  • 5+ consecutive irregular beats with no alternating pattern: AFIB — confirmed by coefficient of variation (CoV > 12%) and morphology validation

Additionally, a CoV fallback detector catches sustained irregularity (CoV > 30% over 20 beats) that doesn't form clean runs, and an ectopic cluster reclassifier converts dense ectopic clusters (5+ ectopics in 10 seconds) into AFIB detections. During confirmed AFIB periods, individual ectopic detections are suppressed to prevent false positives from AFIB's chaotic rhythm.

Technical Deep Dive: The Neural Network (AgeV4)

Arrhythmia Agent: Uses a 1D-Convolutional Neural Network (1D-CNN) trained on the MIT-BIH Arrhythmia Database. It analyzes a 1-second window (130 samples) centered on the R-peak (43 samples before, 87 after).

Rule-Based Overrides: To prevent false positives, we apply a "Safety Guard." If the AI classifies a beat as a PVC ('V') but the calculated QRS width is less than 50ms, it is automatically reverted to a Normal ('N') classification, as true ventricular beats are physiologically wider.

Validation Results: Test Pipeline (182 files, 4 datasets)

The detection pipeline was validated against four open-access ECG databases, totalling 182 files and 2,628 annotated arrhythmia events:

  • VitalDB (87 files): Clinical ECG recordings from surgical patients — diverse arrhythmias including AFIB, bigeminy, VT, and bradycardia.
  • SHDB (7 files): Smart Heart Database — Polar H10 recordings from confirmed AFIB patients, providing sensor-matched validation.
  • PhysioNet Apnea-ECG (70 files): Sleep apnea annotations for validating the apnea detection agent.
  • Zenodo Cyclist (20 files): High heart rate ECG during cycling — stress-tests ectopic detection under exercise conditions.

Key results after implementing run-based AFIB detection:

  • 80% reduction in AFIB/ectopic type mismatches — the run-based approach correctly distinguishes AFIB from ectopic beats by counting consecutive irregular intervals.
  • AFIB detection count closely matches ground truth (51 detected vs 39 annotated) — down from 108 false detections with the previous CoV-only approach.
  • Precision improved to 55.5% (from 48.8%) while sensitivity increased to 25.0% (from 23.4%).

Note: The Icentia11k dataset (17,589 events from a chest patch device) was used for early ectopic tuning but excluded from final validation as chest patch RR data is not representative of the Polar H10 chest strap.

Dashboard Re-Classify: Retrospective Second Opinion

The dashboard's Re-Classify (Full Agent) button performs a retrospective re-analysis of the entire session using the full ECG waveform — not just the RR intervals recorded by the phone. It runs the same run-based AFIB detection as the phone app, plus additional detectors that require full-session context:

  • Run-based AFIB detection: Same 5+ consecutive irregular beat logic as the phone, with CoV fallback and morphology validation.
  • Morphology template scan: Builds a median beat template from clean beats and flags any beat whose shape differs significantly (Pearson correlation < 0.70). This catches interpolated PVCs — beats with abnormal QRS morphology but normal RR timing that the phone's 4-gate timing detector cannot see.
  • HRV-suppressed detector: Scans for 60-second windows with abnormally low SDNN, indicating concealed bigeminy or trigeminy masquerading as regular rhythm.
  • Re-windowing fix: Corrects bloated ectopic snapshot regions from older phone sessions to tight ±300ms windows.
  • TFLite model re-classification: Re-runs the 1D-CNN classifier on re-windowed beats with the full session median RR for better local context.

Findings are presented as accept/reject cards in the sidebar, allowing users to review each suggested change before applying it. Corrected CSVs are saved to the PC only — the original file on the phone is not modified.

3. Dual-Agent AI Architecture

Analysis is performed by two independent Neural Networks, collectively referred to as the AgeV4 architecture. These agents are optimized for on-device inference using TensorFlow Lite.

1D-CNN Architecture (Simplified)
INPUT
130 samples
CONV 1D
Feature extraction
POOLING
Downsampling
DENSE
Classification
OUTPUT
Probabilities

Agent 2: Apnea Detector

A temporal monitor that looks for long-term patterns in heart rate variability associated with breathing cessation events during sleep.

Technical Deep Dive: Apnea Architecture

Apnea Agent: A Temporal 1D-CNN with Global Max Pooling. It analyzes 60-second windows (7,800 samples) to detect Respiratory Sinus Arrhythmia (RSA) disruptions. Input: (batch, 7800, 1). Binary output (Apnea/Normal). Trained on the PhysioNet Apnea-ECG Database.

4. The Mobile Engine

The Android app serves as the real-time processing hub. It performs signal denoising, beat detection, and AI inference without ever sending your raw data to a cloud server.

Z-Score Normalization Formula
z = (x - μ) / σ
Ensures the AI sees the shape of the beat, regardless of signal amplitude.

Privacy & Efficiency

By running the neural networks locally (on-device), we achieve two goals: Total Privacy (your ECG never leaves your phone) and Real-time Feedback (latency is measured in milliseconds, not seconds).

Technical Deep Dive: Preprocessing Pipeline
  1. Pan-Tompkins Algorithm: A digital bandpass filter (5-15Hz) followed by derivative and squaring operations to isolate the QRS spike.
  2. Z-Score Normalization: Each window is normalized (val - mean) / std to make the AI invariant to sensor gain or skin contact quality.
  3. Event Stitching: To save space, the app can export "Events Only" files which contain high-resolution 130Hz data only around detected anomalies, while maintaining a 1Hz trend for the rest of the session.

5. Sleep & Respiratory Science

When you select the Sleeping activity, the app activates a specialized multi-modal analysis pipeline combining heart rate, HRV, and accelerometer data.

Sleep Stage Motion (ENMO) HRV (RMSSD)
Wake High (>0.05g) Variable
REM Low (<0.01g) High (>45ms)
Light Low (<0.01g) Medium (25-45ms)
Deep Zero (<0.005g) Low (<25ms)

Sleep Staging (Hypnogram)

We classify sleep into Wake, Light, Deep, and REM using a proprietary algorithm based on two primary inputs:

  • Motion (ENMO std): The standard deviation of gravity-subtracted acceleration identifies waking periods.
  • HRV (RMSSD): High RMSSD with low motion indicates REM sleep; low RMSSD with zero motion typically indicates Deep sleep.

Respiratory Rate Estimation

While you sleep, your chest movement modulates the accelerometer signal. We use a windowed Fast Fourier Transform (FFT) on the Z-axis (up/down) movement to isolate the breathing frequency (typically 0.1 to 0.5 Hz).

FFT: Movement to Breathing Rate
1. Raw ACC Z (Time Domain)
↴ FFT
2. Power Spectrum (Frequency Domain)
14 Breaths/Min

6. Biofeedback & Coherence Training

The Polar H10 doesn't just measure your heart — it can help you actively improve it. Our guided meditation turns the same chest-strap data into a real-time, closed-loop biofeedback session. Tiny accelerometer movements from your chest are fused with your heart rate and beat-to-beat (RR) intervals, and the result is fed back to you as adaptive audio that responds to your body in real time.

A Closed Loop: Measure → Guide → Improve

  1. Measure: The H10 streams ECG, RR intervals, and 3-axis accelerometer data at up to 130 Hz.
  2. Estimate breathing: A windowed FFT on the ACC Z-axis isolates your chest-movement frequency (the same approach used in our sleep respiratory pipeline).
  3. Guide: The audio engine paces your breathing around a resonance frequency (~6 breaths per minute) and adjusts the sound based on your live biometric state.
  4. Improve: Resonance breathing strengthens parasympathetic tone, which typically raises HRV (RMSSD) over the session.

Four Adaptive Sound Modes

You can choose the feedback style on the duration picker and switch it mid-session. The preference is remembered between sessions.

  • Spatial Tone: A fixed 5-second in / 5-second out breathing cycle delivered as immersive stereo audio. Best for learning the rhythm.
  • Breath-Driven: The audio pacer follows your actual, real-time chest movement from ACC, so the cue matches your natural breathing rather than forcing a fixed cadence.
  • HRV Coherence: A continuous drone whose pitch and brightness shift with your HRV trend, giving you instant sonic feedback on how coherent your nervous system is becoming.
  • Heartbeat: A low-frequency pulse timed to your actual heartbeat and RR intervals, turning your own cardiac rhythm into a calming, embodied sound.
Biofeedback Loop
ACC chest movement + ECG / RR / BPM Adaptive audio Higher HRV

This is the kind of feature many apps charge for as a standalone subscription. In Your Rhythm Studio, it is included in the free Android app — because the best use of heart data is not just to report it, but to help you change it.

7. HRV & RHR Baselines

The most important data point in Your Rhythm Studio is your Morning Baseline. Your autonomic nervous system is a sensitive indicator of stress, recovery, and impending illness.

The Autonomic Nervous System and the Heart

Your heart rate is constantly modulated by two opposing branches of the ANS:

  • Sympathetic ("fight or flight") — speeds the heart, suppresses HRV. Activated by stress, exercise, fear.
  • Parasympathetic ("rest and digest") — slows the heart, increases HRV. Dominant during sleep and recovery.

HRV is the net result of this push-pull balance. When parasympathetic activity is high (you are calm, rested, recovered), the intervals between heartbeats vary more — a sign the brain is actively fine-tuning cardiac output. When sympathetic activity dominates (exercise, stress, illness), intervals become more uniform and HRV falls.

RMSSD Calculation
RMSSD = √[ mean( (RRi+1 - RRi)2 ) ]
Quantifies the variation between consecutive heartbeats.

RMSSD Interpretation Ranges

RMSSD Range Interpretation Typical Context
< 15 msVery LowHigh stress / illness / exercise peak
15–30 msLowModerate stress / light activity
30–60 msNormalHealthy resting adult
60–100 msGoodWell-recovered / high fitness
> 100 msExcellentAthletes, deep sleep, vagal dominance

Important: RMSSD values are highly individual. Track your own baseline over time rather than comparing to published population averages.

Resting Heart Rate (RHR) Interpretation

RHR Range Status Interpretation
< 50 bpmLowVery fit or possible bradycardia
50–60 bpmGoodExcellent cardiovascular fitness
60–80 bpmNormalNormal resting range
80–100 bpmElevatedMay indicate stress or poor recovery
> 100 bpmHighPossible health concern

Why "First Thing in the Morning"?

Measurements taken after coffee, stress, or a commute are "contaminated" by sympathetic activation. For a true baseline, you should measure RHR and HRV while sitting or lying still immediately after waking. This represents your body's "ready state" for the day.

Resting Heart Rate (RHR): An indicator of overall cardiovascular efficiency. A rising RHR often precedes symptoms of overtraining or viral infection.

HRV (RMSSD): An indicator of parasympathetic (recovery) dominance. A significant drop in your morning HRV suggests that your nervous system is still under stress from previous days.

8. Heart Rate Recovery Science

Heart Rate Recovery (HRR) measures how quickly your heart rate returns to baseline after exertion. It is a well-established clinical indicator of cardiovascular fitness and autonomic health.

The phone app measures your recovery using the Cool Down activity. It records your heart rate at the moment you select Cool Down (your peak HR) and again 60 seconds later (your recovery HR).

Rather than reporting the raw BPM drop, the app stores your relative recovery percentage. This scales the drop to how hard your heart was working, making it easier to compare recovery across different intensities.

HRR Percentage Formula
HRR % = ((HRpeak − HR60s) / HRpeak) × 100

For example, if your peak HR was 150 bpm and your HR after 60 seconds was 120 bpm, your HRR would be 20%. If your peak was 180 bpm and your recovery HR was 144 bpm, your HRR would also be 20%.

HRR Interpretation

HRR % Interpretation
> 20%Good — typically indicates healthy cardiovascular recovery
10–20%Average — normal for many people after moderate exertion
5–10%Below Average — recovery is slower than typical
< 5%Poor — very slow recovery; consider rest or medical review if persistent

Best practice: Use the same peak-effort protocol each time (e.g. finish a hard effort, immediately select Cool Down) so the percentage is comparable day-to-day.

9. Training Zones & Exercise Physiology

Heart rate zones divide your effort into training intensities based on a percentage of your maximum heart rate. The dashboard and phone app use the Karvonen method, which factors in your resting heart rate for personalised zones.

Karvonen Formula
Target HR = ((Max HR − Resting HR) × %Intensity) + Resting HR
Max HR defaults to 220 − age, but can be manually overridden in Settings.
Zone Name % Max HR Purpose
Z1Recovery50–60%Warm-up, cool-down, active rest
Z2Base / Aerobic60–70%Fat oxidation, aerobic base building
Z3Tempo70–80%Aerobic capacity, lactate threshold
Z4Threshold80–90%Lactate threshold improvement
Z5Max / VO2max90–100%Speed, power, VO2max

Zone boundaries are calculated automatically from your age and resting HR, but can be manually adjusted in the phone app's Settings → Heart Rate Zones section. The dashboard displays zones as a coloured band beneath the ECG trace when the Zone toggle is enabled.

10. Clinical References & Datasets

Our models and algorithms are built upon decades of clinical research and open-access databases.

  • MIT-BIH Arrhythmia Database: Used for training the beat-level classification agent.
  • PhysioNet Apnea-ECG Database: Used for training the sleep disordered breathing agent.
  • VitalDB: Clinical ECG dataset from surgical patients — used for validating arrhythmia detection across diverse cardiac conditions.
  • Smart Heart Database (SHDB): Polar H10 recordings from confirmed AFIB patients — sensor-matched validation for atrial fibrillation detection.
  • Zenodo Cyclist ECG: High heart rate cycling ECG recordings — used for stress-testing ectopic detection under exercise conditions.
  • Task Force on HRV (1996): Standards for measurement, physiological interpretation, and clinical use of HRV.
  • Pan & Tompkins (1985): A real-time QRS detection algorithm for ECG signals.
  • Siegmund et al. (2022): Validity of the Polar H10 sensor for HRV analysis during rest and exercise. Sensors, 22(17).
  • Gilgen et al. (2023): Validation of Polar H10 chest strap vs. Holter in cardiac patients. Europace, 25(Suppl 1).
  • Polar H10 White Paper: RR interval accuracy of 2 ms. Polar Electro Oy.