The investigators propose to predict extubation success by evaluating the electrical activity of the diaphragm (Edi), which provides important information about the "drive" to breathing coming from the brain and the function of the diaphragm, two essential factors determining extubation readiness and success.