1. Introduction
Automated controllers have been developed for various tasks in a variety of different industries. Automation has been used in agriculture, the automotive industry, as well as the medical field [
1,
2,
3]. Automation in medicine has the potential to streamline medical procedures, reduce the cognitive burden on medical providers, lower the skill threshold for challenging procedures, and improve patient outcomes, and has been implemented in extracorporeal circulatory support systems [
4], resuscitation during hemorrhagic shock [
5], and assisted ventilation in intensive care units [
6].
Fully automated mechanical ventilation has been an increasingly researched topic due to the COVID-19 pandemic, resulting in studies on controllers being developed [
7] and further integrated with patient monitoring [
8]. Even with this increased research on mechanical ventilation, respiratory failure occurrences following trauma-induced shock occur, even as other parameters, such as hemodynamics, may have appeared satisfactory to medical providers [
9]. Failure to manage appropriate ventilation during respiratory failure can rapidly become fatal, serving as a significant contributor to potentially preventable mortality in trauma emergencies [
10]. To increase the survival of patients requiring ventilation, automated ventilator controllers need to be able to manage the delivery of oxygen (O
2), normalize alveolar ventilation in the lungs, increase lung volume, reduce the work required for breathing, and aid in carbon dioxide (CO
2) removal, ensuring appropriate oxygenation and the removal of waste from the system [
11]. Automated ventilation controllers, in addition to managing various aspects of patient respiration, will also need to include safeguards for the prevention of ventilator-induced lung injuries, which can be caused by both the over- and under-inflation of the lungs. This highlights the need for automated controllers to include precise ventilator strategies that minimize extending the lungs into the ranges where injury can occur, unless absolutely necessary for patient survival [
12,
13].
Designing controllers to manipulate physiological parameters is difficult due to the complexity of biological systems [
14]. This difficulty greatly increases with traumatic injury where the body’s natural “control” systems are rapidly changing and interacting with each other to mitigate the effects of trauma and increase the likelihood of survival [
15,
16]. The design of human physiological controllers often relies on data from animal studies [
17,
18], such as those performed on swine. While swine are a recognized model for certain human physiology due to their similarities [
19], there remain differences compared to humans that must be fully addressed in clinical trials prior to regulatory approval [
20]. Large amounts of data from animal studies are usually required for designing and debugging physiological controllers, with additional large animal studies needed to field test the controllers post-designing and debugging. This iterative process is costly as large animals require housing at an accredited research facility that must provide a highly regulated regimen of care, following strict standards for appropriate nourishment, general well-being, and veterinary services. This cost is compounded by the often-large number of animals required to statistically power these studies and the substantial time and personnel commitments required to complete studies.
To mitigate the downsides of extensive animal testing, hardware-in-loop (HIL) benchtops have been used for more streamlined testing. HIL testing enables the more robust evaluation of how controllers will perform when real-world equipment is in use—a feature lacking with strictly in silico models. With the rapidly accelerating advancement of computational capabilities that enable the use of larger and more sophisticated machine learning models, in silico ventilation patient simulators have been growing ever more robust. They have been able to predict individual patient changes in response to ventilator settings as well as gas/aerosol substance transport [
21,
22,
23]. However, these models still require extensive, highly specialized datasets from clinical trials for training [
22]. Some models enable communication with external sensors and devices, but the outputs of the physical devices do not directly impact the sensor readings [
24]. The ventilator settings or measurements of the output are commonly used to estimate a change in the physiological variables, which are then simulated and streamed to the sensors. Previous benchtop models for simulating physiological data have been developed for testing patient care during a coma [
25], the testing of cerebrospinal fluid shunt systems [
26], and the testing of fluid resuscitation strategies for patients experiencing hemorrhagic shock [
27]. There have been several HIL systems previously developed for mechanical ventilation. Simulated lungs that mimic specific respiratory dynamics have been used for controllers that manage positive end-expiratory pressure (PEEP) [
28], and in silico simulations have been designed for modeling the interactions between mechanical ventilators and human lungs [
29]. There have also been complex lung simulators developed, like the xPULM simulator developed by Pasteka et al. Their system combines in silico, ex vivo, and mechanical components into one physical platform to capture flow and pressure changes at differing respiratory rates (RRs) and tidal volumes (V
T) [
30]. Another group developed a physical lung model with adjustable mechanical properties that was able to mimic a normal lung, an obstructive lung, and restrictive lung diseases [
31]. However, these models primarily focus on physically reproducing the pressure and volume mechanics of ventilation and—except for Laubscher et al.—still use in silico simulations for CO
2 generation and/or end-tidal CO
2 (EtCO
2) waveforms. Additionally, none of these models account for O
2 delivery, which is one of the primary purposes of mechanical ventilation. More recent HIL testbeds that have sought to incorporate a measurement of O
2 delivery have done so by introducing an SpO
2 simulator that interacts with the testbed [
24]. The work described here presents novel oxygenation and CO
2 ventilation HIL testing setups for the development and testing of automated ventilation controllers. In summary, this work provided the following contributions:
The development and characterization of a HIL ventilation system for oxygenation
The development and characterization of a HIL system for CO2 ventilation using commercial ventilator technology
Proof-of-concept closed-loop ventilator controller evaluation using HIL systems and physiological scenarios to highlight the utility of the ventilator test platform
2. Materials and Methods
To establish an initial proof of concept for HIL platforms, we targeted two vital signs as corollaries to the primary purposes of mechanical ventilation mentioned above; these were (i) SpO
2 for both O
2 delivery [
32] and atelectasis prevention and (ii) EtCO
2 for the removal of carbon dioxide [
33]. An effective test platform must not only be able to simulate normal physiologically relevant behavior but must also allow some degree of independent manipulation of the signals to simulate “sick” patients to test the limits of a controller’s capabilities. To achieve this, we opted to isolate the ventilation/CO
2 removal module from the O
2 transport module, reducing the complex challenges that would be involved in producing a controllable O
2-CO
2 gas exchange medium. We termed these two simulation modules
MechVent and
OxyVent, respectively. The following is a description of the design and initial system characterization testing for both the MechVent and OxyVent modules, ending with a description of the proof-of-concept automated ventilator control logic and testing approaches.
2.1. MechVent Development
To control EtCO2, mechanical ventilators modulate various settings including the PEEP, peak inspiratory pressure (PIP), and minute ventilation (MV)—which is itself the arithmetical product of VT and RR. Additional physiological characteristics that directly impact the dynamics of mechanical ventilation include airway resistance (Raw) and lung compliance (CL). The MechVent module was primarily designed to generate EtCO2 readings within a physiological range that responds to changes in the select ventilator settings mentioned above while also enabling the adjustment of simulated patient variables (namely Raw and CL). Development and testing were conducted using the MOVES® SLC™ ventilator platform (Thornhill Medical, Toronto, ON, Canada). This system was selected due to its ruggedized design for prehospital medicine and ongoing collaboration with the manufacturer, which allowed for the reading of input data and the sending of ventilator commands in real time. This capability was essential for tuning and characterizing the MechVent system, as well as testing a proof-of-concept automated ventilator controller.
The design and development of the MechVent system, as shown in
Figure 1, began with the selection of cylindrical bellows (McMaster-Carr, Elmhurst, IL, USA) with cuff ends that could be sealed on one end using a cuff insert and secured to the manifold that connected to the ventilator on the other. The size of the bellows was chosen to operate within a relevant V
T range of 200–1200 mL without overly stressing the bellows’ material. Key interface components—including the central three-way hub, hose fittings, a custom choke, and parts for the R
aw and CL adjustments—were modeled using computer-aided design (CAD) software and were either 3D printed or assembled from laser-cut acrylic parts. A 5 in (127 mm) diameter acrylic cylinder was used to house the bellows, and a laser-cut lid was fixed to the cuff insert on the upper end of the bellows. The combination of the cylinder housing and lid served to ensure the even and unidirectional expansion of the bellows during respiration and provided a support platform for the CL adjustment compartment. Lung compliance was manually set by placing standardized weights in the CL compartment. As CL changes are more associated with chronic conditions and are not expected to rapidly change during trauma [
34], setting this simulated patient characteristic once at the beginning of a test was considered acceptable; this was in comparison to an automated real-time adjustment. The lower end of the bellows was attached to the central three-way hub, which was seated within the base of the housing. The central hub contained three ports: the main port that attached to the bellows, a supply port that was connected to the CO
2 supply, and the final port that connected to the ventilator.
As an analogue for CO2 generation, a compressed gas cylinder (Airgas, Radnor, PA, USA) supplying medical-grade CO2 was used, and components were connected using ¼ in (~6.4 mm) plastic tubing. A two-stage regulator was used to reduce the pressure to around 10 psi (~517 mmHg) and was connected to a 15 gal (~57-L) expansion tank (McMaster-Carr, Elmhurst, IL, USA) to stabilize the supply pressure. The initial MechVent design employed continuous flow and a custom-designed choke, which was connected to an adapter fitting that then connected to the supply port of the central hub. The custom choke was later replaced by an automated solenoid valve, as shown in the diagram, enabling variable CO2 generation based on how rapidly the valve opened and closed. The final port of the hub was connected to the ventilator using ¾ in (~19 mm) plastic tubing and a fitting that connected to the standardized vent hose. The Raw control was positioned along the ¾ in (~19 mm) tubing between the hub and the vent hose connection and comprised a 12 V linear actuator, a microcontroller (Arduino®, Monza, Italy), and two relays configured as an H-bridge circuit to control polarity. This setup enabled the bi-directional control of the actuator’s extension, allowing the tubing to be pinched at various levels to simulate different airway resistances. The Raw system was constrained to three positions: Open, Partial (occluding the tubing by approximately half), and Full (denoting full extension of the actuator, while still allowing minimal airflow). Intermediate positions were explored and found to have minimal to no effect on system responsiveness beyond what was already obtained by these three positions.
2.2. Characterization of the MechVent Module
A comprehensive series of tests was developed to characterize the system’s response; these focused on variations in MV, Raw, and CL. The calculated CL values and the corresponding expiratory tidal volume (VTE) were recorded using various loads in the CL compartment ranging from 200 to 1000 g. The calculated Raw values and corresponding VTE and inspiratory tidal volume (VTI) were also recorded at each Raw setting. A baseline CL load of 500 g and an ‘Open’ Raw level were used for all EtCO2 control testing. The system performance was evaluated across RRs ranging from 6 to 30 breaths per minute (BPM), and each test ran for 10 min, generating 600 data points per scenario. Pearson’s correlation values between the controller parameters and responses were calculated, as were the statistical significances for each correlation. Although the ventilator did not support Continuous Mandatory Ventilation (CMV), the system was tested using Intermittent Mandatory Ventilation (IMV) modes. This resulted in minor discrepancies between the VTI and VTE, but the testing protocol still facilitated the collection of critical data, enabling the simulation of real-world ventilatory conditions and contributing to system refinement.
In addition, a series of proof-of-concept tests were conducted on the MechVent module to confirm its usability for evaluating automated ventilation controllers. A simple decision-table-based controller following a modified version of the Acute Respiratory Distress Syndrome Network (ARDSNet) protocol (
Figure 2A) [
35] was used to bring the system within the target range of 30–40 mmHg. Test runs were conducted at 60 s sampling rates and included scenarios with either low (~20 mmHg) or high (~60 mmHg) starting EtCO
2 values. To achieve the different baseline EtCO
2 levels while holding the initial settings of the system constant (7 L/min, MV and 5 cm H
2O, PEEP), a solenoid valve was used in place of the custom choke, with the duration of valve opening controlling the CO
2 supply (
Figure 2B). The simulated patient’s weight was defined as 70 kg in order to provide sufficient V
T overhead for the upper MV range of the ARDSNet protocol. As mentioned above, MV is the product of RR and V
T, either of which can be changed independently to produce the same net change in MV.
2.3. OxyVent Development
When a patient is being mechanically ventilated, there are several settings that may be adjusted to maintain healthy SpO
2 levels. Two such settings are the fraction of inspired oxygen (FiO
2), based on the alveolar gas equation [
36,
37], and PEEP [
38,
39]. Thus, the OxyVent module needed to provide an analogue for SpO
2 within a physiologically relevant range, as well as the ability to manipulate said SpO
2 reading via changes in the provided analogues for FiO
2 and PEEP.
To simulate SpO
2, the OxyVent module incorporated the usage of a dissolved oxygen (DO) probe (Atlas Scientific, Long Island City, NY, USA) to measure the DO content in approximately 1200 mL of plain tap water contained in a closed, rigid cylindrical canister, as shown in
Figure 3. The DO level within the water was controlled by bubbling a mixture of Breathing Grade Air and Ultra-High-Purity Grade Nitrogen (N
2) into the water, and the ratio of this mixture could then be treated as an analogue for FiO
2. Compressed gas cylinders (Airgas, Radnor, PA, USA) were used to supply the gases to the system using ¼ in (~6.4 mm) plastic tubing and barbed fittings to connect each major component. Similarly to the MechVent module, two-stage regulators were used to step down the supply pressure from each cylinder to 15 psi (~776 mmHg), and 15 gal (~57-L) expansion tanks (McMaster-Carr, Elmhurst, IL, USA) were used to improve the stability of the supplied pressure. The outlets of each of the two expansion tanks were connected to solenoid valves (US Solid, Cleveland, OH, USA), which enabled independent control over the flow of each gas. Following the solenoid valves, the two supply lines were merged using a T-fitting into a single line that was then connected to the inlet of the rigid canister, as shown in
Figure 3. Since the solenoid valves functioned in a binary fashion, i.e., being either fully open or fully closed, further control over the composition of the supplied gas mixture was enabled by utilizing open–closed pulsations at various duty cycles. We used three duty cycles that were defined as
Full, open 100% of the time;
Partial, open 50% of the time; and
Off, closed.
Because the OxyVent module performance relied on the absorption of O2 into the water, multiple steps were taken in an attempt to improve consistency and reliability in the rapidity and homogeneity of said absorption. Firstly, a diffusion ring that was connected to the gas inlet and positioned at the bottom of the canister was designed. This diffusion ring distributed the gas from the supply line out around the perimeter of the canister through a series of holes, rather than a single centralized point. The canister was also placed on a magnetic stir plate (Thermo Scientific, Waltham, MA, USA) paired with a crosshead stir bar, which was set in the center of this diffusion ring and spun at 200 rpm. Finally, a secondary diffusion plate was integrated overtop the diffusion ring and stir bar. This plate spanned the entire cross section above the stir bar and included an array of 11 holes with spacings of approximately 23 mm. This prevented the formation of a vortex in the canister from the stir bar and helped to compensate for any higher concentration of gas coming from the diffusion ring holes closer to the supply line connection.
Even with this design, however, there remained a variable which impacted O2 absorption—system pressure. An outlet port alone would eliminate any pressure build up, but by connecting this outlet port to a pressure inducer followed by a third solenoid valve, this variable could be controlled. By taking advantage of the differences in O2 solubility in water at differing pressures, an analogue for PEEP could then be introduced by regulating the pressure within the canister. The regulation of this pressure was controlled via a microcontroller (Arduino®, Monza, Italy), whose behavior could be modified according to the needs of the experiment. With this implementation, the internal pressure of the system could be permitted to increase/decrease at any point, thus raising/lowering the O2 solubility in real time. Although temperature also affects O2 solubility, the ease and speed of pressure control combined with the naturally static nature of the system’s temperature made pressure the preferred variable to use. These two controls provided ample capacity to adjust the DO levels in response to the ventilator settings, allowing robust testing capabilities for automated ventilator controllers.
2.4. Characterization of the OxyVent Module
The system’s behavior was characterized by using a series of baseline and oxygenation procedures. Of particular interest were how the DO saturation ceiling and DO absorption rate were affected by the supplied gas mixture and canister pressure. Each experimental run started by deoxygenating the water via a nitrogen flush, followed by bubbling various air–nitrogen ratios whilst simultaneously regulating the pressure within the canister. The change in DO with time was recorded and analyzed to develop characteristic functions of the system’s response. Each test ran for a period of 5 min to allow sufficient time for the system DO to reach a reasonably steady state. Bubbled gas mixtures were tested in triplicate at a gage canister pressure of approximately 5 psi (~250 mmHg). To observe changes in the DO saturation and responsiveness with a dynamic pressure range, variable pressure tests were conducted with a selection of air–nitrogen ratios that began at an initial gage canister pressure of 0 psi, increasing to 5 psi, and then finally to 10 psi. The canister pressure was held at each step for 5 min, with tests run in triplicate.
To further test the OxyVent module, a preliminary decision-table-based closed-loop control logic was conceived for managing the O
2 ventilator settings. Automated logic was based on the ARDSNet protocol developed by the NIH NHLBI ARDS Clinical Network [
40], which has been used for automating ventilator function in other studies [
41] (
Figure 4A). We used the lower PEEP and higher FiO
2 logic but added additional rules to further prioritize FiO
2 adjustments when SpO
2 fell below a certain threshold. Logic started on the first step in the ARDSNet table, and, if SpO
2 ever drifted below 90%, immediate setting adjustments would be performed to increase FiO
2 to 100% and then continue following PEEP adjustments based on the ARDSNet decision table. Once SpO
2 was above 96%, FiO
2 would decrease according to the ARDSnet decision table. Two sampling rates for the oxygen management logic were evaluated at 5 s and 60 s (
Figure 4B).
4. Discussion
The modules we developed for testing automated ventilator controllers performed acceptably in this proof-of-concept evaluation. The MechVent system was able to generate EtCO2 values that are considered normal for healthy patients while being provided ventilation from the MOVES® SLC™ platform. The Raw and CL features of the system were effective and capable of reproducing the Raw and CL values calculated by the ventilator and that fall within physiologically normal ranges. In addition, the effects of different Raw and CL values on the dynamics of ventilation also matched what is considered normal. Specifically, increased Raw correlated to a decrease in VT, while a decrease in CL (lungs are stiffer) also correlated with a reduced VT. We showed how the key target variable, EtCO2, could be successfully raised or lowered within the MechVent module via adjustments to MV, which is traditionally used to adjust EtCO2 readings. Finally, we demonstrated the system’s ability to generate values outside the optimal “healthy” range, and using a representative, decision-table-driven controller modeled after recognized ventilator protocols, we successfully brought the system back within the optimal range.
The characterization of the OxyVent module showed that the system could produce a range of DO values that could easily be scaled to fit a relevant range of SpO2 values. We demonstrated how the DO value could be changed by adjusting the Air:N2 ratio of the supplied gas mixture or by changing Pcan. A few notable effects from these two settings were observed. First, the O2 absorption rate was impacted little by differences in the canister pressure and only seemed to be noticeably reduced when Air flow was partial and N2 was being supplied as well. These conditions were only met in two configurations, i.e., Partial Air/Partial N2 and Partial Air/Full N2, since interestingly, Partial Air with N2 Off had one of the fastest absorption rates. The more significant effects of the system settings were seen in the plateaus of the DO plots. These plateaus represent the short-term, steady-state DO level under the corresponding system conditions. It is not the saturation point of the mixture, since the solution is not technically O2 saturated; however, it can be loosely thought of as a dynamic saturation or equilibrium point, since it is the peak DO level that can be reasonably expected under those conditions.
Although our developed modules performed acceptably, there are still limitations in their functionality. First, isolating the O
2 transport and CO
2 removal systems, which are somewhat physiologically coupled, introduces a potential source of error since they lose interaction effects that may impact the patient’s status. The MechVent module is incapable of making automated changes to the CO
2 generation rate, which constrains our testing ability. Additionally, there were discrepancies between VTI/VTE, which could be due to the nature of the inanimate system paired with the ventilator. Although the tests were conducted using an IMV setting, the ventilator can be switched between the Pressure-Controlled Mode (PCM) and Volume-Controlled Mode (VCM). Under PCM, the readings between VTI/VTE differed by 80–100 mL, but under VCM, the readings only differed by 10–25 mL. The discrepancy between VTI and VTE under PCM in the MOVES
® SLC™ system can be attributed to several design and control characteristics. PCM uses a decelerating flow pattern, delivering a high initial flow to quickly reach the target pressure, which can lead to excess gas volume in the circuit [
25]. Unlike VCM, PCM does not compensate for circuit compliance or minor leaks, as the tidal volume is not fixed [
26]. Additionally, the MOVES
® SLC™’s closed-circuit design continuously adds oxygen, and excess gas is vented through a relief valve that bypasses flow sensors, potentially leading to an underreported exhaled volume [
25,
27]. The ventilator’s emphasis on tidal volume in VCM and PIP in PCM further suggests that VCM has greater volume accuracy [
25]. In testing the MechVent module, the developed controllers only modified V
T and RR to change MV. Modifying PIP, V
T, and RR simultaneously proved difficult since the MOVES
® can only actively update these values in their respective modes, which results in the system rapidly changing between PCM/VCM to try and update values. This rapid change reduces the functionality of the ventilator and the MechVent module, so VCM is the primary mode of operation.
Another limitation is the range of DO levels within the OxyVent module, with challenges reaching values below 2 ppm and likely being caused by a few things. Firstly, the grade of N
2 used, namely Ultra High Purity, is permitted to contain small amounts of O
2, but not to exceed 2 ppm. These trace “impurities” may prevent the further expulsion of O
2 from the canister. Additionally, although purging DO levels via N
2 is an effective way of lowering DO levels in a liquid [
42], attaining levels below a certain threshold is essentially impossible without the usage of a strong vacuum or certain chemical additives such as sodium sulfite, which are unusable for a design such as ours where the DO levels must be allowed to change rapidly [
43]. Another limitation of the OxyVent module was the consistent appearance of an anomalous artifact regarding the DO readings at the beginning of each experiment. Specifically, the DO level can be seen dipping slightly at the onset of each test before climbing. One potential cause for this is the relatively low sampling rate of the DO probe (1 Hz), introducing a delay in readings carrying over from the N
2 flush. Another factor may be residual N
2 from the flush, which then gets introduced into the system before being expelled by the more oxygen-rich mixture. There were also limitations due to the response time of the valves in the supply and exhaust lines, which may introduce pressure and flow rate inconsistencies that adversely impact the performance.
The next steps will include further refinements to both modules. Some improvement opportunities for the MechVent module include automated CL adjustments that could be achieved by utilizing an actuator-driven spring similar to Pasteka et al.’s model [
30]. Automated changes in CO
2 generation could be achieved by automating the valve regulating the CO
2 supply. Testing the system with other ventilators capable of alternative control modes would be highly beneficial. To achieve this, there would need to be a way to set certain parameters and send commands directly to the ventilator. Unfortunately, most commercial systems do not grant out-of-the-box access to this level of control. The OxyVent module can be modified to reduce the distance between the supply valves and where the mixture is bubbled into the water to reduce the impact of residual N
2 in the system and improve the overall responsiveness. The valves can also be substituted with proportional solenoids that offer continuous, rather than binary, opening adjustment. This would enable greater granular control of the flow, reducing noise and improving the precision of both the mixture ratio and canister pressure. Although the systems currently operate independently, steps towards a singular ventilator module could be made by adding logic that mirrors relevant pressure values across both systems and by mapping both the oxygen consumption and CO
2 output to a unifying “metabolic” function. Finally, these modules will be integrated into a larger, polytrauma HIL automated testbed for resuscitation controllers that incorporate systems for testing fluid resuscitation controllers for hemorrhagic shock, automated extremity/junctional tourniquet control, and anesthesia management. The final system will enable the evaluation of a wide range of automated technologies for managing trauma patients, including algorithms that identify contraindications that may not be accounted for by standalone devices or controllers.