The CDS is a knowledge- based system embedded in a ventilator (EVITA XL) (15, 16, 17). It achieves three main goals. First, the CDS continuously adjusts the PSV level based on respiratory rate (RR), tidal volume (Vt) and end-tidal partial pressure of CO2 (PETCO2) acquired from the ventilator in real time and averaged over 2 min. Adjustment is such that the patient is kept within a "comfort zone” defined as a RR between 15-30 range (up to 34 within patients with neurological disorders), Vt greater than 300 ml (< 250 ml if body weight < 55 kg), and PETCO­2 less than 55 mm Hg (< 65 mmHg in patients with COPD). Second, the CDS gradually decreases ventilatory assistance by reducing PSV level after at least 30 min of stable ventilation within the comfort zone; the reduction is by 2 or 4 cm H20 depending on whether the initial level is below or above 20 cm H2O, respectively. Third, the CDS evaluates weaning readiness: when the PSV level reaches the preset minimal value (9 cm H2O in tracheotomized patients), the CDS starts an observational period, which serves as automatic spontaneous breathing trial. After uninterrupted ventilation at the minimal PSV level for 1 or 2 h (depending on whether the initial PSV level was above or below 15 cm H2O), the CDS displays a message that the patient is ready to be disconnected from the ventilator. The investigator will have perfect knowledge of the system.