Proposed closed-loop control system, based on a fully-connected state transition model (STM).

<p>The system consists of three components: a real-time control application, a neuromodulator prototype and a sheep used for animal experimentation. An intracardiac electrogram (EGM) is obtained via a cardiac lead implanted into the right ventricle of the sheep, analogically processed by the neuromodulator, and acquired via the analog to digital converter into the real-time control application. R-wave instants are detected and used for calculating a Weighted Moving Average of the RR intervals WMARR(b), which will be used as control variable. An error <i>ϵ</i> is obtained from the difference between the target (RR<sub>T</sub>) and WMARR(b). The STM-based controller estimates a new set of VNS parameters <i>S</i><sub><i>i</i></sub>, minimizing <i>ϵ</i>. VNS is triggered synchronously to the R-wave, with the new set of parameters <i>S</i><sub><i>i</i></sub>, to deliver VNS to the right vagus nerve of the sheep. VNS with these new parameters will modify the acquired EGM and a weighted moving average of the new RR interval is computed, closing the loop.</p>