A Low-cost Air Flow Sensor/transducer for Medical Applications: Design and Experimental Characterization

Mechanical ventilation systems, which are used for breathing support when a person is not able to do it by their own, requires a device for measuring the air flow to the patient in order to monitoring and a assure the magnitude establish by a medical staff. Flow sensors are the conventional devices used for the air flow measuring; however, there were not available in Peru, because of the international demand during COVID-19 pandemic. In this sense, a novel air flow sensor based on orifice plate and an intelligent transducer stage were developed as an integrated design. Advanced methodologies in simulations and experiments using specially designed equipment for this application were carried out. The obtained data was used for a mathematical characterization and dimensions validation of the integrated design. The device was tested in its real working conditions, it was implemented in a breathing circuit connected to a low-cost mechanical ventilation system based on cams. Results indicate that the designed air flow sensor/transducer is a low-cost complete medical device for mechanical ventilators able to provide satisfactorily all the ventilation parameters air flow, pressure and volume over time by measuring the air flow and calculating the others. Furthermore, this device provides directly a filtered equivalent electrical signal for a display or a computer.


Introduction
Mechanical ventilators need sensors to register information of the main physical variables for monitoring and showing the air pressure, volume and flow curves by a display to medical staff, moreover that physical variables can be used for internal control tasks; for instance, adaptive feedback according to enhance the performance of the mechanical ventilator by avoiding disturbances produced for vibrations or due to its own operation. Furthermore appropriated values of physical variables and artificial breathing could be achieved by monitoring the ventilation curves in real time [1]. In this sense, flow sensor is a device used for the air flow measurement, its working concept is commonly based on an induced pressure drop through an orifice which can be measured and related to the air flow value in a breathing circuit over time [2]. patient. However, air flow sensors were not available in Peru due to the international demand, also its design and fabrication for this medical application requires to deal with some facts.
Design considerations for air flow measurement are well established for industrial applications in steady state condition [3]; nevertheless, the air flow, pressure and volume provided by the developed low-cost mechanical ventilator has a particular periodic wave form in a transient condition [4]. Typical medical air flow sensors measure the pressure drop using static pressure taps connected to a transducer which represents a risk of polluted air leak from a patient, especially in a pandemic context. In this sense, there are modern medical air flow sensors which are connected to electrical transducers according to give the electrical equivalent values of the static pressure [5]. The fact to have connected a transducer with a sensor is quite important owing to the measured information, they can be registered for electrical equivalents of the main control system of the ventilator, and also to reduce any kind of virus which could not be cleaned from typical connectors of airflow. Furthermore, air flow sensors can't provide the air pressure and volume, which are necessary for monitoring, they are measured using an additional sensor and calculated by a processing stage, respectively.
In this study, we propose a novel air flow sensor/transducer as an integrated design able to measure the air flow in a breathing circuit over time and estimate the air pressure and volume parameters by a mathematical model developed and calibrated experimentally for a specific low-cost mechanical ventilator based on cams. This medical device provides directly the equivalent electrical signals of air pressure, volume and flow after a transduction stage designed, which is required due to the nonlinearity of the air flow and pressure drop [6].
An exhaustive analysis of air airflow measurement in different conditions of flow as well as orifice plate dimensions are carried out using analytic methods and computational fluid dynamics. Experimental equipment is specially designed for validation in a flow range according to its real working condition. The experimental data obtained is used for a mathematical characterization of the sensor in dynamical conditions and its transduction stage design, also validates it the analytical and computational models in order to establish appropriate dimensions for the sensor geometry.

Air flow sensor/transducer concept description
In Figure 1 is depicted the sensor and sensor/transducer. The scheme of sensor "S" represents an air flow sensor based on orifice plate. The crossing air flow through the orifice plate produces a differential pressure related to the air flow value. This differential pressure (static pressure) from hoses to the ventilator system needs a transducer in order to register the pressure. Conventionally the adaptive internal transducer "AT" is part of the mechanical ventilator system "MS", Figure 1a. However, in order to avoid virus transmission by hose connectors inside the AT, it is proposed in this research that it needs to be an external system such as sensor/transducer, Figure 1b

