CN109528159B - Human sleep and respiration monitoring system and method based on bed body - Google Patents

Human sleep and respiration monitoring system and method based on bed body Download PDF

Info

Publication number
CN109528159B
CN109528159B CN201811243454.6A CN201811243454A CN109528159B CN 109528159 B CN109528159 B CN 109528159B CN 201811243454 A CN201811243454 A CN 201811243454A CN 109528159 B CN109528159 B CN 109528159B
Authority
CN
China
Prior art keywords
signal
signals
sleep
respiration
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811243454.6A
Other languages
Chinese (zh)
Other versions
CN109528159A (en
Inventor
皇甫江涛
季彬浩
刘派
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201811243454.6A priority Critical patent/CN109528159B/en
Publication of CN109528159A publication Critical patent/CN109528159A/en
Application granted granted Critical
Publication of CN109528159B publication Critical patent/CN109528159B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/68Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient
    • A61B5/6887Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient mounted on external non-worn devices, e.g. non-medical devices
    • A61B5/6891Furniture
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/08Detecting, measuring or recording devices for evaluating the respiratory organs
    • A61B5/0826Detecting or evaluating apnoea events
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Detecting, measuring or recording devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/11Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb
    • A61B5/1118Determining activity level
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/48Other medical applications
    • A61B5/4806Sleep evaluation
    • A61B5/4809Sleep detection, i.e. determining whether a subject is asleep or not

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Physics & Mathematics (AREA)
  • Veterinary Medicine (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Public Health (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • Physiology (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Dentistry (AREA)
  • Anesthesiology (AREA)
  • Pulmonology (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)

Abstract

The invention discloses a bed body-based human sleep and respiration monitoring system and method. Pressure sensor is all installed to four footpost lower extremes of the bed body of this system, and pressure sensor connects gradually AD conversion module, microprocessor, wireless module through the wire, and wireless module's wiFi module and bluetooth module pass through the serial ports and acquire original signal from microprocessor, and the wiFi module sends network database with original signal, and bluetooth module sends the cell-phone with original signal through the bluetooth agreement. The monitoring method mainly resets the microprocessor under the empty bed state; the pressure sensor signal is pre-judged by the microprocessor through the A/D conversion module and then sent to a network database or a mobile phone, so that the original signal is subjected to feature extraction, a sleep signal and a respiration signal are obtained, and then the detection of the apnea phenomenon and the statistical analysis of the respiration frequency are completed. The invention has the characteristics of low cost and simple structure, and is suitable for application occasions such as family care, hospital monitoring and the like.

Description

Human sleep and respiration monitoring system and method based on bed body
Technical Field
The invention relates to a human sleep and respiration monitoring system, in particular to a system and a method capable of analyzing specific sleep behaviors and carrying out statistical analysis on respiration signals based on a bed body.
Background
At present, a plurality of detection methods are used for detecting sleep quality, the most common medical method is Polysomnography (PSG), which is always regarded as the 'gold standard' of sleep monitoring, and the PSG is mainly used for accurately and scientifically evaluating the sleep state of a human body by using precision equipment in combination with physiological characteristics such as blood pressure, heartbeat, brain waves and the like in medicine. However, the PSG requires a patient to wear a lot of equipment, and also needs to sleep in a hospital all night, which is high in cost, affects the sensory experience, and cannot be applied to home detection.
In addition, there is a method of performing sleep detection using a wrist motion meter, a leg motion meter, and a triaxial acceleration sensor. Compared with PSG, the methods are much lower in cost, simple and easy to carry, can be applied to home detection, and still do not solve the problem that the sensory experience is influenced by wearing equipment. Meanwhile, the wrist meter and the leg meter have a problem in that the time for the user to start and end sleep cannot be automatically determined, requiring manual setting by the user. Therefore, a non-contact sleep behavior detection method is needed, which can realize multi-angle sleep detection, has a function of breath analysis, and reduces system cost.
Disclosure of Invention
In view of the shortcomings in the background art, the invention aims to provide a bed-based human sleep and respiration monitoring system and method.
In order to achieve the purpose, the invention adopts the technical scheme that:
human sleep and respiration monitoring system based on bed body
Pressure sensor is all installed to the lower extreme of four footposts of the bed body, four pressure sensor pass through the wire and are connected to AD conversion module jointly, AD conversion module is connected to wireless module through microprocessor, wireless module includes wiFi module and bluetooth module, wiFi module and bluetooth module all acquire original signal from microprocessor through the serial ports, the wiFi module sends original signal to the network database, bluetooth module passes through the bluetooth agreement and sends original signal to the cell-phone.
The pressure sensor is fixed under the foot of the bed and used for collecting pressure signals, and the collected pressure signals are converted into resistance values and then are converted into output voltage values.
The A/D conversion module comprises a stabilized voltage power supply and an on-chip clock oscillator and is used for amplifying and A/D converting the output voltage value of the pressure sensor.
The microprocessor includes several fast I/O ports for reading the original signal after the A/D conversion module and judging.
The sleep behavior detection algorithm utilizes wavelet decomposition to carry out multi-layer decomposition on barycentric coordinates of original signals, extracts wavelet detail coefficients and variances as judgment features, and classifies the signals by adopting a support vector machine method, so that the sleep signals are divided into normal sleep signals and leg movement signals.
The respiration statistical algorithm carries out windowing processing on the original signal, extracts the respiration signal from the original signal according to a set threshold value, then carries out filtering wave to obtain a filtered respiration signal, and carries out statistics on the respiration times and the detection of apnea phenomenon, thereby realizing various non-perception detections in the sleep process.
Secondly, a monitoring method of a human body sleep and respiration monitoring system based on a bed body, which comprises the following steps:
1) and resetting the pressure sensor in an empty bed state.
A rectangular coordinate system is established by taking one foot of a bed leg as the origin of coordinates and taking the directions of two adjacent bed legs as the positive directions of an X axis and a Y axis respectively, barycentric coordinates are calculated according to the readings of pressure sensors under the four bed legs, and the horizontal and vertical coordinates X and Y of the barycentric coordinates can be obtained according to the lever principle:
Figure BDA0001839947460000021
Figure BDA0001839947460000022
wherein, w1, w2, w3 and w4 are respectively the readings of the pressure sensors under the four bed legs.
The reading of the pressure sensor is recorded as the weight of the pelt in an empty bed condition, the user's activity in the bed causes the reading of the pressure sensor to change, and the reading of the weight of the pelt subtracted from the reading of each change of the pressure sensor is taken as the raw signal.
2) The original signal of the pressure sensor is converted by the A/D conversion module and then judged by the microprocessor.
Setting a flag bit S, if all the received original signals for two consecutive times are greater than a flag threshold value T, setting the flag bit S to be 1, and considering that the user starts to sleep; and if the original signals of two consecutive times are all smaller than the mark threshold value T, setting the mark position S to be 0 and considering that the user gets up.
The flag threshold T is set to 2 kg in consideration of the weight of a normal human body and an actual test.
3) And sending the original signal and the zone bit S to a network database or a mobile phone through a WiFi module or a Bluetooth module, and extracting the characteristics of the original signal by the network database or the mobile phone so as to obtain a sleep signal and a respiratory signal.
The extraction of the sleep signal is based on a sleep behavior detection algorithm to divide the sleep signal into a normal sleep signal and a leg movement signal, and specifically comprises the following steps: carrying out multi-layer decomposition on barycentric coordinates of acquired original signals by utilizing wavelet decomposition to obtain approximate coefficients and detail coefficients after horizontal and vertical coordinate wavelet decomposition of the barycentric coordinates, selecting the detail coefficients of a seventh layer as first features, forming 18-dimensional feature vectors by variances of the horizontal and vertical coordinates of the barycentric coordinates as second features, and considering the original signals as leg movement signals when the detail coefficients have peak values with slopes larger than a first preset threshold value and the variances of the horizontal and vertical coordinates of the barycentric coordinates are larger than a second preset threshold value; specifically, detail coefficients (x and y have 8 values respectively) after seven layers of wavelet decomposition of a gravity center horizontal coordinate and a gravity center vertical coordinate are selected to form 18-dimensional feature vectors, and the variance (2 values) of the gravity center horizontal coordinate and the gravity center vertical coordinate is adopted to classify and obtain the features of the leg movement signals by adopting a support vector machine method, so that the occurrence of the leg movement signals in a certain time period is automatically identified in normal sleep signals.
The separation of the respiration signal and the leg movement signal is based on a respiration analysis algorithm, and specifically comprises the following steps: setting a respiration signal threshold H, windowing the original signal, calculating the difference value between the maximum value and the minimum value of the original signal in each window, considering that the original signal in each window belongs to a leg movement signal when the difference value is greater than the respiration signal threshold H, and considering that the original signal in each window belongs to a respiration signal when the difference value is less than the respiration signal threshold H; discarding all data belonging to leg movement signals in the original signals to further obtain separated respiration signals, removing random interference from the separated respiration signals through moving average filtering, and obtaining filtered respiration signals through the signals after FIR low-pass filtering.
4) Detection of apneic phenomena and statistical analysis of respiratory rate:
the detection method of the apnea phenomenon is similar to the respiratory statistic algorithm, and specifically comprises the following steps: setting an apnea threshold value D, carrying out windowing processing on the original signal, calculating the difference value between the maximum value and the minimum value of the original signal in each window, considering that the original signal in each window belongs to the apnea phenomenon when the difference value is larger than the apnea threshold value D, and considering that the original signal in each window belongs to the apnea phenomenon when the difference value is smaller than the apnea threshold value D.
And (3) counting the respiratory frequency by adopting a method of counting signal peak values, calculating the slope of the filtered respiratory signal in the step 3), and counting as a primary peak value when the slope changes from positive to negative, wherein the total number of the peak values is the number of times of respiration.
5) Drawing the breathing times per minute in a sleep breathing frequency histogram according to the statistical result of the breathing frequency obtained in the step 4), sending the processing result of the network database or the mobile phone on the original signal to the mobile terminal as the sleep behavior detection result, and checking the change condition of the breathing frequency during the sleep through the mobile terminal by a user.
The invention has the beneficial effects that:
1) the whole system is simpler, more convenient and lower in cost than the medical common Polysomnography (PSG), and has higher accuracy than devices such as a wrist motion meter on the market;
2) the method has the advantages that the characteristics of the collected leg movement signals are extracted, the classification of the sleep behaviors is carried out by using a support vector machine, the leg movement behaviors are automatically identified, and the accuracy is high; the acquired respiratory signals are also very clear, then the respiratory signals of leg movement behaviors are separated out, the apnea phenomenon is detected, the respiratory frequency is statistically analyzed, the resolution rate of normal sleep and leg movement twitch is over 90 percent, and the respiratory and apnea judgment precision is close to 100 percent;
3) the system has the characteristics of low cost and simple structure in the aspect of the whole data acquisition, transmission and processing system, and is suitable for household detection.
Drawings
Fig. 1 is a system architecture diagram.
Fig. 2 is a flow chart of a sleep behavior detection algorithm.
Fig. 3 is a flow chart of a respiratory statistics algorithm.
FIG. 4 is a diagram of wavelet decomposition layer detail coefficients.
Fig. 5 is a graph of the effect of breath analysis.
Fig. 6 is a graph of the effect of the separation of the leg movement and respiration signals.
Fig. 7 is a plot of the amplitude frequency response of a Finite Impulse Response (FIR) low pass filter.
Fig. 8 is a histogram of sleep breathing frequency.
In the figure: 1. the device comprises a bed body, 2. a pressure sensor, 3. an A/D conversion module, 4. a microprocessor, 5. a WiFi module, 6. a Bluetooth module, 7. a network database and 8. a mobile phone.
Detailed Description
The invention is further illustrated by the following figures and examples.
As shown in fig. 1, pressure sensor 2 is all installed to the lower extreme of four footpads of bed body 1, four pressure sensor 2 are connected to AD conversion module 3 through the wire jointly, AD conversion module 3 is connected to wireless module through microprocessor 4, wireless module includes wiFi module 5 and bluetooth module 6, wiFi module 5 and bluetooth module 6 all acquire primitive signal from microprocessor 4 through the serial ports, wiFi module 5 sends primitive signal to network database 7, bluetooth module 6 sends primitive signal to cell-phone 8 through the bluetooth agreement.
Pressure sensor 2 fixes under the foot of bed, and pressure sensor 2 converts the pressure signal who gathers into the resistance value, and then converts output voltage value into.
The A/D conversion module 3 comprises a plurality of necessary peripheral circuits such as a stabilized voltage power supply, an on-chip clock oscillator and the like, the integration level is high, the response speed is high, the anti-interference performance is strong, and the A/D conversion module 3 is used for amplifying the output voltage value of the pressure sensor 2 and performing A/D conversion processing to obtain an original signal.
The microprocessor 4 comprises a plurality of fast input/output I/O ports, meets the use requirement of the system, and is used for reading and judging the original signals processed by the A/D conversion module 3.
The sleep behavior detection algorithm utilizes wavelet decomposition to carry out multi-layer decomposition on barycentric coordinates of original signals, extracts wavelet detail coefficients and variances as judgment features, and classifies the signals by adopting a support vector machine method, so that the sleep signals are divided into normal sleep signals and leg movement signals.
The respiration statistical algorithm carries out windowing processing on the original signal, extracts the respiration signal from the original signal according to a set threshold value, obtains the filtered respiration signal through moving average filtering and FIR low-pass filtering, and counts the respiration times and detects the phenomenon of apnea so as to realize various non-perception detections in the sleep process.
The specific implementation mode of the invention comprises an embodiment I and an embodiment II, wherein the first two steps of the embodiment I and the embodiment II are basically the same, and the difference is that the microprocessor 4 of the embodiment I sends an original signal to the network database 7 through the Wifi module 5 to perform signal processing; the microprocessor 4 of the second embodiment sends the original signal to the mobile phone 8 through the bluetooth module 6 for signal processing.
The first embodiment is as follows: the microprocessor 4 sends the original signal to the network database 7 through the Wifi module 5
In the embodiment, the pressure sensors 2 placed under the four feet of the bed 1 are used for collecting voltage data, the model of the pressure sensor 2 adopted by the system is YZC-167, the measuring range is 75 kilograms, and the total measuring range of the four sensors 2 is 300 kilograms. YZC-167 is a strain gauge pressure sensor that can convert the measured pressure into a change in the corresponding resistance value and then into a change in the output voltage value. The a/D conversion module 3 selects the HX711A/D conversion module, and performs amplification and a/D conversion on the voltage value to obtain voltage data. The pressure readings obtained here are not accurate values and need to be calibrated.
1) The fur weight is reduced when the bed is empty, the reading at the moment is recorded as the fur weight, and the fur weight is subtracted when the reading is carried out every time, so that the reading obtained by processing is the net weight caused by a human body completely, and errors caused by external factors such as the placing position of articles on the bed are avoided.
The method for resetting the empty bed 1 is based on analysis of the center of gravity, so that the readings of the four pressure sensors 2 need to be converted into the readings of the center of gravity, a rectangular coordinate system is established by taking one foot of the bed 1 as a coordinate origin, the two beds 1 are respectively in the X-axis positive direction and the Y-axis positive direction along the direction, and the four pressure sensors 2 are placed under the four beds 1. The barycentric coordinates can be calculated according to the reading numbers of the pressure sensors 2 under the feet of the four beds 1, the horizontal coordinates and the vertical coordinates of the barycenter are respectively recorded as x and y, and according to the lever principle:
Figure BDA0001839947460000051
Figure BDA0001839947460000052
wherein w1, w2, w3 and w4 are readings of the four foot pressure sensors respectively.
The reading of the pressure sensor 2 changes when the user moves on the bed, and the reading of the fur weight in the initial empty bed state is subtracted from the reading read by the pressure sensor 2 each time to be used as a raw signal to be processed;
2) the original signal of the pressure sensor 2 is converted by the A/D conversion module 3 and then judged by the microprocessor 4:
considering that many sleep detection devices on the market cannot automatically judge the time of starting and ending the sleep of a user at present, the system designs a simple judging method, the microprocessor 4 can select an STM32 microprocessor, after the STM32 microprocessor obtains an original signal, firstly, the judgment is carried out, if the original signals for two times are all greater than a mark threshold value T, a mark position S is set to be 1, and the user is considered to start the sleep; and if the original signals of two consecutive times are all smaller than the mark threshold value T, setting the mark position S to be 0 and considering that the user gets up. The flag threshold T is set to 2 kg in consideration of the weight of a normal human body and an actual test.
The sampling frequency of the system is 10Hz, the duration time of the leg movement signal is about 2 seconds, and the frequency of the respiration signal is about 0.2 to 0.8Hz, so the sampling frequency of 10Hz can completely meet the system requirement.
3) The microprocessor 4 sends the readings w1, w2, w3, w4 and the flag bit S of the four pressure sensors 2 to the network database 7 through the Wifi module 5 in a subject simple notation (Json) format, and the network database 7 extracts the characteristics of the original signals to obtain sleep signals and respiratory signals.
The network database 7 selects an open-source Message Queue Telemetry Transmission (MQTT) message server EMQ which is based on an Erlang/OTP language platform, supports million-level connection and distributed clusters to provide an MQTT message server based on a publish/subscribe mode, and supports MQTT V3.1/V3.1.1 protocol specification. The data uploading of the EMQ message server can reach 10-15 times per second, and the requirements of the system can be met. The data storage adopts a MySQL database, and the data processing uses various local tools such as Matlab and the like, so that a completely free MQTT data transmission and processing system can be built.
The microprocessor 4 issues the original signal to the MQTT server, and subscribes a message at a computer by using a client written by Python to acquire the original signal. The raw signal is then feature extracted to obtain a sleep signal and a respiration signal.
As shown in fig. 2, the extraction of the sleep signal is based on a sleep behavior detection algorithm, and the following features are extracted from the original signal from the perspective of the time domain and the frequency domain, respectively, and the sleep signal is divided into a normal sleep signal and a leg movement signal, which aim to distinguish a part which may represent leg movement and twitch from the original signal, and the sleep behavior is divided into the following two categories: the first type is a state which is kept stable during normal sleep and does not generate any large-amplitude movement; the second category includes leg swing and twitching either systemically or locally (e.g., legs).
The sleep behavior detection algorithm specifically comprises the following steps: the gravity center coordinate of the collected original signal is subjected to multi-layer decomposition by utilizing wavelet decomposition to obtain approximate coefficients and detail coefficients after wavelet decomposition of horizontal and vertical coordinates of the gravity center coordinate, the detail coefficients (x and y have 8 values respectively) after the wavelet decomposition of seven layers of the horizontal and vertical coordinates (x and y) of the gravity center coordinate, and the variance of the horizontal and vertical coordinates of the gravity center forms 18-dimensional feature vectors. Wavelet decomposition is a multi-scale and multi-resolution analysis method, and is very suitable for analyzing unsteady signals.
Figure BDA0001839947460000061
Wherein a and b are scale factor and translation factor, respectively, f (t) is original signal,
Figure BDA0001839947460000071
is a mother wavelet, representing a conjugate,
Figure BDA0001839947460000072
t is the f result of wavelet transform, and t is time. The original signal is decomposed into an approximate coefficient and a detail coefficient through wavelet decomposition, the general trend and the high-frequency characteristic of the signal are respectively reflected, the data volume is about half of that of the original signal, and then the approximate component can be continuously decomposed.
The original signal and the detail coefficients of the first, third, fifth and seventh wavelet decompositions are shown in fig. 4. The left column in fig. 4 is the abscissa x of the barycentric coordinate, and the right column is the ordinate y of the barycentric coordinate. The first row is an original signal, the first half of the original signal is a first class of stable signal, the second half of the original signal is a second class of leg movement and twitch signal, and as can be seen from detail coefficients of the first layer of wavelet decomposition, the wavelet detail coefficients of the first class of stable signal are all very small, and the second class of leg movement signal reacts to a peak value in the detail coefficients every time leg movement occurs, so that the wavelet decomposition can extract high-frequency characteristics of the original signal and has definite physical significance. As the number of decomposition layers increases, the peak value is gradually blurred, but the difference between the two types of signals is still quite obvious. Therefore, the classification accuracy using the detail coefficients of the wavelet decomposition as features may also be high.
Selecting detail coefficients of a seventh layer as first features, forming 18-dimensional feature vectors by variances of horizontal and vertical coordinates of barycentric coordinates as second features, and considering that an original signal is a leg movement signal when a peak value with a slope larger than a first preset threshold exists in the detail coefficients and the variances of the horizontal and vertical coordinates of the barycentric coordinates are larger than a second preset threshold; selecting detail coefficients (x and y have 8 values respectively) after seven layers of wavelet decomposition of a horizontal coordinate and a vertical coordinate of the gravity center, forming 18-dimensional feature vectors, and classifying by adopting a method of a support vector machine to obtain the features of leg movement signals, thereby automatically identifying the leg movement signals from normal sleep signals to classify the sleep behaviors and further extracting the large-amplitude behaviors related to sleep diseases such as leg movement twitch and the like;
the classification method of the step adopts a Support Vector Machine (SVM). Grouping the data by taking the data as a group every minute, calculating corresponding 18-dimensional feature vectors for each group, obtaining 45 groups of data by using an MQTT server, taking 20 groups of data as training data, taking 25 groups of data as test data, training by using the training data to obtain an SVM model, and classifying the test data. The result was only one set of data with misclassification and 96% accuracy.
A flow chart of a breath analysis algorithm for the separation of the breath signal from the leg movement signal is shown in fig. 3. Since the amplitude of the leg movement signal is much larger than the breathing signal, the direct processing is very poor and requires separation. The data are firstly windowed, the window length is 21, the data are about 2 seconds, the difference between the maximum value and the minimum value of the data in the window is calculated, a respiration signal threshold value H is set, when the difference value is larger than the respiration signal threshold value H, the central point of the group of data is considered to belong to the leg movement signal, and when the difference value is smaller than the respiration signal threshold value H, the central point of the group of data is considered to belong to the respiration signal. All leg movement data are directly discarded after being found, the duration of each leg movement is about two seconds, the number of leg movements per night in the early stage is less than one hundred, and therefore the direct discarding is not significant. The sleep detection algorithm of the system uses data of one minute for classification, and can only judge that the leg movement phenomenon occurs within a certain minute, and if the respiration analysis algorithm is combined, the leg movement phenomenon can be accurate to the beginning of a certain second. The effect of the separation is shown in fig. 6, where the discrete points in fig. 6 originally belong to the points of the leg movement signal.
And filtering the separated respiratory signals, firstly passing through a 5-order moving average filter, setting the data length to be n, sequentially supplementing the first 4 values of the data to the last of the data to form an n +4 data string, then starting from the first data, taking the current data and the next 4 data to calculate the mean value, and assigning the mean value to the current data. The moving average filtering is mathematically expressed as follows:
Figure BDA0001839947460000081
where x [ i ] is the original signal and y [ i ] is the signal after moving average filtering.
After the moving average filtering removes a part of random noise, Finite Impulse Response (FIR) low-pass filtering is carried out again to extract a respiratory signal. The FIR low-pass filter is designed by adopting a window function method, the sampling frequency Fs is 500Hz, the frequency range of the respiratory signal is considered to be 0.2-0.8 Hz, therefore, the cutoff frequency Fc is selected to be 0.8Hz, the window type is Kaiser (Kaiser) window, Beta is 2.5, the order of the filter is 30, and the amplitude-frequency response of the designed filter is shown in FIG. 7.
The filtered respiration signal is shown in fig. 5, where the first line is the original signal, the second line is the signal after moving average filtering, the third line is the signal after FIR low-pass filtering, the dotted line is the detected apnea phenomenon, and the circle marks the detected respiration.
4) Detection of apneic phenomena and statistical analysis of respiratory rate:
the method for detecting the apnea phenomenon is similar to the respiratory statistics algorithm, because the duration of the apnea phenomenon is about 2 seconds, a window with the length of 21 is still selected, the difference value between the maximum value and the minimum value of 21 data points in the window is calculated, an apnea threshold value D is set, the central point of the group of data is considered to belong to the respiratory signal when the difference value is larger than the apnea threshold value D, and the group of data is considered to belong to the apnea phenomenon when the difference value is smaller than the apnea threshold value D. Similarly, the signal is first normalized so that the apnea threshold D can be applied to the detection of different populations.
The statistics of the respiratory frequency in the system adopts a method of counting signal peak values, the slope of the filtered signal is calculated, when the slope changes from positive to negative, a peak value appears, and the total number of the peak values is the number of times of respiration.
5) The result of MQTT server data processing can be sent to APP for the demonstration of the processing result, the number of breaths per minute is drawn in the sleep respiratory rate histogram, as shown in FIG. 8, the change situation of the respiratory rate during the sleep of the user can be conveniently checked.
Example two: the microprocessor 4 sends the original signal to the mobile phone 8 for processing through the Bluetooth module 6
In the embodiment, the pressure sensors 2 placed under the four beds 1 are used for acquiring data, the model of the pressure sensor 2 adopted by the system is YZC-167, the measuring range is 75 kilograms, and the total measuring range of the four sensors 2 is 300 kilograms. YZC-167 is a strain gauge pressure sensor that can convert the measured pressure into a change in the corresponding resistance value and then into a change in the output voltage value. The A/D conversion module 3 selects an HX711A/D conversion module, and the pressure data can be obtained by amplifying and A/D converting the voltage value. The pressure readings obtained here are not accurate values and need to be calibrated.
1) The fur weight is reduced when the bed is empty, the reading at the moment is recorded as the fur weight, and the fur weight is subtracted when the reading is carried out every time, so that the reading obtained by processing is the net weight caused by a human body completely, and errors caused by external factors such as the placing position of articles on the bed are avoided.
The method for resetting the empty bed 1 is based on analysis of the center of gravity, so that the readings of the four pressure sensors 2 need to be converted into the readings of the center of gravity, a rectangular coordinate system is established by taking one foot of the bed 1 as a coordinate origin, the two beds 1 are respectively in the X-axis positive direction and the Y-axis positive direction along the direction, and the four pressure sensors 2 are placed under the four beds 1. The barycentric coordinates can be calculated according to the reading numbers of the pressure sensors 2 under the feet of the four beds 1, the horizontal coordinates and the vertical coordinates of the barycenter are respectively recorded as x and y, and according to the lever principle:
Figure BDA0001839947460000091
Figure BDA0001839947460000092
wherein, w1, w2, w3 and w4 are the readings of the four bed foot pressure sensors respectively.
The reading of the pressure sensor 2 changes when the user moves on the bed, and the reading of the fur weight in the initial empty bed state is subtracted from the reading read by the pressure sensor 2 each time to be used as a raw signal to be processed;
2) the original signal of the pressure sensor 2 is converted by the A/D conversion module 3 and then judged by the microprocessor 4:
considering that many sleep detection devices on the market cannot automatically judge the time of starting and ending the sleep of a user at present, the system designs a simple judging method, the microprocessor 4 can select an STM32 microprocessor, after the STM32 microprocessor obtains an original signal, firstly, the judgment is carried out, if the original signals for two times are all greater than a mark threshold value T, a mark position S is set to be 1, and the user is considered to start the sleep; and if the original signals of two consecutive times are all smaller than the mark threshold value T, setting the mark position S to be 0 and considering that the user gets up. The flag threshold T is set to 2 kg in consideration of the weight of a normal human body and an actual test.
The sampling frequency of the system is 10Hz, the duration time of the leg movement signal is about 2 seconds, and the frequency of the respiration signal is about 0.2 to 0.8Hz, so the sampling frequency of 10Hz can completely meet the system requirement.
3) In consideration of the environment without Wifi coverage, in this embodiment, the microprocessor 4 sends the readings w1, w2, w3, w4 and the flag bit S of the four pressure sensors 2 to the bluetooth module 6 through the serial port, and then sends the data to the mobile phone 8 through the bluetooth module 6, so as to process the original signal at the mobile terminal.
The system still sends Json format data formed by five data signals through the Bluetooth module 6, and meanwhile, a start bit is added in front of each group of data to further enhance the accuracy of signal transmission. After long-time tests, the accuracy rate of signal transmission in the data format can basically reach 100%. And after the mobile terminal receives the original signal, performing characteristic extraction to obtain a sleep signal and a respiration signal.
As shown in fig. 2, the extraction of the sleep signal is based on a sleep behavior detection algorithm, and the following features are extracted from the original signal from the perspective of the time domain and the frequency domain, respectively, and the sleep signal is divided into a normal sleep signal and a leg movement signal, which aim to distinguish a part which may represent leg movement and twitch from the original signal, and the sleep behavior is divided into the following two categories: the first type is a state which is kept stable during normal sleep and does not generate any large-amplitude movement; the second category includes leg swing and twitching either systemically or locally (e.g., legs).
The sleep behavior detection algorithm specifically comprises the following steps: the gravity center coordinate of the collected original signal is subjected to multi-layer decomposition by utilizing wavelet decomposition to obtain approximate coefficients and detail coefficients after wavelet decomposition of horizontal and vertical coordinates of the gravity center coordinate, the detail coefficients (x and y have 8 values respectively) after the wavelet decomposition of seven layers of the horizontal and vertical coordinates (x and y) of the gravity center coordinate, and the variance of the horizontal and vertical coordinates of the gravity center forms 18-dimensional feature vectors. The wavelet decomposition formula is calculated as:
Figure BDA0001839947460000101
wherein a and b are scale factor and translation factor, respectively, f (t) is original signal,
Figure BDA0001839947460000102
is a mother wavelet, representing a conjugate,
Figure BDA0001839947460000103
t is the f result of wavelet transform, and t is time. The original signal is decomposed into an approximate coefficient and a detail coefficient through wavelet decomposition, the general trend and the high-frequency characteristic of the signal are respectively reflected, the data volume is about half of that of the original signal, and then the approximate component can be continuously decomposed.
The original signal and the detail coefficients of the first, third, fifth and seventh wavelet decompositions are shown in fig. 4. The left column in fig. 4 is the abscissa x of the barycentric coordinate, and the right column is the ordinate y of the barycentric coordinate. The first row is an original signal, the first half of the original signal is a first class of stable signal, the second half of the original signal is a second class of leg movement and twitch signal, and as can be seen from detail coefficients of the first layer of wavelet decomposition, the wavelet detail coefficients of the first class of stable signal are all very small, and the second class of leg movement signal reacts to a peak value in the detail coefficients every time leg movement occurs, so that the wavelet decomposition can extract high-frequency characteristics of the original signal and has definite physical significance.
Selecting detail coefficients of a seventh layer as first features, forming 18-dimensional feature vectors by variances of horizontal and vertical coordinates of barycentric coordinates as second features, and considering that an original signal is a leg movement signal when a peak value with a slope larger than a first preset threshold exists in the detail coefficients and the variances of the horizontal and vertical coordinates of the barycentric coordinates are larger than a second preset threshold; selecting detail coefficients (x and y have 8 values respectively) after seven layers of wavelet decomposition of a horizontal coordinate and a vertical coordinate of the gravity center, forming 18-dimensional feature vectors, and classifying by adopting a method of a support vector machine to obtain the features of leg movement signals, thereby automatically identifying the leg movement signals from normal sleep signals to classify the sleep behaviors and further extracting the large-amplitude behaviors related to sleep diseases such as leg movement twitch and the like;
the classification method of the step adopts a Support Vector Machine (SVM). Grouping the data by taking the data as a group every minute, calculating a corresponding 18-dimensional feature vector for each group, obtaining 30 groups of data by using the Bluetooth 6 and the mobile phone 8, taking 14 groups of data as training data, taking 16 groups of data as test data, training by using the training data to obtain an SVM model, and classifying the test data. The result was only one set of data with an erroneous classification and a 94% accuracy. The data are mixed with the data obtained by processing through the MQTT server, one part of training classifiers is randomly selected, and the rest data are used for testing, so that the final accuracy rate is over 90 percent and can reach 100 percent at most.
A flow chart of a breath analysis algorithm for the separation of the breath signal from the leg movement signal is shown in fig. 3. Since the amplitude of the leg movement signal is much larger than the breathing signal, the direct processing is very poor and requires separation. The method for separating the data and the data comprises the steps of firstly windowing the data, wherein the window length is 21, the data is about 2 seconds, calculating the difference between the maximum value and the minimum value of the data in the window, setting a respiration signal threshold value H, considering the central point of the group of data to belong to a leg movement signal when the difference value is larger than the respiration signal threshold value H, and considering the central point of the group of data to belong to a respiration signal when the difference value is smaller than the respiration signal threshold value H. All leg movement data are directly discarded after being found, the duration of each leg movement is about two seconds, the number of leg movements per night in the early stage is less than one hundred, and therefore the direct discarding is not significant. The sleep detection algorithm of the system uses data of one minute for classification, and can only judge that the leg movement phenomenon occurs within a certain minute, and if the respiration analysis algorithm is combined, the leg movement phenomenon can be accurate to the beginning of a certain second. The effect of the separation is shown in fig. 6, where the discrete points in fig. 6 originally belong to the points of the leg movement signal.
And filtering the separated respiratory signals. Firstly, removing random interference through moving average filtering, wherein a 5-order moving average filter is adopted, the length of data is set to be n, the first 4 values of the data are sequentially complemented at the end of the data to form an n +4 data string, then, starting from the first data, the current data and the following 4 data are taken to calculate the mean value and are given to the current data.
After the moving average filtering removes a part of random noise, Finite Impulse Response (FIR) low-pass filtering is carried out again to extract a respiratory signal. The FIR low-pass filter is designed by adopting a window function method, the sampling frequency Fs is 500Hz, the frequency range of the respiratory signal is considered to be 0.2-0.8 Hz, therefore, the cutoff frequency Fc is selected to be 0.8Hz, the window type is Kaiser (Kaiser) window, Beta is 2.5, the order of the filter is 30, and the amplitude-frequency response of the designed filter is shown in FIG. 7.
The filtered respiration signal is shown in fig. 5, where the first line is the original signal, the second line is the signal after moving average filtering, the third line is the signal after FIR low-pass filtering, the dotted line is the detected apnea phenomenon, and the circle marks the detected respiration.
4) Detection of apneic phenomena and statistical analysis of respiratory rate:
the method for detecting the apnea phenomenon is similar to the respiratory statistics algorithm, because the duration of the apnea phenomenon is about 2 seconds, a window with the length of 21 is still selected, the difference value between the maximum value and the minimum value of 21 data points in the window is calculated, an apnea threshold value D is set, the central point of the group of data is considered to belong to the respiratory signal when the difference value is larger than the apnea threshold value D, and the group of data is considered to belong to the apnea phenomenon when the difference value is smaller than the apnea threshold value D. Similarly, the signal is first normalized so that the apnea threshold H can be used for different population detections.
The statistics of the respiratory frequency in the system adopts a method of counting signal peak values, the slope of the filtered signal is calculated, when the slope changes from positive to negative, a peak value appears, and the total number of the peak values is the number of times of respiration.
5) The statistical result can be displayed on an app, and the number of breaths per minute is drawn in the sleep respiratory rate histogram, as shown in fig. 8, which is convenient for the user to check the change of the respiratory rate during the sleep.

