A sleeping posture monitoring system based on a flexible pressure-sensing mattress

By combining flexible pressure-sensitive mattress with STM32 microcontroller, frequency channel selection and Tiny-MobileNetV2 model are adopted to solve the computational complexity of real-time sleep posture monitoring on embedded systems, and achieve efficient monitoring with low cost and low power consumption.

CN115153430BActive Publication Date: 2025-08-29FUDAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210626575.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-03
Publication Date
2025-08-29
Estimated Expiration
2042-06-03

AI Technical Summary

Technical Problem

The prior art is difficult to realize real-time sleep posture monitoring on low-cost, embedded systems, and has computational complexity and privacy issues, so it cannot be widely used in the Internet of Things.

Method used

A flexible pressure-sensitive mattress combined with STM32 microcontroller is used to reduce the complexity of the algorithm through the frequency channel selection algorithm and the Tiny-MobileNetV2 model and achieve low power consumption and efficient sleep posture monitoring.

Benefits of technology

In the embedded system, low-cost, low-power consumption, and real-time sleep posture monitoring is achieved, with an accuracy rate of 86.80%, meeting the real-time monitoring needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115153430B_ABST
    Figure CN115153430B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of health detection technology, specifically a sleep posture monitoring system based on a flexible pressure-sensitive mattress. The system of the present invention includes a front-end acquisition device, a signal acquisition and processing circuit and an algorithm module; the front-end acquisition device is a flexible pressure sensor, which is made in the form of a mattress and is used to collect the pressure of the human body; the signal acquisition and processing circuit includes a pressure divider module, an N-to-1 module and an STM-N module; the algorithm module is used to process the sampled human body pressure distribution map and realize the prediction of sleep posture. The algorithm module uses the network FCSNet for frequency domain channel selection and the network Tiny-MobileNetV2 as the inference model, which simplifies the complexity of the network and reduces the running time. The experimental results show that the present invention can achieve high-precision recognition of sleep posture, greatly reduce the cost and power consumption of the product, improve portability and privacy security, and help to popularize sleep posture monitoring to the daily monitoring of ordinary families.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of health detection, and specifically relates to a sleeping posture monitoring method based on a flexible pressure-sensitive mattress. Background Art

[0002] Sleep posture has been shown to be a key indicator of sleep quality analysis and has been extensively studied in sleep monitoring and healthcare for bedridden patients. An incorrect sleeping posture can exacerbate airflow obstruction in the airway, potentially leading to sleep disorders such as snoring and sleep apnea. Furthermore, it can increase stress on muscles and ligaments, causing shoulder, neck, and back pain, and even pressure ulcers due to impaired blood circulation. Pressure ulcers are a major concern for bedridden and elderly patients. They damage the skin and underlying tissues and can be life-threatening if not treated properly. The risk of death for those with pressure ulcers is 4.5 times higher than for those with the same condition but without pressure ulcers, and approximately 60,000 people die from pressure ulcer-related illnesses worldwide each year. Given overburdened healthcare systems, medical staff are often unable to provide the necessary care and monitoring of sleep posture for elderly patients and patients to prevent pressure ulcers. Therefore, a low-cost, real-time, and continuous sleep posture recognition system is needed to prevent pressure ulcers.

[0003] To date, many methods have been proposed for continuously monitoring and identifying sleep posture. These methods can be roughly divided into three categories. The first category uses a video camera or near-infrared camera to record sleep episodes and classify sleep posture from the recorded video images. However, this method can be affected by blanket obstruction and changes in ambient lighting. In addition, it may raise privacy issues. The second category uses multiple wearable sensors to record motion signals, such as three-axis accelerometers and gyroscopes. However, sleep can be disturbed by the sensors, and the acquired signals may also be susceptible to motion artifacts.

