World Sleep Industry ENCYCLOPEDIA

Actigraphy And Position Analysis Algorithms

4.4.1

Definition, tasks, and limits of use

Actigraphy and position analysis algorithms transform continuous acceleration, angular velocity, bed motion, pressure, or video into activity intensity, movement events, estimated sleep and wake, in-bed intervals, turns, and postures such as supine, prone, left lateral, and right lateral. These outputs answer different questions. Wrist actigraphy suits multinight sleep-wake patterns, torso sensors better represent body position, and under-bed systems measure mechanical changes across the bed.

Movement is a proxy for sleep, not electrophysiological sleep itself. Quiet wake is often mislabeled as sleep, while turning, periodic limb movement, or a bed partner's motion during sleep may be labeled wake. Algorithms can estimate total sleep time, onset, wake after sleep onset, and sleep efficiency, but movement alone cannot fully reproduce PSG staging, arousals, respiratory events, or periodic limb movement scoring.

Position also needs an anatomical target. Wrist orientation, head direction, neck posture, and torso posture are not the same variable. Positional breathing analysis often concerns body or head-neck posture when events occur, while pressure-injury management may concern contact surface and sustained loading. A system must state where the sensor is, which body segment the label represents, and whether the output supports trends, clinical review, or intervention control.

Sensors, coordinates, and calibration

A triaxial accelerometer senses gravity and dynamic acceleration, a gyroscope adds angular velocity, and a magnetometer may supply heading but is vulnerable to environmental magnetic fields. Watches, rings, chest patches, neck devices, waist units, and mattress sensors have different coordinate meanings. Sampling rate, range, resolution, filters, sensor-axis definitions, and timestamps should be retained; a vendor's summarized activity count is not a universal physical unit.

Posture classification first maps device coordinates to anatomical axes. Attachment angle, looseness, wrist side, a tilted chest patch, and overnight rotation all change the gravity vector, and boundaries from one night may fail after reattachment. Initialization pose, self-calibration, orientation continuity, and recalibration rules need explicit records. When sensor shift cannot be distinguished from a real turn, the output should carry low confidence.

Noncontact bed sensing mixes the participant, bed partner, pets, frame, and environmental vibration. Video is limited by bedding, lighting, view, and privacy. Wrist signals depend on reading in bed, habitual hand motion, and daytime removal. Sensor fusion can reduce ambiguity, but every channel has a different spatial footprint and failure mode. The system should establish who moved and which body part moved before interpreting sleep or posture.

Preprocessing, nonwear, and movement events

Preprocessing generally includes synchronization, resampling, gravity removal or orientation estimation, bandwidth control, artifact detection, and windowed features. Activity may be represented by axis change, vector magnitude, angle range, energy, or learned features. Window length and smoothing alter short-movement and turn counts, so thresholds and aggregation rules require versioning. Metrics derived from raw acceleration are also not directly comparable with proprietary activity counts.

Nonwear, charging, detachment, and clipping must be separated from true immobility. Runs of zeros, implausibly constant temperature, optical contact, impedance, or diary information may help, but available evidence varies by device. Treating nonwear as sleep inflates total sleep time; treating a removed watch as wake creates a long false awakening. Valid-wear intervals should be an independent output with a route for manual correction.

A movement event may be a brief limb action, whole-body turn, rising from bed, or device impact. Boundaries need onset, offset, minimum persistence, merging, and invalid-gap rules. A large wrist motion need not indicate a body turn, and a torso angle change need not have high activity. Separate models for activity intensity and posture transition are usually clearer than one threshold intended to explain every movement.

Sleep-wake and rhythm estimation

Classical actigraphy weights activity around a target epoch to classify sleep or wake; newer models use raw acceleration, arm angle, optical pulse, temperature, and longer temporal context. Both tend to favor sleep detection and miss motionless wake. Sleep sensitivity and wake specificity should be reported together, because a high overall accuracy can conceal systematic bias in insomnia or fragmented sleep.

