Architecture Overview
The Velo-X signal pipeline runs entirely on-device. No data is transmitted to external servers during normal operation. The processing chain consists of four sequential stages: acquisition, classification, decision, and actuation.
| Sensor | Rate | Buffer | Notes |
|---|---|---|---|
| EOG (differential) | 256 Hz | 4 s rolling | Bandpass 0.3–40 Hz |
| PPG (IR + red) | 64 Hz | 30 s rolling | Ambient subtracted |
| IMU (accel + gyro) | 50 Hz | 8 s rolling | Low-power mode |
| Temp (skin contact) | 1 Hz | 60 s rolling | Contact detection only |
Total pipeline latency from REM onset to first possible cue: 8–20 minutes (configurable, default 8 min). Average current draw during active processing: 1.8 mA.
LED Intensity & Pulse Configuration
The LED driver operates in constant-current mode with 12-bit PWM resolution. Intensity is specified in cd/m² at the diffuser surface. The sub-threshold target is the intensity at which a cue is reliably processed by the visual cortex during REM without triggering arousal.
| Level | cd/m² | Typical use | Arousal risk |
|---|---|---|---|
| 1 | 0.02 | Initial calibration | Negligible |
| 2 | 0.04 | Sensitive users | Very low |
| 3 | 0.08 | Default | Low |
| 4 | 0.14 | Tolerance plateau | Moderate |
| 5 | 0.22 | High threshold users | Moderate-high |
| 6 | 0.40 | Maximum recommended | High |
| 7 | 0.80 | Research / override | Very high |
| Parameter | Default | Range | Notes |
|---|---|---|---|
| Pulse count | 2 | 1 – 6 | Per cue event |
| ON duration | 50 ms | 20 – 200 ms | LED active period |
| OFF duration | 600 ms | 300 – 1200 ms | Inter-pulse gap |
| Cue cooldown | 8 min | 4 – 30 min | Min. time between cues |
| Max cues/night | 6 | 1 – 12 | Safety ceiling |
REM Detection Pipeline
REM classification uses a 14-feature decision tree evaluated every 2 seconds. On-device accuracy: 91.3% sensitivity, 88.7% specificity at the default threshold of 65.
- EOG features (6): movement rate, amplitude, saccade burst density, waveform asymmetry, HF content ratio, impedance delta
- HRV features (5): mean RR interval, RMSSD, LF/HF power ratio, RR trend, autonomic suppression index
- Motion features (3): micro-movement count, postural stability score, voluntary movement probability
If cues consistently wake you: raise threshold by 5 points. If few REM windows detected: lower by 3 points. Adjust in single steps with at least 5 nights between changes. Do not go below 50.
Adaptive Threshold Algorithm
The adaptive algorithm adjusts cue intensity based on physiological response to previous cues. It operates on a 7-night rolling window and updates once per night after the session ends.
| Class | Criteria | Action |
|---|---|---|
| Arousal | HRV drops >15%, motion events >2, waking EOG pattern | Decrease intensity –1 |
| Integration | EOG change, no arousal markers, stable HRV | Maintain or increase +1 |
| Null | No detectable physiological response | Increase +1 after 3× null |
| Parameter | Default | Range | Effect |
|---|---|---|---|
| learning_rate | 0.20 | 0.05–0.5 | EMA weight for new observations |
| arousal_weight | 2.0 | 1.0–4.0 | Penalty multiplier for arousal |
| null_patience | 3 | 1–6 | Nulls before intensity increase |
| max_delta_per_night | 1 | 0–3 | Max intensity steps per session |
HRV Integration
Heart rate variability serves two functions: sleep depth estimation and post-cue arousal detection. The HRV gate blocks cue issuance when LF/HF exceeds 2.5 — preventing cues during transitional sleep phases even when the EOG classifier reports REM-active.
RMSSD is the primary metric for beat-to-beat variation. A declining RMSSD trend over multiple nights suggests the protocol is adding physiological load. Pause if RMSSD drops more than 10% below your 14-night baseline for three consecutive nights.
Motion Artifact Filtering
Motion artifacts contaminate both EOG and PPG signals. The IMU provides a reference channel for artifact subtraction using adaptive LMS filtering.
- Micro-movements: sub-threshold shifts during active sleep — expected in REM, included in feature set
- Macro-movements: repositioning, partial arousals — trigger a 45-second blanking window with no cues and flagged classifier output
If motion artifact quality score is consistently below 60: check strap tension, reposition EOG contacts on the orbital bone, run fit diagnostic for 3 consecutive nights.
Timing Windows
Three independent window parameters control the temporal envelope for cue issuance:
| Parameter | Default | Range | Purpose |
|---|---|---|---|
| onset_delay | 8 min | 4–30 min | Min time from REM onset to first cue |
| session_start | 90 min | 20–180 min | Earliest time after sleep onset |
| session_end | 60 min | 0–180 min | Buffer before planned wake |
| Use case | onset_delay | session_start | Notes |
|---|---|---|---|
| Default | 8 min | 90 min | Most users, first 30 nights |
| WBTB supplement | 4 min | 20 min | After re-entry |
| High-arousal user | 12 min | 120 min | Fragmentation history |
| Advanced / trained | 4 min | 60 min | Post-30 nights |
Advanced Configuration
Advanced configuration is accessible after Night 30. Access via Settings → Developer → Signal Config. All advanced parameters are reset on factory reset.
| Parameter | Default | Range | Description |
|---|---|---|---|
| rem_confidence_threshold | 65 | 50–85 | REM classifier cutoff |
| hrv_gate_lf_hf_max | 2.5 | 1.5–4.0 | HRV gate threshold |
| intensity_learning_rate | 0.20 | 0.05–0.5 | Adaptive EMA weight |
| arousal_penalty_weight | 2.0 | 1.0–4.0 | Arousal response weight |
| max_cues_per_night | 6 | 1–12 | Safety ceiling |
| motion_blank_duration_s | 45 | 20–120 | Post-movement blank window |
Troubleshooting Signal Issues
| Issue | Likely cause | Fix |
|---|---|---|
| High EOG impedance | Skin contact, dry electrodes | Clean with alcohol, reposition |
| REM not detected | Low-amplitude EOG or threshold too high | Lower threshold by 5, check strap |
| Cues wake you | Intensity too high, timing too early | Reduce intensity –2, raise onset_delay |
| No cues despite REM | HRV gate active, timing window blocked | Check LF/HF, verify session_start |
Full Parameter Index
| Parameter | Default | Range | Section |
|---|---|---|---|
| hrv_gate_lf_hf_max | 2.5 | 1.5–4.0 | 05 |
| led_intensity_level | 3 | 1–7 | 02 |
| max_cues_per_night | 6 | 1–12 | 08 |
| motion_blank_duration_s | 45 | 20–120 | 06 |
| null_patience | 3 | 1–6 | 04 |
| onset_delay_min | 8 | 4–30 | 07 |
| pulse_count | 2 | 1–6 | 02 |
| pulse_off_duration_ms | 600 | 300–1200 | 02 |
| rem_confidence_threshold | 65 | 50–85 | 03 |
| session_start_min | 90 | 20–180 | 07 |