*4.1. Calibration and Validation*

Figure 5 shows the error curve for the YF-S201 sensor, considering *n* = 13. There are repeatability and agreement between the results of the measurements performed. Therefore, after applying the bias corrections in the results, the sensor model presents a minimum uncertainty of 22 <sup>×</sup> 10−<sup>6</sup> m3 for volumes up to 300 <sup>×</sup> 10−<sup>6</sup> m3, and a maximum uncertainty of 56 <sup>×</sup> 10−<sup>6</sup> m3 for volumes up to <sup>1800</sup> <sup>×</sup> <sup>10</sup>−<sup>6</sup> m3. Thus, the systematic and random errors were characterized, with a maximum error of <sup>65</sup> <sup>×</sup> <sup>10</sup>−<sup>6</sup> <sup>m</sup><sup>3</sup> or 3.6%.

**Figure 5.** Error curve of the YF-S201 sensor.

After the calibration, the sensor performed the measurements shown in Table 2, using the syringe. The results are according to the spirometric model, and as expected for the performance of the sensor, i.e., the uncertainty is less than 3.4% of the full scale, satisfying the spirometric conditions [25].

**Table 2.** Measurements after calibration.


### *4.2. Spirometric Tests*

Figure 6 shows the measurement results of the YF-S201 sensor (experimental data) and the spirometric model curve obtained from these measurements. We found proximity among the dataset of each graph of Figure 2 and the nonlinear models of Boltzmann's (BTZ), Logistic (LG), Modified Langevin (ML), Doseresp, Gompertz, Slogistic, and Langmuir EXT 1 (LA). Aiming to fit the dataset to these models, we performed the algorithms of Levenberg Marquardt (LM) and Orthogonal Distance Regression (ODR) for each model. We chose the Langevin model along with the Orthogonal Distance Regression algorithm because it reaches the highest coefficient of determination (R-squared), according to Table 3.

**Figure 6.** Result of validation of YF-S201 sensor with air: (**a**) 300 <sup>×</sup> 10−<sup>6</sup> m3; (**b**) 450 <sup>×</sup> 10−<sup>6</sup> m3; (**c**) 600 <sup>×</sup> 10−<sup>6</sup> m3; (**d**) 750 <sup>×</sup> 10−<sup>6</sup> m3; (**e**) 900 <sup>×</sup> 10−<sup>6</sup> m3; (**f**) 1050 <sup>×</sup> 10−<sup>6</sup> m3; (**g**) 1200 <sup>×</sup> 10−<sup>6</sup> m3; (**h**) 1350 <sup>×</sup> <sup>10</sup>−<sup>6</sup> <sup>m</sup>3; (**i**) 1500 <sup>×</sup> <sup>10</sup>−<sup>6</sup> m3; (**j**) 1650 <sup>×</sup> <sup>10</sup>−<sup>6</sup> m3 and (**k**) 1800 <sup>×</sup> <sup>10</sup>−<sup>6</sup> <sup>m</sup>3.


**Table 3.** R-Square of the non-linear adjustments.

*IA—Inadequate accuracy. NC—Not converged.*

The Langevin function—a simplified version of Brillouin function—is used for classic cases of solid-state physics in quantum treatments. It has applications in paramagnetism [68–73] and dielectric properties (permittivity) [74–76]. When performing a nonlinear adjustment of experimental data, there may be a need to consider errors in both independent and dependent variables (as in the case of this work). The Orthogonal Distance Regression algorithm [77–79] has applications in metrology [80] because it adjusts data with implicit or explicit functions.

Langevin's function is scale modified to address this application, and the mathematical equation that describes the model is:

$$\mathbf{Y} = \mathbf{Y}\_0 + \mathbf{C} \left[ \coth\left(\frac{\mathbf{x} - \mathbf{x}\_c}{\mathbf{s}}\right) - \frac{\mathbf{s}}{\mathbf{x} - \mathbf{x}\_c} \right],\tag{25}$$

where Y0 is the linear coefficient of equation (m3), *xc* is the central coordinate of the curve (s), C is the amplitude of the curve (m3), and *s* is the scale. To obtain Langevin's equation, we set the initial guess Y0 = 0, C = 1, *xc*= 0 and *s* = 1.

Table 4 shows the convergence parameters of the non-linear adjustment. It is noteworthy that the R-squared of the calculated model is close to unity, so the modified Langevin mathematical model can be used to describe the spirometric curve and, consequently, the results obtained in this work.


