Next Article in Journal
A Novel Spatter Detection Algorithm for Real-Time Quality Control in Laser-Directed Energy Deposition-Based Additive Manufacturing
Previous Article in Journal
The Initial Attitude Estimation of an Electromagnetic Projectile in the High-Temperature Flow Field Based on Mask R-CNN and the Multi-Constraints Genetic Algorithm
Previous Article in Special Issue
Takagi–Sugeno Fuzzy Nonlinear Control System for Optical Interferometry
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Unobtrusive Sleep Posture Detection Using a Smart Bed Mattress with Optimally Distributed Triaxial Accelerometer Array and Parallel Convolutional Spatiotemporal Network

1
The Higher Educational Key Laboratory for Measuring and Control Technology and Instrumentations of Heilongjiang Province, Harbin University of Science and Technology, Harbin 150080, China
2
Murdoch University Chiropractic Clinic, Murdoch University, Murdoch 6150, Australia
3
Faculty of Life Science and Education, University of South Wales, Treforest, Pontypridd CF37 1DL, UK
4
Faculty of Health Sciences, Durban University of Technology, Durban 1334, South Africa
*
Author to whom correspondence should be addressed.
Sensors 2025, 25(12), 3609; https://doi.org/10.3390/s25123609
Submission received: 7 May 2025 / Revised: 28 May 2025 / Accepted: 6 June 2025 / Published: 8 June 2025
(This article belongs to the Special Issue Advanced Sensing and Measurement Control Applications)

Abstract

Sleep posture detection is a potentially important component of sleep quality assessment and health monitoring. Accurate identification of sleep postures can offer valuable insights into an individual’s sleep patterns, comfort levels, and potential health risks. For example, improper sleep postures may lead to musculoskeletal issues, respiratory disturbances, and even worsen conditions like sleep apnea. Additionally, for long-term bedridden patients, continuous monitoring of sleep postures is essential to prevent pressure ulcers and other complications. Traditional methods for sleep posture detection have several limitations: wearable sensors can disrupt natural sleep and cause discomfort, camera-based systems raise privacy concerns and are sensitive to environmental conditions, and pressure-sensing mats are often complex and costly. To address these issues, we have developed a low-cost non-contact sleeping posture detection system. Our system features eight optimally distributed triaxial accelerometers, providing a comfortable and non-contact front-end data acquisition unit. For sleep posture classification, we employ an improved density peak clustering algorithm that incorporates the K-nearest neighbor mechanism. Additionally, we have constructed a Parallel Convolutional Spatiotemporal Network (PCSN) by integrating Convolutional Neural Network (CNN), Long Short-Term Memory (LSTM), and Bidirectional Long Short-Term Memory (Bi-LSTM) modules. Experimental results demonstrate that the PCSN can accurately distinguish six sleep postures: prone, supine, left log, left fetus, right log, and right fetus. The average accuracy is 98.42%, outperforming most state-of-the-art deep learning models. The PCSN achieves the highest scores across all metrics: 98.64% precision, 98.18% recall, and 98.10% F1 score. The proposed system shows considerable promise in various applications, including sleep studies and the prevention of diseases like pressure ulcers and sleep apnea.

1. Introduction

Sleep posture detection is a crucial aspect of sleep research and clinical practice, as it can provide valuable insights into sleep quality and the prevention of various health issues [1]. Sleep posture can affect a wide range of physiological processes, including respiration, spinal alignment, and overall comfort during sleep. For instance, improper sleep postures may lead to tension in the cervical and lumbar spine, causing pain, and potentially contributing to related diseases such as obesity, diabetes mellitus, and hypertension [2,3,4]. Additionally, inadequate sleep or sleep disturbances have been linked to an increased risk of depression, anxiety, and various other mental or psychiatric disorders [5]. The prevalence of sleep disorders is estimated to be 4.7% in the population, with some reports indicating that up to half of the population may experience sleep-related disorders in Western countries [6].
With the global elderly population rapidly increasing and projected to account for 20% of the total world population by 2050 [7], obtaining adequate and restful sleep is particularly important for this demographic. Sleep enables the body and brain to undergo essential restorative processes necessary for overall health and cognitive function recovery [8,9]. Studies have shown that sleep-related issues are more prevalent among individuals in residential care settings [10], with falling out of bed during sleep representing a significant risk for the elderly, potentially leading to injuries and, in severe cases, even death [11]. Moreover, poor sleep postures are considered major contributors to certain health complications, especially among the elderly, including impaired physical health, cognitive decline, and a reduced overall quality of life [12], which is especially important among the elderly. Additionally, adjusting postures in cardiovascular patients has been shown to help reduce cardiac load [13,14,15,16].
In the medical field, long-term bedridden patients who maintain the same lying posture for extended periods are at an increased risk of developing pressure sores/ulcers [1,5,6], with body position detection being considered essential for preventing the formation of pressure sores. Therefore, sleep posture detection could prove crucial for alerting individuals to avoid improper positions, or prolonged periods of any position, and for reminding people to change posture regularly, thereby reducing the risk of any associated health complications [17].
The objective of this study is to explore the feasibility of accurately identifying sleep postures using low-complexity hardware configurations. To accomplish this, we have developed a smart mattress equipped with eight triaxial accelerometers, whose output data is analyzed using a Parallel Convolutional Spatiotemporal Network (PCSN) model to enable highly precise sleep posture recognition. The main contributions of this work include: (1) the design of a cost-effective smart mattress with minimal sensor requirements, (2) the development of a novel PCSN model specifically optimized for sleep posture recognition, and (3) a comprehensive evaluation demonstrating the system’s high accuracy in real-world scenarios.
In the following sections, we first summarize the achievements of state-of-the-art publications in Section 2. We then detail the unobtrusive sleep posture detection system, including accelerometer evaluation, optimal distribution of the eight accelerometers, and related algorithms in Section 3. In Section 4, we explore hyperparameter selection, system accuracy, and classification performance from both metrological and model metrics perspectives. In Section 5, we compare the proposed system against classic non-contact sleep posture detection methods and discuss the limitations of the current study. Finally, we provide a conclusion in Section 6.

2. Related Works

Traditional methods for sleep posture detection can be broadly categorized into four main approaches: wearable device-based [18,19], camera-based [20,21], radio-frequency-based [22], and pressure-sensitive mat-based [23,24,25,26]. Wearable devices, such as accelerometers and gyroscopes, are attached directly to the human body to monitor movements and postures. Camera-based systems use video or infrared cameras to capture images and analyze sleep postures. Radio-frequency-based methods detect sleep postures through the reflection of radio waves. Pressure-sensitive mats, in contrast, measure the pressure distribution of the body to infer sleep postures.
However, these traditional methods have several drawbacks. Wearable devices can cause discomfort and interfere with normal sleep. Camera-based systems may raise privacy concerns and are highly dependent on ambient lighting. Radio-frequency-based methods can be expensive, require complex installation, and are susceptible to multipath effects and environmental interference [22]. Pressure-sensitive mats, although more comfortable and less invasive, often involve large-scale sensor arrays that increase production costs and computational complexity. Additionally, these mats may suffer from area redundancy, as only a portion of the sensors are utilized when a person lies on the mat. These limitations highlight the need for a more efficient, cost-effective, and non-contact method to detect different sleep postures [27,28].
In recent years, significant progress has been made in sleep posture classification driven by deep learning techniques. For example, Andy Yiu-Chau Tam et al. [20] proposed a deep learning model integrated with an ECA (Efficient Channel Attention) mechanism, which improved the F1 score from 87.4% to 92.2%. While this method significantly enhanced classification accuracy, its performance was limited in low-light environments due to its reliance on RGB images. In another study, Zebo Li et al. [29] introduced a dual-fusion recognition model based on an air pressure cushion. This model combines human anatomical features with algorithmic enhancements, achieving an accuracy of 99.9%. Experimental results indicated that the method performed exceptionally well on low-density air cushion data. However, given that the entire system comprises 264 nodes, further structural optimization is necessary to enhance its efficiency and effectiveness. Despite these advancements in signal processing and algorithmic structures, challenges remain in terms of environmental adaptability, cost-effectiveness, non-invasiveness, and practical deployment.
In contrast to existing approaches, our work advances the state-of-the-art by proposing a systematic structure that addresses key limitations of traditional methods. Our smart mattress, equipped with only eight triaxial accelerometers, significantly reduces hardware complexity compared to existing pressure-sensitive mat systems with hundreds of sensors. Furthermore, our PCSN model achieves highly accurate sleep posture recognition while maintaining computational efficiency. This approach balances non-invasiveness, cost-effectiveness, and performance, making it particularly suitable for practical deployment in both clinical and home settings.