[0004] Meanwhile, none of the aforementioned methods have been implemented on mobile / embedded systems or commercialized as plug-and-play devices for IoT technology. This is primarily due to the separate nature of data acquisition and posture classification in these approaches. Data acquisition is typically performed by hardware devices, while analysis of the acquired data is performed on high-performance computers / servers. The algorithms employed in these approaches, such as deep learning, possess high computational complexity. Deploying these algorithms directly on embedded platforms hinders real-time monitoring due to long computational latency. Furthermore, due to the low cost and limited memory of embedded systems, memory consumption poses a challenge for sleep posture recognition using embedded systems. Consequently, these methods are cumbersome and costly, hindering widespread adoption in the IoT. To overcome these challenges and achieve real-time sleep posture recognition in mobile / embedded systems, methods to reduce algorithmic / network complexity are a prerequisite.

[0005] Recently, much research has focused on optimizing the accuracy and efficiency of deep neural networks through neural architecture search using hand-crafted structures and algorithms, particularly for deploying deep learning algorithms on embedded platforms. Numerous algorithm exploration methods have been proposed, including hyperparameter optimization, network pruning, and neural network architecture search. However, directly deploying these network models on ultra-low-cost embedded platforms remains overly complex. If we could pre-learn some features of the training set on a high-performance server and significantly refine the pre-trained model based on these features, we could significantly reduce the algorithm complexity and facilitate deployment on embedded systems. Summary of the Invention

[0006] The purpose of the present invention is to propose an efficient sleep posture monitoring system based on a flexible pressure-sensitive mattress to overcome the problems caused by the limitations of existing solutions.

[0007] The sleep posture monitoring system based on a flexible pressure-sensitive mattress proposed in the present invention has a flexible pressure-sensitive mattress built on the hardware side for sensing human body pressure. The pressure distribution information of the human body is collected by an acquisition and control circuit and sampled into a digital signal by the ADC module in the STM32 single-chip microcomputer for analysis and processing on the software side. The software side uses a frequency channel selection algorithm to greatly simplify the complexity of the sleep posture classification algorithm, and realizes low-cost, low-power, and efficient sleep posture monitoring in an embedded system.

[0008] The sleep posture monitoring system based on a flexible pressure-sensitive mattress proposed in the present invention includes a front-end acquisition device, a signal acquisition and processing circuit, and a software processing algorithm module, wherein:

