# Hardware-in-Loop Modules for Testing Automated Ventilator Controllers
## 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 EtCO\({}_{2}\) values that are considered normal for healthy patients while being provided ventilation from the MOVES(r) SLC(tm) platform. The R\({}_{\text{aw}}\) and CL features of the system were effective and capable of reproducing the R\({}_{\text{aw}}\) and CL values calculated by the ventilator and that fall within physiologically normal ranges. In addition, the effects of different R\({}_{\text{aw}}\) and CL values on the dynamics of ventilation also matched what is considered normal. Specifically, increased R\({}_{\text{aw}}\) correlated to a decrease in V\({}_{\text{T}}\), while a decrease in CL (lungs are stiffer) also correlated with a reduced V\({}_{\text{T}}\). We showed how the key target variable, EtCO\({}_{2}\), could be successfully raised or lowered within the MechVent module via adjustments to MV, which is traditionally used to adjust EtCO\({}_{2}\) readings. Finally, we demonstrated the system's ability to generate values outside the optimal \"healthy\" range, and using a repre  
Figure 11: **Proof-of-concept evaluation of closed-loop controller logic with the OxyVent module. ** The average controller performance for maintaining SpO\({}_{2}\) across five-minute testing scenarios using (**A**) 5 s and (**B**) 60 s sampling rate controller configurations (n = 3 each). Controllers adjusted FiO\({}_{2}\) and PEEP/P\({}_{\text{can}}\) to reach the target SpO\({}_{2}\) in each respective run. SpO\({}_{2}\) and FiO\({}_{2}\) are plotted on the left axis while P\({}_{\text{can}}\) and PEEP are shown on the right axis. The shaded region for each variable denotes the standard deviation. sentative, 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 SpO\({}_{2}\) values. We demonstrated how the DO value could be changed by adjusting the Air:N\({}_{2}\) ratio of the supplied gas mixture or by changing P\({}_{\text{can}}\). A few notable effects from these two settings were observed. First, the O\({}_{2}\) absorption rate was impacted little by differences in the canister pressure and only seemed to be noticeably reduced when Air flow was partial and N\({}_{2}\) was being supplied as well. These conditions were only met in two configurations, i.e., Partial Air/Partial N\({}_{2}\) and Partial Air/Full N\({}_{2}\), since interestingly, Partial Air with N\({}_{2}\) 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 O\({}_{2}\) 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).