3. Materials and Methods

While manufacturers perform batch sampling on available sensors, it is crucial to assess their specifications, including consistency and linearity. This is especially important when multiple sensors, such as triaxial accelerometers in this study, are used together for data collection.

3.1. Accelerometer Performance Evaluation

To assess the triaxial accelerometer (ADXL345, Analog Devices Inc., Wilmington, MA, USA), we employed a custom-designed rotating device [30] capable of rotating through a 180° arc. This device was mounted on an optical platform to enhance the stability of the evaluation system. Eight triaxial accelerometers were positioned along the rotating device (Figure 1), with each axis aligned sequentially. The alignment process began with the x-axis, followed by the y-axis, and finally the z-axis. For each axis alignment, the rotating device with the triaxial accelerometers was turned in 5° increments. The sampling frequency was set to 240 Hz. The selection of a 240 Hz sampling frequency is based on the requirements of the eight-channel accelerometer data acquisition in our system. Specifically, this sampling rate ensures that each channel operates at a frequency of 30 Hz. This frequency is within the range of 13 to 35 Hz, which is deemed sufficient for effective human motion detection [18,31].

3.2. Optimal Placement of Accelerometers

To determine the optimal placement of accelerometers under the mattress, preliminary tests were conducted for six typical sleep postures: prone, supine, left log, left fetus, right log, and right fetus [32]. These tests involved placing a force-sensitive mat under the body of a volunteer (Figure 2). The points with the highest pressure were then selected as the locations for the triaxial accelerometers. The results of the preliminary tests show that the primary stress points are in the shoulder blade, spine, coccyx, hip-sacrum, and knees.
By identifying sensitive areas, eight triaxial accelerometers were placed around these regions to optimally cover the key features of various sleep postures. This layout minimizes system complexity by optimizing the spatial resolution of the sensors, thereby providing an effective hardware configuration for the subsequent development of the sleep posture detection system. A 190 cm × 90 cm mattress was then placed on top of the optimized accelerometer array for sleep posture detection (Figure 3).
It should be noted that while our sensor placement strategy was derived from tests with a volunteer of average body type (height: 170.7 cm, weight: 61.8 kg), the identified pressure points generally correspond to anatomical landmarks that are common across different body types. The relative positions of these landmarks may vary with individual height and weight, but the primary stress points (shoulder blade, spine, coccyx, hip-sacrum, and knees) remain consistent across most body compositions. The system proposed in this study relies on the pattern of pressure distribution rather than absolute pressure values, which provides some inherent adaptability to different body types. However, extreme variations in height (below 160 cm or above 190 cm) or weight may affect the system’s accuracy, as the pressure distribution patterns could significantly deviate from those observed in our preliminary tests. This limitation is further addressed in Section 4.3, where we discuss potential future work to enhance the system’s adaptability and applicability across diverse populations.
The system employs an FPGA-based architecture (EP4CE10F17C8N, Intel Corpo-ration, Santa Clara, CA, USA) to interface with eight accelerometers via dedicated I2C connections. Each triaxial accelerometer is assigned an independent pair of SCL and SDA lines, enabling parallel and isolated communication. Eight I2C driver modules are implemented to handle sensor initialization, register configuration, and data acquisition. The output from each of triaxial accelerometers is a 48-bit data package (data [47:0]), representing 16-bit acceleration values along the x, y, and z axes, respectively.
Within the FPGA, a polling mechanism sequentially accesses each triaxial accelerometer and forwards the acquired data to a processing unit. This unit formats the data with the assistance of clock division and state machine control modules. The formatted data is then transmitted via a Universal Asynchronous Receiver/Transmitter (UART) interface to a laptop at a baud rate of 115,200 bits per second.

3.3. Participants

Participants in the study were healthy adults aged 18 years or older. Individuals who suffered from illnesses such as sleep deprivation, sleep disturbances, or musculoskeletal pain, or who had difficulties maintaining or transitioning between specific postures in bed, were excluded. Before the trials, all participants were requested to not engage in intense walking or running activities. The experiment was approved by the Faculty Research Committee (No. 20241118) and conducted in accordance with the guidelines outlined in the Declaration of Helsinki. A total of 30 healthy university students (15 males and 15 females) participated in the experiment. All participants provided informed consent after receiving a verbal and written description of the experimental procedures. Basic demographic information for the participants is presented in Table 1.

3.4. Experimental Procedures

The trials were conducted from 20 November to 10 December 2024. During the experiment, each subject lay on the mattress embedded with eight triaxial accelerometers underneath and assumed six distinct sleeping positions (Figure 1) randomly to avoid potential order effects. While maintaining the fundamental posture of each sleeping position, minor positional adjustments were made to enhance the diversity of the data collected for each posture. Every participant remained in a given sleep posture for at least 30 s before transitioning to the next, thereby ensuring the acquisition of no fewer than 25 sets of acceleration data per posture. Consequently, a total of 4500 data points were obtained for all six sleep postures (25 × 6 × 30 = 4500). All the recorded data were organized into a sleep posture dataset for subsequent analysis and processing.

3.5. Statistical Analysis for Accelerometer Performance

The data were analyzed using Python (version 3.8.10) and Excel 2021 (Microsoft, Seattle, USA). One-way ANOVA was employed to access the consistency within the datasets gathered from the triaxial accelerometers. A significance level of <0.05 was considered indicative of statistical significance.

3.6. Data Preprocessing with Improved Density Peak Clustering

Clustering, as an unsupervised learning method, aims to uncover the underlying structure of unlabeled data by exploring similarity relationships in feature space [33]. Among various clustering algorithms, such as K-means [34], hierarchical clustering [35], and self-organizing maps (SOM) [36], density peak clustering (DPC) [37] stands out for its ability to identify clusters based on local density and distance. However, in this study, the distribution of sleep posture samples exhibited notable inconsistency due to individual variability in height and weight among participants. Traditional DPC struggles with such heterogeneity because of its dependence on a global cutoff distance for density estimation, leading to three main limitations:
  • Difficulty in distinguishing intra-class differences and inter-class similarities;
  • Inability to automatically identify cluster centers;
  • Increased subjectivity due to human intervention.
To address these issues, we proposed an improved clustering framework that integrates the K-nearest neighbor (KNN) strategy with the DPC algorithm. This approach reconstructs key components of the traditional DPC pipeline by improving adaptability and robustness.
  • Local Density
