A method and device for generating a signal that mirrors changes in the level of effort exerted by respiratory muscles of patients on mechanical ventilatory support comprising: monitoring and storing airway pressure (Paw), rate of gas flow (F), and volume of gas flow (V), and generating a composite pressure signal using resistive pressure units (KF) determined from elapsed data and selected to minimize step changes in the calculated signal and elastic pressure units (Kv) determined from elapsed data by steps comprising: —scanning stored F or Paw during exhalation and identifying where their trajectory transiently reverses direction to detect transients —selecting points within the exhalation that are at preselected distances away from the transients —calculating the value of Kv required to force the values of the calculated signal at said selected points in elapsed breaths to be substantially equal when the selected value of KF is used as the flow coefficient.