A system for providing a flow of breathing gas to a patient comprising: a pressure generating system adapted to provide a flow of breathing gas; a gas flow controller adapted to control the flow of breathing gas delivered to the patient responsive to a control signal; a patient circuit having a first end coupled to the pressure generating system and adapted to communicate the flow of breathing gas with an airway of a patient ; a flow sensor adapted to measure the flow of breathing gas in the patient circuit and to output a first flow signal indicative thereof; a pressure sensor adapted to measure a pressure of the flow of breathing gas in the patient circuit and to output a first pressure signal indicative thereof; an exhaust assembly adapted to communicate gas from within the patient circuit to ambient atmosphere; and a controller adapted to receive the first flow signal and the first pressure signal and to output the control signal that controls the flow of breathing gas delivered to the patient circuit by the pressure generating system and, hence, the flow of breathing gas at a patient's airway , wherein the controller is adapted to detect onset of an inspiratory phase of a patient's breathing cycle for triggering an inspiratory flow of breathing gas based on such a patient's inspiratory effort, which is determined based on the first flow signal and the first pressure signal, characterized in that the controller is adapted to establish a trigger lockout interval, which is a period of time during each expiratory phase of a breathing cycle in which triggering the inspiratory flow of breathing gas is prevented, based on at least one of the first flow signal and the first pressure signal. a pressure generating system adapted to provide a flow of breathing gas; a gas flow controller adapted to control the flow of breathing gas delivered to the patient responsive to a control signal; a patient circuit having a first end coupled to the pressure generating system and adapted to communicate the flow of breathing gas with an airway of a patient ; a flow sensor adapted to measure the flow of breathing gas in the patient circuit and to output a first flow signal indicative thereof; a pressure sensor adapted to measure a pressure of the flow of breathing gas in the patient circuit and to output a first pressure signal indicative thereof; an exhaust assembly adapted to communicate gas from within the patient circuit to ambient atmosphere; and a controller adapted to receive the first flow signal and the first pressure signal and to output the control signal that controls the flow of breathing gas delivered to the patient circuit by the pressure generating system and, hence, the flow of breathing gas at a patient's airway , wherein the controller is adapted to detect onset of an inspiratory phase of a patient's breathing cycle for triggering an inspiratory flow of breathing gas based on such a patient's inspiratory effort, which is determined based on the first flow signal and the first pressure signal, characterized in that the controller is adapted to establish a trigger lockout interval, which is a period of time during each expiratory phase of a breathing cycle in which triggering the inspiratory flow of breathing gas is prevented, based on at least one of the first flow signal and the first pressure signal. <EOS>