a session falling asleep — accelerometer calming, audio tasks thinning, predicted SOL descending

WEARABLE INTERVENTION SYSTEM FOR INSOMNIA

A computational approach to modeling and controlling sleep onset dynamics


role: end-to-end design and engineering

technology: watchOS/iOS, SwiftUI/Swift, Python

date: 2023 — 2024

links: Master's Thesis (MIT)

Zzzonic is a sleep-aid system for wearables that treats falling asleep as a control problem.

The system has three components: a multi-modal interface that delivers audio tasks and harvests behavioral signals, a predictor that turns those signals into a real-time estimate of sleep onset latency (SOL), and a controller that uses that prediction to strike a balance between engaging the user without keeping them awake. Zzzonic was evaluated through user trials run throughout its development — 49 sessions across 11 participants.

The Interface

The multimodal interface is designed to occupy the mind while collecting behavioral data for the predictor, all from the comfort of bed. The intensity of the experience is shaped by cadence (spacing between tasks), difficulty (tone discriminability), and volume.

User testing found that cadence had the greatest impact on perceived intensity, while volume was the most disruptive and changes in difficulty were largely imperceptible. Future work should explore less arousing stimuli, such as brief light flashes delivered through an eye mask, to improve compatibility with sleep.

prototype 1

Built with a website to quickly distribute and test basic elements of the interaction.

User testing revealed the experience was relaxing but required smarter control of the audio to be effective.

It also revealed a browser-based app limited control over system features (like screensavers) and made accidental browser interactions disruptive.

prototype 2

Built using a native iOS app to refine the interaction, offer better control over system features and test other modalities such as haptic feedback.

User testing revealed the audio control improved but was still insufficient.

It also revealed:

  • A) the need for customized audio since sounds are not universally relaxing
  • B) haptic feedback tended to increase arousal rather than relaxation
  • C) the required position restricted comfort in bed

prototype 3

Built as a stand-alone watchOS app to liberate the user from specific positions, utilize advanced health sensing for better audio control and test different interaction modalities.

User testing revealed insufficient but significant improvement of the audio control using wearable sensors.

A natural progression would be:

  • A) test the use of a DNN for improved sleep onset latency prediction and task control
  • B) offload analysis and control to a mobile app to improve battery life and robustness
  • C) experiment with shorter stimuli for tasks and other devices, such as a smart-mask

SCREEN INTERFACE

Apple Watch interface walkthrough: post-sleep rating, pre-sleep survey, start button, and user settings

The Predictor

The predictor estimates how much time remains before a user falls asleep (SOL), providing the feedback signal for the controller. To do this it uses behavioral signals, such as response latency and gesture magnitude, which are proxies for cognitive acuity and muscle tone, both of which decline as sleep approaches.

For evaluation, a simple linear predictor combined actigraphy and these signals to estimate SOL. It successfully tracked changes in sleepiness but consistently predicted longer sleep onset latencies than observed. Future work should explore per-user calibration, dynamic signal weighting, additional sensing modalities, and machine learning.

fig 3: composite SOL prediction builder — toggle indicators to rebuild the estimate

The Controller

The controller uses the predictor's sleepiness estimate (SOL) to adjust task intensity, turning sleep tracking into an active intervention that crowds out intrusive thoughts while minimizing arousal. It must strike a balance: tasks that are too demanding delay sleep onset, while tasks that are too sparse allow rumination to return.

A simple rational function was used as the control policy, but there was no evidence that it reduced SOL. User reports instead indicated that cadence, the timing between prompts, was the dominant factor: prompts that were too frequent delayed sleep onset, while those that were too sparse induced anticipatory arousal. More accurate SOL prediction and principled feedback control (e.g., PID) may improve performance.

fig 5: the "X-pattern" test — toggle the ideal controller to compare

The System

The system treats the human–computer interaction as a closed-loop controller that aims to minimize sleep onset latency (SOL). The interface occupies the mind while collecting behavioral data, the predictor estimates sleepiness from those signals and actigraphy, and the controller adjusts task intensity in response. Together, these components form an adaptive intervention rather than a passive sleep tracker.

fig 1: one interaction traced through the closed loop — interface → predictor → controller

projects/zzzonic/01