Instead of using a global truncation distance, we redefine the local density based on the average distance between a sample point x α and its k-nearest neighbors:
ρ α = 1 x β K N N ( x α ) , x β x α d ( x α , x β ) σ 1 k
where d ( x α , x β ) denotes the Euclidean distance between two sample points, and σ = max { d ( x α , x β ) , x α , x β X } serves as a normalization factor. This formulation effectively mitigates the sparsity effect in high-dimensional space and reflects how densely x α is surrounded by other points. The default value for k is 8.
2.
Repulsion Factor
To distinguish common points (points located in areas with relatively uniform density) from central points (points located at the center of high-density areas) or isolated points (points located in areas with lower density), a repulsion factor δ a is used:
δ α = min x β K N N ( x α ) , x ε H D ( x i ) d ( x β , x ε ) i f   ρ ( x α ) < max ρ ( x ϕ ) x ϕ X max x β X d ( x β , x ε ) o t h e r w i s e
where K N N ( x α ) = K N N ( x α ) x α , H D ( x α ) = x ε | ρ ε > ρ α , x ε X ,   x is the sample point in the sample set X. This metric reflects the proximity of x α to a higher-density region. If x α is a peak point, the global maximum distance is used.
3.
Centrality Evaluation
The overall importance of a point is evaluated by combining its local density and repulsion factor values. The centrality score is defined as:
γ α = ( ρ α × δ α ) m
where the default value for m is 2.
4.
Adaptive Center Selection
Data points whose local density and repulsion factor values exceeding the average levels are considered as the potential cluster centers:
C e n t e r s = { x α | ρ α > ρ ¯   δ α > δ ¯ }
where ρ ¯ and δ ¯ represent the mean values of local density and repulsion factor value, respectively.
5.
Point gap
After identifying the candidate cluster centers, all candidates are sorted in descending order according to their centrality scores γ α as defined in Equation (3). To determine the optimal number of clusters, the difference between each pair of adjacent centrality values is:
g α = γ α γ α + 1
The average difference g ¯ is computed over all g α values. The index of the first occurrence where g α > g ¯ serves as the estimated number of clusters. For instance, if this condition is first met at g 3 = γ 3 γ 4 , then the top three candidate points (i.e. γ 1 ,   γ 2 ,   γ 3 ) are selected as the final cluster centers. This strategy ensures that only points with relatively high centrality are preserved, while suppressing outliers or ambiguous candidates. The pseudocode of the improved DPC algorithm is included in the Appendix A (Algorithm A1).

3.7. Model Training and Architecture

To address the limitations of traditional serial CNN and LSTM architectures, where temporal dependencies are often weakened due to feature loss during convolution and pooling [38,39], we propose a novel Parallel Convolutional Spatiotemporal Network (PCSN). As illustrated in Figure 4a, PCSN employs a dual-path design to simultaneously extract spatial and temporal features, thereby enhancing classification performance on sleep posture data.
The upper branch of the PCSN model comprises three parallel CNN blocks. Each block includes a stack of convolutional layers, ReLU activations, max pooling, and average pooling. These blocks capture spatial correlation patterns among multi-channel accelerometer signals and enhance discriminability in feature space.
In the lower branch, temporal features are extracted using both LSTM and Bi-LSTM (Bidirectional LSTM) modules.
  • LSTM [40] captures long-term dependencies within time domain while alleviating gradient vanishing.
  • Bi-LSTM [41] enhances temporal awareness by processing data bidirectionally—both forward and backward—enabling better understanding of contextual relationships across time.
The features from CNN, LSTM, and Bi-LSTM modules are concatenated along the feature dimension, as illustrated in Figure 4b. This concatenated fusion [42] combines spatial and temporal representations into a unified feature vector, yielding a richer and more comprehensive data representation. Each module contributes information in distinct dimensions, and the fusion process preserves both position information (spatial) and sequential cues (temporal) essential for sleep posture classification.
The fused feature vector is passed into a fully connected (FC) layer, which maps the high-dimensional features to the final label space. A Softmax activation function is applied at the output layer to generate a probability distribution across predefined categories (e.g., prone, supine, left log, etc.). The sleep posture category corresponding to the highest probability is selected as the final prediction result.

3.8. Performance Analysis Tools for Improved DPC

NMI (Normalized Mutual Information) [43] and ARI (Adjusted Rand Index) [44] are used to evaluate the clustering performance. NMI is an indicator used to measure the similarity between clustering results and true labels, with a value range of [0, 1]. When the value is closer to 1, it means that the clustering result is closer to the true category. Its definition is:
N M I ( U , V ) = 2 · I ( U , V ) H U + H ( V )
where U is the true classification, V is obtained by the clustering algorithm, and I( U ,V) is the mutual information, which represents the common information of the two distributions:
I ( U , V ) = i j p ( i , j ) l o g p ( i , j ) p ( i ) p ( j )
where p(.) is defined as the probability of the corresponding variable, while H( U ) and H(V) represent entropy:
H (   U   ) = i p i l o g p ( i )
H ( V ) = i p j l o g p ( j )
ARI is an improved version of the rand index and is used to measure the consistency between clustering results and true classification [45]. It takes into account the impact of random clustering and makes adjustments to avoid high scores caused by randomness. When the value is close to 1, it means that the clustering results are very consistent with the true category; when the value is close to 0, it means that the clustering results are close to random.
A R I = i j n i j 2 i a i 2 j b j 2 / n 2 1 2 i a i 2 + j b j 2 i a i 2 j b j 2 / n 2
where n i j represents the number of data points that belong to both cluster i in the true classification and cluster j in the clustering result. a i denotes the total number of data points in cluster i of the true classification, while b j denotes the total number of data points in cluster j of the clustering result. n 2 represents the number of possible pairs that can be formed by choosing any two samples from a dataset of size n. This combinatorial expression is used to calculate the total number of sample pairs for evaluating clustering consistency.

4. Results

4.1. Experimental Environment and Hyperparameter Selection

In the training process of deep learning models, processing large amounts of data requires significant computational resources. To meet this demand, we utilized a GPU to train the PCSN model. Specifically, an NVIDIA GeForce RTX 4060 graphics card was employed, in conjunction with the CUDA parallel computing architecture and the cuDNN acceleration library. To ensure efficient training, the PyTorch (version 1.7.1+cu101) framework was selected for this experiment, as it effectively supports the implementation and optimization of complex algorithms.
To determine the optimal hyperparameters for the PCSN model, we conducted a prior selection test using the grid search approach and cross-validation scheme. The model was implemented using the PyTorch framework, and the comparison results were partially illustrated (Figure 5) due to too many combinations in hyperparameters (663 combinations in total). The heat map analysis further reveals the complex relationships between the hyperparameters. The optimal hyperparameter settings included the Adam optimizer, learning rate of 0.0001, batch size of 64 samples, hidden size of 10, and a total of 400 epochs to ensure convergence. The optimal combination performs well not only in each individual dimension but also maintains strong correlations after accounting for parameter interactions.

4.2. Performance of Accelerometer

The ANOVA was conducted on each axis of the eight triaxial accelerometers, indicating no significant difference (p > 0.05). Moreover, the curves (Figure 6) demonstrated strong consistency as the sensors were rotated from 0° to 180°.

4.3. System Performance from a Metrological Point of View

The entire system comprises three main components: (1) a bed frame, which is based on a standard hospital bed frame and provides structural support for the entire system; (2) a sensor layer, which includes embedded triaxial accelerometers positioned optimally at corresponding body pressure points; and (3) a mattress, which offers comfort to users while effectively transmitting body movements to the accelerometers below. To evaluate the system performance from a metrological perspective, we present three key factors: system accuracy, spatial resolution, and acceleration resolution across three axes (Table 2).