Analytical model of air flow thorugh an orifice plate
In Figure 2 is depicted a scheme due to explain the theoretical model of the flow inside the airflow circuit, in which f is the airflow from a source (that can be an airbag), the section area of the hose is a, and the flow reduces its section area b while crossing the orifice plate. Therefore it is produced a differential pressure in the points P1 and P2. In order to find pressure, airflow and volume equations, it was analyzed the Stokes equation (1), in which, "f" is the function as consequence of airflow, "µ" and "D" are the physical parameters to get the dynamic of the flow.
From stokes, it is possible to reduce to Bernoulli model, therefore, by the scheme depicted in the figure 7, and energy balance it is obtained the equation (2).
Therefore, it is obtained the equation (3) ( ) Because of static pressure analysis, it is obtained the equation (4).  (4) From that, it is possible to reduce to the following equation due to considering "discharge coefficient Cd" and obtaining the equation (5).
Nevertheless, it is achieved a theoretical model from expected breathing curve as it is showed by the following equation (6).

Case setup
The geometry was modelled after the actual state bench design proposal (with an extended outlet to overcome reverse flow issues). Following Bridgeman's steps [7], the case was modelled as axisymmetric and the pressure sensing ports geometries were disregarded, to save computational resources and time. Because of the former, better, and more structured meshes can be obtained. 5 geometries were generated in total (one for each orifice diameter) The meshes were then generated with an element size of 0.00025 m, all of them having good or excellent mesh metrics results, according to Ansys [8]. Figure 3 shows the model for the 10mm orifice plate case. The main governing equations relevant to this analysis are the Navier Stokes equations, mainly the x-y momentum and continuity equations. The energy equation won't be part of the analysis since heat transfer isn't one of the concerns of this study. The SST k-⍵ turbulence model was selected for this study because it combines 2 separate models: the k-ε and k-⍵ turbulence models. The former being better at capturing near-the-wall turbulence effects, and the latter being superior at capturing turbulence effects away from the walls.

of 23
The following initial and border conditions were considered: ▪ Air assumed as incompressible fluid [9].   Figure 4 shows that the results are starting to converge towards a single PD value. If the mesh refining continued, a single PD value would be reached. Since the geometry is simple, a highly populated mesh might not be necessary. This was shown in Figure 4, where almost doubling the number of elements only resulted in an increase of 0.31% of the PD, as well as the considerable increase of almost 6 times the required number of iterations before the residuals reached convergence. Therefore, to save computational resources and time, but at the same time still obtain acceptable results, a mesh with an element size of 0.00025 m will be selected for the upcoming simulations. The mesh used for the 10 mm orifice model is shown in Figure 5.

