A nitrogen generation system comprising: a heat exchanger for receiving supply air and cooling air and providing temperature conditioned supply air; a first flow control valve for controlling a flow of the cooling air through the heat exchanger ; an air separation module for receiving the temperature conditioned supply air and generating nitrogen-enriched air, wherein the air separation module comprises a membrane; a first sensor for measuring a parameter of the nitrogen-enriched air selected from the group consisting of a temperature, a flow rate, an oxygen concentration, and combinations thereof; a jacket surrounding the air separation module a second flow control valve connected to the controller , wherein the second flow control valve is a three way valve for controlling a first flow of the temperature conditioned supply air into the air separation module and controlling a second flow of the temperature conditioned supply air into the jacket; and a controller connected to the first sensor and the first flow control valve for controlling the flow of the cooling air through the heat exchanger based on the parameter of the nitrogen-enriched air measured by the first sensor, and characterized by the controller being configured to manipulate, according to a phase of flight of an aircraft, permeability and selectivity of the air separation module by controlling the temperature of the air separation module membrane, which in turn controls the flow rate and oxygen content of the nitrogen-enriched air, wherein the controller is further connected to the second flow control valve for controlling a first flow of the temperature conditioned supply air into the air separation module and controlling a second flow of the temperature conditioned supply air into the jacket based on the measured parameter of the nitrogen-enriched air. a heat exchanger for receiving supply air and cooling air and providing temperature conditioned supply air; a first flow control valve for controlling a flow of the cooling air through the heat exchanger ; an air separation module for receiving the temperature conditioned supply air and generating nitrogen-enriched air, wherein the air separation module comprises a membrane; a first sensor for measuring a parameter of the nitrogen-enriched air selected from the group consisting of a temperature, a flow rate, an oxygen concentration, and combinations thereof; a jacket surrounding the air separation module a second flow control valve connected to the controller , wherein the second flow control valve is a three way valve for controlling a first flow of the temperature conditioned supply air into the air separation module and controlling a second flow of the temperature conditioned supply air into the jacket; and a controller connected to the first sensor and the first flow control valve for controlling the flow of the cooling air through the heat exchanger based on the parameter of the nitrogen-enriched air measured by the first sensor, and characterized by the controller being configured to manipulate, according to a phase of flight of an aircraft, permeability and selectivity of the air separation module by controlling the temperature of the air separation module membrane, which in turn controls the flow rate and oxygen content of the nitrogen-enriched air, wherein the controller is further connected to the second flow control valve for controlling a first flow of the temperature conditioned supply air into the air separation module and controlling a second flow of the temperature conditioned supply air into the jacket based on the measured parameter of the nitrogen-enriched air. <EOS>