4.4. Comparative Test for Clustering

In order to verify the accuracy and reliability, the improved DPC algorithm is compared with the DBSC (Density-Based Spatial Clustering) algorithm [45], FNDPC (fuzzy neighborhood Density Peak Clustering) algorithm [46], DPC algorithm [37], and FKNNDPC (Fuzzy K-Nearest Neighbors Density Peak Clustering) algorithm [47] using UCI datasets [48]. The evaluation experiments across multiple datasets of UCI, including Segmentation, Dermatology, and Ecoli, have demonstrated that the improve DPC consistently achieves superior performance with the averaged ARI = 0.787 and NMI = 0.841 (Figure 7).

4.5. Comparative Test for Sleep Posture Classification

To validate the performance of the PCSN model, two-thirds of the sampling data were used for training (4500 ×   2 / 3 = 3000 ) and the remaining one-third for testing (4500 ×   1 / 3 = 1500 ). The confusion matrix of the PCSN model in classifying the six sleep postures revealed high accuracy across all categories (Figure 8). The model demonstrated a remarkable ability to correctly identify the supine posture, achieving accuracies of 99% and 98.8% on the training and test datasets, respectively. The right fetus posture was also classified with high precision, with an accuracy of 98.8% for both the training and test datasets. Although the right log and left log postures had the lowest accuracy rates, their accuracies were still above 97%. Overall, the PCSN model exhibited robust performance in classifying sleep postures, achieving high accuracy on both the training and test datasets. The model’s ability to maintain high consistency in performance (average accuracy = 98.67% for training and 98.17% for testing) across different sleep postures suggests that it is not only effective in learning from the training data but also possesses good generalization properties.
In addition, the PCSN model was compared with several classic deep learning models, including AlexNet, VGG19, GoogLeNet, ResNet50, Xception, MobileNetV1, and ShuffleNetV2, using accuracy, precision, recall, and F1 score as metrics for sleep posture classification. The comparative results (Figure 9) show that the PCSN model, which integrates both spatial and temporal features, achieved the highest accuracy (98.42%), precision (98.64%), recall (98.18%), and F1 score (98.10%). These results significantly outperform various state-of-the-art models.
To further evaluate whether the improvement is statistically significant, we have performed paired t-tests comparing the proposed PCSN model with state-of-the-art deep learning models mentioned above. The results demonstrate that the p-values are consistently below 0.001, providing strong evidence that the performance enhancements of the PCSN model are statistically significant.

5. Discussion

In this study, we developed a non-contact sleep posture detection system comprising eight optimally placed accelerometers. This hardware configuration significantly reduces the cost and complexity compared to uniformly distributed sensor array methods [23,24,25,26]. Additionally, we integrated spatial and temporal characteristics into the deep learning model with improved DPC algorithm. The classification results show that the PCSN model achieves an average accuracy of 98.42% for six sleep postures.

5.1. PCSN Performance Evaluation

The accuracy and loss values of PCSN model were compared with those of the CNN model, the CNN + LSTM model, and the CNN + Bi-LSTM model for both the training and the test sets (Figure 10).
Regarding the training and test set accuracies (first column of Figure 10), the CNN model demonstrated moderate learning capability, with a noticeable gap between training and test accuracies that remained unstable even after 400 epochs. However, integrating LSTM with CNN significantly enhanced the model’s performance, achieving accuracies of 91.60% and 91.00% for training and test sets after 250 epochs, respectively. Further improvement was observed when Bi-LSTM was added to the CNN framework, resulting in higher training and test accuracies of 95.33% and 94.13% after 350 epochs, respectively. The primary disadvantage of the Bi-LSTM + CNN model was its relatively slow convergence rate. The PCSN model achieved the highest accuracy among all models, with accuracies of 98.67% and 98.17% for training and test sets after only 220 epochs, respectively. These results highlight the importance of considering both spatial and temporal dynamics in model design, particularly for tasks involving sequence prediction.
For the loss function, which provides a quantitative measure of the models’ learning progress and generalization ability (second column of Figure 10), the CNN model demonstrated a sharp decrease in both training and test losses but failed to reach a stable state even after 400 epochs. In contrast, the CNN + LSTM model showed both training and test losses converged towards a relatively small value (0.3 after 250 epochs). The CNN + Bi-LSTM model stabilized at even smaller values after 350 epochs, with loss functions for both training and test data reaching 0.18 and 0.22, respectively. After 220 epochs, the PCSN model demonstrated the smallest loss value, 0.15 and 0.19 for training and test sets, respectively, indicating its exceptional learning and generalization performance.

5.2. Comparison with Non-Contact Sleep Posture Detection Methods

The comparative analysis presented in Table 3 evaluates the performance of various non-contact sleep posture detection methods, highlighting the effectiveness of different sensor types and algorithms in accurately classifying sleep postures.
Notably, the pressure mat [29] utilizing AdaBoost and SVM achieved an impressive average accuracy of 99.9%, showcasing the potential of deep learning in this domain. However, such high accuracy comes at the cost of increased computational complexity and resource requirements. Our system distinguishes itself with a remarkable average accuracy of 98.42%. This high accuracy is attributed to two key factors: (1) the optimal sensor placement ensures effective capture of movement without the need for large arrays. This not only reduces the cost but also simplifies the complexity of the system, making it more accessible and easier to implement; (2) the combination of both temporal and spatial information by the PCSN model provides a more comprehensive understanding of sleep postures.
Although various methods can achieve high accuracy in sleep posture detection, our system offers a balanced approach. It maximizes performance while minimizing complexity and cost, making it highly practical for real-world scenarios where ease of use, cost, and reliability are paramount.

5.3. Limitation

While this study has undeniably achieved significant results in the field of sleep posture detection, it is essential to acknowledge several limitations that should be considered for future improvements and research directions.
Firstly, the definition of sleep posture categories used in this study is somewhat limited. The posture changes of bed-dependent patients in real-life scenarios are often more complex and diverse than the categories we have defined. In clinical and everyday settings, patients may exhibit a wide range of postures that are not included in our current classification system. However, our system has proved capable of classifying the six typical sleep postures mentioned in the previous literature [18].
Secondly, there was a lack of testing on users of different ages, such as elderly populations who might have different sleep patterns and postures due to age-related physical changes. Additionally, our study did not include individuals with varying body mass indices and heights, which could also influence sleep posture and the effectiveness of our detection system based on the position of the sensors. Including a more diverse range of participants in future studies would help to ensure that our system is robust and applicable across different demographic groups.
Thirdly, the experiments were conducted in a controlled laboratory setting, which may not fully replicate the complexities of real-world environments. The experiments were conducted on a single standard mattress with a thickness of 4.5 cm, which allowed for optimal placement of sensors. However, this controlled setting may not fully represent real-world conditions. The following real-world variables could impact system performance: (1) Different mattress materials, such as memory foam, innerspring, or latex, have varying degrees of firmness and elasticity. These differences can alter how pressure is distributed across the surface of the mattress. (2) The size of the mattress can influence the overall surface area available for pressure distribution. A larger mattress may provide more space for even distribution, whereas a smaller one might concentrate pressure in certain areas. (3) Shared beds introduce complex interference patterns that could have a significant impact on classification accuracy. Each individual’s body movements, such as rolling over, shifting positions, or getting out of bed, generate vibrations that can interfere with each other. These vibrations can create overlapping and interacting patterns that make it more challenging to accurately classify and distinguish individual movements or events.
Additionally, the relatively short detection period used in our study might not capture the full range of sleep posture changes that occur over a night sleep [52,53,54,55]. In the future, it would be beneficial to apply the system to real-world scenarios, such as overnight sleep posture detection, to better understand its performance over extended periods and in more natural settings.
Despite the above limitation, our cost-effective system has made a significant progress towards addressing the challenges by classifying six typical sleep postures that are frequently listed in the existing literature [23,32,50]. Ultimately, the smart mattress presents a highly effective solution for the detection of sleep postures, which has the potential to significantly enhance health outcomes and elevate the quality of life for individuals across various groups.
The experiments were conducted on a single mattress, which allowed for optimal placement of sensors. However, further research is needed to determine the optimal sensor placement for larger mattresses, such as queen or king size. Additionally, while the current trials were conducted with a single person, further tests are required to assess the effectiveness of this system when two people share the same mattress. Top-of-the-range mattresses often utilize thick mattress toppers. Further research is required to determine if placing accelerometers under these thicker layers can also effectively detect sleeping postures.

