The present protocol will demonstrate the safety, feasibility and efficacy of a newly computerized protocol integrated into a ventilator: S1 ventilator (Hamilton Medical). During ventilation with S1 ventilator, the respiratory support including oxygenation and CO2 removal parameters are continuously adapted to patient respiratory status using science based rules. The present protocol is designed as a pilot evaluative study where the researchers will evaluate the safety, feasibility and efficacy of ventilating children during the weaning phase with the S1 ventilator for 5 hours, and compare to conventional ventilation.