Transduction stage design
After to study the theoretical model through "Stokes" and to analyze the simulation methodologies, there were made experiments due to achieve the experimental model of the designed sensor/transducer. Equations 7 and 8 represent a non-linear system, where u(t) is the input signal (for example pressure from cam over pivot), y(t) is the response (such as for example airflow crossing airbag to a connected hose), x(t) is an internal variable which lets the connection between input signals and response, f and h represent the non-linear characteristics of the system like functions, θ represents physical parameters of the system and t the time.
By last equations, it can be possible to design the mathematical model of the system (sensor/transducer), moreover to find the optimal signal (input variable) to get a predicted response. Furthermore, this equation depends of the trajectory solution as set point: R, r(ki) as described by equation (9).
Moreover, equation 11 has dependence of matrices F, φ and the state vector X(ki). The explanation to answer how to obtain the optimal predicted solution for a desired value in system is based in the cost function among optimal predicted response with this "trajectory solution Y" such as optimal predicted solution ∆U, that is described through equation (10) and (11). Of course the procedure to get ∆U is given by equations (12), (13) and (14).
By other side, the "Optimal predicted response Y" has dependence of "∆U" as it is shown by Furthermore, analyzing periodical answers of the sensor/transducer, it is reduced to the equation (16) though transfer functions analysis because of first order behavior in the steady state. For this reason, the transducer adapts the signal received from the sensor from a physical variable to another equivalent of it (such as, the differential pressure to an equivalent of an electrical signal, which is from "cmH2O" to "mV". In this context, Figure 6 represents the static curve given in the section "A, B, C" for the coordinate system "X1, Y1." However, the static curve allows to recognize the linear response regions, according to work in linear regions or either by non-linear mathematical models. It should be analyzed that depending on the response time of a system (the system considered as a research plant) it can lose information in the linearization process, due to its non-linear behaviour, which is why many authors suggest working in linear zones despite such risk (losing information in linearization process), in addition to the fact that in the process of discretizing the signal, information may also be lost, such as dependence on the response time of the system and the sampling time (important parameter to discretize a signal).
Based on the conditions described in the previous paragraph, a transducer is necessary to transform the physical variable of static pressure differences into its electro equivalent (mV) and to be able to achieve the physical variable of air flow and also the displaced air volume. Theoretically, through "Stokes" models the relationship of the three physical variables is achieved: "pressure, flow and volume", where the numerical solutions of the differential equations are also prone to loss of information as a dependence of the methodologies of numerical approximations in the solutions, however, the disadvantage of a completely theoretical correlation is that many times the modeling of the disturbances is not achieved, this is remedied either by approximation modeling or by a correlation with experimental data. Therefore, in the coordinates "X2, Y2" are the transients of the plant's dynamic system (while it is first-order) for the sections represented by "d0, d1"; "d2, d3"; "d4, d ..." and with similar slopes only in the linear trends "AB" or "BC". In such sections can be obtained the response times of the plant (the designed sensor/transducer).
Moreover, for each section "d1, d2"; "d3, d4" and "d ..., henceforth" keep the characteristics of overshoots, settling time, damping and parameters that allow knowing the stability of the designed system.
The static and dynamic curves are algebraically interpreted to models of differential equations (generally polynomial models). Consequently, the correlation of theoretical modelling with modelling based on experimental data analysis results in the modelling of the final model of the designed "sensor/transducer" system, that implies a response "Experimental Model (EM) and Theoretical Model (TM)" from linear (linearized) or completely non-linear (NLM) models. Indeed, the system formed by the sensor/transducer represented by "ST" receives a mechanical signal "Ms1" (fluid mechanical signal for this case, which is differential pressure) and transforms it Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 20 January 2021 doi:10.20944/preprints202101.0404.v1 into its electrical equivalent "Es" or even also an "Ms2" response (fluid mechanics variable as volume or airflow equivalent signal). This conversion (transduction) requires characterization and calibration steps, which is depicted by the scheme summarized in Figure 7. Since having the mathematical model of the sensor/transducer as a system, the transducer is formed by the electronic devices that allow the conversion of the fluid mechanics variable "pressure difference" to its electrical equivalents of this one or for the variables "airflow and volume", furthermore a characterization of each physical variable to be measured is necessary, with the electro/mechanical devices that manage to give the desired physical variable to be monitored in the measurement, Figure 8.

A variable orifice-plate air flow sensor designed for characterization
The working concept of an orifice-plate is to produce a differential pressure which is related to the flow through it. In this sense, different diameters could be used; however, there's an optimum range of diameters which sustains an equilibrium between a produced differential pressure sufficiently high to be used on the transduction stage and sufficiently low not to produce significant air flow drop in the breathing circuit. Figure 9 shows the variable orifice-plate flow sensor, it consists of two pipes united by a ferrule clamp in order to have a quick release mechanism. Downstream of the ferrule clamp, there's an orifice-plate welded to the flange, hence 5 parts were fabricated for different diameters: 4,6,8,10,12 mm. Distances of the pressure taps to the orifice plate were established according to the design considerations of an orifice plate air flow sensor [3]. However, the distance of the downstream pressure tap was not able to be less than half radius because of welding limitations for the geometry. (c) (d) Figure 9. Variable Orifice-plate flow sensor designed for model validation

Steady state air flow
The variable orifice plate air flow sensor is tested for the air flow measurement in a steady state condition. Figure 10a shows the experimental setup designed for this test, it consists of the variable orifice plate installed in an air flow test bench especially designed for this test, Figure A1. An air compressor provides the air flow through the variable orifice plate sensor, a differential pressure transducer MPX2010DP connected to an Arduino UNO, where an algorithm was developed for this transduction stage. Figure 10b shows a schematic representation of the experimental setup and its components interaction.

Real working conditions
The variable orifice plate air flow sensor is installed in a breathing circuit connected to a mechanical ventilation system based on cams "OxygenIP.PE" [4]. This experiment corresponds to the real working condition of the air flow sensor/transducer which has to be designed. A medical gas flow meter Fluke VT650 is installed in the circuit to get the real air flow over time.
In order to simulate the ventilation parameters of a lung, an artificial lung Fluke Accu Lung, a precision test lung, was used. This device is able to simulate 3 lung stages since a healthy up to a damaged lung. A healthy lung corresponds to a compliance of 50mL/cmH2O and a resistance of 5cmH2O-s/L, while a damaged lung corresponds to a compliance of 10mL/cmH2O and a resistance of 50cmH2O-s/L. In this sense, for each orifice diameter inside the sensor, the experiment was run four times, twice for each lung parameters and twice for the minimum and maximum cams, XS and XL respectively.

Steady State Results
The following results were obtained for the steady state simulations for a 100 L/min airflow in a φ10 mm orifice. At the same time, they were plotted alongside the corresponding analytic results. It is worth noting that the analytic results obtained disregard turbulence as well as any kind of losses and can be thought of as an ideal case.

Figure 12. Steady state and analytic DP vs Q curves for a φ10 mm orifice
The 2 curves shown in Figure 13 outline an area were experimental results could be expected to lie in. Figure 13a shows how the velocity increases as the area is reduced (orifice throat), this is explained by the flow's intention of conserving the flow rate (mass conservation and incompressibility assumption). On the other hand, Figure 13b shows how the static pressure is reduced, this takes place as a response of the velocity´s increase. This is explained by the flow's intention of conserving its momentum. It must also be noted that the behavior of these contours matches the ones presented by Karthik [10]. be modeled using steady state approximations. This behavior was expected, since Funk et al [11] concluded in their work that steady state approximations can be used in transient situations with excellent or valid results for most engineering applications.

Experimental results
For the 4mm diameter sensor/transducer and a steady-state inlet pressure of 5mBar, 10mBar and 20mBar provided by an air compressor, there were made graphical comparisons of the airflow curves, which are shown in Figure 16. Fluke curve gives the information of the airflow measured by the "Fluke" analyzer, and the ST curve shows the airflow as the response of the designed sensor/transducer ST.  For the 4mm diameter sensor/transducer and a steady-state inlet pressure of 5mBar, 10mBar and 20mBar provided by an air compressor, there were made graphical comparisons of the airflow curves, which are shown in Figure 18. Each curve gives the information of the pressure measured by the Sensor/Transducer in Pascal. For the 8mm diameter sensor/transducer and a steady-state inlet pressure of 5mBar, 10mBar and 20mBar provided by an air compressor, there were made graphical comparisons of the airflow curves, which are shown in Figure 21. Each curve gives the information of the pressure measured by the Sensor/Transducer in Pascal. In Figure 22 is shown the behavior of the airflow obtained by the sensor transducer designed (ST curve) in comparison with the airflow reference pattern (Fluke curve measured by the Fluke equipment). It is possible to understand that the ST system can measure changes of airflow when the tester prototype can be closed or opened according to evaluate the steady state behavior of the ST designed. Nevertheless, it was possible to get better responses of the system as dependence of the diameter of the ST, the better responses (less error percent between ST and Fluke measurements) were achieved in diameters around 8, 10 and 12 mm. In Figure 23 is shown the differential pressure measured by the ST designed for closed loop (upper subfigure) and open loop (lower subfigure). It was possible to understand that ST system can detect changes or tendencies to keep steady state as consequence to open or close the loop of the tester prototype, therefore it was possible to measure this differential pressure by the ST designed. In Figure 24 is shown the dynamical response of the system ST by pressure excitation signal given by 10, 20, 30 mBar obtained through the airflow regulated by the air compressor of the air flow test bench, and the diameter evaluated was 4mm. It is possible to understand that the ST designed cannot get a faster response in presence of transient changes (ST curves for airflow, differential pressure and volume), it could be explained because of the geometrical characteristics of the ST and its nonlinear behavior in diameters 4mm to 6mm, however, the ST system can get a better answer in presence of disturbances or transient changes when the diameter is between 8, 10 y 12mm and every reference was given in comparison the measurement of the Fluke equipment (Fluke curve for airflow, differential pressure and volume). For the 10mm diameter sensor/transducer and the mechanical ventilator excitation signals, there were made graphical comparisons of the airflow curves, which are shown in Figure 26. In every subfigure, the Fluke curves gives the information of the airflow measured by the medical gas flow meter Fluke VT 650 and the ST curves is the airflow measured by the sensor transducer designed. During the 1 minute of measurement, the ST shows a faster and robust sensor behavior (for 8mm of diameter) as consequence of dynamical evaluation made by an air compressor in range of work between 75 l/min to 105 l/min. For the 8mm diameter sensor/transducer and the mechanical ventilator excitation signals, which had the XS cam and 20 RPM speed, there were made graphical comparisons of the ventilation curves, which are shown in Figure 26. In every subfigure, the Fluke curve gives the information of the volume, differential pressure and airflow measured by the medical gas flow meter Fluke VT 650 and the ST curves are the volume, pressure and airflow measured by the sensor transducer designed. During the 2 minutes of measurement, the ST shows a faster and robust sensor behavior (for 8mm of diameter) as a consequence of dynamical evaluation made by a mechanical ventilator low cost based on cams OxygenIP.PE.  Figure 27 shows the integrated air flow sensor/transducer developed for this particular transient flow measurement. It consists of a compact air flow sensor based on an orifice plate and a transduction stage of the measured differential pressure over time. Results above indicate the optimum dimensions which can be used in an orifice-plate sensor for the working conditions and range of the mechanical ventilator OxygenIP.PE. Transduction stage and differential pressure measurement were integrated in this device in order to prevent leaks of contaminated air flow. The device allows to measure an air flow through it and calculate the flow into an electric signal ready to be stored or, as was used, to show an air flow value in a display over time.  Figure 28 shows the compact air flow sensor developed for the integrated design and its assembly plan is shown in Figure 29. It consists of an upstream and downstream pipe which are welded to an orifice plate. Dimensions were established based on the analytic and experimental results which guarantee the differential pressure measurement over time for this particular medical application: a mechanical ventilation system OxygenIP.PE whose nominal working conditions correspond to a transient flow.   Figure 32 shows a schematic representation of the orifice plate for the air flow sensor. It required a compact orifice plate inside the integrated device as much as possible while it is able to be fabricated in local mechanic shops. In this sense, thicknesses were selected for releasing welding process. Pressure taps dimensions were established in order to be able to be welded to the upstream and downstream pipes. Additionally, its dimensions allow to connect hoses for the differential pressure measurement.

Conclusions
A sensor/transducer (ST) was designed to measure the differential pressure trough an orifice plate and obtain the air flow, volume and pressure over time to register the performance of mechanical ventilators. The geometrical characteristics of the proposed sensor based on orifice plate were researched in order to find the appropriate parameters to measure the physical variables. Results indicate that the sensor orifice diameter has an important influence in sensor performance; in this sense, a diameter of 10mm provides the best response, in terms of magnitude and tracking, for the mechanical ventilator curves without increasing significantly the pressure inlet for a breathing circuit which is provided by the mechanical ventilator.
The mathematical model of the system was designed as well as evaluated, and consequently, an algorithm was designed to obtain the airflow, volume and pressure from the differential pressure obtained by the transduction process of the transducer joined to the designed sensor. Therefore, the ST system was analyzed in dynamical and transient behavior for ranges of work that depends on geometrical parameters and physical values of airflow, pressure, and volume of mechanical ventilators for artificial human breathing.
For a given orifice diameter, a correlation was observed between the differential pressure and the airflow. This correlation was not linear, but instead showed a parabolic tendency. Secondly, similar results and tendencies were observed between the steady state and transient state simulations. Therefore, it can be concluded that a steady state approach (and its corresponding assumptions) can be considered to validly describe the transient behavior of this orifice plate sensor.
For a given air flow, the smaller the orifice diameter, the larger differential pressure induced in the orifice plate. This could happen because for a given flow, a smaller orifice diameter requires the flow to squeeze to pass through the opening. This increases the flow velocity, but at the cost of reducing the flow pressure at the outlet, resulting in a bigger differential pressure in the orifice plate. Therefore, a bigger inlet pressure would be necessary to help the flow overcome the pressure losses in the pipes. It can be concluded that a plate with a smaller orifice diameter would be the best for this sensor. Taking this into account, lower pressure drops would occur in the plate, not affecting considerably the flow, while at the same time being large enough to be detected by the sensor transducer and still being in its measuring range.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Appendix A
This appendix describes the special equipment designed for the validation and mathematical characterization of the air flow sensor in different working conditions of air flow.

Steady state air flow test bench designed for experimental
In order to determine the optimal orifice diameter for the medical flow sensor in stationary conditions a test bench was specially designed for this experiment, Figure A1. It consists of a pipe where an air flow is induced by an air compressor, a fixed orifice plate to the pipe for flow measurement and a variable orifice-plate flow sensor. The fixed orifice plate was calibrated with a medical gas flow meter Fluke VT650 in a validation laboratory implemented in the COVID19pandemic context at the Pontificia Universidad Católica del Perú. This fixed orifice-plate allows to determine the real flow through the variable orifice-plate flow sensor. In this sense, the orifice diameter can be changed and the relation between real flow and differential pressure can be obtained.