1. Introduction
Accurate measurement of respiratory flow is vital for the clinical decision-making of chronic obstructive pulmonary disease (COPD) [
1,
2,
3,
4]. The pneumotachograph (PNT) is one of the most common respiratory flow measurement elements used for spirometers. Under laminar flow conditions, according to the Hagen–Poiseuille law, the pressure drop (
P) across the resistance of the pneumotachograph is linear to the flow rate (Q) [
5,
6,
7,
8]. However, the linear range, i.e., conductance, can be considered as a constant value and is very narrow [
9]. The conductance values reduce slightly with increasing flows. So, when the PNT is used as a linear element, obtaining a calibration curve is simple, but the measurement accuracy will be lost. To improve measurement accuracy, PNT needs to use higher-order polynomial calibration curves. The frequency calibration of non-linear PNT, which is required to maintain accuracy [
10,
11], is generally a complex and time-consuming task, as it usually requires a source of constant airflow. However, reliably accurate reference waveform generators are not widely available.
The 3L calibration syringe has the advantages of being a small piece of equipment, having a low cost, and a simple operation. It is an ideal quality control device commonly used in pulmonary function laboratories. Finding out whether the calibration curve of a PNT device can be obtained with only a 3L syringe has sparked interest among researchers. Since it is difficult to generate a steady flow by manually pushing the syringe, indirect methods have been proposed to obtain the calibration curves of PNT. As early as 1982, Yel et al. [
12] developed a simple method named the weighted averaging (WA) technique to obtain the conductance values of PNT. In subsequent research, the calibration curves were supposed as second and third-order polynomials, as proposed by Tang et al. [
13], the power law equation, as described by Biselli et al. [
14], and polynomials with regularizing penalization added, as developed by Quelhas et al. [
15]. On top of these studies, multiple strokes at different flow rates were needed to cover the whole calibration range. A common strategy of the indirect methods of nonlinear calibration of PNT is to find optimal parameters to minimize the error between the known syringe volume (3L) and the volume obtained by integrating the calibrated PNT waveform in each stroke. However, this strategy cannot guarantee the accuracy of the calibration requirements for both volume and flow. As the flow rate through the PNT increases, the flow resistance increases. The gas in the syringe barrel will be compressed (injection) or expanded (withdrawal), which leads to the calibrated PNT measuring volume being less than or more than 3L [
16]. Hankinson et al. [
17] solved this distortion problem by calculating the compression volume in the cylinder using the adiabatic process of an ideal gas, which requires simultaneous monitoring of the plunger displacement and the absolute pressure of the gas inside the cylinder. On this basis, Cross et al. [
18] proposed a syringe potentiometer (SP) for PNT calibration by reinventing a 3L syringe. Volume and flow waveforms obtained from the SP device were deemed accurate surrogates for the actual syringe volume and flows. However, assembling a SP device is not easy. A set of 3D-printed components needs to be additionally manufactured. A draw-wire potentiometer is required to purchase. Finally, a small-bore pressure tap is demanded to drill into the faceplate of the calibration syringes. These additional accessories and complex processes would not only increase costs but also weaken its popularization. To date, none of the above-mentioned methods can be widely used.
In this study, an alternative simplified PNT calibration method was proposed, which can achieve fast calibration without adding accessories and modifying the 3L syringe. This paper is organized as follows. Firstly, in the Method section, there will be a description of the test setup for the experiments and detailed information on the simulation experiments. Secondly, the simulation results of piston movement such as velocity and pressure profiles, the static pressure comparison between origin pressure tapping and new pressure tapping, and the validation of the calibration system are described in the Result and Discussion section. Finally, the research significance of this work based on the achieved results is reported in the Conclusions.
2. Methods
Figure 1 shows the schematic of the calibration system. A 3-L precision calibration syringe (Chest M.I., Tokyo, Japan) was used for this experiment. The typical structure of a commercial 3L calibration syringe is a lightweight piston mounted horizontally in a right cylinder. The total volume inside the cylinder is calculated by the product of the plunger displacement (L) and the area of the syringe piston head (S):
where the trajectory obtained by the object tracking algorithm is taken as a surrogate for L, given the assumption that in each calibration stroke the movement of the extrusion profile occurs only along the principle axis of the syringe. Since the total volume and area of the syringe piston head are constant, we only need to monitor the length changes of the plunger to obtain the instantaneous volume in the cylinder. The length of the plunger of this 3L calibration syringe is 37.5 cm, and that of other common brands is similar. In practical use, we put these data into the program as the input parameter to ensure the algorithm can apply all commercial calibration syringes. For universality and ease of operation, high saturation colored electrical insulating tape (3M, Saint Paul, MN, USA) was attached to the end of the plunger of a 3L syringe as a mark point for target tracking. The real-time tracking trajectory of the color marker was used as a real-time substitute for the plunger movements. All experiments mentioned in this paper were implemented with a red color code. The trajectory of the plunger translated into real-time changes in the volume of the cylinder in subsequent calculations. The shooting direction of the camera is perpendicular to the plunger of the syringe, as shown in
Figure 1. The marked
H in
Figure 1 represents the distance between the rear camera and the plunger. The distance can be arbitrary as long as it satisfies the conditions that the camera shooting range can cover the moving range of the color code. The mobile APP calls the rear HD camera of the mobile phone to shoot video in 1080 P mode with 60 frames (the highest possible resolution and frame rate were chosen to capture the details of the movement of the plunger). During the experiment, the smartphone was placed on a stable base for shooting to avoid camera shaking. According to the experimental requirements, no color was the same or close to the color code in the video background. The gauge pressure sensor and its measurement system were the same as in the previous experiment.
The application in the mobile terminal, which was developed under the integration environment of Android Studio, implemented three functions: (1) to track and save the color code movement trajectory and convert it into a real-time cylinder volume; (2) to obtain, process, display, and save the data of gauge pressure by the Bluetooth communication; and (3) to fit the calibration curve with the real-time gauge pressure data and real output flow data and display it.
In this system, the two factors that had a greater impact on the calibration results are the selection of the tapping position and the deviation caused by gas compression, or the expansion in the cylinder. The selection of the tapping position was analyzed and optimized using the dynamic-mesh updating technique. The deviation caused by gas compression or expansion in the cylinder was corrected using a model equation.
2.1. Tapping Position Optimization
A two-dimensional dynamic transient simulation was adopted to simulate the injection and extraction process when the 3L syringe is connected to a PNT, which facilitated observing the whole fluid domain to find the appropriate substitution for the measurement tapping position.
2.1.1. Presumptions
To facilitate the establishment of a mathematical model describing the motion of the cylinder, some presumptions were made for quantitative analysis of the motion process of the plunger:
The air in the 3L syringe is set as the ideal gas, which satisfies the ideal gas state equation;
The friction between the plunger and the cylinder wall is relatively small and can be ignored;
The gas in the cylinder cavity has no heat exchange with the outside world. It is an adiabatic process. The gas temperature is the ambient temperature;
Cylinder leakage can be ignored.
2.1.2. Governing Equations
When the boundary is moving, the integral form of the conservation equation on an arbitrary control volume, V, can be written as [
19,
20,
21,
22]:
where
is the fluid density,
is the flow velocity vector,
is the grid velocity of the moving mesh,
is the diffusion coefficient, and
is the source term if
. Here, what is used to represent the boundary of the control volume is V. The time derivation term in Equation (
3) can be written using a first-order backward difference formula as:
where
n and
n + 1 denote the respective quantity at the current and next time levels. The (
n + 1)th time level volume is calculated using:
where
is the volume time derivative of the control volume. To satisfy the grid conservation law, the volume time derivative of the control volume is computed from:
where
is the number of faces on the control volume and
is the j-face area vector. The dot product
on each control volume face is calculated from
is the volume swept out by the control volume face over the time step
.
2.1.3. Dynamic Mesh Method and Boundary Conditions
In this case, to characterize the performance of the fluid passing through the PNT, the dynamic mesh was used to simulate the plunger movement and the porous media was used to simulate the PNT. Since the movement of the plunger was a simple directed rigid body motion, the dynamic layering method can be used to update the grid to simulate this form of motion. Therefore, the 3L calibration tube grid was divided into three regions. In order to retain a certain observation area for point A, the moving part did not cover the entire piston stroke. The quadrilateral structured grids were built for moving parts and porous media. The unstructured triangle elements were built for stationary regions. Given the symmetry of the computation domain, to reduce the computation time, half of the 2D calibration syringe geometry with the same physical size was used, consisting of a rigid body of piston on the left and a pressure outlet on the right. The mesh model is shown in
Figure 2.
The ANSYS Fluent
® (ANSYS 2020 R1) software was flexible for CFD simulation. The users can compile User-Defined Functions (UDFs) according to their specific modeling needs [
23]. In the present study, the macros of DEFINE_CG_MOTION were used to specify plunger (rigid body) velocity and displacement. Stationary zones were maintained intact for an update. The following velocity expression was used to simulate the reciprocating motion of the piston:
where A is the amplitude, f is the frequency, and the maximum velocity is (
). The appropriate A and f values were set to cover the range of detection.
The porous media model in Fluent was used to simulate PNT. By setting the key parameters, the flow characteristics of the fluid through PNT would be consistent with the real data to achieve the purpose of simulation. The key parameters include inertial resistance coefficient, viscous resistance coefficient, and porosity. Based on the calculation method offered by the ANSYS fluent 12.0 Documentation [
24], the calculated key parameters are 1.5 ×
, 15, 112, and 0.95, respectively.
The feasibility verification of the porous media model is shown in
Figure 3. The simulation (red line) and measurement (black line) results of 14 groups of flow (from 1 to 14 L/s with a step of 1 L/s) were recorded. It can be seen that the numerical simulation results were in good agreement with the experimental results, indicating that it is feasible to use the porous media model in Fluent to simulate the characteristics of PNT.
2.2. Experimental Method
2.2.1. Experiment 1: Validation of Tapping Position
A Fleisch-type pneumotachograph (0–800 L/min range, Piston Medical Ltd. Budapest, Hungary) was used for the experiments. An auxiliary gasket ring with a pressure tap was fabricated using 3D printing technology to connect the PNT to the calibration syringe. We connected the pressure tap to gauge pressure sensors (ABPMRRN010KG2A3, Honeywell, Columbus, OH, USA), attached to a 12-bit ADC (Analog-to-Digital Converting) (NI USB-6008, National Instruments, Austin, TX, USA). On the faceplate of the commercially available 3L calibration syringe (Cubic Sensor and Instrument, Wuhan, China), a small hole was drilled as the pressure tap, whereby the pressure inside the syringe barrel can be real-time monitored by connecting one port of the same type of gauge pressure sensors mentioned above. A primary microcontroller module (CC2640R2F module-based ARM Cortex®-M3 core, JieFan Scientific Company, Guangdong, China), which serves as the Bluetooth transmitter at the same time, was used for respiratory signal acquisition and data wireless transmission. The data processing, data storage, and result displaying were completed in an application for smartphones or other mobile terminals. The waveforms of the combined data set were low-pass filtered at 25 Hz with a fifth-order Butterworth design. The sampling frequency was set to 250 Hz.
2.2.2. Experiment 2: Validation of the Calibration System
The object tracking algorithm worked in the application and was implemented using Meanshift [
25,
26,
27,
28,
29], a ready-to-use function provided by the OpenCV library, and is the iteration tracking algorithm based on a color histogram. The advantages of the target tracking algorithm based on color feature included (1) a small computational cost and (2) the histogram generated by the HSV color space is not more sensitive to light changes than the one generated by the RBG color space. The limitation is that similar colors cannot appear in the background. Compared to a draw-wire potentiometer, the color code tracking method is very simple. This method is not affected by the material and appearance of the 3L calibration cylinder. Although the experiments were carried out indoors, there is no guarantee that the lighting conditions would not change at different times and in different places. Therefore, at the beginning of the experiment, the region of interest (ROI) was retrieved.
The flowchart of the app is shown in
Figure 4.
Before the tests, the device needed to be initialized. The device Bluetooth was pre-set to the communication mode. Once the Bluetooth pairing was complete, the gauge pressure data began to transmit immediately. Then, the plunger length, frame rate, and resolution settings of the camera were entered as the input parameters. When the camera was ready, the current video frame was captured and the target was selected interactively. Then, the experiment begins with a push-pull plunger at different speeds several times to cover the largest possible flow range. The gauge pressure data processing included extracting gauge pressure sensor data based on the transmitted packet pattern. Finally, calibration curves were fitted using gauge pressure data and real output flow data. The result of the fitted curve was displayed on the screen.
2.2.3. Experiment 3: The Correction for Real Output Flow
The flow resistance of the PNT increases with the increase in the flow rate. When the flow resistance of PNT is too large to be ignored, gas compression will occur in the cylinder. The compressed volume is
. In theory, the volume discharged from the 3L calibration syringe was supposed to be
, but the actual discharged volume is
, as
Figure 5 shows.
According to the adiabatic process of an ideal gas [
30],
Suppose that the gas compression process is a quasi-static transition from pre-compression with pressure
and volume
to post-compression with pressure
and volume
where
is the instantaneous volume within the cylinder, including connecting tubing,
is instantaneous pressure in the cylinder measured at the front tap,
is barometric pressure, and
is the ratio of the molar heat capacity at a constant pressure to the molar heat capacity at a constant volume (for air,
is 1.4).
Finally, we obtain the gas compression (
) formula for the instantaneous volume loss:
The pump-corrected displacement volume was during the injection process, while it was during the withdrawal process. The first derivative of the pump-corrected displacement volume was the syringe flow, i.e., real output flow.
2.2.4. Experiment 4: Validation of Calibration Accuracy
The pulmonary waveforms generator (PWG-33, Piston Medical Ltd. Budapest, Hungary) with high accuracy and fidelity was used as standard equipment to depict the real calibration curves of the PNT. The PWG-33 can provide the waveforms with 0.5% and 0.2% accuracy of flow and volume, respectively. The 14 sets of flow waveforms (from 1 to 14 L/s at a step of 1 L/s) were used to calibrate. The pressure drop was recorded by the measuring equipment with differential pressure transmitters (ABPMRRN010KD2A3, Honeywell, Columbus, OH, USA). The polynomial curve fit was applied and a linear regression equation was obtained with a correlation coefficient () of 0.9995 as the standard reference flow curve.