A nitrogen generation system (10, 100, 200) comprising: a heat exchanger (12, 112, 212) for receiving supply air and cooling air and providing temperature conditioned supply air; a first flow control valve (16, 116, 216) for controlling a flow of the cooling air through the heat exchanger (12, 112, 212); an air separation module (26, 126, 226) for receiving the temperature conditioned supply air and generating nitrogen-enriched air, wherein the air separation module (26, 126, 226) comprises a membrane; a first sensor (36, 136, 236) 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 (26, 126, 226) a second flow control valve connected to the controller (32, 132, 232), 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 (32, 132, 232) 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 (26, 126, 226) membrane, which in turn controls the flow rate and oxygen content of the nitrogen-enriched air, wherein the controller (32, 132, 232) 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 (12, 112, 212) for receiving supply air and cooling air and providing temperature conditioned supply air; a first flow control valve (16, 116, 216) for controlling a flow of the cooling air through the heat exchanger (12, 112, 212); an air separation module (26, 126, 226) for receiving the temperature conditioned supply air and generating nitrogen-enriched air, wherein the air separation module (26, 126, 226) comprises a membrane; a first sensor (36, 136, 236) 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 (26, 126, 226) a second flow control valve connected to the controller (32, 132, 232), 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 (32, 132, 232) 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 (26, 126, 226) membrane, which in turn controls the flow rate and oxygen content of the nitrogen-enriched air, wherein the controller (32, 132, 232) 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.