Claims (1)

1. A monitoring method of a human sleep and respiration monitoring system based on a bed body is characterized in that:
the method adopts a human sleep and respiration monitoring system which comprises a bed body (1), pressure sensors (2) are mounted at the lower ends of four bed legs of the bed body (1), the four pressure sensors (2) are connected to an A/D conversion module (3) through leads, the A/D conversion module (3) is connected to a wireless module through a microprocessor (4), the wireless module comprises a WiFi module (5) and a Bluetooth module (6), the WiFi module (5) and the Bluetooth module (6) acquire original signals from the microprocessor (4) through serial ports, the WiFi module (5) sends the original signals to a network database (7), and the Bluetooth module (6) sends the original signals to a mobile phone (8) through a Bluetooth protocol; the pressure sensor (2) is fixed under the foot of the bed, and the pressure sensor (2) converts the acquired pressure signal into a resistance value and further converts the resistance value into an output voltage value;
the method comprises the following steps:
1) resetting the pressure sensor (2) in an empty bed state:
recording the reading of the pressure sensor (2) under the empty bed state as the fur weight, leading the reading of the pressure sensor (2) to change when a user moves on the bed, and subtracting the reading of the fur weight from the reading of each change of the pressure sensor (2) as a raw signal;
a rectangular coordinate system is established by taking one foot of a bed foot as the origin of coordinates and taking the directions of two adjacent bed feet as the positive directions of an X axis and a Y axis respectively, a barycentric coordinate is calculated according to the original signals of pressure sensors (2) under the four bed feet, and the ratio (X, Y) of the horizontal coordinate and the vertical coordinate of the barycentric coordinate to the length and the width of the bed is obtained according to the lever principle:
Figure FDA0002455942470000011
Figure FDA0002455942470000012
wherein, w1, w2, w3 and w4 are the original signal values of the pressure sensors (2) under the four bed legs respectively;
2) the original signal of the pressure sensor (2) is converted by the A/D conversion module (3) and then judged by the microprocessor (4): setting a flag bit S, if all the received original signals for two consecutive times are greater than a flag threshold value T, setting the flag bit S to be 1, and considering that the user starts to sleep; if the original signals of two consecutive times are all smaller than the mark threshold value T, the mark position S is set to be 0, and the user is considered to have got up;
3) the original signal and the zone bit S are sent to a network database (7) or a mobile phone (8) through a WiFi module (5) or a Bluetooth module (6), and the network database (7) or the mobile phone (8) extracts the characteristics of the original signal so as to obtain a sleep signal and a breathing signal;
the extraction of the sleep signal is based on a sleep behavior detection algorithm to divide the sleep signal into a normal sleep signal and a leg movement signal, and specifically comprises the following steps: carrying out multi-layer decomposition on barycentric coordinates of acquired original signals by utilizing wavelet decomposition to obtain approximate coefficients and detail coefficients after horizontal and vertical coordinate wavelet decomposition of the barycentric coordinates, selecting the detail coefficients of a seventh layer as first features, forming feature vectors by variances of the horizontal and vertical coordinates of the barycentric coordinates as second features, and considering the original signals as leg movement signals when the detail coefficients have peak values with slopes larger than a first preset threshold value and the variances of the horizontal and vertical coordinates of the barycentric coordinates are larger than a second preset threshold value; classifying by adopting a support vector machine method to obtain the characteristics of the leg movement signals, so as to automatically identify the leg movement signals from the normal sleep signals;
the separation of the respiration signal and the leg movement signal adopts a respiration analysis calculation method, which specifically comprises the following steps: setting a respiration signal threshold H, windowing the original signal, calculating the difference value between the maximum value and the minimum value of the original signal in each window, considering that the original signal in each window belongs to a leg movement signal when the difference value is greater than the respiration signal threshold H, and considering that the original signal in each window belongs to a respiration signal when the difference value is less than the respiration signal threshold H; discarding all data belonging to leg movement signals in the original signals to further obtain separated respiration signals, removing random interference from the separated respiration signals through moving average filtering, and obtaining filtered respiration signals through the signals after FIR low-pass filtering;
4) detection of apneic phenomena and statistical analysis of respiratory rate:
setting an apnea threshold value D, windowing the original signals, calculating the difference value between the maximum value and the minimum value of the original signals in each window, considering that the original signals in the windows belong to the apnea signals when the difference value is larger than the apnea threshold value D, and considering that the original signals in the windows belong to the apnea phenomenon when the difference value is smaller than the apnea threshold value D;
counting the respiratory frequency by adopting a method of counting signal peak values, calculating the slope of the filtered respiratory signal in the step 3), and counting as a primary peak value when the slope changes from positive to negative, wherein the total number of the peak values is the number of times of respiration;
5) drawing the breathing times per minute in a sleep breathing frequency histogram according to the statistical result of the breathing frequency obtained in the step 4), sending the processing result of the original signal of the network database (7) or the mobile phone (8) to the mobile terminal as the sleep behavior detection result, and checking the change condition of the breathing frequency during the sleep through the mobile terminal by a user.
CN201811243454.6A 2018-10-24 2018-10-24 Human sleep and respiration monitoring system and method based on bed body Active CN109528159B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811243454.6A CN109528159B (en) 2018-10-24 2018-10-24 Human sleep and respiration monitoring system and method based on bed body

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811243454.6A CN109528159B (en) 2018-10-24 2018-10-24 Human sleep and respiration monitoring system and method based on bed body