**Table 4.** Parameters of convergence of non-linear adjustment applied to the results.

The results of the measurements agree with the conventional values of the measured volume, considering the experimental error. As shown in Table 2, for the reference values of (300 ± 2, 450 ± 3, 600 <sup>±</sup> 3, 750 <sup>±</sup> 4, 900 <sup>±</sup> 5, 1050 <sup>±</sup> 6, 1200 <sup>±</sup> 6, 1350 <sup>±</sup> 7, 1500 <sup>±</sup> 8, 1650 <sup>±</sup> 9 and 1800 <sup>±</sup> 9) <sup>×</sup> 10−<sup>6</sup> m3, the developed system measured (305 ± 22, 450 ± 23, 603 ± 24, 751 ± 26, 922 ± 27, 1021 ± 30, 1182 ± 33, <sup>1326</sup> <sup>±</sup> 36, 1476 <sup>±</sup> 37, 1618 <sup>±</sup> 45 and 1786 <sup>±</sup> 56) <sup>×</sup> <sup>10</sup>−<sup>6</sup> <sup>m</sup><sup>3</sup> (Figure 6a-k, respectively).

Comparing the graphs in Figure 6 (Experimental Data and Calculated Spirometric Model) with the spirometric model, from zero to the maximum experimental volume, the behavior follows the spirometer models (Figure 2), characterizing the inspiration. During CPR, there is no muscle activity in the victim's chest, so the victim's expiration occurs due to the chest's weight or due to the resumption of the cardiac massage. Due to these conditions, it is not possible to apply spirometry concepts to the expiration step.

Although the profile of the YF-S201 curves is slightly different from the Koko spirometer results, Table 5 shows that the major part of spirometric results is equivalent. The difference occurs because the Koko spirometer has limitations in use in CPR training, as its measurement range is related to physical breathing parameters such as completely obstructed airway (0-300 <sup>×</sup> 10−<sup>6</sup> m3), partially obstructed airway (300-1000 <sup>×</sup> 10−<sup>6</sup> m3) or severe disease (200-2000 <sup>×</sup> 10−<sup>6</sup> m3). The results of this study refer to cardiorespiratory arrest victims, i.e., a person in conditions of severe disease. However, to perform optimal ventilatory maneuvers during CPR, the result must contain spirometric characteristics such as those obtained by the YF-S201 sensor (Figure 6), whose response does not depend on the measurement range.

**Table 5.** Comparison between spirometric results of Koko and the sensor developed in this work.


From these curves, it was possible to obtain information about FVC, FEVt<sup>=</sup>1 s and FEF25–75%, shown in Table 5. In spirometry, the FEV value in 1 s time is approximately 80% of the FVC value. One ventilation should be done every 6 s in a forced ventilation maneuver. On average, there are 3 s for expiration and 3 s for inspiration. Therefore, for a time of 3 s, FEV always has to be less than FVC, i.e., ventilation should provide FVC within 3 s. It is noteworthy that it happens in the graphs of (300, 450, 600, 750, 900, 1050 and 1200) <sup>×</sup> 10−<sup>6</sup> m3; around times of 1.40, 1.65, 1.96, 2.25, 2.09, 2.40 and 2.67 s; respectively (Figure 6). In the (1350, 1500, 1650 and 1800) <sup>×</sup> 10−<sup>6</sup> m3 charts; it occurs around 3.1, 3.61, 4.05 and 4.89 s; respectively (Figure 6). It is also worth noting that the values highlighted in blue in Table 5, measured by the YF-S201 sensor, are different from those obtained by the Koko spirometer. This happens because the higher volumes have a capacity which is not supported by the dynamics of ventilation, because air volumes applied at short intervals cause stomach insufflation to occur, differently from the dynamics of Koko spirometry. If the dynamics of ventilation fail, it is still possible to address the requirements of spirometry applying a faster ventilatory maneuver without stomach insufflation.

It is also worth mentioning that FVC provides the instantaneous maximum expired volume. In mechanical ventilation, it represents the amount of air that was introduced into the lung, and therefore air volume provided in the ventilation. When calculating FEF25–75%, note that the values highlighted in green in Table 5 are different from the values measured by the YF-S201 sensor. Meeting the spirometric parameters in this range is difficult, and converges to results from serious diseases, with airway

obstruction or dead volumes. To characterize ventilation, performed in humans under the mentioned conditions, the sensor of this work obtains results with adequate spirometric standards [25], unlike the Koko spirometer.
