In a method for controlling an expiratory valve in a ventilator during
expiration, including a stage in which the expiratory valve is opened
almost completely for a first interval. Opening the expiratory valve
almost completely results in a reduction in expiratory resistance. Thus in
the first interval of flow or pressure in the expiratory part of the
ventilator, a determination is made when the flow or pressure in the
expiratory part meets a condition. A second interval is started when the
flow in the expiratory part meets the condition and the expiratory valve
is regulated during the second interval in order to attain a pre-set end
pressure in the expiratory section.