The aim of this study was to investigate heart rate (HR) variability in patients with weaning failure or success, using both linear and nonlinear techniques. Thirty-two surgical patients were enrolled in the study. Signals were analyzed for 10 minutes during two phases: 1. pressure support (PS) ventilation (15-20 cm H2O) and 2. weaning trials with PS: 5 cm H2O. Low and high frequency (LF, HF) components of HR signals, HR multiscale entropy (MSE) and al exponent derived from detrended fluctuation analysis (DFA) were computed in all patients and during the two phases of PS. Weaning failure patients exhibited significantly decreased LF, HF and al exponent, whereas MSE increased both between and within groups.