Download Markdown Download PDF
Provenance
This breathing-volume model is repository-specific code ported from the existing Unity runtime. It is not presented as a published external method reference.
Important status note:
- this ACC breathing-volume model has not yet been externally validated
- a validation study is actively being worked on
Data Path
- input stream: PMD accelerometer samples from the Polar H10
- preprocessing: exponential moving average on the raw ACC signal
- calibration: estimate a center point and a principal breathing axis from a calibration window
- projection: map filtered ACC onto the chosen breathing axis
- bounds: derive lower and upper projection bounds from calibration quantiles
- output: convert the projected signal into a
0..1breathing-volume estimate
In the notation below, a_raw(t) is the raw accelerometer vector at time t,
a_f(t) is the filtered vector, alpha is the smoothing factor, c is the
calibration center, u is the dominant breathing axis, p(t) is the scalar
projection onto that axis, and Q_lower / Q_upper are the calibration
quantile operators used to define a practical operating range. The tracker
works in accelerometer coordinates internally and only turns the signal into a
single breathing scalar after the projection step.
Core Approximation
Filtered ACC sample:
This smooths the raw accelerometer stream so the later breathing estimate is less sensitive to frame-level jitter.
Calibration center:
This is the average filtered posture during calibration and acts as the reference point for later motion.
Principal-axis projection:
Where u is the dominant calibration axis estimated from the calibration-window
covariance.
This projection turns 3-D chest motion into one signed scalar that should rise and fall mainly along the learned breathing direction.
If the optional XZ model is available, the tracker also keeps a 2-D projection
in the chest plane:
This is the same idea as p(t), but constrained to the chest plane for the
optional XZ model.
Lower and upper projection bounds come from calibration quantiles:
These bounds define the expected low and high ends of the breathing excursion without trusting a single noisy minimum or maximum sample.
The runtime then applies the configured edge-ease and optional adaptive-bounds updates before mapping the projection to volume:
This maps the projected motion into a normalized 0..1 breathing volume, where
values near 0 sit near the lower calibration bound and values near 1 sit
near the upper calibration bound.
The final base volume uses either the 3-D axis model or the XZ model,
depending on the tracker settings. The displayed output may then be inverted if
the configured inhale/exhale direction is flipped.
State Classification
The tracker derives Inhaling, Exhaling, and Pausing from the first
difference of the output volume:
Positive Delta v means the estimated volume is rising, negative Delta v
means it is falling, and values near zero mean the tracker sees little movement
in either direction.
InhalingwhenDelta vexceeds the configured positive thresholdExhalingwhenDelta vis below the negative thresholdPausingotherwise
Alignment Status
There is no external paper claim here. The correct interpretation is:
- this page documents what the app computes
- the model is intended as a practical ACC-only breathing approximation
- external validation is still pending