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
-
Learning Phase The system first learns from labeled data — known examples of each sleep stage — and creates representative clusters for each stage.
-
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.
-
Smoother Transitions To avoid abrupt stage changes, we implemented a two-phase memory mechanism that ensures smoother, more natural transitions.
Examples of graphs developed