Publications (2)

Publication Number Publication Date
CN109528159A CN109528159A (en) 2019-03-29
CN109528159B true CN109528159B (en) 2020-08-14

Family

ID=65844967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811243454.6A Active CN109528159B (en) 2018-10-24 2018-10-24 Human sleep and respiration monitoring system and method based on bed body

Country Status (1)

Country Link
CN (1) CN109528159B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110575139A (en) * 2019-08-13 2019-12-17 珠海市万瑙特健康科技有限公司 Sleep monitoring method and equipment
CN111227792B (en) * 2020-01-10 2022-11-01 京东方科技集团股份有限公司 Apnea detection method and system, electronic device and storage medium
CN111310599B (en) * 2020-01-20 2021-08-03 重庆大学 Sleep action recognition system capable of quickly adapting to various change factors
CN112545851A (en) * 2020-11-03 2021-03-26 未来穿戴技术有限公司 Massage method and device, electronic device and computer readable storage medium
CN112617821B (en) * 2020-12-30 2022-05-17 山东沃尔德生物技术有限公司 System and method for monitoring getting on and off of bed of old people
TWI773562B (en) * 2021-10-14 2022-08-01 雲云科技股份有限公司 Breath detecting system and breath detecting mat thereof
CN117409537B (en) * 2023-11-20 2024-09-20 河北大学附属医院 Ward sensing and calling system for night use

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102078184A (en) * 2010-12-31 2011-06-01 深圳清华大学研究院 Method for monitoring body position by using weighing bed and weighing bed
CN107041730A (en) * 2017-03-07 2017-08-15 杭州医电园科技有限公司 A kind of contactless sleep monitoring device and its monitoring method
CN108135486A (en) * 2015-08-17 2018-06-08 瑞思迈传感器技术有限公司 Sleep disordered breathing disease screening instrument
CN108697241A (en) * 2015-12-30 2018-10-23 德沃特奥金有限公司 Sleep with sensor or dependence furniture

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110144455A1 (en) * 2007-08-31 2011-06-16 Bam Labs, Inc. Systems and methods for monitoring a subject at rest
JP6105703B1 (en) * 2015-09-29 2017-03-29 ミネベアミツミ株式会社 Biological information monitoring system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102078184A (en) * 2010-12-31 2011-06-01 深圳清华大学研究院 Method for monitoring body position by using weighing bed and weighing bed
CN108135486A (en) * 2015-08-17 2018-06-08 瑞思迈传感器技术有限公司 Sleep disordered breathing disease screening instrument
CN108697241A (en) * 2015-12-30 2018-10-23 德沃特奥金有限公司 Sleep with sensor or dependence furniture
CN107041730A (en) * 2017-03-07 2017-08-15 杭州医电园科技有限公司 A kind of contactless sleep monitoring device and its monitoring method

