Autonomous control of ventilation through closed-loop adaptive respiratory pacing

Mechanical ventilation is the standard treatment when volitional breathing is insufficient, but drawbacks include muscle atrophy, alveolar damage, and reduced mobility. Respiratory pacing is an alternative approach using electrical stimulation-induced diaphragm contraction to ventilate the lung. Oxygenation and acid–base homeostasis are maintained by matching ventilation to metabolic needs; however, current pacing technology requires manual tuning and does not respond to dynamic user-specific metabolic demand, thus requiring re-tuning of stimulation parameters as physiological changes occur. Here, we describe respiratory pacing using a closed-loop adaptive controller that can self-adjust in real-time to meet metabolic needs. The controller uses an adaptive Pattern Generator Pattern Shaper (PG/PS) architecture that autonomously generates a desired ventilatory pattern in response to dynamic changes in arterial CO2 levels and, based on a learning algorithm, modulates stimulation intensity and respiratory cycle duration to evoke this ventilatory pattern. In vivo experiments in rats with respiratory depression and in those with a paralyzed hemidiaphragm confirmed that the controller can adapt and control ventilation to ameliorate hypoventilation and restore normocapnia regardless of the cause of respiratory dysfunction. This novel closed-loop bioelectronic controller advances the state-of-art in respiratory pacing by demonstrating the ability to automatically personalize stimulation patterns and adapt to achieve adequate ventilation.


PG/PS Controller design
The PG/PS controller design is based on the biological ventilatory control scheme, where the PG generates a ventilatory pattern and the PS adapts stimulation parameters to evoke a prescribed ventilatory pattern. The PG module includes a triphasic oscillatory network developed by Botros and Bruce to mimic the behavior of the respiratory CPG 26 . This rCPG model uses a CO2-based input to determine an appropriate inspiratory duration which is then converted into a breath volume profile through the use of a chest biomechanical model. The volume profile and cycle duration are scaled and passed on to the PS to serve as the prescribed ventilatory pattern. The rCPG network model used is composed of five interconnected neuronal populations. The activity of each of these populations is maximal at different phases of the respiratory cycle, these being early-inspiratory, inspiratory, late-inspiratory, post-inspiratory, and expiratory. These populations receive mostly inhibitory input from each other as well as from other sources, such as chemoreceptors and pulmonary stretch receptors. The equations for this oscillating respiratory network, as described in an earlier study 26 , are, Where I, L, P, E, and R represent the inspiratory, late-inspiratory, post-inspiratory, expiratory, and early inspiratory neuronal populations, respectively, while v represents the input from the vagus nerve which carries pulmonary stretch receptor information. The self-decay term denoting the rate of decay is defined by ai, where I is the respective neuronal population. This term allows for silencing of the i-population when no input is present. Wji refers to the gain of the signal, or weight, of the j neuron to the i neuron, whereas Wii is the self-activation factor. Bi refers to the weight of the chemoreceptor signal, nCO2, which is considered to change linearly with PaCO2. To convert firing frequency of the neuronal population to population activity, a sigmoid function, S, is used: Where X is the firing frequency and K is a constant that determines the steepness of the function.
The chemoreceptor input, nCO2, is given as a bounded linear function of PaCO2: The limits of 0.2 and 1.72 were set as a result of a set of preliminary simulations performed on the rCPG model to obtain the minimum and maximum 2 values at which a physiologically relevant response was obtained. The linear function constants were set so that a linear response between a PaCO2 of 35 to 45 mmHg is maintained.
To reduce the effect of transient events, an exponential moving average (EMA) of the peak PaCO2 with a time constant, τ, of 8 sec was utilized. This was determined through simulations described in the main text.
To represent the pulmonary stretch receptor input, v, which contributes to the oscillatory behavior of the rCPG, a basic model to represent pulmonary expansion 26 is used, Where K1 and K2 are constants set such that v increases during inspiration but decays as v (t) increases, reflecting the Hering-Breuer reflex. When this model is paired with the previously described respiratory CPG equations and chemoreceptor model, rhythmogenesis occurred, producing a ventilatory response to PaCO2 similar to that observed in mammals 26 . Given that this basic model creates a pattern that represents pulmonary stretch, it can be used to derive a breath volume profile.
The output of the inspiratory pool of the rCPG was half-wave rectified and processed through the pulmonary stretch receptor model. The pulmonary stretch receptor output was then scaled in amplitude to match the tidal volume expected for the weight of each rat 27 . The range of the cycle duration of the rCPG output was also scaled in time to match the range of breath durations observed in rats under eupneic 27,28 to hypercapnic 28,29 conditions. This scaled ventilatory pattern then provided, on a breath-by-breath basis, a prescribed trajectory for the PS module to follow. In the experimental studies, if etCO2 information is unavailable (e.g. first breath of pacing), the controller worked under the assumption that the etCO2 input is 36 mmHg.
The PS module for respiratory control has been described in a previous study 18 . The PS module aims to determine adequate stimulation parameters to elicit a specified breath volume profile. In previous studies, this prescribed profile was preset based on baseline breath volumes and profiles for each rat; here, the prescribed profile was generated by the PG module. Briefly, the PS consists of a single-layered neural network with time-shifted activation profiles. The output of the controller, z, is a value from 0 to 1 which is multiplied by the maximum allowed current amplitude. This is given by The output is defined by the summation of the weighted output (yj) of all active neurons, na.
Neuronal weights for each neuron j are given by wj.
The PS uses a comparator to define the error at any time t, e(t), between the prescribed volume trajectory defined by the PG module and the measured volume profile. The change in weight, Δwj, for all neurons at time t is defined by Where η is the learning rate, np is the number of past activations over which the error is time averaged to account for delays in activation, and yj(t-kpT) is the output of neuron j at previous times. Hence, the error at time t affects all neurons that have been recently active; the amount of change is proportional to its activity over the specified window (npT).
The neural network contains a maximum of 72 neurons time shifted every 0.014 sec to span a duration of 1.05 seconds. To account for changes in breath cycle duration, the network is reorganized by excluding a certain number of neurons of the network at the start of every breath to match the new prescribed cycle duration. Thus, as PaCO2 increases and the PG module prescribes a ventilatory pattern with reduced cycle duration, neurons with zeroed weights (an indication of no influence on stimulation) are excluded. This shortens the cycle such that the updated cycle duration closely matches that of the shortened prescribed breath duration. Once PaCO2 decreases and the PG module prescribes an increase in breath cycle duration, these neurons are included to prolong the cycle duration. In this manner, the PS is able to work in concert with the PG module to evoke the prescribed ventilatory pattern.
The PG/PS controller was programmed and implemented in LabVIEW (National Instruments, Austin, TX) for both in vivo and in silico studies. All controller constants can be found in Supplementary Table S1. In animal studies, the controller output to the stimulator was scaled such that the maximum allowed current amplitude was four times the twitch threshold, as previously described 18 .