6. Conclusions

In this study, we developed a non-contact sleep posture detection system using eight optimally deployed triaxial accelerometers, strategically positioned to cover the most sensitive areas of a sleeping person. An improved DPC algorithm, incorporating the K-nearest neighbor mechanism, was utilized to enhance the robustness of the similarity metric. Additionally, a PCSN deep learning model was employed to integrate temporal and spatial information, achieving high-precision classification of sleep postures. The system achieved a classification accuracy of 98.42%. Moreover, the cost of the sensing unit is less than USD 8, with each ADXL345 accelerometer costing less than USD 1. Thus, the findings provide a cost-effective and reliable solution for sleep posture detection.

Author Contributions

Conceptualization, Z.L. and P.W.M.; data collection and analysis, G.L. and C.W.; methodology, Z.L. and P.W.M. original draft preparation, G.L., Z.L. and C.W.; review and editing, Z.L., V.C. and P.W.M. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Young Elite Research Program of Harbin University of Science and Technology (8402/217045088) and the Natural Science Foundation of Heilongjiang Province (F201421).

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki, and approved by the Faculty Research Committee of Measuring and Control Technology and Instrumentation (No. 20241118).

Informed Consent Statement

Written informed consent was obtained from the subject involved in the study.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Acknowledgments

The authors would like to express their gratitude to the participation of volunteers. AI was used as a translation aid.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
DLPDeep Learning Position
SVMSupport Vector Machine
CNNConvolution Neural Network
LSTMLong Short-Term Memory
S3CNNSparse Sensor-based Spatiotemporal Convolution Neural Network
BEMDBody-Earth Mover’s Distance
PCSNParallel Convolutional Spatiotemporal Network
DBSCDensity-Based Spatial Clustering
FNDPCfuzzy neighborhood Density Peak Clustering
DPCDensity Peak Clustering
FKNNDPCFuzzy K-Nearest Neighbors Density Peak Clustering

Appendix A

The pseudocode of the algorithm is included in Algorithm A1.
Algorithm A1 Pseudocode of improved DPC algorithm
0 K_get_Final_Centers ( X , ρ , δ )
1 Input :   Datasets ,   X = x 1 , x 2 , , x n ,   Local   density :   ρ ,   Repulsion   Value :   δ
2OutPut: Cluster Centers Set: Final_Centers
3begin
4    for α ← 1 to n do
5      γ   α   cal_ ( ρ α , δ α )
6    end for
7     ρ   ¯  ← avg(ρ)
8     δ   ¯  ← avg(δ)
9      centers     get_centers ( ρ ¯ , δ ¯ )
10    quick_sort(centers,γ,‘desc’)
11    for α ← 1 to |centers| do
12      g α     γ α γ α 1
13    end for
14 g ¯  ← avg(g)
15for α ← |centers| do 1 do
16    if   g α > g ¯ then
17      final_centers     final_centers     x α
18   end for
19    if   g α g ¯ then
20     break
21   end if
22    end for
23    return final_centers
24end

