Apparatus for separating gases, comprising as membrane separation stages at least a feed stream separation stage, a retentate separation stage and a permeate separation stage and also at least one compressor arranged on the feed side of said feed stream separation stage and/or at least one, preferably one or two, vacuum pump(s) arranged downstream of said feed stream separation stage, preferably on the permeate side of said retentate separation stage in the second permeate stream (9a + 9b) and/or on the permeate side of said permeate separation stage in the third permeate stream, wherein said feed stream separation stage separates a feed stream, consisting of two or more components, into a first permeate stream and a first retentate stream, said retentate separation stage divides said first retentate stream into a second permeate stream (9a + 9b) and a second retentate stream which is removed as product or further processed, and said second permeate stream is supplied to said feed stream, said permeate separation stage divides said first permeate stream into a third retentate stream (10a + 10b) and a third permeate stream, which is removed as product or further processed or discarded, and said third retentate stream is supplied to said feed stream, characterized in that - said second permeate stream (9a + 9b) comprises at least one permeate control means with which the permeate pressure of said retentate separation stage can be raised or lowered and which is controlled on the basis of measured values from one or more flow meters in said first retentate stream and/or one or more measuring means in said second retentate stream for determining the composition of the particular gas mixture and said second permeate stream is supplied to said feed stream downstream of said permeate control means, and - said third retentate stream (10a + 10b) comprises at least one retentate control means with which the retentate pressure of said permeate separation stage can be raised or lowered and which is controlled on the basis of measured values from one or more flow meters in said first permeate stream and/or one or more measuring means in said third permeate stream for determining the composition of the particular gas mixture. said feed stream separation stage separates a feed stream, consisting of two or more components, into a first permeate stream and a first retentate stream, said retentate separation stage divides said first retentate stream into a second permeate stream (9a + 9b) and a second retentate stream which is removed as product or further processed, and said second permeate stream is supplied to said feed stream, said permeate separation stage divides said first permeate stream into a third retentate stream (10a + 10b) and a third permeate stream, which is removed as product or further processed or discarded, and said third retentate stream is supplied to said feed stream, characterized in that - said second permeate stream (9a + 9b) comprises at least one permeate control means with which the permeate pressure of said retentate separation stage can be raised or lowered and which is controlled on the basis of measured values from one or more flow meters in said first retentate stream and/or one or more measuring means in said second retentate stream for determining the composition of the particular gas mixture and said second permeate stream is supplied to said feed stream downstream of said permeate control means, and - said third retentate stream (10a + 10b) comprises at least one retentate control means with which the retentate pressure of said permeate separation stage can be raised or lowered and which is controlled on the basis of measured values from one or more flow meters in said first permeate stream and/or one or more measuring means in said third permeate stream for determining the composition of the particular gas mixture. - said second permeate stream (9a + 9b) comprises at least one permeate control means with which the permeate pressure of said retentate separation stage can be raised or lowered and which is controlled on the basis of measured values from one or more flow meters in said first retentate stream and/or one or more measuring means in said second retentate stream for determining the composition of the particular gas mixture and said second permeate stream is supplied to said feed stream downstream of said permeate control means, - said third retentate stream (10a + 10b) comprises at least one retentate control means with which the retentate pressure of said permeate separation stage can be raised or lowered and which is controlled on the basis of measured values from one or more flow meters in said first permeate stream and/or one or more measuring means in said third permeate stream for determining the composition of the particular gas mixture.