Abstract
Performing real-time monitoring for human vital signs during sleep at home is of vital importance to achieve timely detection and rescue. However, the existing smart equipment for monitoring human vital signs suffers the drawbacks of high complexity, high cost, and intrusiveness, or low accuracy. Thus, it is of great need to develop a simplified, nonintrusive, comfortable and low cost real-time monitoring system during sleep. In this study, a novel intelligent pillow was developed based on a low-cost piezoelectric ceramic sensor. It was manufactured by locating a smart system (consisting of a sensing unit i.e. a piezoelectric ceramic sensor, a data processing unit and a GPRS communication module) in the cavity of the pillow made of shape memory foam. The sampling frequency of the intelligent pillow was set at 1000 Hz to capture the signals more accurately, and vital signs including heart rate, respiratory rate and body movement were derived through series of well established algorithms, which were sent to the user’s app. Validation experimental results demonstrate that high heart-rate detection accuracy (i.e. 99.18%) was achieved in using the intelligent pillow. Besides, human tests were conducted by detecting vital signs of six elder participants at their home, and results showed that the detected vital signs may well predicate their health conditions. In addition, no contact discomfort was reported by the participants. With further studies in terms of validity of the intelligent pillow and large-scale human trials, the proposed intelligent pillow was expected to play an important role in daily sleep monitoring.
Introduction
Sleep disorder symptoms are common, and nearly a billion people suffer from a variety of sleep disorders such as insomnia, sleep apnea and restless legs syndrome, with a wide range of age.1,2 Sleep problem has become a major public health issue worldwide. 3 Long-term sleep disorders have detrimental effects on the immunity system and can severely diminish human health, causing endocrine disorder, recurrent heart attack, stroke, hypertension, diabetes, and even sudden death at night. 4 It was observed that there was a high incidence of unexpected death during sleep among the elderly with cardiovascular disorders. 5 Therefore, there is a need for implementing proper interventions that minimize sleep disruption and optimize sleep continuity. 5
Real-time monitoring for human vital signs during sleeping may be feasible to detect sleep disorders and take prompt treatment on sleep-related illnesses 6 Generally, there are three types of intelligent systems for monitoring vital signs of human body in real-time during sleeping, including polysomnography (PSG), 7 portable electrocardiogram (ECG) devices, 8 wearable equipment,9–11 and smart bedding systems.12–14 Up to date, polysomnography (PSG) still serves as a gold standard for monitoring sleep conditions and diagnosing sleep disorders in medical organizations or laboratory conditions.7,15 However, this technique suffers from several drawbacks in terms of complexity, intrusiveness, high expense, a lack of data privacy, and long-term continuous health report.7,15,16 Moreover, it requires the participation of a medical staff or professional technicians, restricting the wider application of PSGs for home healthcare. 16 Portable ECG devices could be used at home, but also has similar disadvantages to those of PSGs. 8 By contrast, wearable equipment represented by small smart wristbands, watches and intelligent clothing were considered as simple, non-invasive, and real-time monitoring approaches. 17 A majority of commercial wristbands and watches are developed based on the optical absorption method, that is, photoplethysmography. It utilizes light-sensitive photoelectric sensors that can detect the light intensity changes during the passing of the blood volume through the wrist, which provides details of waveforms and ensures timing accuracy. 9 On the other hand, smart clothing uses textile-based pressure or strain sensors, normally in the form of yarns, woven, knitted or nonwoven fabrics. However, it requires the tight fitting of the sensors with the body skin, which is sometimes impracticable due to the body’s curved surface contours.17,18 In addition, the monitoring accuracy of the wearable equipment is often low, and can be also greatly affected by skin sweat, hair, tattoo and skin movement, etc.17,18 Furthermore, the tight fitting of the wearable equipment with the contours of the body is likely to cause excessive pressure and body discomfort, adversely affecting sleep quality.17,18 All these limitations greatly restrict the application of the wearable equipment on monitoring human sleep.17,18 Consequently, there is a pressing need for developing a simplified, non-intrusive, comfortable, cost effective and real-time monitoring system that can detect human vital signs during sleeping.
Non-intrusive vital sign monitoring mattresses and bad sheets have been developed with various operating principles, including ultrasonic, 19 optical,12,14 and piezoelectric sensing. 13 However, these technologies have some limitations in terms of low sampling rates and accuracy, poor flexibility, importability, and lack of washability,12,13 which greatly limit their widespread application. Smart mattresses consist of piezoelectric materials, such as polyvinylidene fluoride film (PVDF) and ceramic, can provide more accurate results of detection and monitoring; however, they feature high motion noise and are costly regarding a large sensing area. 20 A respiration and cardiac beat monitor (using vinyl tubes, filled with silicon-oil) fitted under a pillow has been reported, which could measure human respiratory rate and heart rate during sleeping. 21 More recently, a smart pillow using accelerometer-equipped module and strip-type force sensors has been developed for unconstrained vital sign monitoring. 10 Another relevant study reveals a smart pillow based on temperature and humidity sensors, which could detect body movements and sweating conditions, but could not provide other important sleeping biological signals such as heart rate. 22 A common drawback of these pillow devices is their low sampling frequency (i.e. 100 Hz), much lower than that of the medical device (300–500 Hz), which greatly affected their detection accuracy. 23 Apart from that, this system only collects one or two vital signs, whereas other important vital parameters such as body movement can not be detected. 10
To overcome the above limitations of the current intelligent monitoring systems, a novel intelligent pillow (InPillow) embedded with a piezoelectric ceramic (PZT) sensor for real-time vital sign monitoring on sleep conditions was developed in this study to achieve multi-parameter detecting, high accuracy, low cost and non-intrusiveness. The PZT generates electric charges and provides a voltage when subjected to small deformation under the external pressure, and the magnitude of voltage could be used to assess the pressure. 21 The advantages of PZT include: (1) it captures pressure changes caused by micro vibrations, for example, respiratory rate and heartbeat, 13 and (2) it has much lower price compared to other sensors such as piezoelectric film and optical fiber sensors. 13 Using the artificial intelligence algorithms, the captured vital signals are transformed to heart rate, respiratory rate and body movement; the latter are then transmitted to the user’s app or PC. The current study aimed to examine the performance of the InPillow. First, the accuracy of heart rate detected by InPillow was evaluated by comparing with electrocardiograph (ECG). Second, human tests were conducted to evaluate the performance of the InPillow using by the elderly.
Experimental details
Novel intelligent pillow (InPillow) design
A novel intelligent pillow (InPillow) for monitoring human vital signs was developed, 24 shown in Figure 1(a). The InPillow was manufactured by locating an intelligent system into the cavity (size: 16 cm × 16 cm × 2.5 cm) of a pillow made of shape memory foam and cotton fabric cover layer, and the shortest distance between the top of system and the surface of the pillow is about 2 cm. The length and width of the InPillow are 52 cm and 28 cm, respectively, and the height of the head contact area is about 8 cm. The intelligent system consists of a sensing unit and a data processing unit. The sensing unit involves a piezoelectric ceramic sensor and a encapsulating cover with a trapezoidal bulge underneath, and the bulge was located directly under the sensor to exert force on the sensor when the external load was applied. In this study, the purchased ceramic sensor (KD-35B-26ENC100, Guangzhou Kailitech Electronics Co., Ltd, Guangzhou, China) is composed of a piezoelectric ceramic sheet and a metal sheet, and the sensor has the diameter of 35 mm and thickness of 0.25 mm. The data processing unit involves a top and a bottom cover made of acrylic glass, a main control board (WSM-LN-01-M, Guangzhou SENVIV Technology Co., Ltd., Guangzhou, China) that is located between the two covers, and heat-conductive glue that is attached to the control board using the thermal-conductive colloid to dissipate heat generated during calculation. As to the main control board, it involves the central processing unit, signal conditioning module (OP07CDR, Texas Instruments, USA), GPRS communication module (MG2260, Xiamen CHEERZING IoT Technology Co., Ltd, Xiamen, China) and a charging lithium battery with capacity of 1000 mA. Noteworthy is that the ceramic sensor is located under the upper cover, and the signal output cables of sensor is connected to the input cables of the main control board, and a pressing pad is used to fix the cables. Besides, a charging unit was created at the side of the pillow, which could charge the battery in the data processing unit through charging wires. The charging time for the battery is 2–3 h, and could be used for more than 15 days (about 8 h/day) for the continuous work of the InPillow.

