Model for Design of Ventilator Control