DOI : 10.5281/zenodo.24052728
- Open Access

- Authors : Bhageshwari Ratkal, G. Amulya, A. Jyothi, C. Harshitha, Y. Harshitha, P. Laxmi Vashnave, P. Hasini
- Paper ID : IJERTV15IS110128
- Volume & Issue : Volume 15, Issue 11 , November – 2026
- Published (First Online): 08-11-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
AI-Based Sleep and Circadian Rhythm Analysis Using Wearable Data
Bhageshwari Ratkal
Department of Computer Science and Engineering, G. Naryanamma Institute of Technology and Science (for women) Hyderabad,India
G. Amulya
Department of Computer Science and Engineering, G. Naryanamma Institute of Technology and Science (for women) Hyderabad,India
A. Jyothi
Department of Computer Science and Engineering, G. Naryanamma Institute of Technology and Science (for women) Hyderabad,India
C. Harshitha
Department of Computer Science and Engineering G.Naryanamma Institute of Technology and Science(for women) Hyderabad,India
Y. Harshitha
Department of Computer Science and Engineering G.Naryanamma Institute of Technology and Science (for women) Hyderabad,India
P. Laxmi Vashnave
Department of Computer Science and Engineering G.Naryanamma Institute of Technology and Science (for women) Hyderabad,India
P. Hasini
Department of Computer Science and Engineering G.Naryanamma Institute of Technology and Science (for women) Hyderabad,India
Abstract – Sleep and daily activity patterns play a crucial role in determining how healthy a person feels, both physically and mentally. Modern life brings challenges like irregular work hours, shift work and travelling across the zones. These things can mess up the body internal clock known as circadian rhythm. In this study an artificial intelligence system was built to look at sleep and circadian rhythm. The system uses data from sensors that people wear, like fitness trackers, smart watches. The data included things like how active a person is, how well they sleep etc. A special kind of network called a Temporal Convolution Network is used. This kind of model is good at understanding patters over time long-term series of data. The model was trained to predict sleep quality and insomnia risk. To make the system more useful a simulation tool was added. This tool mimics real-life disruptions, like jet-lag, working night shifts. It helps show how these events affect sleep and activity rhythm. The simulated outputs were quantitatively and qualitatively validated against real world wearable datasets, demonstrating high consistency and generalization capability of the proposed approach. Furthermore, the system was optimized for Edge AI deployment, enabling low-latency, on-device inference while ensuring data privacy and reduced dependency on cloud-based computation. The experimental results indicate that the proposed system effectively delivers predictive and interpretable insights for sleep health assessment, circadian behavior analysis and preventive healthcare applications, thereby establishing its potential as a scalable and real-world deployable solution.
Keywords circadian rhythm analysis, temporal convolutional networks, time-series modelling, edge ai
-
INTODUCTION
When people sleep, the body continuously supports the body functions during wake hours. These functions include body recovery from stress of the day and achievement of overall energy balance. In fast-paced cities and urban environments, the bodys natural sleep wake cycle is often disrupted and is not given adequate time to achieve emotional
stability and body recovery through sleep. In addition to affecting physical health and leading to complications such as heart diseases, cough and cold, and a range of mental illnesses, sleep problems can also affect a persons work efficiency and productivity. In fact, research has found that sleep problems are linked to several health and well-being outcomes including heart disease, a weakened immune response, mental health problems, and lower workplace efficiency [7]. For example, Polysomnography measures brain wave activity, blood oxygen levels, heart rate, and body motions to gain a complete assessment of sleep patterns in an individual. While expensive, these tests are typically not done on an ongoing basis. However, the use of machine learning in medicine has enabled real-time interpretation of an individual’s physical functions using software that can learn to recognize changes in bodily signals. When tackling problems related to the human body, many models attempt to categorize various health issues using time-series models. Models that recognize problems related to the human bodys functions and states, such as sleep, include RNNs and LSTMs, among others. However, due to reasons such as calculation cost for sleeping person recognition, long training times, and shrinkage of gradient values, it has been difficult to apply these models. Unlike traditional approaches such as Recurrent Neural Networks that have been proposed to recognize sleeping problems in individuals, Temporal Convolutional Networks offer a much simpler approach to tackle the problem. The model performs computation in parallel, easily changes the receptive fields, and has the same mechanism of learning across the sleeping of an individual. These networks can be used to build a predictive model for the mentioned sleep disorders.
-
LITERATURE SURVEY
In a 2024 paper, [1] the challenges and potential benefits of deep learning in wearable-based sleep assessment were addressed. In a paper entitled “Sleep Quality Forecasting
Using Wearable Sensors by Deep Convolutional Networks”,
[2] a convolutional neural network to detect sleep quality based on data from wearable sensors is designed. The performance was better than traditional sleep quality prediction methods. But it failed to acknowledge time dynamics or circadian patterns on a daily basis. Wearable EEG for sleep tracking and analysis [3].While EEG-based sleep stage classification is accurate, the cost and inconvenience make it impractical for routine use. Hence, research is being conducted into non-invasive, low- cost alternatives. An artificial intelligence smart sleep monitoring system for humans was proposed [4] utilizing IoT systems, offering real-time data collection and processing to enhance user experience, though issues common to most IoT based systems are still evident such as constant connectivity requirements and cloud processing leading to latency and privacy concerns. An artificial intelligence-based personal sleep recommendation system was developed [5] based on individual user behavioural patterns.
While individual, personal content can be engaging, there are issues regarding the maintenance of long-term data and the guarantee of the input data quality. A wearable accelerometer’s use in circadian rhythm analysis was investigated [6]. An extensive review of the current trends and state-of-the-art research is provided for AI based sleep stage scoring and sleep disorder diagnoses [7]. Deep learning algorithms performed the best, however class imbalance and missing data for large-scale, bedside sleep data with concurrent bio-signals were identified as a limitation for model validation. A recent survey conducted [8] looked at different deep learning methods developed in the last few years and noted how these techniques allow researchers to build better models for the classification of sleep stages. Unfortunately, the high amount of computation necessary to complete most of these algorithms will mean that very few of them would be even remotely feasible for use in a limited format.
-
METHADOLOGY
Fig.1 System Architecture Diagram
A different approach emerges when deep learning meets analysis of time series with Temporal Convolution Network. Instead of doing the traditional thing, this esign addresses flaws in existing setups by tackling two goals together estimating sleep duration and detecting insomnia risk.
Convolution blocks of input sequences grow into time-based patterns. With dilation built into the layers, distant connections across time surface clearly, even as computational load stays low. Generalization improves because strategic dropouts prevent reliance on any single pathway. By handling two jobs at once, this approach keeps performance so strong without even needing separate systems. Accessibility grows as more people gain use through everyday technology tools.
The system given in Fig 1 is a client-based and component-based system. In terms of deployment, CDN/Static Hosting is used for the Circadian-AI system, and access is provided via User Browser. External Libraries- It deploys the set of standard HTML/JavaScript libraries (e.g. jQuery) through CDN, as well as scripts and components written specifically for this system. The solution essentially behaves like a client application that is browser based and maintains the states of your application and the session. All user interaction and content insertion are validated in the Client Application. Authentication Service manages the authentication by Supabase Auth. Each session is saved as a JSON web 9 token (as seen in Session Handling). The Application communicates with the Data Storage function to save data like information/user data/model prediction etc. This information is saved for use in the next sessions through the Predictions and User Data. Data Storage > Powered by Supabase Database. The system makes predictions with the help of AI Inference Engine, which runs due to the ONNX Runtime Web, meaning that it performs the AI predictions directly in the browser. The AI Inference Engine loads the stored AI Model locally and runs it. Perform all calculations locally, no need for a connection to an outside server or cloud. The Visualization System elaborates on the results given by the inference process to obtain human-readable outputs for the end user. There is a Charting component Chart.js to render the charts. The results are produced and presented to the user in an interactive Results Dashboard where the design predictions can be viewed by the user in depth.
-
Client-Side Module
The client-side module is the user facing part of the system and is rendered entirely within a web browser. It is responsible for rendering the interface, gathering 11 user input, and validating user actions. Users enter their daily sleep and physiological data for 7 days. Participant completed forms are validated prior to processing, and the module performs normalization, feature scaling as well as cyclic encoding time of the week for bedtime. The model is run using the ONNX Runtime Web java script file, and graphs are rendered using Chart.js. The client code runs entirely locally on the users machine to enable a fast response, low latency, and increased data privacy.
-
Prediction Module
This module is the brain of the system. It analyses input and makes predictions for the input stream. This module uses a pre-trained Temporal Convolutional Network (TCN), implemented here as a lightweight EdgeTCN model that has been converted to ONNX format and is executed directly in the browser. No cloud computing is required. This module is trained on a 7-day window time series and predicts the sleep duration and the probability of insomnia (or wakefulness).These two outputs are processed further to
predict the level of risk and to generate personal recommendations.
-
Server-side and Data Management Module
The server-side module deals with user authentication, session, and persistent data storage. The server-side code is written with Supabase as the server; this allows for email/password and OAuth login methods. The application utilizes token-based authentication to keep the user logged in and safe. All recorded data, user inputs, and prediction results will be stored in a structured database and can be retrieved for trend analysis. To ensure data quality, security, and access rights, the prediction is calculated on the client side, while data consistency is checked by the server.
-
-
IMPLEMENTATION
Fig.2 Training Pipeline Diagram
Fig 2 shows a high-level overview of the training pipeline of the proposed system, which is an offline process, used to train a predictor in advance before deployment on the client- side. The pipeline starts with data collection and as shown in Table 2, the required data for this study were one week of sleep data reading and other relevant signals (i.e., movement, and heart rate) along with answers to certain questions asked to the user to refine the results. The first pipeline component simply preprocesses the provided data to obtain the appropriate input to be used in the following learning-based steps of the pipeline. The data is first pre-processed to deal with missing values, remove anomalous records, and limit values outside of the normal medical range to the edge of the dataset range. Once pre-processed, the data is ready for training. Feature engineering is applied to the pre-processed input data. Numerical features are first normalized via scaling, and features involving time-of-day are mapped to a cyclic representation using sine and cosine functions. As a result, the model outputs a sequence of length 7 of time agnostic, 13 dimensional feature vectors.
The data is transformed into the right format, it is into a model format i.e., into a model training pipeline. Implementation of a Temporal Convolution Network(TCN) using a supervised learning approach. The TCN looks at 7 days at a time and daily data to predict sleep quality and probability of insomnia. Then split the data and uses a portion for training and validation to prevent overfitting. Instead of conventional rest Api, functionality depends on Supabase
tools alongside computations handled directly in the browser, one seed direct interaction taking place: the frontend talks straight to the database. Communication flows without extra layers ,just these two parts linked clearly. This stands out in a simpler way as how they connect, bypassing any middle components. This setup shows a straightforward path where data moves efficiently.
-
RESULTS
Fig.3 Physiological Data Entry
Fig 3 shows where the user enters ISI, PHQ- 9,GAD7,MEQ values if already known or can take the clinically verified questionnaire where the scores are automatically calculated and stored. These values help the system to understand physiological and psychological behaviour of the user. The Insomnia Severity Index(ISI) indicates clinically significant insomnia symptoms. The Patient Health Questionnaire (PHQ-9) used to measure anxiety. The Generalized Anxiety Disorder scale depression severity(GAD-7) suggests anxiety. The Morningness Eveningness Questionnaire (MEQ) is used to determine a person chronotype. This helps in understanding circadian rhythm alignment.
Fig.4 Insomnia Risk Meter
Fig 4 depicts how the insomnia risk is displayed in a meter. The inference engine uses this data also to estimate outcomes such as insomnia risk and sleep time.0 25 % indicates low- risk or healthy sleep, 25%- 50% indicates occasional insomnia
. A moderate risk is indicted if range is in between 50% and 75%.If >75% then it indicates severe insomnia risk.
Fig.5 Prediction Dashboard
Fig 5 shows the predicted sleep for the next day and the recommended target sleep for the good health. Insomnia risk
and average sleep efficiency is given in %. Average Heart rate variability is shown also. The estimated circadian bedtime of the person is shown, which means the time when body goes into deep sleep.
through wearables directly, performance could increase better after considering these fields. Not only trouble falling asleep, but breahing pauses at night or disruptions in the internal clock. Other potential avenues to improve EdgeTCNs performance could be adding light transformer-style focus layers to better manage complex signals. The next step would be to test these 28 advancements in a clinical setting to ensure the technology meets the needs of patients and healthcare providers.
REFERENCES
Fig.2 Sleep Analysis Graph
The system provides a 7-day trend visualization of key sleep and physiological metrics. As shown in Fig 6 the dashboard shows graphical plots for: Sleep duration Sleep efficiency Heart rate variability (HRV). These charts enable users to see trends and changes in their sleeping habits over time.
-
FUTURE ENHANCEMENTS
Future Enhancements of the system would be integrating the wearables like smart watches directly to the system. In this way the user can avoid entering all the fields manually. The number of fields taken into consideration will also be increased as more diverse biological signals can be collected
-
A.Zhai, G. J. Elder, and A. Godfrey, Challenges and Opportunities of Deep Learning for Wearable- Based Sleep Assessment, NPJ Digital Medicine, 2024.
-
A.Klç, Ö. Yldrm, and M. Talo, Sleep Quality Prediction Using Wearable Sensor Data and Convolutional Neural Networks, Biomedical Signal Processing and Control, 2023.
-
D.Markov and M. Goldman, Wearable EEG Devices for Sleep Monitoring and Analysis, Sleep Medicine Reviews, 2024.
-
D.Patel and K. Shah, Smart Sleep Monitoring System Using IoT and Artificial Intelligence, International Journal of Engineering Research & Technology, 2024.
-
H.Lee and J. Park, Personalized Sleep Recommendation System Using Artificial Intelligence, IEEE Transactions on Biomedical Engineering, 2025.
-
K.Shim, S. Hwang, and J. Lee, Circadian Rhythm Analysis Using Wearable Accelerometer Data, Scientific Reports, 2024.
-
T.U.Wara, A. H. Fahad, A. S. Das, and M. M. H. Shawon, A Systematic Review on Sleep Stage Classification and Sleep Disorder Detection Using Artificial Intelligence, Heliyon, 2025.
-
Y.Liu, H. Dong, and X. Wang, A Survey on Deep Learning Techniques for Sleep Stage Classification, IEEE Access, 2024.
