A system for producing biomethane comprising: - at least one module for producing biogas, - at least one scrubbing unit capable of separating the biogas stream coming from the at least one module for producing biogas into a stream of biomethane and a stream of residual gases containing a proportion of methane, - at least one module for combusting residual gases characterised, on the one hand, by a so-called "methane" factor (Y CH4 mini manufacturer) denoting the minimum volume fraction of methane that said stream of residual gases has to contain to allow combustion of methane it contains and, on the other hand, by a so-called "dioxygen" factor (λ) denoting the minimum amount of dioxygen to be fed to be able to burn said residual gases, - at least one supply module capable of supplying a gaseous stream comprising dioxygen to the at least one module for combusting residual gases, said system being characterised in that: - it comprises a control module capable of determining the volume fraction of methane (Y residual CH4) of the stream of residual gases, of calculating a dioxygen-enrichment rate (Y O2 enriched air) of an air stream for performing combustion of methane contained in said residual gases in the combustion module from the volume fraction of methane (Y residual CH4) of the stream of residual gases determined by respecting the dioxygen factor (λ) and the methane factor (Y CH4 mini manufacturer) of the combustion module, and of sending the dioxygen-enrichment rate (Y O2 enriched air) calculated to the at least one supply module, - the at least one supply module is capable of generating a gaseous stream comprising a proportion of dioxygen equal to the dioxygen-enrichment rate (Y O2 enriched air) received from the control module. - at least one module for producing biogas, - at least one scrubbing unit capable of separating the biogas stream coming from the at least one module for producing biogas into a stream of biomethane and a stream of residual gases containing a proportion of methane, - at least one module for combusting residual gases characterised, on the one hand, by a so-called "methane" factor (Y CH4 mini manufacturer) denoting the minimum volume fraction of methane that said stream of residual gases has to contain to allow combustion of methane it contains and, on the other hand, by a so-called "dioxygen" factor (λ) denoting the minimum amount of dioxygen to be fed to be able to burn said residual gases, - at least one supply module capable of supplying a gaseous stream comprising dioxygen to the at least one module for combusting residual gases, - it comprises a control module capable of determining the volume fraction of methane (Y residual CH4) of the stream of residual gases, of calculating a dioxygen-enrichment rate (Y O2 enriched air) of an air stream for performing combustion of methane contained in said residual gases in the combustion module from the volume fraction of methane (Y residual CH4) of the stream of residual gases determined by respecting the dioxygen factor (λ) and the methane factor (Y CH4 mini manufacturer) of the combustion module, and of sending the dioxygen-enrichment rate (Y O2 enriched air) calculated to the at least one supply module, - the at least one supply module is capable of generating a gaseous stream comprising a proportion of dioxygen equal to the dioxygen-enrichment rate (Y O2 enriched air) received from the control module.