Also Published As

Publication number Publication date
CN109528159A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN109528159B (en) Human sleep and respiration monitoring system and method based on bed body
CN108042108B (en) Sleep quality monitoring method and system based on body vibration signals
CN104224132B (en) sleep monitoring device and monitoring method thereof
CN105769122B (en) A kind of measuring apparatus of apnea hypopnea indexes
CN110192862B (en) Radar-based non-contact human body respiration detection method and device
CN107137071A (en) It is a kind of to analyze the method that heart impact signal is used for calculating short-term heart beat value
Kim et al. 1D CNN based human respiration pattern recognition using ultra wideband radar
CN107913060A (en) For monitoring the method and device of heartbeat
CN106618497A (en) Method for monitoring sleep in complicated environment based on channel state information
CN109328034A (en) For determining the determination system and method for the sleep stage of object
TWI554304B (en) Projection capacitive body motion detection system
CN104546007B (en) Anti-interference processing method and device for fetal movement detection
CN106344023B (en) Unsteady state respiratory wave detection device based on atmospheric pressure and acceleration
CN102988036A (en) Method for measuring pulse rate
CN110960211A (en) Embedded-based real-time electrocardio monitoring system
CN113017559A (en) Vital sign extraction algorithm and system based on piezoelectric film sensor
KR101744691B1 (en) Method and Apparatus for Detecting Heartbeat using Ballistocardiogram
KR20160096895A (en) Lying position classification system and method using ballistocardiography
CN106821378A (en) A kind of portable muscular fatigue degree testing equipment based on electronics epidermis
CN111887830B (en) Sleep monitoring method, device, equipment and readable storage medium
CN106419884B (en) A kind of rate calculation method and system based on wavelet analysis
KR102276614B1 (en) Method and apparatus for measuring biosignal in a non-contact manner and clothes using the same
CN207590681U (en) A kind of portable muscular fatigue degree detection device based on electronics epidermis
Zhao et al. A new method for fetal movement detection using an intelligent T-shirt embedded physiological sensors
CN115089125A (en) Method and device for monitoring sleep characteristics and breathing rate

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant