1. An apparatus for delivering ventilatory support to a subject synchronized to the subject's respiratory phase, comprising: a means for providing a controlled supply of breathable gas to a subject's airway; a means for generating an air flow signal representative of the subject's respiration; and a processor to determine a phase of the subject's respiratory cycle and to control the supply of breathable gas delivered to the subject's airway; wherein said processor determines a phase in the subject's respiratory cycle by (a) designating a plurality of phase states within said subject's respiratory cycle; (b) calculating a measure of the subject's respiration from said air flow signal; (c) calculating a rate of change of the air flow signal from said measure of the subject's respiration, (d) determining probabilities for said subject being in each of said phase states based on said rate of change; and (e) identifying the phase in the subject's respiratory cycle from the determined probabilities of said subject's respiratory cycle being in each of said phase states; and wherein said processor causes the delivery of a supply of breathable gas synchronized with the determined phase of the subject's respiratory cycle.