A closed-loop system (AUTOPILOT-BT) for the control of mechanical ventilation was designed to: 1) autonomously achieve goals specified by the clinician, 2) optimize the ventilator settings with respect to the underlying disease and 3) automatically a