NOVELTY - Device for separating gases, comprises a feed stream separating unit, a retentate separating unit and a permeate separating unit as a membrane separation unit, at least one compressor, and at least one, preferably one or two vacuum pumps arranged after the feed stream separating unit, preferably on permeate side of the retentate separating unit in second permeate stream and/or on permeate side of the permeate separating unit in third permeate stream. The feed stream separating unit separates a feed stream into a first permeate stream and a first retentate stream.    USE - The device is useful for separating gases (claimed) during processing of bio- or natural gas.    ADVANTAGE - The device produces the gases with high purity.    DETAILED DESCRIPTION - Device for separating gases, comprises a feed stream separating unit, a retentate separating unit and a permeate separating unit as a membrane separation unit, at least one compressor arranged on feed side of the feed stream separating unit, and at least one, preferably one or two vacuum pumps arranged after the feed stream separating unit, preferably on permeate side of the retentate separating unit in second permeate stream and/or on permeate side of the permeate separating unit in third permeate stream. The feed stream separating unit separates a feed stream comprising at least two components, into a first permeate stream and a first retentate stream. The retentate separating unit separates the first retentate stream into a second permeate stream comprising a partial stream before a permeate control device and after the retentate separating unit, and a partial stream after the permeate control device, which is supplied to the feed stream, and a second retentate stream which is removed as a product or processed further. The permeate separating unit separates the first permeate stream into a third retentate stream comprising a partial stream before a retentate control device and after the permeate separating unit, and a partial stream after the retentate control device, which is supplied to the feed stream, and a third permeate stream which is removed as a product, processed further or discarded. The second permeate stream comprises at least one permeate control device with which permeate pressure of the retentate separating unit is increased or decreased, and which is controlled based on measured values of at least one measuring device in the first retentate stream and/or at least one measuring device in the second retentate stream. The measuring devices in the first- and the second retentate streams, are different. The third retentate stream comprises at least one retentate control device with which retentate pressure of the permeate separating unit is increased or decreased, and which is controlled based on measured values of at least one measuring device in the first permeate stream and/or at least one measuring device in the third permeate stream. The measuring devices of the first- and the third permeate streams are different. INDEPENDENT CLAIMS are also included for:    (1) controlling a gas separation plant, in which (i) when the concentration of a severe permeating component which is optionally determined by a parameter of the second retentate stream, to be correlated, falls below a predetermined target value, then the pressure of the second permeate stream is reduced using the permeate control device, until the concentration or the parameter is within limits, and (ii) when the concentration of the severe permeating component which is optionally determined by a parameter of the second retentate stream, to be correlated, rises above a predetermined target value, then the pressure of the second permeate stream is increased using the permeate control device, until the concentration or the parameter is within limits, (iii) and/or (iii) when the concentration of the severe permeating component which is optionally determined by a parameter of the third permeate stream, to be correlated, falls below a predetermined target value, then the pressure of the third retentate stream is increased using the retentate control device, until the concentration or the parameter is within limits, and (iv) when the concentration of the severe permeating component which is optionally determined by a parameter of the third permeate stream, to be correlated, rises above a predetermined target value, then the pressure of the third retentate stream is reduced using the retentate control device, until the concentration or the parameter is within limits; and    (2) a biogas plant comprising the above device.