References

  1. Perez-Pozuelo, I.; Zhai, B.; Palotti, J.; Mall, R.; Aupetit, M.; Garcia-Gomez, J.M.; Taheri, S.; Guan, Y.; Fernandez-Luque, L. The future of sleep health: A data-driven revolution in sleep science and medicine. npj Digit. Med. 2020, 3, 42. [Google Scholar] [CrossRef] [PubMed]
  2. Khalil, M.; Power, N.; Graham, E.; Deschênes, S.S.; Schmitz, N. The association between sleep and diabetes outcomes—A systematic review. Diabetes Res. Clin. Pract. 2020, 161, 108035. [Google Scholar] [CrossRef]
  3. Short, M.A.; Booth, S.A.; Omar, O.; Ostlundh, L.; Arora, T. The relationship between sleep duration and mood in adolescents: A systematic review and meta-analysis. Sleep Med. Rev. 2020, 52, 101311. [Google Scholar] [CrossRef] [PubMed]
  4. St-Onge, M.-P.; Cherta-Murillo, A.; Darimont, C.; Mantantzis, K.; Martin, F.P.; Owen, L. The interrelationship between sleep, diet, and glucose metabolism. Sleep Med. Rev. 2023, 69, 101788. [Google Scholar] [CrossRef]
  5. Tasali, E.; Wroblewski, K.; Kahn, E.; Kilkus, J.; Schoeller, D.A. Effect of Sleep Extension on Objectively Assessed Energy Intake Among Adults With Overweight in Real-life Settings. JAMA Intern. Med. 2022, 182, 365. [Google Scholar] [CrossRef]
  6. Hombali, A.; Seow, E.; Yuan, Q.; Chang, S.H.S.; Satghare, P.; Kumar, S.; Verma, S.K.; Mok, Y.M.; Chong, S.A.; Subramaniam, M. Prevalence and correlates of sleep disorder symptoms in psychiatric disorders. Psychiatry Res. 2019, 279, 116–122. [Google Scholar] [CrossRef]
  7. Rudnicka, E.; Napierała, P.; Podfigurna, A.; Męczekalski, B.; Smolarczyk, R.; Grymowicz, M. The World Health Organization (WHO) approach to healthy ageing. Maturitas 2020, 139, 6–11. [Google Scholar] [CrossRef]
  8. Alotaibi, A.; Alosaimi, F.; Alajlan, A.; Bin Abdulrahman, K. The relationship between sleep quality, stress, and academic performance among medical students. J. Fam. Community Med. 2020, 27, 23. [Google Scholar] [CrossRef] [PubMed]
  9. Carbonaro, N.; Laurino, M.; Arcarisi, L.; Menicucci, D.; Gemignani, A.; Tognetti, A. Textile-Based Pressure Sensing Matrix for In-Bed Monitoring of Subject Sleeping Posture and Breathing Activity. Appl. Sci. 2021, 11, 2552. [Google Scholar] [CrossRef]
  10. Mansfield, S.; Obraczka, K.; Roy, S. Pressure Injury Prevention: A Survey. IEEE Rev. Biomed. Eng. 2020, 13, 352–368. [Google Scholar] [CrossRef]
  11. Ibrahim, A.; Chaccour, K.; Hajjam El Hassani, A.; Hajjam, M.; Andres, E. BedSense: A Bed-Mounted Sensor Node System for Sleep Activities Monitoring and Nocturnal Falls Detection. IEEE Sens. J. 2024, 24, 19944–19953. [Google Scholar] [CrossRef]
  12. Landry, S.A.; Beatty, C.; Thomson, L.D.J.; Wong, A.-M.; Edwards, B.A.; Hamilton, G.S.; Joosten, S.A. A review of supine position related obstructive sleep apnea: Classification, epidemiology, pathogenesis and treatment. Sleep Med. Rev. 2023, 72, 101847. [Google Scholar] [CrossRef] [PubMed]
  13. Tang, K.; Kumar, A.; Nadeem, M.; Maaz, I. CNN-Based Smart Sleep Posture Recognition System. IoT 2021, 2, 119–139. [Google Scholar] [CrossRef]
  14. Jalal, B.; Romanelli, A.; Hinton, D.E. Sleep paralysis in Italy: Frequency, hallucinatory experiences, and other features. Transcult. Psychiatry 2021, 58, 427–439. [Google Scholar] [CrossRef]
  15. Abdel-Basset, M.; Ding, W.; Abdel-Fatah, L. The fusion of Internet of Intelligent Things (IoIT) in remote diagnosis of obstructive Sleep Apnea: A survey and a new model. Inf. Fusion 2020, 61, 84–100. [Google Scholar] [CrossRef]
  16. Oh, Y.S.; Kim, J.-H.; Xie, Z.; Cho, S.; Han, H.; Jeon, S.W.; Park, M.; Namkoong, M.; Avila, R.; Song, Z.; et al. Battery-free, wireless soft sensors for continuous multi-site measurements of pressure and temperature from patients at risk for pressure injuries. Nat. Commun. 2021, 12, 5008. [Google Scholar] [CrossRef]
  17. Wang, Q.; Cheng, H.; Wang, W. Video-PSG: An Intelligent Contactless Monitoring System for Sleep Staging. IEEE Trans. Biomed. Eng. 2025, 72, 965–977. [Google Scholar] [CrossRef] [PubMed]
  18. Abdulsadig, R.S.; Rodriguez-Villegas, E. Sleep Posture Monitoring Using a Single Neck- Situated Accelerometer: A Proof-of-Concept. IEEE Access 2023, 11, 17693–17706. [Google Scholar] [CrossRef]
  19. Hosseini, M.-P.; Hosseini, A.; Ahi, K. A Review on Machine Learning for EEG Signal Processing in Bioengineering. IEEE Rev. Biomed. Eng. 2021, 14, 204–218. [Google Scholar] [CrossRef]
  20. Tam, A.Y.-C.; Zha, L.-W.; So, B.P.-H.; Lai, D.K.-H.; Mao, Y.-J.; Lim, H.-J.; Wong, D.W.-C.; Cheung, J.C.-W. Depth-Camera-Based Under-Blanket Sleep Posture Classification Using Anatomical Landmark-Guided Deep Learning Model. Int. J. Environ. Res. Public Health 2022, 19, 13491. [Google Scholar] [CrossRef]
  21. Van Gastel, M.; Stuijk, S.; Overeem, S.; Van Dijk, J.P.; Van Gilst, M.M.; De Haan, G. Camera-Based Vital Signs Monitoring During Sleep—A Proof of Concept Study. IEEE J. Biomed. Health Inform. 2021, 25, 1409–1418. [Google Scholar] [CrossRef] [PubMed]
  22. Li, Z.; Chen, K.; Xie, Y. A Deep Learning Method for Human Sleeping Pose Estimation with Millimeter Wave Radar. Sensors 2024, 24, 5900. [Google Scholar] [CrossRef]
  23. Song, Y.; Guo, S.; Liang, B. DeepLPos: A comprehensive hybrid deep learning model for lying position recognition using a tactile sensor array system. Meas. Sci. Technol. 2025, 36, 015702. [Google Scholar] [CrossRef]
  24. Li, Y.; Zhang, P.; Wang, S.; Su, T.; Zhang, K.; Huang, L.; Wu, S. Sleep State Monitoring System Based on Flexible Pressure Sensor Arrays for Evaluating Sleep Quality. IEEE Sens. J. 2024, 24, 33217–33225. [Google Scholar] [CrossRef]
  25. Kau, L.-J.; Wang, M.-Y.; Zhou, H. Pressure-Sensor-Based Sleep Status and Quality Evaluation System. IEEE Sens. J. 2023, 23, 9739–9754. [Google Scholar] [CrossRef]
  26. Wang, K.; Feng, B.; Zhao, D.; Xiao, K.; Wu, G.; Shi, B.; Wang, R.; Chen, J.; Li, K.; Li, L.; et al. Noncontact in Bed Measurements of Electrocardiogram Using a Capacitively Coupled Electrode Array Based on Flexible Circuit Board. IEEE Trans. Instrum. Meas. 2023, 72, 1–14. [Google Scholar] [CrossRef]
  27. Chao, Y.; Liu, T.; Shen, L.-M. Method of recognizing sleep postures based on air pressure sensor and convolutional neural network: For an air spring mattress. Eng. Appl. Artif. Intell. 2023, 121, 106009. [Google Scholar] [CrossRef]
  28. Hoang, M.L.; Matrella, G.; Ciampolini, P. Metrological evaluation of contactless sleep position recognition using an accelerometric smart bed and machine learning. Sens. Actuators A Phys. 2025, 385, 116309. [Google Scholar] [CrossRef]
  29. Li, Z.; Zhou, Y.; Zhou, G. A dual fusion recognition model for sleep posture based on air mattress pressure detection. Sci. Rep. 2024, 14, 11084. [Google Scholar] [CrossRef]
  30. Liu, Z.; Shu, Z.; Cascioli, V.; McCarthy, P.W. Comparative Analysis of Force-Sensitive Resistors and Triaxial Accelerometers for Sitting Posture Classification. Sensors 2024, 24, 7705. [Google Scholar] [CrossRef]
  31. Riddick, R.; Smits, E.; Faber, G.; Shearwin, C.; Hodges, P.; Van Den Hoorn, W. Estimation of human spine orientation with inertial measurement units (IMU) at low sampling rate: How low can we go? J. Biomech. 2023, 157, 111726. [Google Scholar] [CrossRef] [PubMed]
  32. Xu, X.; Lin, F.; Wang, A.; Hu, Y.; Huang, M.-C.; Xu, W. Body-Earth Mover’s Distance: A Matching-Based Approach for Sleep Posture Recognition. IEEE Trans. Biomed. Circuits Syst. 2016, 10, 1023–1035. [Google Scholar] [CrossRef] [PubMed]
  33. Dalmaijer, E.S.; Nord, C.L.; Astle, D.E. Statistical power for cluster analysis. BMC Bioinform. 2022, 23, 205. [Google Scholar] [CrossRef]
  34. Ahmed, M.; Seraj, R.; Islam, S.M.S. The k-means Algorithm: A Comprehensive Survey and Performance Evaluation. Electronics 2020, 9, 1295. [Google Scholar] [CrossRef]
  35. Ran, X.; Xi, Y.; Lu, Y.; Wang, X.; Lu, Z. Comprehensive survey on hierarchical clustering algorithms and the recent developments. Artif. Intell. Rev. 2023, 56, 8219–8264. [Google Scholar] [CrossRef]
  36. Hartley, S.; Royant-Parola, S.; Zayoud, A.; Gremy, I.; Matulonga, B. Do both timing and duration of screen use affect sleep patterns in adolescents? PLoS ONE 2022, 17, e0276226. [Google Scholar] [CrossRef]
  37. Wei, X.; Peng, M.; Huang, H.; Zhou, Y. An overview on density peaks clustering. Neurocomputing 2023, 554, 126633. [Google Scholar] [CrossRef]
  38. Koşar, E.; Barshan, B. A new CNN-LSTM architecture for activity recognition employing wearable motion sensor data: Enabling diverse feature extraction. Eng. Appl. Artif. Intell. 2023, 124, 106529. [Google Scholar] [CrossRef]
  39. Nasiri, A.; Yoder, J.; Zhao, Y.; Hawkins, S.; Prado, M.; Gan, H. Pose estimation-based lameness recognition in broiler using CNN-LSTM network. Comput. Electron. Agric. 2022, 197, 106931. [Google Scholar] [CrossRef]
  40. Shahid, F.; Zameer, A.; Muneeb, M. A novel genetic LSTM model for wind power forecast. Energy 2021, 223, 120069. [Google Scholar] [CrossRef]
  41. Kim, J.; Oh, S.; Kim, H.; Choi, W. Tutorial on time series prediction using 1D-CNN and BiLSTM: A case example of peak electricity demand and system marginal price prediction. Eng. Appl. Artif. Intell. 2023, 126, 106817. [Google Scholar] [CrossRef]
  42. Shan, C.H.; Chen, X.M. Multichannel concat-fusional convolutional neural networks. J. Intell. Fuzzy Syst. 2022, 43, 957–969. [Google Scholar] [CrossRef]
  43. Sun, K.; Tian, P.; Qi, H.; Ma, F.; Yang, G. An Improved Normalized Mutual Information Variable Selection Algorithm for Neural Network-Based Soft Sensors. Sensors 2019, 19, 5368. [Google Scholar] [CrossRef] [PubMed]
  44. Warrens, M.J.; Van Der Hoef, H. Understanding the Adjusted Rand Index and Other Partition Comparison Indices Based on Counting Object Pairs. J. Classif. 2022, 39, 487–509. [Google Scholar] [CrossRef]
  45. Gan, X.; Fan, H.; Yang, M.; Tang, F.; Liu, H.; Ma, Z. Machine Well Screening Method Based on POI Data and DBSCAN Clustering Algorithm. IEEE Geosci. Remote Sens. Lett. 2025, 22, 1–5. [Google Scholar] [CrossRef]
  46. Zhao, J.; Wang, G.; Pan, J.-S.; Fan, T.; Lee, I. Density peaks clustering algorithm based on fuzzy and weighted shared neighbor for uneven density datasets. Pattern Recognit. 2023, 139, 109406. [Google Scholar] [CrossRef]
  47. Xu, X.; Ding, S.; Wang, L.; Wang, Y. A robust density peaks clustering algorithm with density-sensitive similarity. Knowl.-Based Syst. 2020, 200, 106028. [Google Scholar] [CrossRef]
  48. Srinivasan, S.; Gunasekaran, S.; Mathivanan, S.K.; Malar M.B., B.A.; Jayagopal, P.; Dalu, G.T. An active learning machine technique based prediction of cardiovascular heart disease from UCI-repository database. Sci. Rep. 2023, 13, 13588. [Google Scholar] [CrossRef]
  49. Wu, S.; Diao, H.; Feng, Y.; Zhang, Y.; Chen, H.; Akay, Y.M.; Akay, M.; Chen, C.; Chen, W. Lightweight Neural Network for Sleep Posture Classification Using Pressure Sensing Mat at Various Sensor Densities. IEEE Trans. Neural Syst. Rehabil. Eng. 2024, 32, 3410–3421. [Google Scholar] [CrossRef]
  50. Hu, D.; Gao, W.; Ang, K.K.; Hu, M.; Chuai, G.; Huang, R. Smart Sleep Monitoring: Sparse Sensor-Based Spatiotemporal CNN for Sleep Posture Detection. Sensors 2024, 24, 4833. [Google Scholar] [CrossRef]
  51. Diao, H.; Chen, C.; Yuan, W.; Amara, A.; Tamura, T.; Fan, J.; Meng, L.; Liu, X.; Chen, W. Deep Residual Networks for Sleep Posture Recognition with Unobtrusive Miniature Scale Smart Mat System. IEEE Trans. Biomed. Circuits Syst. 2021, 15, 111–121. [Google Scholar] [CrossRef] [PubMed]
  52. Dam, H.P.; Doan, N.P.; Pham, N.D.A.; Nguyen, D.M.; Pham, H.M.; Nguyen, H.H. In-Bed Posture Classification Using Pressure Sensor Data and Spiking Neural Network. In Proceedings of the 8th NAFOSTED Conference on Information and Computer Science (NICS), Hanoi, Vietnam, 21–22 December 2021; IEEE: New York, NY, USA, 2021; pp. 358–363. [Google Scholar] [CrossRef]
  53. Peruzzi, G.; Galli, A.; Giorgi, G.; Pozzebon, A. Sleep Posture Detection via Embedded Machine Learning on a Reduced Set of Pressure Sensors. Sensors 2025, 25, 458. [Google Scholar] [CrossRef] [PubMed]
  54. Chi, P.; Bai, Y.; Du, W.; Wei, X.; Liu, B.; Zhao, S.; Jiang, H.; Chi, A.; Shao, M. Altered Muscle–Brain Connectivity During Left and Right Biceps Brachii Isometric Contraction Following Sleep Deprivation: Insights from PLV and PDC. Sensors 2025, 25, 2162. [Google Scholar] [CrossRef] [PubMed]
  55. Li, C.; Ren, G.; Wang, Z. Sleep Posture Recognition Method Based on Sparse Body Pressure Features. Appl. Sci. 2025, 15, 4920. [Google Scholar] [CrossRef]
