Synthesis of the use of filters in respiratory signals.
This chapter introduces the anatomy and physiology of the respiratory system, and the reasons for measuring breathing events, particularly, using wearable sensors. Respiratory monitoring is vital including detection of sleep apnea and measurement of respiratory rate. The automatic detection of breathing patterns is equally important in other respiratory rehabilitation therapies, for example, magnetic resonance exams for respiratory triggered imaging, and synchronized functional electrical stimulation. In this context, the goal of many research groups is to create wearable devices able to monitor breathing activity continuously, under natural physiological conditions in different environments. Therefore, wearable sensors that have been used recently as well as the main signal processing methods for breathing analysis are discussed. The following sensor technologies are presented: acoustic, resistive, inductive, humidity, acceleration, pressure, electromyography, impedance, and infrared. New technologies open the door to future methods of noninvasive breathing analysis using wearable sensors associated with machine learning techniques for pattern detection.
- breathing analysis
- wearable device
- respiration monitoring
- pattern recognition
Wearable devices mean whatever a person can wear since they do not restrict daily activities or mobility . Recently, progress has been made in the use of wearable sensors for breathing monitoring devices, so that it is considered a promising area . Many applications, including sleep monitoring , breathing pattern detection, and respiratory rate detection [4, 5], require comfortable and wearable devices that patients can wear in their homes, if possible, for continuous monitoring and storage of relevant data. Other requirements for wearable devices involve (i) the ability to share patient data with healthcare professionals, researchers, and family, (ii) very low energy consumption and long battery autonomy, and (iii) wireless communication with other devices [1, 6].
The main topics for the development of wearable devices for breathing monitoring and pattern detection are discussed in this chapter.
1.1 Why is it important to monitor breathing activity with wearable devices?
The development of wearable devices to monitor breathing activity allows giving rise to various medical care services. For example, considering people with asthma or chronic obstructive pulmonary disease, the environmental conditions directly affect their breathing, and a wearable device is able to continually measure air quality and pulmonary function . The device could trigger alarm functions for drug uptake, contact a general practitioner for an appointment, or call emergency services .
The measurement of air quality is important, as pollutant exposure can lead to acute asthma attacks . This happens usually after days under exposure. If a system detects pollutant exposure, it can warn the person and help to prevent attacks [7, 9].
Other applications of wearable devices include sleep monitoring for apnea detection , speaking detection as an indicator of social interaction , respiratory impedance , etc. The detection and tracking of respiratory movement for image-guided chest and abdomen radiotherapy, for compensation of movement during treatment, are additional uses of wearable devices . Moreover, researchers have studied ways to develop smart fabrics, which are comfortable and nonintrusive, for different applications such as healthcare, sports, and military scenarios .
1.2 What is important to know for the development of a wearable device for breathing monitoring and pattern detection?
The creation of these wearable devices requires understanding the anatomy and physiology of the respiratory system. The knowledge about its structure and function leads to the development of devices that do not interfere with respiratory mechanics or daily life activities. It also allows selecting the best sensors in each case. Therefore, it is important to have an overview of the main types of electronic sensors used in recent years and how they have been applied, as well as signal processing and machine learning methods.
This chapter covers these topics concisely as a guide for people interested in developing wearable devices for respiratory monitoring. The next section introduces the anatomy and physiology of the respiratory system. The sections 3, 4, and 5 discuss, respectively, the electronic sensors, signal processing methods, and machine learning techniques applied to respiratory signals for pattern recognition.
2. Anatomy and physiology: mechanics of respiration
When one thinks of breathing, the airways and the airflow come to mind. Therefore, an understanding starting with the structures involved in this process is very important.
2.1 Respiratory system
Nose: nasal fossae; nasal cavity; pharynx (muscle tube); larynx (cartilage tube); trachea—bifurcates into two primary bronchi, which enter the pulmonary lobes, then subdivided into progressively smaller structures: bronchioles, ducts, and alveoli (where gas exchange occurs).
Airways: space from the nose to the bronchioles (where no gas exchange occurs). The structures up to the trachea are responsible for conducting, filtering, heating, and humidifying the air.
Lungs: the principal organs of the respiratory system, surrounded by a membrane of connective-elastic tissue called visceral pleura. There are also the parietal pleura, which cover the thoracic cavity. Between them, there is pleural fluid, which contributes to respiratory mechanics.
Not only structures play an important role in respiration. Airflow direction delimits the breathing phases. Breathing comprises two steps. The first is the transport of oxygen (O2) through inhalation, from the environment to the cells. The second is the transport of carbon dioxide (CO2) from the intracellular to the environment. Breathing aims to supply the cells with adequate amounts of O2 and withdraw CO2 from the body to maintain homeostasis .
The lungs are positioned in an airtight space, and the oscillation of their pressure volume is the basis for respiratory control. The intrathoracic pressure is negative compared to the lung pressure. The lung functions as an elastic structure that resists deformation. The ability of the lung to expand is called compliance  and is expressed as Eq. (1).
Compliance requires a respiratory effort under conditions of normality. When compliance is reduced, more effort is demanded from the respiratory system, and, in more severe cases, it may lead to respiratory insufficiency.
Breathing also involves air diffusion, exchange from a more concentrated to a less concentrated medium. Poiseuille’s law governs the flow resistance as expressed by Eq. (5).
Where R is the flow resistance, L is the length, η is the viscosity of air, and r is the radius of the tubes.
Figure 1 shows the main structures and processes involved in breathing.
2.2 Muscles involved in breathing and their functions
The diaphragm is the most important muscle of inspiration. When it contracts, there is a decrease in intrapleural pressure and an increase in lung volume . Simultaneously, an increase in abdominal pressure is transmitted to the chest through the apposition zone to expand the lower thoracic cavity. When the diaphragm contracts, the lower rib cage expands. One may observe the bucket handle movement that causes an increase in thorax transverse diameter due to the elevation of the ribs during inspiration . Elevation and sternum forward movement during inspiration causes the increase of thorax anteroposterior diameter. Diaphragm contraction also contributes to increasing the longitudinal thorax diameter .
Scalene muscle, sternocleidomastoid muscle, and intercostal muscle are inspiration auxiliary muscles. During forced expiration, the abdominal muscles contract, and the diaphragm is pushed upward, thus causing a decrease in chest diameters. Abdominal muscle is also important for coughing .
2.3 Different etiologies, types, and characteristics of pathological respiratory patterns
If structural and/or functional changes occur, then adequate air transport to and from the lungs can be compromised. There are different etiologies, types, and pathological respiratory patterns in which wearable systems may assist in the characterization of movement patterns . This capacity helps in the analysis of the health condition of patients, providing important additional information.
Thoracic mobility is related to the integrity of the nerve pathways and respiratory muscles . In clinical practice, thoracic and abdominal amplitude measurements during respiratory movement may provide information on changes in the respiratory system or eventual diseases . Some paradoxical movements may occur when patients present weakness, muscle paralysis, or chronic obstructive pulmonary disease (COPD), with pulmonary hyperinflation, among other commitments . Another example is Cheyne-Stokes breathing, which is a type of central sleep apnea with an unstable breathing pattern throughout the night. It can cause changes in respiratory frequency and depth of patients with congestive heart failure .
Other impairments may cause changes in the thoracic and abdominal mobility relation such as dyspnea, orthopnea, alternate breathing, forced expiration, etc. Wearable systems capable of monitoring the contribution of different muscles and changes in mobility patterns can help monitor the evolution of the respiratory functional condition of a person.
2.4 Pulmonary auscultation: sounds in healthy and diseased lungs
Lung sounds occur because of air turbulence in the larger airways [15, 20]. They are the results of pulmonary vibrations and the respective airways transmitted to the thoracic wall. Sounds that occur during natural breathing differ depending on where they are acquired as well as the moment of the ventilatory cycle . So, controlling where to place wearable devices and their sampling frequency and duration allows obtaining significant data from lung sounds.
Normal pulmonary sounds are classified into:
Tracheal sound: it is audible in the region of the trachea from cervical to sternal height, having an intense and tubular sound. Inspiration is slightly shorter than expiration, with a pause between events .
Bronchial sound: it is audible in the region of the bronchi, at the height of the sternal manubrium, having less intensity than the tracheal sound. The duration of inspiration and expiration is similar, with a pause between events .
Bronchovesicular sound: it is audible in the first and second intercostal spaces and between the scapulae. The duration of inspiration and expiration is similar, with no pause between events .
Vesicular murmur: it is audible in the peripheral regions of the lungs, having less intensity than the bronchial sound. Inspiration is longer than expiration, with no pause between events .
The anatomical structures may influence the sound heard during normal breathing .
Pathological changes in the lungs directly affect the perception of lung sounds from the airways to the thoracic surface. Abnormal lung sounds, also called adventitious noises, are classified into:
Wheezing: it occurs with the oscillations of the bronchial pathways .
Rhonchus: similar to snoring, it can be heard during inspiration and/or expiration .
Crackles: they are discontinuous sounds, presented in a short and explosive manner, usually classified considering their duration and loudness, during the respiratory cycle .
There are other sounds and more details about each of them, and wearable systems contribute to distinguishing the different sounds in clinical practice.
The concepts presented in this section are very important for understanding the respiratory system in healthy and unhealthy conditions. Depending on the event one aims to observe, this information helps to identify the best location for sensor placement. It also contributes to a better interpretation of the respiratory signals obtained.
After this brief overview of the main concepts involving respiratory anatomy and physiology, the next section explains how wearable devices for respiratory monitoring have been made.
3. Respiratory wearable sensors
Wearable sensors for respiratory monitoring employ various types of electronic sensors that can be mounted into clothes , attached to belts [5, 24], fixed on the skin [3, 7], etc. There are many ways to make wearable devices and some of them are described separately by the type of primary sensor in the following sections.
3.1 Pressure sensors
We can take advantage of the events of diaphragm contraction (as shown in Figure 1b) and relaxation (as illustrated in Figure 1c) to create wearable devices based on pressure sensors. As an example, researchers have used an electromechanical film (EMFit) to develop a respiratory rate sensor designed as a belt  (as shown in Figure 2a). They attached the sensor to the belt so that the expansion of the chest during breathing applies a force to the sensor, and produces a voltage change proportional to this movement. EMfit is a capacitive pressure sensor that has a thin porous polypropylene film structure with a sensitivity of 30–170 pC/N.
Another way to use pressure sensors is to use them directly in contact with the inhaled and exhaled air pressure during breathing. The facemask introduced in  measures the respiratory impedance and was targeted to home and clinical applications. The solution consists of two pressure transducers, two low power consumption fans, a field-programmable gate array, and a real-time processing engine. The device is based on the forced oscillation technique (FOT), which is a nonstandardized lung function test. The idea is to use fans to input a periodic sinusoidal air pressure signal and measure the opposite force produced by the respiratory tract. With these data, respiratory resistance and compliance, as shown in Eq. (1), can be calculated and sent via Bluetooth to a smartphone (Figure 2b).
The EMFit sensor is less intrusive and performed well in the detection of respiratory rate. However, body movements affect the accuracy of the measurement, so the sensor only worked well for still or moderate moving patients . The facemask sensor also performed well and estimated the respiratory impedance satisfactorily. Nevertheless, it was a prototype and its use was not comfortable .
3.2 Acoustic sensors
As seen in Section 2.4, it is possible to monitor lung sounds using acoustic sensors. Acoustic signals related to breathing are usually obtained with the sensors located close to the nose, mouth, throat, and suprasternal notch [3, 25, 26]. Figure 3a shows a wireless microphone that is a portable, cheap, and easy-to-use wearable device positioned next to the nose . The purpose was to measure the respiratory rate in sleep. The microphone is fixed near the nose with a tape, and the signals are sent to a smartphone via wireless communication.
BodyScope was developed to record the sounds produced by the throat region in order to classify them into the following categories : eating, drinking, speaking, laughing, and coughing. The developers modified a wireless headset attaching a microphone and a stethoscope chestpiece to minimize external source audio, as illustrated in Figure 3b. The position selected to place the sensor was close to the carotid artery region as indicated the preliminary test results. The device sends the audio signals to a computer or smartphone likewise solution shown in Figure 3a .
Figure 3c shows a real-time wheeze detector that consists of a wireless sound acquisition module, a wearable mechanical design and a host system . The sensor module was an omnidirectional condenser microphone and a stethoscope bell.
A commercial repository of normal and abnormal lung sounds (referred to as the R.A.L.E lung repository) was used to implement and evaluate a wearable sensor that monitors lung sounds continuously for asthma attack detection . The sensor is a microphone array for pre-filtered acoustic signal acquisition. It is an acoustic resonator array consisting of 13 paddle-shaped piezoelectric cantilevers. The results showed that accessing a repository to test for event detections did not hinder its application as a wearable system.
Acoustic wearable sensors can be very practical. However, some challenges are faced during the project design phase such as determining the optimal sensor position, canceling the acoustic ambient noise and the detection of movement artifacts. Depending on the setting, its use is not possible.
3.3 Humidity sensors
Wearable humidity sensors based on the porous graphene network (a chemical structure capable of detecting moisture) have been tested for breathing analysis . The sensors are capable of sensing the human respiration, apnea, speaking, and whistle rhythm. The sensors are attached to the body with a facemask, as shown in Figure 4. The disadvantage of using this sensor is that long time use is also uncomfortable. It still needs some improvements to further commercialization.
3.4 Oximetry sensors
Oximetry is the technique used to measure oxygen saturation. It consists, basically, of a small infrared emitter that illuminates a small portion of the skin and a receiver that measures the light absorption depending on the oxygenated and deoxygenated blood levels . Wearable oximetry sensors can be worn on the wrist, finger, head, earphones, earlobe, thigh, and ankle, and they have been widely commercialized  (Figure 5).
3.5 Acceleration sensors
Accelerometers can be used to capture the respiratory movements during inhalation and exhalation events . An adhesive sensor (called BiostampRC®) made of a triaxial accelerometer that can be placed on the chest wall (Figure 6b) has been used .
Researchers adapted the EMFit-based sensor to evaluate MEMS (microelectro mechanical system) high-resolution capacitive accelerometers for the detection of respiratory rate at the same time . They attached two monoaxial accelerometers to the belt as shown in Figure 6a.
A better signal can be obtained depending on the location of the sensor [30, 31], because people may have disorders that affect muscle contraction during breathing , as seen in Section 2.3. Accelerometers have found application in many areas, recently, since sensors operate in a wide spectral range and have small dimensions [33, 34]. In spite of that, in the clinical setting, body movement seriously influences them . The sensitivity can be set to measure vibrations with amplitude varying from gross body movements to small artery pulsation . Therefore, likewise applications with acoustic sensors, unwanted artifacts have to be detected in order to prevent taking decisions based on contaminated lung signals . The activation of synchronized functional electrical stimulation should consider these undesirable artifacts.
3.6 Resistive sensors
Another work used a textile sensor to detect talk events based on changes in breathing patterns . The solution consisted of resistive stretch sensors that are made with a conductive material and a polymer mixture. These components were attached to three different belts: upper chest, lower chest, and abdomen as illustrated in Figure 7a. The events of thoracic or abdominal expansion and relaxation result in variation in the resistance of the stretch sensor with this sensor configuration. The idea is that the sensor can be directly integrated into the clothing in the future.
Piezoresistive sensors can also be used for the production of wearable devices. Figure 7b shows an example in which a smart textile fabric for respiratory rate monitoring was developed using a conductive piezoresistivity-based yarn garment .
Movement artifacts are also a problem for this kind of sensor. Researchers are working on improvements to incorporate these sensors in clothes and allow for activities such as running and cycling in the future [5, 38, 39].
3.7 Multimodal sensing platforms
Low-power multimodal wearable systems for the continuous monitoring of respiratory activity have been developed. Figure 8 shows a system with a sensing platform that consists of a chest-patch, a wristband, and a handheld spirometer . Its aim is to monitor health and the environment for asthma management. The chest-patch measures electrocardiogram (ECG), skin impedance, photoplethysmography (PPG), movement, and acoustic signals. The spirometer can measure forced expiratory volume in 1 s (FEV1), peak expiratory flow (PEF), and forced expiratory capacity (FVC). The wristband sensors are intended to measure ozone exposure, ambient temperature, relative humidity, PPG, and movement. The idea is to create a system for continuous long-term monitoring of the state of health and the environmental factors relevant to respiratory problems such as asthma.
This brief overview revealed that different sensors can monitor the same respiratory event and there are different ways to apply them. The sensors discussed are not limited to the applications mentioned in this chapter; they can be used in many other applications and combinations. One of the most difficult tasks is to develop a respiratory wearable device that is low cost, low power consuming, and immune to movement artifacts other than the pulmonary ones.
4. Signal processing methods for respiratory signals
Some sensor signals have very low amplitude and need to be processed. The sensitivity of the EMFit, for example, is about 2.2–7 mV/mmHg. For signals so small, high-impedance voltage amplifiers must be used .
Depending on the signal, filtering is advantageous for processing . Filters are quite common in biomedical engineering applications to emphasize the spectral contents of electrophysiological signals . There are signals with a well-known spectrum that researchers have extensively investigated. Once the frequency range of the signal is determined, an electronic circuit prevents unwanted energy from contributing to the processing and decision-making . As an example, if the acoustic signal band frequency of interest of a solution is between 500 and 900 Hz, then a band-pass filter encompassing this spectrum is inserted into the circuit . For each sensor, one filter should be placed.
Filters can be applied to minimize high-frequency noise, preserving the shape of the respiratory signal . A band-pass filter with cutoff frequencies of 0.1 and 1.5 Hz was applied to compensate for possible drifts and to reduce the total noise level in the signals . Table 1 shows some types of filters used by the researchers in this area.
|Reference||Sensor||Type of filter||Cutoff frequencies (Hz)|
|||Pressure and accelerometer||2nd order Butterworth low-pass filter||0.2|
|||Acoustic||2nd order Butterworth high-pass and low-pass filters in series||20–2000|
4.3 Analog to digital processing
Despite the advances in digital technologies, we still live in a world full of analog phenomena and human physiology is no exception. Almost all electronic biomedical devices use some kind of quantity conversion, from analog to digital. The exceptions are those devices that work entirely in analog mode.
Key factors of analog to digital conversion need to be considered in order to understand the operation of mobile wearable devices. One factor relates to Claude Shannon’s  and Harry Nyquist’s theories . The sampling theory helps to determine the acquisition frequency (or sampling frequency ) of analog signals. To digitize a pure sinusoidal wave properly, an acquisition frequency of at least twice the maximum frequency of the analog signal must be used. Knowledge of the spectral range is therefore crucial for determining .
Human electrophysiological signals are not purely sinusoidal so that the developers of biomedical systems should be far more conservative in determining . Knowing the maximum frequency of the bandwidth ( ) is useful, because the theory indicates to set at least twice that value ( ). In some cases, however, must be high enough to keep the signal’s significant energy depending on the frequencies of interest. Acoustic sounds, for instance, revealed that signal power was mainly distributed below 5000 Hz . The researchers, therefore, set 22,050 Hz, which covers up to 11,025 Hz, because the range was considered enough for their application. Table 2 shows some of the sampling rates used.
|||Chest or abdominal belt with a resistive sensor||Talking detection||100 Hz|
|||Acoustic sensor configured as a headset over the throat||Activity detection of deep breath, eating, drinking, speaking, whispering, whistling, laughing, sighing, and coughing.||22,050 Hz|
|||Acoustic sensor fixed with tape near the nose||Sleep apnea detection||44.1 kHz|
|||Acoustic sensor fixed with tape on the thoracic region||Measurement of acoustic sounds from the thorax, including the lung sounds||4 kHz|
|||Acoustic sensor embedded in a wearable mechanical design over the right chest||Wheeze detection||2048 Hz|
Other equally important factors affect the quality of the acquisition, operation, and energy efficiency of wearable devices, such as the duration of acquisition, signal conditioning, conversion resolution, etc. However, these are not explored in this chapter.
4.4 Fast Fourier transform (FFT)
Fast Fourier Transform (FFT) is an algorithm that converts the signal from the time domain to the frequency domain and vice versa [40, 48]. This algorithm is important because it is the first step to extract spectral features, which can be used by machine learning algorithms and other algorithms for signal processing.
5. Machine learning for respiratory signal pattern detection
Machine Learning is the result of pattern recognition and the assumption that computers can learn to execute a task. As a field of artificial intelligence, machine learning is the ability of a machine to learn, identify, and classify from being exposed to specific data in an interactive way, and to not only learn and make reliable decisions but also to adapt when exposed to new data.
This technique can be useful for automatic pattern recognition in respiratory signals such as sleep apnea, respiratory patterns, and talking detection [10, 49, 50]. The steps to implement a machine learning algorithm are introduced in the following sections.
5.1 Feature extraction
First, for machine learning classification, some features must be given to the classification algorithm. These features must be extracted from the original signal, and they must be well chosen for better results.
For example, when working with a wearable acoustic sensor  aiming to recognize activity patterns like sitting, eating, and drinking and respiratory patterns such as whispering, deep breath, and coughing, the features extracted from the sensor signals were related to time, frequency, and cepstral:
Time domain features: these features were obtained using the zero-crossing rate, that is, the rate of sign changes along a signal.
Frequency domain features: to obtain these features, the FFT needs to be calculated. The features include total spectrum power, subband powers (summed power signal in logarithmically divided bands), brightness (frequency centroid), spectral roll-off (skewness of the spectral distribution), and spectral flux (L2-norm of the spectral amplitude difference of two adjacent frames, representing how drastically the sound changes between two frames).
Cepstral features: commonly used for speech recognition and audio, the mel-frequency cepstral coefficients are extracted with the application of a discrete cosine transform to the log-scaled outputs of the FFT coefficients filtered by a triangular band-pass filter bank.
It is also possible to use a tool that automatically extracts the features of the signals being studied. With the purpose of identifying talking in respiratory signals , more than 10 features were extracted using the Python library “tsfresh” ; those that presented more than 10% of recurrence between the tests were manually selected in order to use that feature for classification in the algorithm.
It is common to extract a variety of features in a study, but the effectiveness of a machine learning algorithm strongly depends on which one will be selected and how the data will be selected for training and validation.
5.2 Classification selection
After the selection of features to be used in the algorithm, it is important to decide which the classes are and how the data will be processed. It is important to select what will be used to train the algorithm and what will be used to validate it. There are several ways of separating the acquired data so that the network is trained without the risk of overfitting.
For instance, in Yatani and Tuong , two approaches were carried out:
“Leave-one-participant-out”: they worked with 9 samples of data, training the chosen algorithm and using one participant to validate the results.
“Leave-one-sample-per-participant”: an example of each class of each participant was left out for validation and the rest used for training.
A different approach was used by Ejupi and Menon : the data were obtained executing different activities such as walking, standing, and sitting, and an algorithm was trained for each one. For classification, 70% of the database was used for training and 30% for validation.
These techniques prevent the major problem in machine learning, overfitting . In case an algorithm is overfitted, it will produce inaccurate results creating unrealistic patterns. It is always wise to select which data will be used to train the algorithm and which will be used to validate the results, never using all dataset to just one task.
5.3 Machine learning algorithms
The strategy or algorithm to be used in a project as well as its effectiveness and performance are strongly dependent on the problem domain (e.g., data structure, database size, etc.) . It is therefore impossible to choose a method as the best one regardless of domain intricacies. Some popular machine learning algorithms are presented in the following topics.
5.3.1 Support Vector Machines
In order to identify speech pattern using a wearable textile-based sensor , the best results were obtained with Support Vector Machines (SVMs). The basic approach for SVM algorithms is to give a set of basic examples and their weight, generally understood as positive and negative (binary) examples for the algorithm, interpreted as classes, where there is a degree of similarity between them, a kernel function, as a means of comparison .
SVM was applied for identifying activities using an acoustic sensor . They used more than two classes, comparing one against the other as a strategy to obtain results, using the Radial Basis Function (RBF) as a kernel function. All the implementation using a library “LIBSVM”  reaches almost 80% of accuracy.
5.3.2 Naïve Bayes
The Naïve Bayes algorithm can be used when it is necessary to recognize the user activities in real time . The theorem is based on the Bayes statistical theorem that describes the probability of an event based on conditions or previous knowledge. The “naïve” comes from the naivety of the assumption that the results are independent given the cause .
From the Bayes’ theorem, we have Eq. (6):
where, P(A|B) is the probability that hypothesis A is true given data of type B. P(B|A) is the probability of data B given that hypothesis A was true.
P(A) is the probability that A is true independently of data, and P(B) is the probability of data B regardless of the hypothesis.
The algorithm uses this probability structure to classify at least two independent sets, which can lead to another set of classification or decision and, at the same time, to another independent set.
This algorithm is simple, computationally cost-effective and can be used for small datasets, as it was used to identify activity patterns such as speaking, laughing, and coughing, presenting good results of accuracy .
5.3.3 Artificial neural networks
An artificial neural network (ANN) is a technique based on a series of connected inputs and outputs. Its structure resembles neurons, each one connected and with associated weights. The weights represent information being used by the net to solve the problem and can be adjusted as required. The networks can be supervised or not, the fundamental difference is that in supervised learning, the target vectors indicate what is wanted from the network.
The neural networks can also be more complex, which depends of the problems intricacies. Aiming to recognize activity patterns such as respiratory effort, using a wearable piezo sensor  it was applied networks with up to 17 layers and inputs, a very complex ANN, to achieve the best classification.
Overall, the use of machine learning has become increasingly common in health implementations and has proved a very beneficial tool in classifying and recognizing respiratory activities and patterns when combined with wearable sensors [10, 25, 55].
Wearable devices for breathing monitoring and pattern detection are not simple devices. They must not interfere with the respiratory system activities and need to be highly immune to external perturbations. The understanding of the respiratory mechanics is crucial to the development of wearable sensors, and to know how to connect them in an optimal way. The methods, whether manual processing or the use of machine learning algorithms, depend substantially on the type of the signal studied and are a crucial step for a study development.
The authors thank CAPES (Coordenação de Aperfeiçoamento de Pessoal de Nível Superior), Fundação Araucária de Apoio ao Desenvolvimento Científico e Tecnológico do Estado do Paraná, and CNPq (Conselho Nacional de Desenvolvimento Científico e Tecnológico), Brazil, for the scholarships and the financial support.
Conflict of interest
The authors declare no conflict of interest.