The invention pertains to a ventilator that delivers a flow of gas to an airway of a user, and to communicate a flow of gas from the airway of the user in a controlled manner. The ventilator includes a conduit (1, 3) that carries a flow of gas from the airway of a patient, a first valve (7) coupled to the conduit and adapted to control a pressure or rate of the flow of gas exhausted from the conduit, a first sensor (10) coupled to the conduit and adapted to monitor a pressure of the gas in the conduit, and a controller (12) adapted to control the first valve based on an output of the first sensor. A restrictor (8) is provided in the conduit between the pressure sensor and the patient such that a first volume is defined in the conduit between the first valve and the restrictor and a second volume is defined in the conduit between the patient and the restrictor. The controller controls actuation of the first valve based on a pressure of the first volume monitored by the first sensor.