This disclosure describes systems and methods for compensating for inelastic and elastic leaks in a ventilation system. The disclosure describes a model-based enhancement to conventional pressure triggering methodology that optimizes the timing and patient work of pressure triggering performance. The methods and systems described herein compensate for the additional effort a patient has to exert to generate the same amount of airway pressure drops compared to no leak condition. One method described includes calculating an elastic leakage and an inelastic leakage based on current measurements of pressure and flow in the ventilation system and then compensating a pressure threshold for the effects of the inelastic and elastic leaks in the system.