key: cord-0570438-8opc15jb authors: Hewing, Lukas; Menner, Marcel; Tachatos, Nikolaos; Daners, Marianne Schmid; Pasquier, Cosima du; Lumpe, Thomas S.; Shea, Kristina; Carron, Andrea; Zeilinger, Melanie N. title: Volume Control of Low-Cost Ventilator with Automatic Set-Point Adaptation date: 2020-09-03 journal: nan DOI: nan sha: 443332736c67d6ae6cad24f1bc4963c4cacd1f3e doc_id: 570438 cord_uid: 8opc15jb This paper considers the control design for a low-cost ventilator that is based on a manual resuscitator bag (also known as AmbuBag) to pump air into the lungs of a patient who is physically unable to breathe. First, it experimentally shows that for accurately tracking tidal volumes, the controller needs to be adapted to the individual patient and the different configurations, e.g., hardware or operation modes. Second, it proposes a set-point adaptation algorithm that uses sensor measurements of a flow meter to automatically adapt the controller to the setup at hand. Third, it experimentally shows that such an adaptive solution improves the performance of the ventilator for various setups. One objective of this paper is to increase awareness of the need for feedback control using sensor measurements in low-cost ventilator solutions in order to automatically adapt to the specific scenario. Coronavirus disease 2019 (COVID-19) is an ongoing pandemic, which is caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2). The viral spread of the disease has dramatically increased the demand for medical devices needed in hospitals to treat patients. Mechanical ventilators are one example of medical devices that are currently in short supply and that are critical for the treatment of patients suffering from COVID-19, cf. [1] . To meet the peak ventilator demands, a series of low-cost and modular solutions have been proposed, e.g., in [2] , [3] . In order to provide guidelines on their design, the Medicines and Healthcare products Regulatory Agency [4] has introduced requirements that a low-cost ventilator solution ought to satisfy. These guidelines include hardware requirements, operation modes, and settings, as well as alarms for the malfunctioning of the ventilator. A popular class of low-cost mechanical ventilators is a design that relies on squeezing a manual resuscitator bag (AmbuBag) with paddles to pump air into the lungs of a patient. Such a ventilator solution is mechanically flexible enough to satisfy the operational requirements but depends on an adequate control design to actuate the paddles. This paper addresses the controller design for a bag-based ventilator building on [5] design where we particularly focus on satisfying the following four requirements: i. Positive end-expiratory pressure (PEEP). The ventilator must provide a range of 5-20 mBar during expiration, adjustable in 5 mBar increments. ii. Inspiratory:Expiratory ratio (I:E). The ventilator must provide a ratio of 1:2, and additionally could provide a range of 1:1-1:3. iii. Breaths per minute (BPM). The ventilator must provide a respiratory rate of 10-30 BPM, adjusted in 2 BPM increments. iv. Tidal volume. The ventilator must provide a tidal volume of 400 mL. Additionally, it should provide tidal volumes of 350 and 450 mL. For an extensive list of all requirements, the reader is referred to [4] . We investigate the influence of different patients and different settings on the operation of a bag-based lowcost ventilator. In particular, we show experimentally that feedforward control of the paddles may not be sufficient to achieve accurate tidal volume tracking (requirement iv.) for different operational settings (e.g., along requirements i.iii.) or patient characteristics, due to varying compression and leakage losses. Instead, we propose to utilize feedback from a flow meter to adapt the controller to the individual patient and the specific operational settings, as well as small deviations in the mechanical set-up (bag placement, tubing, etc.). The experiments were conducted using a mechanical lung (TestChest V2, Organis GmbH, Landquart, Switzerland) that is capable of simulating different patients and healthy persons. With this study, we want to emphasize the importance of a flow meter and an adaptation of the controller, regarding patient safety and alarm signals. Related ventilator designs do not mention the implementation of a flow meter or an adaptive scheme to cope with a patient's pathophysiology, cf. [2] , [3] , [5] - [9] . Functional prototype of the Breathe ventilator. A resuscitator bag is squeezed by two paddles, which are actuated by an electric motor. The ventilator pushes air into the patient's lungs, where the breath cycle is adjusted by a range of settings. Not shown: Flow sensor (placed between the patient valve and high-efficiency particulate air (HEPA) filter) and pressure sensor (attached to HEPA filter), cf. Breathe 1 is a ventilator solution whose design has been adapted from [5] . It is based on a resuscitator bag (Ambu Mark IV, Ambu, Ballerup, Denmark), which is squeezed by two paddles actuated by an electric motor, see Fig. 1 . The system is controlled with an Arduino Mega 2560. The breathing system, i.e., the airway to the patient, consists of medical-grade tubing and includes a bi-directional patient valve (included in the Ambu SPUR II Disposable Resuscitator, Ambu, Ballerup, Denmark), a passive PEEP valve (Ambu PEEP Valve, Ambu, Ballerup, Denmark) and a highefficiency particulate air (HEPA) filter. The connection to the patient is realized by an intubation tube. 1) Actuator: The system uses a brushed 12 V DC electric motor and a 1/212 gearbox (IG420504-SY5513, Conrad Electronic, Hirschau, Germany) with a 5.5 A nominal current. The motor-driver is a full H-bridge that accepts ultrasonic PWM frequencies to regulate the motor voltage. It also embeds an analog current-sense feedback and a digital incremental encoder that are used in the motor controller. 2) Sensors: The ventilator uses two sensors: a flow meter and a pressure sensor. The flow meter (SFM3019, Sensirion, Staefa, Switzerland) is a 16-bit digital sensor able to measure an airflow between −10 and 240 standard liter per minute. The sensor is temperature-calibrated and offers a 2% accuracy and 1% repeatability, which makes the measurements very reliable. The tidal volume is calculated by integrating the positive airflow (from the ventilator to the lung) during one breath. The pressure sensor is a Freescale Semiconductor (MFPX5010DP, NXP Semiconductors, Eindhoven, Netherlands), which is an analog, temperature-calibrated, and preamplified sensor that can measure pressures in the range between 0 to 100 mBar. The modularity of the system allows the sensors (flow meter and pressure sensor) to be implemented at any position of the patient's airway. In this study, we placed the flow meter between the HEPA filter and the patient valve and connected the pressure sensor to the Luer lock port of the HEPA filter. Remark 1 (Sensor Placement): The placement of sensors (in particular the flow sensor) is a difficult problem on its own. We placed the flow sensor to increase the accuracy of tidal volume measurements by including potential leakage of the patient valve in the measurements. For the final placement further analysis will have to be performed in extensive device testing. 3) Alarms: The implementation of alarms is a crucial component for low-cost ventilator solutions as outlined in the guidelines by the Medicines and Healthcare products Regulatory Agency [4] . We use the flow meter and the pressure sensor to trigger the following three alarms: (a) tidal volume (as integral of positive flow) not achieved, (b) minute volume (as one minute moving average tidal volume) not achieved, (c) maximum inspiratory airway pressure exceeded, and (d) minimum inspiratory pressure not achieved, where excess of the pressure levels in alarm (c) also stops the current breath early to prevent overpressure, and alarm (d) also serves as a disconnection alarm. The basis of the control design is a reference trajectory generation for the motor position. The reference trajectory is a sawtooth signal composed of piecewise linear functions, whose slopes are adjusted based on the I:E and the BPM settings, as well as on the setting for the tidal volume. The slopes, i.e., the motor velocities are given bẏ where T b = 60 s BPM is the duration of one breath cycle, I and E define the I:E ratio, φ 0 is the motor position at the beginning of the inhalation phase, and φ sp is the motor position at the end of the inhalation-the set-point (sp). Throughout the paper, numeric values for the motor position are stated after gearbox reduction. The reference trajectory is tracked using a position-velocity-current cascade of proportionalintegral (PI) controllers. This ensures that the I:E and the BPM requirements are satisfied. The realized tidal volume depends on correctly choosing φ sp (with fixed φ 0 ). However, for variations in patients and settings of the ventilator, φ sp has to be adapted to achieve the desired tidal volume, which will be shown with an empirical study in this paper. In order to allow for accurate tracking of the tidal volume, we propose to use a set-point adaptation, i.e., the end-point of the position reference is altered adaptively. Mathematically, we assume that the tidal volume of each breath, V (k), results from where k is a time index that refers to the kth breath cycle, φ sp (k) is the motor target position of the kth breath cycle, and f θ is a bounded and strictly monotonically increasing function that relates the motor target position to the tidal volume. We denote with θ the uncertainties arising due to patient variations, hardware variations (e.g., different resuscitator bags), or operational variations (parameter settings). An approximation of the function f θ based on geometric considerations is provided in Appendix A. Strict monotonicity of f θ implies that the more the bag is squeezed, the higher is the achieved tidal volume, which is a reasonable assumption and was observed to be satisfied in our experiments. The goal of the set-point adaptation algorithm is to successively adjust the target position φ sp (k) to achieve the reference tidal volume V ref , as quickly as possible but without overshoot. Hence, we want to find φ ref for which We propose to use a set-point adaptation that is based on integrating the difference between the reference tidal volume and the achieved one, with where g I can be interpreted as a gain. Setting ensures that the set point, and therefore also the tidal volume, converge to the reference value monotonically, i.e., and asymptotically, i.e., which is formally shown in Theorem 1 with proof in Appendix B. Note that dV denotes the best Lipschitz constant or the maximum sensitivity (the steepest gradient) of the tidal volume function for all possible variations, θ, and all possible positions, φ. Empirically, we approximate the maximum sensitivity as from a grid over a set of test cases {θ i } and motor target positions {φ j } with step size ∆φ. Theorem 1: Consider the relation between set-point and tidal volume as in (1) with the strictly monotonically increasing function f θ . Using the set-point adaptation in (3) with g I = 1 dV and dV as in (4), φ sp converges monotonically and asymptotically, i.e., (5) and (6) hold. 3 . Illustration of the basic lung mechanics, relating the lung volume (V L ) to the airway pressure (paw), see [10] . C 1 is the respiratory compliance below the lower inflection point (LIP), C 2 is the respiratory compliance above the upper inflection point (UIP), and Crs is the respiratory compliance between the LIP and the UIP. FRC at ZEEP denotes the functional residual capacity at zero end-expiratory pressure. For the experimental testing, the ventilator was connected to a mechanical lung, the TestChest via intubation with an inflated cuff, see Fig. 2 . The TestChest is specially designed for ventilator training and has an underlying lung model integrated. The basic lung mechanics are defined by the pressure-volume curve for static conditions in Fig. 3 and the airway resistance, R aw . The respiratory compliance, C rs , is determined by the chestwall compliance, C w , and the lung compliance, C L , as 1/C rs = 1/C w + 1/C L . Table I shows two sets of TestChest settings, one set modeling a healthy person and one set modeling a patient suffering from COVID-19. All physiological values were provided by [11] and were implemented in the physiological [12] . The assumption that late-stage COVID-19 type H patients match the severe acute respiratory distress syndrome (ARDS) criteria was emphasized by [13] . In order to show the required set-point adaptation for individual lung characteristics, the following base settings were chosen for the experiments. The tidal volume was measured as the time integral of the flow meter on the disconnected ventilator and on both patient models of the TestChest (healthy and ARDS) with a PEEP of 5 mBar. Additionally, the PEEP valve was set to 10 mBar for the ARDS patient to highlight that different ventilator settings require an adaptation of the set-point. In a parameter study, we investigated the implications of different settings and different patients on the tidal volume for a fixed set-point, φ sp . The resulting tidal volumes for the various test scenarios of different patient settings, PEEP settings, and set-points are reported in Table II . The parameter study showed that the tidal volume varied greatly for a fixed set-point. For small set-points, the tidal volume varied more than 30% with different patient characteristics and PEEP settings, e.g., 101 mL/58 mL ≈ 174% for φ sp = 0.2 rad or 161 mL/118 mL ≈ 136% for φ sp = 0.25 rad. For higher set-points, the tidal volume varied more than 10%, e.g., 503 mL/453 mL ≈ 111% for φ sp = 0.5 rad or 444 mL/397 mL ≈ 111% for φ sp = 0.45 rad. Fig. 4 illustrates tidal volume changes for the test scenarios as in Table II by displaying the difference to the ARDS case with 5 mBar PEEP. It highlights that the tidal volumes for various patients or settings with a fixed set-point vary by more than ±15 mL. This analysis indicates that there is no single fixed set-point to achieve a given tidal volume for the various setups considered in the study. In the second study, we investigated the implications of the set-point adaptation on the achieved tidal volume. We estimated dV in (4) with the results in Table II , resulting in g I = 5.6 · 10 −4 [rad/mL], which we rounded down to 5 · 10 −4 for additional safety. Table III shows the tracking performance The gray-shaded area shows that all scenarios considered in the study are separated by more than 15 mL. The scenario in which the ventilator was disconnected from the TestChest is not displayed as the volume differences are greater than 40 mL for all target motor positions. with the set-point adaptation, i.e., φ sp was adjusted according to (3) . For all combinations of tidal volumes and BPM, the tidal volume was tracked very closely with low mean error and root mean squared error (RMS) of approximately 1 mL and a maximum deviation of the tidal volumes from the target of less than 4 mL (absolute value). In order to better judge the maximum and the RMS values, we conducted one experiment without adaptation using representative settings (ARDS patient, 100 breath cycles, V ref = 400 mL, 20 BPM), which resulted in a maximum deviation of 2.24 mL and RMS of 0.71 mL. We therefore observed repeatability of tidal volume measurements within 0.2%. To illustrate the transient behavior of the adaptation mechanism, we changed the operating condition in the ARDS patient setting through a manual adjustment of the PEEP valve from 5 to 10 mBar. Fig. 5 displays the resulting tidal volumes of 5 breath cycles following the change with and without set-point adaptation. It shows that the adaptation required roughly two to three breath cycles to achieve the desired tidal volume. Remark 2: Results for further BPM and I:E settings were qualitatively similar, but are not reported here. Low-cost mechanical ventilator solutions that use paddles to squeeze a resuscitator bag (AmbuBag) offer sufficient flexibility to provide a wide range of operating settings. However, the requirements for their medical usage render a ventilator design without a flow meter and a pressure sensor difficult, e.g., for triggering alarms and for the controller. In this study, we used a high-fidelity experimental testbed to show that variations in patient pathophysiology, in the hardware, or in operational parameter settings cause significant differences in the tidal volume if the controller is not adjusted accordingly. These differences are likely due to varying compression and leakage losses in the breathing system, which will tend to be particularly pronounced and irregular in a low-cost and modular solution as we consider here. In particular, the parameter study showed that no two test scenarios with different settings or patients were within a range of ±15 mL, with maximum deviations of 50 mL. The results indicate that the feeding back of sensor measurements is necessary to adjust the controller in order to accurately track the desired tidal volume for different patients and operating conditions. The proposed set-point adaptation was shown to cope with different settings and patients by automatically adapting the controller to achieve the desired tidal volume. The controller using the set-point adaptation was able to stay within a tolerated range of ±10 mL for all breath cycles test scenarios. The variations over the experiments (RMS and maximum tracking errors) were found to be on a similar scale both with and without set-point adaptation, which indicates that the set-point adaptation is not sensitive to noise. Furthermore, the analysis of transients due to changes in the operating conditions indicate that the set-point adaptation is sufficiently fast to react within two to three breath cycles. In principle, it would be possible to store different setpoints for different operating conditions, different resuscitator bags, and different patients. However, providing a setpoint for all possible combinations and to select them for each patient separately would be a great overhead for the engineer of the ventilator and the doctors/nurses. This paper experimentally investigated the implications of different patient pathophysiologies and different operating conditions on low-cost ventilator solutions that compress a bag to pump air into a patient's lungs. A parameter study highlighted the need for flow measurements and an adaptive solution for a controller to achieve the high accuracy for different patients and different operating conditions, in particular the tidal volume. Furthermore, this paper proposed a set-point adaptation algorithm to automatically adjust the controller to different scenarios. The set-point adaptation algorithm was shown to achieve the desired set points within a tolerance of less than 10 mL. The results indicate that such an adaptive scheme is able to cope with hardware and patient variations and should be considered when designing low-cost ventilators based on a bag-squeezing mechanism. Area: r 2 bag ψ(x) x r bag Paddle Fig. 6 . Illustration of geometric resuscitator bag model. The bag is modeled as cylindrical object, which is squeezed by two paddles. The resulting volume is the volume of a cylinder minus the volume displaced by the two paddles. We gratefully acknowledge Sara Mettler and Dario Fenner from the Product Development Group Zurich, ETH Zurich for their technical support; Adrian Marty and the team from the Simulation Center at the University Hospital Zurich for providing medical knowledge and the testing platform "TestChest"; as well as Martin Meier from the Zürcher Hochschule der Künste. We model the bag as a cylindrical object, with radius r bag and length l bag , and the lung as a constant volume, V L . Let x be the horizontal distance of one paddle to the outside of the cylindrical object, see Fig. 6 for an illustration of the geometry. Further, letx = r bag −x r bag . Then, the volume of the cylindrical object with paddle position x is V bag (x) = l bag r 2 bag (π − 2ψ(x)) ψ(x) = arccosx −x 1 −x 2 . Approximating the horizontal position as x = l pad φ with the length of the paddle l pad (distance of outside of bag to the paddle's rotation axis) and the motor position φ, the tidal volume is given by Remark 3: This geometric model can also be used to approximately predict the pressure and the flow rate, as well as the torque transmitted from the paddles to the motor. The pressure, the flow rate, and the torque of one paddle are given by p = p ∞ V L + V bag (0) V L + V bag (l pad φ) V bag = 4l bag r 2 bagẋ 1 −x 2 τ = l pad A pad p with the surface of the paddle computed as A pad = 2l bag r bag √ 1 −x 2 . APPENDIX B: PROOF OF THEOREM 1 Proof: As f θ is a monotonically increasing function and dV ≥ ∂f θ (φ) ∂φ for any φ and θ, for any two V 2 = f θ (φ 2 ) and V 1 = f θ (φ 1 ). In particular, which is equivalently written as as dV > 0. Finally, choosing φ sp (k+1) as in (3) with g I = 1 dV and dV as in (4), we can conclude that (5) holds, with φ sp (k+1) = φ sp (k) ⇐⇒ φ sp (k) = φ ref , which proves (6) . A review of open source ventilators for covid-19 and future pandemics Utah-Stanford ventilator (Vent4US): Developing a rapidly scalable ventilator for COVID-19 patients with ARDS Mechanical Ventilator Milano (MVM): A novel mechanical ventilator designed for mass scale production in response to the COVID-19 pandemics Medicines and Healthcare products Regulatory Agency, Rapidly Manufactured Ventilator System ) MIT emergency ventilator project ApolloBVM emergency use ventilator Coventor emergency use ventilator Design and prototyping of a low-cost portable mechanical ventilator ) Spiro wave emergency use ventilator Using COVID-19 ICU Respiratory Training Simulators Parameters for simulation of adult subjects during mechanical ventilation COVID-19 pneumonia: different respiratory treatments for different phenotypes?