A sleep interval is not determined only by epoch labels; it also requires bed entry, attempt to sleep, final awakening, and bed exit. Diaries, event buttons, ambient light, and device status help constrain the interval but can be missing. The algorithm should retain automatic boundaries, edits, and evidence sources and distinguish time in bed, sleep opportunity, and estimated sleep time so similarly named outcomes do not hide different denominators.

The strength of multinight actigraphy is description of timing, regularity, day-night distribution, and trends before and after an intervention, not single-night microstructure. Missing days, shifts, naps, time-zone travel, switching wrists, and daylight-saving changes alter rhythm interpretation. Analysis should preserve calendar continuity and local time, diary events, and missingness and abstain from a stable rhythm conclusion when coverage is insufficient.

Posture classes and position-dependent indices

Torso posture can be discretized from the gravity vector into supine, prone, left lateral, right lateral, and upright, or retained as continuous roll and pitch. Broad categories simplify clinical reporting but force near-boundary oblique postures into one class. Continuous angles add resolution but are more sensitive to calibration and sensor slip. Hysteresis and confidence around boundaries reduce rapid class switching.

Head-neck direction can differ from the torso, especially with pillow support, partial lateral rotation, or an elevated bed head. A chest sensor does not automatically represent head position, and wrist orientation certainly does not represent body side. If positional OSA assessment or therapy depends on head-neck information, a corresponding sensor or video reference is needed and should be reported separately rather than inferred from torso class.

Position-specific respiratory indices match every respiratory event to valid sleep and posture at that time and then compute rates for each posture. Too little exposure in a posture makes a ratio unstable, while errors in automated sleep and position affect both numerator and denominator. Reports should provide valid sleep duration, event count, confidence, and minimum interpretable exposure for every posture instead of only a positional label.

Labels, data, and performance validation

Sleep-wake labels should ordinarily come from synchronized PSG, while posture reference may come from synchronized video, observation, or a validated body sensor; timing must be aligned precisely. The reference should define epoch, posture categories, bedding obstruction, whether head and torso are separate, and the annotator. Another unvalidated wearable or the same device's prior algorithm can establish agreement, not accuracy.

Training, tuning, and testing must be separated by participant and night and cover age, body habitus, mobility, insomnia, sleep-disordered breathing, neurological conditions, shifts, bed partners, and attachment styles. Children, older adults, people with limited mobility, and ordinary adults have different motion-sleep relations. Nonwear, low-motion wake, and high-motion sleep should remain represented, with excluded nights and analyzable proportion reported.

Epoch-level validation should report sleep and wake sensitivity, specificity, F1, confusion matrices, and transition-boundary error. Posture validation needs class-wise metrics, angular error, and turn detection. Record-level analysis then compares bias and agreement for total sleep time, sleep-onset latency, wake after sleep onset, sleep efficiency, time in each posture, and transition counts. Correlation cannot replace agreement and individual-error analysis.

Deployment, reporting, and future directions

A deployment interface should expose raw activity or angle trends, wear quality, automatic sleep windows, position, and edits, allowing a user or professional to mark removal, naps, bedtimes, and atypical nights. Insufficient data must remain a valid state; a long motionless segment cannot automatically become sleep. Hardware, firmware, attachment site, threshold, and model updates all need regression testing and traceable versions.

Selection starts with the use and time scale: multinight rhythm, support for insomnia assessment, sleep-time estimation in HSAT, position-dependent breathing analysis, positional-therapy feedback, or general wellness trends. The next checks are sensor site, raw-data availability, nonwear handling, target population, external validation, and human review. Actigraphy does not replace leg EMG for PLMD diagnosis or PSG when PSG is indicated.

Future directions include personalized detection of quiet wake, joint head-neck and torso posture, uncertainty-aware multisensor fusion, open raw metrics, and privacy-preserving home validation. A better algorithm says when it does not know instead of forcing every epoch into a class. Adaptive updates still require bounded changes, prespecified validation, drift monitoring, and rollback so longitudinal trends remain interpretable across hardware and software versions.