Sleep Stage Identifyer Algorithm - Develpment

  • Tuesday, May 6, 2025

Here is how we developed a system that iddentifies the sleep stages:

We used a data array of 10 values combining heart rate and acceleration readings. From this input we were able to extract five key features:

  • Two Burg coefficients (calculated from heart rate)
  • Prediction error from the Burg model
  • Mean heart rate
  • Acceleration

These features were used to classify sleep into three stages:

  • 🟢 Awake
  • 🟡 Light Sleep
  • 🔵 Deep Sleep

How it works

  1. Learning Phase The system first learns from labeled data — known examples of each sleep stage — and creates representative clusters for each stage.

  2. Live Classification During real-time use, the system compares the current data vector to each cluster and assigns the sleep stage based on the closest match.

  3. Smoother Transitions To avoid abrupt stage changes, we implemented a two-phase memory mechanism that ensures smoother, more natural transitions.


Examples of graphs developed

Sleep Stages Graph SSI