The present disclosure describes a system that automatically detects patient-ventilator asynchrony and trends in patient-ventilator asynchrony. The present disclosure describes a framework that uses pressure, flow, and volume waveforms to detect patient-ventilator asynchrony and the presence of secretions in the ventilator circuit.