# Inertial and Flexible Resistive Sensor Data Fusion for Wearable Breath Recognition
## 2 Methodology  
The proposed breath monitoring system works based on noninvasive measurements. This system primarily comprises three subsystems: the sensor subsystem, the microcontroller subsystem, and the data acquisition and analysis subsystem. A wearable breathing sensor system as shown in Figure 1 consisting of an inertial sensor (IMU), flex sensor, and data acquisition system is attached in proximity to the diaphragmatic area. Throughout the breathing process, the periodic motion of the thoracic and abdominal areas can be captured by different sensors, such as IMU sensors and flex sensors. Inhalation involves the diaphragm contracting, pushing the abdominal organs downward, and consequently reducing intrathoracic pressure. Conversely, during exhalation, as the diaphragm relaxes, the chest and abdomen return to their resting positions, leading to a reduction in lung volume. The inhalation and exhalation processes are sensed and waveform data are provided by the inertial and flex sensors. The data collection, validation, and analysis experimental setup for our breath monitoring system is illustrated in Figure 1, constructed by all commercially available components. In this setup, IMU and flex sensors are used to detect and monitor breathing. For comparison and validation, spirometry is applied to obtain the actual breathing signal (ground truth) to evaluate the performance of the approach. The breathing sensor testing was done in the Faculty of Human Kinetics breathing testing lab where each interested participant goes over a familiarization session. In the familiarization session, participants were familiarized with the three different laying positions, namely supine, rolled to right, and then rolled to left. On the trial day, after getting their body measurement and age, they are asked to lie down. Our wearable breathing sensor is mounted on the participant's skin around the diaphragmatic area (same sensor placement location was used across all participants) and data from the sensor is recordedon a PC. The participants also receive a mouthpiece of the spirometer attached to a filter and turbine to monitor their ventilation. The participants also wear a nose clip. The data from the spirometer is also recorded on a PC. In each position, different breathing patterns were exercised, and data were recorded. The sequence and time of each breathing pattern remained the same across all participants. Participants are also given 2 min of rest before and in between breathing patterns or position changes. All experimental steps, protocols, and conditions remained the same across the participants. Six young (mean age: 23.2 years, SD: 2.4) adults (3 male and 3 female) were recruited for testing the device. The study procedure was approved by the University of Windsor's Research Ethics Board (REB #22-166) and was in accordance with the Declaration of Helsinki, except for registration in a clinical database. The IMU sensor, flex sensor, and spirometer used are described below. The basic hardware consists of an IMU and a flex resistive sensor. A data acquisition system and controller are needed to collect and process the sensor data; therefore, a data acquisition board was designed. Figure 2 shows the data acquisition hardware used for the wearable breathing sensor, which was designed and developed in-house. The board is developed using all commercially available electronic components and sensors. The breathing sensor hardware board shown in Figure 2 is made with a four-layer PCB (Printed Circuit Board) consisting of two main components, a microcontroller (Atmega328P, Microchip, Chandler, AZ, USA) and an IMU (MPU6050, TDK InvenSense, San Jose, CA, USA), which can measure 3-axis acceleration and 3-axis rotation motion. The board was synchronized with a 16.384 MHz oscillator. The Atmega328P consists of 2 KB SRAM, 32 KB Flash, and 1 KB EEPROM. The EEPROM is a nonvolatile memory, meaning that the data remains the same even if the power is off. Hence, once the board is programmed, it does not need to be programmed again.