Figure 1. Performance evaluation of eight triaxial accelerometers using a customized rotating device installed on a high-precision optical platform.
Figure 1. Performance evaluation of eight triaxial accelerometers using a customized rotating device installed on a high-precision optical platform.
Sensors 25 03609 g001
Figure 2. Six sleep positions to be classified in the experiment and corresponding pressure distribution maps. The colors in the heat map represent the relative pressure levels, with a gradient indicating increasing load intensity. Specifically, light blue denotes the lowest pressure, followed by dark blue, green, yellow, and red, which signifies the highest pressure. Top row shows a heat map of pressure distribution for each posture, with warmer colors (yellow–red) indicating higher pressure points at key anatomical landmarks (scapula, hip-sacrum, and knee). Bottom row shows corresponding postures captured by cameras: (a) prone—face down with arms on either side of the body; (b) supine—face up with arms on either side of the body; (c) left log—lying on the left side with the straight legs; (d) left fetus—lying on the left side with bent legs; (e) right log—lying on the right side with straight legs; (f) right fetus—lying on the right side with bent legs.
Figure 2. Six sleep positions to be classified in the experiment and corresponding pressure distribution maps. The colors in the heat map represent the relative pressure levels, with a gradient indicating increasing load intensity. Specifically, light blue denotes the lowest pressure, followed by dark blue, green, yellow, and red, which signifies the highest pressure. Top row shows a heat map of pressure distribution for each posture, with warmer colors (yellow–red) indicating higher pressure points at key anatomical landmarks (scapula, hip-sacrum, and knee). Bottom row shows corresponding postures captured by cameras: (a) prone—face down with arms on either side of the body; (b) supine—face up with arms on either side of the body; (c) left log—lying on the left side with the straight legs; (d) left fetus—lying on the left side with bent legs; (e) right log—lying on the right side with straight legs; (f) right fetus—lying on the right side with bent legs.
Sensors 25 03609 g002
Figure 3. Sleep detection mattress. (a) Photo of experimental mattress embedded with eight triaxial accelerometers; (b) three-layer structure of smart mattress: top layer is commercially available mattress, middle layer contains an optimally distributed triaxial accelerometer array (labeled A–H), and bottom layer provides structural support; (c) top view of optimally distributed accelerometer array. Accelerometers are placed at key anatomical pressure points: shoulder blade (accelerometer A and B), spine (accelerometer C), coccyx (accelerometer D), hip-sacrum (accelerometer E and F), and knees (accelerometer G and H). Optimally placed accelerometers reduce system complexity by focusing on key pressure points identified by preliminary trials (Figure 2).
Figure 3. Sleep detection mattress. (a) Photo of experimental mattress embedded with eight triaxial accelerometers; (b) three-layer structure of smart mattress: top layer is commercially available mattress, middle layer contains an optimally distributed triaxial accelerometer array (labeled A–H), and bottom layer provides structural support; (c) top view of optimally distributed accelerometer array. Accelerometers are placed at key anatomical pressure points: shoulder blade (accelerometer A and B), spine (accelerometer C), coccyx (accelerometer D), hip-sacrum (accelerometer E and F), and knees (accelerometer G and H). Optimally placed accelerometers reduce system complexity by focusing on key pressure points identified by preliminary trials (Figure 2).
Sensors 25 03609 g003
Figure 4. Structure of proposed PCSN model: (a) overall network architecture; (b) concatenated feature fusion module.
Figure 4. Structure of proposed PCSN model: (a) overall network architecture; (b) concatenated feature fusion module.
Sensors 25 03609 g004
Figure 5. Comparison results of grid search and cross validation for selecting optimal hyperparameters, including learning rate (lr), batch size (bs), epochs (ep), optimizer (opt), and hidden size (hs). (a) lr = 0.01, (b) lr = 0.001, (c) lr = 0.0001.
Figure 5. Comparison results of grid search and cross validation for selecting optimal hyperparameters, including learning rate (lr), batch size (bs), epochs (ep), optimizer (opt), and hidden size (hs). (a) lr = 0.01, (b) lr = 0.001, (c) lr = 0.0001.
Sensors 25 03609 g005aSensors 25 03609 g005b
Figure 6. Response characteristic curve of eight triaxial accelerometers with a sampling interval of 5° in range of 0° to 180° using custom-made rotating device. (a) x-axis data, (b) y-axis data, (c) z-axis data.
Figure 6. Response characteristic curve of eight triaxial accelerometers with a sampling interval of 5° in range of 0° to 180° using custom-made rotating device. (a) x-axis data, (b) y-axis data, (c) z-axis data.
Sensors 25 03609 g006aSensors 25 03609 g006b
Figure 7. Experimental comparison of various clustering algorithms on UCI dataset. (a) Segmentation dataset, (b) Dermatology dataset, and (c) Ecoli dataset.
Figure 7. Experimental comparison of various clustering algorithms on UCI dataset. (a) Segmentation dataset, (b) Dermatology dataset, and (c) Ecoli dataset.
Sensors 25 03609 g007
Figure 8. Confusion matrix of PCSN for training and test sets. (a) Classification results of training set, (b) classification results of test set.
Figure 8. Confusion matrix of PCSN for training and test sets. (a) Classification results of training set, (b) classification results of test set.
Sensors 25 03609 g008
Figure 9. Comparison of PCSN with state-of-the-art deep learning models for sleep posture classification.
Figure 9. Comparison of PCSN with state-of-the-art deep learning models for sleep posture classification.
Sensors 25 03609 g009
Figure 10. Accuracy and loss value curves of model training and testing sets. (a) CNN model, (b) CNN + LSTM model, (c) CNN + Bi-LSTM model, and (d) PCSN (Parallel Convolutional Spatiotemporal Network).
Figure 10. Accuracy and loss value curves of model training and testing sets. (a) CNN model, (b) CNN + LSTM model, (c) CNN + Bi-LSTM model, and (d) PCSN (Parallel Convolutional Spatiotemporal Network).
Sensors 25 03609 g010aSensors 25 03609 g010b
Table 1. Demographic information of all participants reported as mean ± standard deviation.
Table 1. Demographic information of all participants reported as mean ± standard deviation.
ParticipantsAge (Years)Height (cm)Body Mass (kg)
Male (15)23.2 ± 1.6176.7 ± 4.870.4 ± 8.1
Female (15)22.3 ± 1.4164.6 ± 1.853.1 ± 5.2
Overall (30)22.7 ± 1.6170.7 ± 7.161.8 ± 11.1
Table 2. Quantitative metrics of proposed system.
Table 2. Quantitative metrics of proposed system.
System
Accuracy (°)
Spatial
Domain Resolution (°)
Acceleration
Domain Resolution (g)
X Axis0.180.250.06
Y Axis0.160.240.07
Z Axis0.170.210.06
Table 3. Comparison with some of non-contact sleep posture detection methods in literatures.
Table 3. Comparison with some of non-contact sleep posture detection methods in literatures.
NameSensor TypeConfigurationAlgorithmCategoriesAccuracy
[12]accelerometer8Rule-based492%
[23]pressure sensor64 × 32 = 2048DLP697.5%
[24]flexible sensor2 × 2 = 4SVM496%
[25]pressure sensor20 × 11 = 220CNN, SVM496.987%
[26]flexible sensor4 × 11 = 44LSTM497.97%
[29]pressure sensor11 × 24 = 264AdaBoost, SVM399.9%
[32]pressure sensor64 × 128 = 8192BEMD691.21%
[49]pressure sensor32 × 32 = 1024ConcatNet495.56%
[50]piezoelectric sensor4 × 8 = 32S3CNN393.02%
[51]flexible sensor32 × 32 = 1024ResNet695.08%
(Ours)accelerometer8PCSN698.42%
DLP: Deep Learning Position, SVM: Support Vector Machine, CNN: Convolution Neural Network, LSTM: Long Short-Term Memory, S3CNN: Sparse Sensor-based Spatiotemporal Convolution Neural Network, BEMD: Body-Earth Mover’s Distance.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, Z.; Li, G.; Wang, C.; Cascioli, V.; McCarthy, P.W. Unobtrusive Sleep Posture Detection Using a Smart Bed Mattress with Optimally Distributed Triaxial Accelerometer Array and Parallel Convolutional Spatiotemporal Network. Sensors 2025, 25, 3609. https://doi.org/10.3390/s25123609

AMA Style

Liu Z, Li G, Wang C, Cascioli V, McCarthy PW. Unobtrusive Sleep Posture Detection Using a Smart Bed Mattress with Optimally Distributed Triaxial Accelerometer Array and Parallel Convolutional Spatiotemporal Network. Sensors. 2025; 25(12):3609. https://doi.org/10.3390/s25123609

Chicago/Turabian Style

Liu, Zhuofu, Gaohan Li, Chuanyi Wang, Vincenzo Cascioli, and Peter W. McCarthy. 2025. "Unobtrusive Sleep Posture Detection Using a Smart Bed Mattress with Optimally Distributed Triaxial Accelerometer Array and Parallel Convolutional Spatiotemporal Network" Sensors 25, no. 12: 3609. https://doi.org/10.3390/s25123609

APA Style

Liu, Z., Li, G., Wang, C., Cascioli, V., & McCarthy, P. W. (2025). Unobtrusive Sleep Posture Detection Using a Smart Bed Mattress with Optimally Distributed Triaxial Accelerometer Array and Parallel Convolutional Spatiotemporal Network. Sensors, 25(12), 3609. https://doi.org/10.3390/s25123609

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop