On-line digital analysis of respiratory mechanics and the automation of respirator control.