[0009] The front-end acquisition device is a flexible pressure sensor in the form of a mattress. Its main function is to collect human pressure. The area of ​​the mattress can cover part of the shoulders, the entire chest and part of the buttocks of an adult (for example, 55cm*55cm=0.3m 2 The mattress is relatively thin (e.g., 2mm thick) and does not affect the user's sleep when placed on the bed. The mattress has a five-layer structure: the first and fifth layers are protective layers, the third layer is a pressure-sensitive sensor layer, and the second and fourth layers are flexible electrode layers.

[0010] The protective layer is a common flexible fabric;

[0011] The flexible electrode layer is divided into two layers, upper and lower, each of which consists of N parallel printed conductive electrodes. The upper and lower electrode layers are perpendicular to each other, that is, the upper electrodes are parallel to the horizontal direction, and the lower electrodes are parallel to the vertical direction. At this time, the points where the upper and lower electrodes intersect and overlap are N×N points, which correspond to the pressure detection points. Typically, the width of the electrodes is 10mm, and the spacing between them is 8mm.

[0012] The pressure-sensitive sensor layer is placed as a conductive medium in the area where the upper and lower electrodes overlap, and a total of N×N pressure sensor arrays are distributed to collect pressure; for example, N=32, then the number of points where the electrodes of the upper and lower layers cross and overlap is 32×32=1024, that is, 1024 pressure sensor arrays are distributed in the mattress to collect pressure distribution; the pressure-sensitive sensor layer can specifically be a polyolefin film, whose physical property is that the initial resistance value is very high, and its resistance value decreases rapidly as the pressure increases.

[0013] The front-end acquisition device (flexible pressure-sensing mattress) described in the present invention senses the pressure of the human body by being placed between the shoulders and hips of the subject.

[0014] The signal acquisition and processing circuit primarily includes a voltage divider module, an N (e.g., 32) select-1 module, and an STM-N (e.g., 32) module. The voltage divider module converts the pressure collected by the front-end acquisition device into a voltage, with higher pressures corresponding to higher output voltages. The N select-1 module uses the ADG732 multiplexing chip to time-share different electrode pins.

[0015] The STM-N module uses an STM32F746ZGTx series MCU and a 12-bit high-precision ADC. The STM-N's five GPIO ports (PB0, PB1, PB2, PB11, and PB15) are connected to the ADG732 address lines of the top electrode layer, while the five GPIO ports (PB6, PB7, PB10, PB13, and PB14) are connected to the ADG732 address lines of the bottom electrode layer. When an electrode in the top electrode layer is energized, the N electrodes in the bottom electrode layer are sequentially energized and output voltage. The ADC then sequentially samples these N voltage values. As the N electrodes in the top electrode layer are sequentially energized, a total of N×N voltage values ​​are sampled sequentially.

[0016] The software processing algorithm module can process the sampled human body pressure distribution map and directly predict the sleeping posture in the single chip microcomputer. The algorithm module includes four submodules: image preprocessing, frequency channel selection, model pretraining and real-time classification. Among them:

[0017] The image preprocessing submodule is divided into threshold filtering, high-pass filtering, and noise elimination in the affected area to eliminate the weak noise of the mattress, the resistance change caused by deformation, and improve the signal-to-noise ratio;

[0018] The frequency channel selection submodule converts the pressure distribution image into frequency through discrete cosine transform (DCT), and obtains the sensitivity of each frequency channel to posture classification through the frequency channel selection network FCNet. After sorting the channels by sensitivity, the indices of the two most sensitive channels in the training set are obtained;

[0019] The model pre-training submodule includes training of the FCNet network and training of the Tiny-MobileNetV2 network; the two most sensitive channels are used to train the Tiny-MobileNetV2 network, and the model is quantized and compressed to generate the final inference model;

[0020] The two most sensitive channels are used to train the Tiny-MobileNetV2 network, and the model is quantized and compressed to generate the final inference model;

[0021] The real-time classification submodule refers to deploying both the inference model and the preprocessing algorithm into the STM32 embedded system to achieve real-time sleeping posture classification.

[0022] The innovative features of the present invention can be summarized as follows:

[0023] (1) Regarding signal acquisition hardware, the present invention proposes a small-area, high-density flexible pressure-sensing mattress that can be placed directly on the bed or under the sheets, achieving comfortable, portable, stable, and accurate acquisition of human pressure distribution, while minimizing the mattress area and reducing costs.

[0024] (2) Regarding the sleep posture recognition algorithm module, this paper proposes for the first time a network, FCSNet, that can effectively identify trivial frequency channels and select sensitive frequency channels. By pre-training a learning-based frequency selection method on a high-performance computer server, sufficient frequency information is retained to achieve satisfactory performance, while trivial frequency components are removed before inference. By pruning up to 87.5% of the channels, the complexity of the model is greatly reduced without causing a significant performance degradation.

[0025] (3) Regarding system implementation, considering the limitations of mobile / embedded resources, the present invention proposes and deploys a Tiny-MobileNetV2 model based on MobileNetV2; compared with MobileNetV2, Tiny-MobileNetV2 reduces the number of layers, channels and expansion factors; it provides a very memory-saving inference, simplifies the complexity of the network, and reduces the running time; thus enabling low-cost, low-power, efficient and convenient sleep posture monitoring in embedded systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a diagram of the framework of the efficient sleep posture monitoring system of this patent.

[0027] Figure 2 Schematic diagram of the five-layer structure of a flexible pressure-sensitive mattress.

[0028] Figure 3This is the hardware circuit schematic.

[0029] Figure 4 Schematic diagram of the voltage division principle.

[0030] Figure 5 Schematic diagram of discrete cosine transform.

[0031] Figure 6 Figure 2. Architecture diagram of the FCSNet frequency channel selection network.

[0032] Figure 7 This is the architecture diagram of the inference network Tiny-MobileNetV2. DETAILED DESCRIPTION

[0033] 1. Mattress structure design

[0034] like Figure 1 As shown, the mat is a five-layer structure with a thickness of 2 mm and an area of ​​55 cm * 55 cm. It can cover the entire chest, part of the shoulders and part of the hips. The protective layer is based on soft fabric. The conductive electrode layer is composed of N = 32 parallel strips of printed electrodes. The spacing between the electrodes is 0.8 cm and the width of the electrodes is 1 cm. The upper and lower conductive layers are placed opposite each other in the horizontal and vertical directions. The schematic diagram of the mat can be seen in Figure 4 Each electrode is connected to each pin, as shown in the following example: Figure 4 As shown in the figure, the sensor layer is located in the middle, forming a 32x32 pressure sensor array. It is made of a flexible material based on Velostat. Velostat is one of the most common and inexpensive materials for force-sensitive resistors (FSRs). FSRs are analog sensors whose resistance changes with pressure. Their physical characteristics include a very high initial resistance value that decreases sharply with increasing pressure. Their volume resistivity is as high as 500Ωcm, while their surface resistivity is as high as 31,000Ω.

[0035] 2. Design of data signal acquisition and processing circuit

[0036] like Figure 3 As shown in the figure, the data acquisition circuit consists of two circuits: one for data acquisition and the other for signal control. The data acquisition circuit includes a 32-channel analog multiplexer (ADG732) and 32 voltage divider resistors. The ADG732 can be used to obtain the voltage values ​​of each of the 32 pins. The signal control circuit uses the ADG732 to sequentially supply 3.3V to each of the 32 pins.

[0037] The electrical schematic diagram of the mattress is shown in Figure 4The upper conductive electrode layer is connected to the signal control circuit, while the lower conductive electrode layer is connected to the acquisition circuit. Assume that the sensor resistance is R_1 and the voltage divider resistance is R_2. When the signal control circuit provides a 3.3V voltage to one electrode, the sensor voltage is V_1 and the voltage divider resistance is V_2. The voltage at the midpoint between the sensor and the voltage divider resistance is V_2, so the relationship between R_1 and V_2 is:

[0038]

[0039] As can be seen from the above equation, R_1 is inversely proportional to V_2, and pressure is also inversely proportional to R_1, so pressure is directly proportional to V_2. Therefore, as long as the V_2 value at each point on the sensor array is measured, the pressure distribution map can be restored.

[0040] The STM-32 is an embedded platform featuring an STM32F746ZGTx microcontroller based on the Cortex-M7 core, boasting a 216MHz clock speed, 1Mbyte of flash memory, and 340KB of RAM. It provides numerous peripherals, such as serial ports, GPIOs, and a 12-bit analog-to-digital converter (ADC). The STM-32 system uses data acquisition circuitry to acquire the pressure voltage from each sensor, processes the pressure distribution image, and ultimately implements real-time sleep posture classification using the proposed algorithm.

[0041] 3. Design of software algorithm module

[0042] The framework diagram of the software algorithm module mainly includes four sub-modules: image preprocessing, frequency channel selection, model pre-training and real-time classification, among which:

[0043] (1) The operation process of the image preprocessing submodule is as follows:

[0044] (1) To deal with noise and other interference, threshold processing is performed on all points of the mattress. Assume that the pressure value of each point of the mattress is p ij (i≤32,j<<32), set the threshold K to:

[0045]

[0046] That is, the K value is the average pressure of the entire mattress. For any point on the mattress, if the pressure value is less than K, it is 0, and if it is greater than or equal to K, it remains unchanged.

[0047] (2) Use a Gaussian smoothing filter to remove noise from all points.

[0048] (3) Eliminate the associated areas. As mentioned above, the middle layer of the mattress is a whole material. The points pressed by the body may affect the points that are not pressed, so these points need to be eliminated. To address this phenomenon, this paper adopts the following method: directly extract the data of the entire row for each row, then find all the peak points in this row, locate the peak point with the smallest value, whose size is P, and then perform threshold processing on all the points in this row, with a threshold of P*3 / 4. The purpose of multiplying the threshold by the fraction is to retain the points around the peak, because these may be the edge areas that are pressed. The same operation is performed on each column.

[0049] (2) The processing flow of the frequency channel selection submodule is as follows:

[0050] (1) After image preprocessing, the image is divided into 4×4 pixel blocks, and then DCT processing is performed on each block because the resolution of the input image is very low (32×32). There are 64 blocks after DCT transformation. Then, the two-dimensional DCT coefficients are combined into a three-dimensional DCT cube through the DCT reshaping operation, as shown in Figure 5 As shown in Figure 2. Components of the same frequency in all 64 blocks are grouped into one channel, resulting in a total of 16 frequency channels. Finally, the 32×32 input image is converted to 8×8×16 DCT coefficients, maintaining the same input data size.

[0051] (2) Frequency channel selection

[0052] This paper uses the network FCSNet to obtain the sensitivity of frequency channels in image classification tasks. Figure 6 As shown in Figure 1, it consists of an FCS block, three convolutional layers, one pooling layer, and one fully connected layer. The FCS block includes a global average pooling layer and two fully connected layers. The FCS block maps the input of different frequency channels into corresponding weights (dense1 layer), and the other layers are used for network training.

[0053] (3) The operation process of the model pre-training submodule is as follows:

[0054] (1) Training of FCSNet

[0055] Assume that the dimension of the input sample, i.e., the global frequency information X, is H×W×16, where H and W are the width and height of X, and the global average pooling layer F in the FCS block is used. g (X) Reduce the global frequency information X to T (1×16). Then pass it through the fully connected layer F e (T) Convert T to Z 1 and Z 2 . Z 1 and Z 2 They are all in the shape of (1×16), by Z 1 and Z2 The elements at the same position in the SoftMax operation are converted to A 1 and A 2 . Indicates the importance of the C-th channel to image classification, Indicates the redundancy of the c-th channel.

[0056] Finally, A 1 Perform point-to-point multiplication with the input X to obtain Y, which is the input of the first convolutional layer in FCSNet.

[0057]

[0058] In the above formula, x c (i,j) is the c-th channel of input X, and is the fully connected layer F e The bias parameter of (T), and is the fully connected layer F e The weight parameter of (T); x i,j,c is the value of the i-th height, j-th width, and c-th channel coordinate, that is, the value under the (i, j, c) coordinate of the corresponding input X; similarly, y i,j,c The value corresponding to the (i, j, c) coordinate of the output Y.

[0059] After the network is trained, The larger the value of , the more sensitive the Cth channel is. The two most sensitive channels are then selected as the channels for this sample. From the selected channels for all samples, the two channels that were selected the most times are retained in the training set. We then use only these two channels as input, reducing the input by 87.5%.

[0060] (2) Training of the Tiny-MobileNetV2 network

[0061] After frequency channel selection, the network Tiny-MobileNetV2 is trained by the two channels that are most sensitive to classification in frequency. Then, through integer quantization after training, the 32-bit floating point numbers in the network (such as weights, biases, and medians between layers) are converted to the nearest 8-bit fixed point numbers. The structure of the network Tiny-MobileNetV2 can be found in Figure 7 shown.

[0062] Tiny-MobileNetV2 is an inverted residual architecture based on depthwise separable convolutions. It consists of one convolutional layer, four inverted residual building blocks based on depthwise separable convolutions, and one fully connected layer. The convolutional layer is the first layer, extracting raw image information; the fully connected layer is the last, outputting the probability distribution of each class. The inverted residual architecture consists of one layer of regular convolution, one layer of channel-wise convolution, and one layer of point-wise convolution. The expansion factor in the inverted residual building block is 4. This significantly reduces the number of parameters, computation, and memory accesses while maintaining network performance, making it more suitable for low-performance, memory-intensive embedded systems. Furthermore, since the image resolution is only 32×32, retaining only 12.5% ​​of the frequency channels, even with a significantly simplified network, it still achieves good classification performance. Compared to the existing MobileNetV2 network, the Tiny-MobileNetV2 network has fewer layers, only 16, and fewer channels (maximum 64). Furthermore, the expansion factor in the inverted residual building block is reduced from 6 to 4. Through such lightweight improvements, the size of the Tiny-MobileNetV2 network is greatly reduced, and the amount of computation is greatly reduced, which makes it easier to deploy it in embedded systems.

[0063] After model training is completed, Tiny-MobileNetV2 is first converted to TF-Lite format by TensorFlow Lite, which is then converted into a library that can be integrated into STM32 user projects.

[0064] (4) Real-time classification submodule

[0065] Finally, the complete algorithm was deployed on the STM32. Signal control and data acquisition were implemented by connecting the STM32's IO ports and ADC to the data acquisition circuit. For the DCT, to reduce computational complexity, the transformation matrix coefficients were pre-calculated and integrated into the project as static constants. After deploying the complete algorithm, real-time posture classification was achieved on the STM32 system.

[0066] 4. Experimental testing

[0067] Two sets of experiments were conducted to evaluate the sleep posture recognition performance of the proposed system. The first experiment was a short-term experiment to assess the feasibility of the proposed system. It is noteworthy that the data collected in this experiment was short-term and fixed-interval. Each posture was maintained for 30 seconds, with a 15-second interval between postures. The second experiment evaluated the system's performance in real-world scenarios by collecting data throughout the night.

[0068] Sixteen subjects (9 males, 7 females) underwent a short-term experiment. Subjects' heights ranged from 158 to 180 cm, and their weights from 48 to 83 kg. Written consent was obtained from each subject before the experiment. A cushion was placed between the subjects' necks and hips to record pressure distribution.

[0069] According to research, sleeping on one side with legs bent is the most common, accounting for 41%, while sleeping on one side with legs straight accounts for 28%. It can be seen that even for the same side-sleeping position, there are at least two common positions (bent legs or straight legs). Therefore, although all postures are divided into only four categories (supine, prone, right side, and left side), it is necessary to obtain as many categories as possible during the experiment. After investigation, eight postures were obtained as a data set to improve the scientific nature of the experiment.

[0070] To evaluate the system's performance in real-world scenarios, continuous sleep data was collected throughout the night. Five subjects participated in the nighttime experiment. The subjects' heights ranged from 168 cm to 185 cm, and their weights ranged from 60 kg to 87 kg. None of the subjects in the nighttime experiment participated in the short-term experiment. The camera continuously recorded their real-life postures. Because the subjects did not move frequently during sleep, the sampling frequency was reduced to 0.1 Hz, resulting in a total of 20,521 pressure distribution images.

[0071] Through the algorithm proposed by this invention, the final summary results are shown in the following table:

[0072] Table 1. Algorithm classification results and model parameter information

[0073]

[0074] Table 2. Runtime and performance of the model after compression and deployment to STM32

[0075] Accuracy Storage usage Memory usage Runtime MACC Cycle / MACC 86.80% 21.6KB 8.4KB 5.02ms 362908 2.99

[0076] MACC is the number of calculations, and Cycle / MACC is the average number of clock cycles required to run a calculation.

[0077] Table 3. Comparison of STM32 system and algorithm on the server side

[0078] network platform Clock frequency price Memory Maximum power consumption Runtime Accuracy ResNet18 Intel i7-6700 <![CDATA[4.0GH Z ]]> $319 16 GB 65W 11.7ms 86.35% Proposed STM32F746 <![CDATA[216MH Z ]]> $5.518 320KB 0.43W 5.02ms 86.80%

[0079] As shown in the table above, after model compression and deployment, the proposed algorithm achieves 86.80% classification accuracy on the STM-32 test set. The model size is only 56KB, significantly smaller than other existing algorithms. The runtime on the STM-32 is 5.02ms, fully meeting the requirements for sleep posture classification.

Claims

1. A sleeping posture monitoring system based on a flexible pressure-sensitive mattress, characterized in that: It includes front-end acquisition equipment, signal acquisition and processing circuits, and software processing algorithm modules, including: The front-end acquisition device is a flexible pressure sensor in the form of a mattress, which is used to collect human pressure. The mattress can cover part of the shoulders, the entire chest, and part of the buttocks of an adult. The mattress has a five-layer structure: the first and fifth layers are protective layers, the third layer is a pressure-sensitive sensor layer, and the second and fourth layers are flexible electrode layers. The protective layer is a flexible fabric; The flexible electrode layer is divided into two layers, upper and lower, each of which consists of N parallel printed conductive electrodes. The upper and lower electrode layers are perpendicular to each other, that is, the upper electrodes are parallel to the horizontal direction, and the lower electrodes are parallel to the vertical direction. At this time, the upper and lower electrodes overlap at N×N points, which are the pressure detection points; The pressure-sensitive sensor layer, serving as a conductive medium, is placed in the area where the upper and lower electrodes overlap, and comprises an N×N pressure sensor array for collecting pressure. The pressure-sensitive sensor layer is specifically a polyolefin film, which has a physical property of having a very high initial resistance that decreases rapidly as pressure increases. The front-end acquisition device is placed between the subject's shoulders and hips to sense the pressure of the human body; The signal acquisition and processing circuit includes a voltage divider module, an N-choose-1 module and an STM-N module; wherein: The voltage divider module converts the pressure collected by the front-end collection device into voltage, and the greater the pressure, the greater the corresponding output voltage; The N-to-1 module uses a multiplexing chip ADG732 to select different electrode pins in a time-sharing manner; The STM-N module uses an STM32F746ZGTx series MCU and a 12-bit high-precision ADC. The five GPIO ports of the STM-N: PB0, PB1, PB2, PB11, and PB15 are connected to the ADG732 address lines of the upper electrode layer, and the five GPIO ports: PB6, PB7, PB10, PB13, and PB14 are connected to the ADG732 address lines of the lower electrode layer. When an electrode in the upper electrode layer is turned on, the N electrodes in the lower electrode layer are turned on in sequence to output voltage. At this time, the ADC samples these N voltage values ​​in sequence. As the N electrodes in the upper electrode layer are turned on in sequence, a total of N×N voltage values ​​are sampled in sequence. The software processing algorithm module is used to process the sampled human body pressure distribution map and directly realize the prediction of sleeping posture in the single chip microcomputer; The software processing algorithm module includes four submodules: image preprocessing, frequency channel selection, model pretraining and real-time classification; among which: The image preprocessing submodule is divided into threshold filtering, high-pass filtering, and noise elimination in the affected area to eliminate the weak noise of the mattress, the resistance change caused by deformation, and improve the signal-to-noise ratio; The frequency channel selection submodule converts the pressure distribution image into frequency through discrete cosine transform (DCT), and obtains the sensitivity of each frequency channel to posture classification through the frequency channel selection network FCNet. After sorting the channels by sensitivity, the indices of the two most sensitive channels in the training set are obtained; The model pre-training submodule includes training of the FCNet network and training of the Tiny-MobileNetV2 network; the two most sensitive channels are used to train the Tiny-MobileNetV2 network, and the model is quantized and compressed to generate the final inference model; The real-time classification submodule deploys both the inference model and the preprocessing algorithm into the STM-N embedded system to achieve real-time sleeping posture classification.

2. The sleep posture monitoring system based on a flexible pressure-sensing mattress according to claim 1, characterized in that: Assuming N=32, the processing flow of the image preprocessing submodule is as follows: (1) To deal with noise and other interference, threshold processing is performed on all points of the mattress; if the pressure value of each point of the mattress is p ij (i≤32,j<<32), set the threshold K to: That is, the K value is the average pressure of the entire mattress. For any point on the mattress, if the pressure value is less than K, it is 0, and if it is greater than or equal to K, it remains unchanged. (2) Use a Gaussian smoothing filter to remove noise from all points; (3) Eliminate the associated area; The middle layer of the mattress is a whole material. The points pressed by the body may affect the points that are not pressed. These points need to be eliminated. To this end, the following method is adopted: directly extract the data of the entire row for each row, then find all the peak points in this row, locate the peak point with the smallest value, whose size is P, and then threshold all the points in this row, with a threshold of P*3 / 4; the purpose of multiplying the threshold by the fraction is to retain the points around the peak; the same operation is performed on each column.

3. The sleep posture monitoring system based on a flexible pressure-sensitive mattress according to claim 2, characterized in that: The operation process of the frequency channel selection submodule is as follows: (1) After image preprocessing, the image is divided into 4×4 pixel blocks, and then DCT processing is performed on each block, resulting in 64 blocks. Then, the two-dimensional DCT coefficients are combined into a three-dimensional DCT cube through the DCT reshaping operation. The components of the same frequency in all 64 blocks are classified into one channel, for a total of 16 frequency channels. Finally, the 32×32 shaped input image is converted to 8×8×16 shaped DCT coefficients, keeping the same input data size; (2) Frequency channel selection The network FCSNet is used to obtain the sensitivity of frequency channels in image classification tasks; it consists of an FCS block, 3 convolutional layers, 1 pooling layer and 1 fully connected layer; the FCS block includes a global average pooling layer and 2 fully connected layers; the FCS block maps the input of different frequency channels to corresponding weights through the dense1 layer, and the other layers are used for network training.

4. The sleep posture monitoring system based on a flexible pressure-sensitive mattress according to claim 3, characterized in that: The operation process of the model pre-training submodule is as follows: (1) Training of FCSNet Assume that the dimension of the input sample, i.e., the global frequency information X, is H×W×16, where H and W are the width and height of X, and the global average pooling layer F in the FCS block is used. g (X) Reduce the global frequency information X to T (1×16); then pass it through the fully connected layer F e (T) Convert T to Z 1 and Z 2 ; Z 1 and Z 2 They are all in the shape of (1×16), by Z 1 and Z 2 The elements at the same position in the SoftMax operation are converted to A 1 and A 2 ; Indicates the importance of the C-th channel to image classification, represents the redundancy of the cth channel; finally, A 1 Perform point-to-point multiplication with the input X to obtain Y: In the above formula, x c (i,j) is the c-th channel of input X, and is the fully connected layer F e The bias parameter of (T), and is the fully connected layer F e The weight parameter of (T); x i,j,c is the value of the i-th height, j-th width, and c-th channel coordinate, that is, the value under the (i, j, c) coordinate of the corresponding input X; similarly, y i,j,c The value at the (i, j, c) coordinate of the corresponding output Y; After the network is trained, The larger the value of , the more sensitive the Cth channel is; then the two most sensitive channels are selected as the channels of this sample; from the selected channels of all samples, the two channels with the most selection times are retained in this training set; Then only use these two channels as input; (2) Training of the Tiny-MobileNetV2 network After frequency channel selection, the network Tiny-MobileNetV2 is trained on the two channels that are most sensitive to classification in frequency. Then, through post-training integer quantization, the 32-bit floating-point numbers in the network, including weights, biases, and inter-layer median, are converted to the nearest 8-bit fixed-point numbers. After model training is completed, Tiny-MobileNetV2 is first converted to TF-Lite format by TensorFlow Lite, which is then converted into a library that can be integrated into STM32 user projects.

5. The sleep posture monitoring system based on a flexible pressure-sensitive mattress according to claim 4, characterized in that: The network Tiny-MobileNetV2 includes: 1 convolutional layer, 4 inverted residual structure blocks based on depthwise separable convolution and 1 fully connected layer; the convolutional layer is located in the first layer, used to extract original image information; the fully connected layer is at the end, outputting the probability distribution of each category; the inverted residual structure consists of a layer of regular convolution, a layer of channel-by-channel convolution and a layer of point-by-point convolution, and the expansion factor in the inverted residual structure block is 4.

Citation Information

Patent Citations

  • Method for predicting sleeping posture based on neural network recognition

    CN113688720A

  • Plantar pressure signal pickup assembly

    CN208511028U