###### Abstract  
According to current trends in healthcare sensing technologies, we describe a textile-based pressure sensing matrix that can be integrated in the mattress of a smart bed to characterize sleeping posture/movement of a subject and to extract breathing activity. The pressure mapping layer is developed as a matrix of 195 piezoresistive sensors, it is entirely made of textile materials, and it is the basic component of a smart bed that can perform sleep analysis, can extract physiological parameters, and can detect environmental data related to subject's health. In this paper, we show the principle of the pressure mapping layer and the architecture of the dedicated electronic system that we developed for signal acquisition. In addition, we describe the algorithms for posture/movement classification (dedicated artificial neural network) and for extraction of the breathing rate (frequency domain analysis). We also perform validation of the system to quantify the accuracy/precision of the posture classification and the statistical analysis to compare our breathing rate estimation with the gold standard. s 2021 2021 9  
The smart bed described in our previous works and reported in [4; 5] was developed in the frame of the L.A.I.D project (Linking Automation to artificial Intelligence for revealing sleep Dysfunctions [6]) and was designed for sleep analysis and extraction of physiological signals. In our previous work reported in [5], we demonstrated the capability of the smart bed to fuse all sensor data (pressure matrix, accelerometers, and environmental sensors) to perform automatic classification of sleep quality with performance comparable to standard polysomnography. In addition, in [7], we showed the methods and results related to extraction of the heart rate through ballistocardiography applied on the signals of the set of accelerometers integrated in the smart bed. In this work, we focus on the pressure mapping layer designed as a two-dimensional array of 195 textile pressure sensors capable of detecting the distribution of pressure exerted by the subject sleeping on the mattress. The signals from the pressure sensors are processed to classify the posture and movements of the subjects and to extract respiratory activity. The classification of posture and movement are the basis for sleep analysis described in [7] and could be also employed to give context to the acquisition of physiological signals (e.g., compensation of artifacts and optimal sensor selection). The respiratory signal in addition to the other sensors of the smart bed such as accelerometers and microphones could be exploited as part of an unobtrusive physiological acquisition system capable of detecting cardiopulmonary activity (including sleep apnea) and relevant respiratory symptoms such as cough and wheezing. In the literature, several sensing solutions have been exploited for the in-bed monitoring of subjects' physiological signals and sleeping posture/movements [8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18]. A review by [PERSON] et al. [19] described the recent results obtained in noninvasive sleep monitoring technologies, focusing both on research and commercial products. The majority of the solutions exploit pressure mapping sensors that extract the distribution of the pressure of the subject sleeping on the mattress. Contact pressures are generally measured by using distributed sensors with high spatial resolution. Different sensing technologies were exploited: capacitive [11; 12; 13], piezoresistive [8], piezoelectric [16], or optical [14]. The information from the pressure transducers are exploited to extract the subject's presence, sleeping posture/movements, or breathing activity. [PERSON] et al. [8] proposed the WhizPAD pressure mapping system: a mattress (weight 6 kg) in which piezoresistive foam placed between two conductive fabrics was used as the sensing element. The WhizPAD is used in hospitals and detects user movements, breathing activity, and subject's presence [9] and can differentiate between sleep and awake phases [10].