The novel intelligent pillow: (a) structure of the intelligent pillow and (b) vital sign monitoring process.
The vital sign monitoring process
Detailed process for obtaining the vital signs is shown in Figure 1(b). Under the effect of pressure applied by human during sleeping, the ceramic piezoelectric sensor is slightly deformed, the surface of which will generate electric charges, and the changes in pressure can be detected by measuring the voltage. The electrical signals were transmitted to the signal conditioning module, which uses the high-pass and low-pass filter circuits with cut-off frequencies of 0.2 Hz and 159 Hz, respectively, and the two-level amplifier circuits with magnifications of 11 times and 1.21 times, respectively, in sequence to filter, amplify, and raise the sampled signals. And through the clamp circuit, the output voltage is clamped between −0.7 and 4 V, which plays an important role in protecting the analog-to-digital converter (ADC) chip. A 12-bit ADC chip (ADS1013, Texas Instruments, USA) with conversion rate of 1.6 ksps was used to convert the analog signals to digital signals, which is then sent to the central processing unit. Single channel was used to sample the original data, and the sampling rate is 1000 Hz, and the band rate is 115,200. The digital signals were further processed to extract the vital signs including heart rate, respiratory rate and body movement. The GPRS communication module (ESP826, Shenzhen Ai-Thinker, Shenzhen, China) then transmits the vital signs to the user’s phone APP and PC, etc.
Pre-processing for the original signals
As the original signals sampled were aliasing signals mixed with noise pollution caused by circuits and human movements, pre-processing was conducted. The aliasing signals were firstly denoised using a notch circuit with frequency of 50 Hz to eliminate power frequency noise, 23 processed using morphological filtering to suppress baseline drift, 23 and then stored in a signal buffer space with a specific storage capacity, depending on the different vital sign measurements.
Heart rate measurement
After pre-processing, BCG signals (i.e. ballistocardiogram) were derived using a Butterworth filter with frequency of 40 Hz, and then was removed of body movement signals by limiting signal amplitude.25,26 Noteworthy is that the buffer space with storage of 6 s (i.e. 6000 points) was adopted here, and the reading and storage intervals are both 1 s (1000 points). After that, series of pre-processing steps were performed for obtaining the desired BCG signals25–27: (1) The baseline drift of heartbeat signals caused by respiration were discerned using a zero-phase low pass filter, and a set of horizontal heartbeat signals without baseline drift was obtained by extracting the heartbeat signals from the baseline drift; (2) To suppress the interference of Gaussian noise to BCG, covariance of the heartbeat signals in the buffer space and the ideal BCG signals was established, and strong relationship was built to suppress the noise (Figure 2); and (3) To eliminate the interface of high frequency interface and obtain the smoothed signals, heartbeat envelope was derived using Hilbert transform method. 27 The process was fully described in our previous published patents.25,28,29

Steps for obtaining smoothed BCG signals.
To extract heart rate, the following steps were followed28,29:
(1) Design a moving time domain window (width: 0.4 s; moving step length: 0.2 s), and detect the maximum heartbeat signal in each window, and if there are two maximum points overlapped or within 0.1 s of the time difference, one of the maximum points should be kept and others should be excluded;
(2) Find the minimum points of the pulse signal within 0.2 s before and after each maximum point, and then determine a set of maximum and minimum points (i.e. the optimum heartbeat feature) by comparing both the longitudinal and transverse distances between the maximum points and the corresponding minimum points, and record the longitudinal distance from each maximum point to the corresponding minimum point;
(3) Use the above selected heartbeat feature as the initial point, locate the positions of the peaks and troughs from left to right according to the standard heart rate cycle (0.4–1.3 s), and if the longitudinal distance from the peak to the corresponding trough is less than 0.6 times of the optimal heartbeat feature, the group of peaks and troughs will be excluded. Select the peaks and troughs with the largest longitudinal distance from the remaining peaks and troughs, which is used as effective peaks and troughs within the standard heart rate cycle;
(4) Calculate the heartbeat interval between two adjacent peaks (or two adjacent troughs) based on the effective peaks and valleys, and obtain the heart rate (HR, beats/min) using the average heat beat intervals (
Respiratory rate
After the expiration of the buffer space, respiratory signals were extracted using a Butterworth filter with frequency of 0.1–0.5 Hz,25,26 which was adopted as it has the optimum flatness. The mutation of respiratory signals was detected, and the body movement signals were eliminated by limiting signal amplitude .25,26 Then, respiratory rate is acquired using the steps: (1) Establish the buffer space with storage of 10 s here due to the slow change of respiratory signals, (2) Calculate the fluctuation variance and the fluctuation amplitude of the respiratory signals every 5 s and use it as historical fluctuation criteria; (3) Every second, calculate the fluctuation variances of respiratory signals in the first and second 5 s in the buffer space, recorded as var1 and var2; (4) Calculate the difference between var1 and var2, and if the difference is larger than the setting threshold value,25,26 proceed the judgment phase for apnea, and keep var2; (5) After entering the apnea judgment phase, if new data enter the buffer space, calculate the fluctuation variance of the respiratory signals in the last 5 s, recorded as var2′, and calculate the difference between var2 and var2′, (6) If the difference is larger than the setting amplitude (i.e. 10),
25
add the number of apnea with 1, otherwise, enter the normal respiratory stage, and noteworthy is that when the apnea times is greater than 10, it is recorded as a real apnea event; (7) In the normal respiratory stage, the zero-crossing point of the respiratory signal waveform, that is, from the negative half axis to the positive half axis, was detected, and the time between two adjacent zero-crossing points is an effective respiratory interval; (8) The respiratory rate (RR, breaths/min) can be measured based on the average respiratory interval (
Body movement measurement
After separating BCG signals from original signals, body movements were calculated as: (1) Set the signal length of BCG to be 15 s, and slice it (
Figure 3 displayed the original vital signals and separated BCG, respiratory, and body movement signals collected by the novel intelligent pillow.

The original vital signals and separated vital signs collected by the novel intelligent pillow: (a) original vital signal, (b) BCG signals, (c) respiratory signals, and (d) body movement signals.
Accuracy validation and testing the InPillow in real-scenario
Two groups of experiments were performed, that is, experiment I: validation of the InPillow and II: application of the InPillow in real scenario.
Accuracy validation for the Inpillow
To confirm the validity of vital signs detected by the InPillow, human tests were conducted in a laboratory under the same conditions as the bedroom (air temperature ranging from 20°C to 23°C). A total of 13 healthy participants including four females were recruited (age ranging from 24 to 45 years). During the tests, the subjects were asked to lie quietly on a bed with the InPillow under their heads, and a contact medical ECG device (BIOPAC MP 160, Biopac System, Inc., USA) with lead I was also applied to monitor heart rate simultaneously. The testing duration is 5 min, during which that the subjects could slightly adjust their positions to keep comfortable.
As it is well established that the main wave of the BCG (i.e. IJK) is equivalent to the QRS from the ECG, both J-J and R-R intervals could be used to calculate heart rate.12,13 Thus, by comparing the value obtained by the InPillow (
Testing the InPillow in real-scenario
Further, the proposed InPillow was examined in real testing scenarios using human tests (Figure 4). Six elderly female participants were employed (age: 69.3 ± 3.3 years), including three healthy subjects, one subjects with hypertension, one subject with hypertension and coronary heart disease, and one subject with diabetes and high blood pressure (Table 1).

Real-time monitoring of human vital signs using the intelligent pillow in a real testing scenario.
The detailed information of the six participants.
The tests were conducted in their own bedrooms with air temperatures fluctuating between 20°C and 25°C, which began at 10:00 p.m. and ended at 8:00 a.m., lasting for 10 h. During the tests, the participants were asked to sleep according to their own schedule, and once they lie in bed, the InPillow is put under their heads, and the vital signs were automatically collected by the InPillow in the response to state of the participants, which were then sent to the phone APP through WIFI connection. Noteworthy is that the participants were restricted from the external interfaces such as phone and the ambient noise caused by people walking around. A total of three nights’ vital signs were sampled for each participant. After the termination of the tests, the participants were asked to rate their main subjective perceptions in using the InPillow, that is, contact comfort, 28 which was scaled from −3 (very discomfort) to 0 (comfort). 30
Results and discussion
Accuracy validation
Figure 5 displays the original signals and heartbeat signals captured by the InPillow and ECG device during the signal acquisition stage for the participants numbered 6 and 11 with the highest and lowest accuracy values, respectively, and only 60-s signals were presented for clear display. Noteworthy is that the J-peaks of BCG signals and the R-peaks of ECG signals are aligned through manual shifting. Table 2 lists the accuracy values of heart-rate detection of the 14 subjects within the 5 min testing. The accuracy values range from 98.06% to 99.73%, with the average value and standard deviation of 99.18% and 0.55%, respectively. The heart-rate detection accuracy is higher than that of a recent study (i.e. 98.11% ± 2.6%) which proposed a health monitoring bedding system with two rows of piezoelectric ceramic sensors arranged under the mattress, and compared the testing results between the developed system and ECG using 10 healthy subjects. 13 The possible reason for the low accuracy of the bedding system is due to the low sampling frequency (i.e. 100 Hz), the large number of sensors that are more easily affected by the noise pollution, or/and different ECG devices adopted. 14 Besides, compared to the bedding system, the InPillow was expected to be of lower cost and more portable. However, it is noted that validation tests were only performed for heartbeat signals, and no validation was done for respiratory and body movement signals. In future studies, more work will be performed to validate the three vital signs by examining human sleeping in different motion states and different noise environments.

ECG signals and heartbeat signals obtained by the InPillow and ECG device: (a) ECG signals captured by the InPillow and heartbeat signals obtained by ECG device in the 60 s testing for participant 1, (a′) the magnified part of (a), that is, signals in the 10 s testing and (b) ECG signals captured by the InPillow and heartbeat signals obtained by ECG device in the 60 s testing for participant 11, and (b′) the magnified part of (b), that is, signals in the 10 s testing.
The J-J and R-R intervals and accuracy results of the heart-rate detection with the time period of 5 min for the 13 subjects.
Real testing scenario
Figure 6 presents the vital signs detected by the InPillow of the six participants during one night’s sleeping, and Table 3 displays the average heart rate (HR) and respiratory rate (RR), standard HR and RR, and the average body movement numbers derived from the figures. Their standard HR and RR values, and body movement numbers range from 56 to 77 beats/min, 11 to 19 breaths/min, and 55 to 428 times/night, respectively. Notably, participant 4 has much higher standard HR (up to 77 beats/min) and RR values (up to 19 breaths/min), and body movement numbers compared other participants (428 times/night). Participant 1 and 4 exhibit significant heart rate increase and decrease during sleeping, respectively (Figure 6), and both participant 4 and 5 show larger body movement numbers. Interestingly, participant 6 manifests much lower body movement numbers and later bedtime compared to other participants. Obviously, the three participants (i.e. no.4, 5, and 6) have sleep disorders, which is possibly due to their health problems (i.e. hypertension, heart disease, diabetes or the two combined diseases). Noteworthy is that participant 6 displayed much less body movement numbers, attributing to the much longer time out of bed (Figure 6), and this will be discussed in future studies. According to previous studies, the normal standard HR and RR range from 50 to 65 beats/min and 12 to 18 breaths/min, respectively. 31 It is speculated the health problems of the participants cause the increase of the standard HR and RR values or the larger body movement numbers. However, for easier understanding of their health conditions, it is necessary to develop a more comprehensive index by integrating these vital signs to describe the health conditions as well as sleep quality of human body.

The vital signs detected by the InPillow of the six participants during one night’s sleeping.
The heart rate, respiratory rate and body movement for the three nights.
Considering the subjective perceptions, no contact discomfort (average score: −0.23) was reported by the six participants. This means that incorporating the hard intelligent system into the pillow using shape memory foam did not introduce contact discomfort. The subjective feelings for the smart equipment were scarely discussed by previous studies.13,22
Here, it must be admitted that the accuracy of the vital signs sampled during the real sleeping scenarios was not verified, only six subjects were employed to evaluate the contact comfort of the InPillow, and the impact of pillow parameters such as pillow filling materials and thickness on the accuracy of the vital signs was not examined. Besides, body movements could only be recognized on the condition that human head stays on the InPillow. In future work, the accuracy and usability of the InPillow will be investigated by examining a large number of subjects in a wide age range and health conditions. Besides, the impact of pillow filling materials on the vital sign accuracy will be explored as well.
Conclusion
In this study, a novel intelligent pillow (InPillow) for non-intrusive monitoring vital signs of human body during sleeping was proposed. The InPillow is constructed by placing an intelligent system into the cavity of a pillow made of shape memory foam. The intelligent system is composed of economically available materials (i.e. piezoelectric ceramic sensor), a main control board, a GPRS commutation module and mobile phone. To capture the signals more accurately, the sampling frequency of the InPillow was set at 1000 Hz, higher than those of the current medical use devices (ranging from 300 to 500 Hz). Heart rate, respiratory rate and body movement were derived through series of well-established algorithms. The InPillow displayed a collection of compelling features, including high accuracy (99.18% for heart rate), non-intrusiveness, multi-parameter detecting, and portability. Furthermore, the proposed InPillow has been applied and evaluated in a real sleeping scenario, and the results showed that the vital signs detected by InPillow may well predicate the human health conditions and no contact discomfort was perceived. In future work, we will further evaluate the accuracy and usability of the InPillow by examining a large number of subjects in a wide age range and health conditions, and finally implement the InPillow into actual home health care.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The study is supported by the Changjiang Scholar Program of Chinese Ministry of Education (No. 19YJC760109), and the Major Project in the Later Stage of the Philosophy and Social Sciences Research of the Chinese Ministry of Education (No. 20JHQ005).
