A method of controlling centrifugal compressor speed within a vacuum pressure swing adsorption apparatus, said method comprising: measuring and calculating a parameter referable to a flow rate of gas entering a centrifugal compressor the centrifugal compressor directly driven by an electric motor having a speed controlled by a variable frequency drive; measuring and calculating a pressure ratio of outlet to inlet pressure of the centrifugal compressor; determining an optimal speed of the centrifugal compressor based on the pressure ratio and that lies along the peak efficiency operating line of the centrifugal compressor; determining a minimum allowable value of the parameter at which surge conditions are likely to occur at the optimal speed; determining a feed back multiplier that when multiplied by the optimal speed will either increase the speed when the parameter is less than the minimum allowable value or will reduce the speed when the parameter is greater than or equal to the minimum allowable value; during steps of a repeating cycle conducted by the vacuum pressure swing adsorption apparatus where the centrifugal compressor is at least likely to encounter surge conditions, other than a pure evacuation step and an evacuation with product purge step thereof, setting a total speed multiplier equal to the feed back multiplier; during the pure evacuation step and the evacuation with product purge step, calculating the total speed multiplier by multiplying the feed back multiplier by a feed forward multiplier that will increase the speed during the pure evacuation step and the evacuation with product purge step such that centrifugal compressor is not likely to enter the surge conditions; calculating an adjusted speed by multiplying the optimal speed by the total speed multiplier; and, at least during a certain portion of the repeating VPSA cycle, generating a control signal referable at least to the adjusted speed and inputting the control signal into the variable frequency drive such that the electric motor and therefore, the centrifugal compressor operates at the adjusted speed. measuring and calculating a parameter referable to a flow rate of gas entering a centrifugal compressor the centrifugal compressor directly driven by an electric motor having a speed controlled by a variable frequency drive; measuring and calculating a pressure ratio of outlet to inlet pressure of the centrifugal compressor; determining an optimal speed of the centrifugal compressor based on the pressure ratio and that lies along the peak efficiency operating line of the centrifugal compressor; determining a minimum allowable value of the parameter at which surge conditions are likely to occur at the optimal speed; determining a feed back multiplier that when multiplied by the optimal speed will either increase the speed when the parameter is less than the minimum allowable value or will reduce the speed when the parameter is greater than or equal to the minimum allowable value; during steps of a repeating cycle conducted by the vacuum pressure swing adsorption apparatus where the centrifugal compressor is at least likely to encounter surge conditions, other than a pure evacuation step and an evacuation with product purge step thereof, setting a total speed multiplier equal to the feed back multiplier; during the pure evacuation step and the evacuation with product purge step, calculating the total speed multiplier by multiplying the feed back multiplier by a feed forward multiplier that will increase the speed during the pure evacuation step and the evacuation with product purge step such that centrifugal compressor is not likely to enter the surge conditions; calculating an adjusted speed by multiplying the optimal speed by the total speed multiplier; and, at least during a certain portion of the repeating VPSA cycle, generating a control signal referable at least to the adjusted speed and inputting the control signal into the variable frequency drive such that the electric motor and therefore, the centrifugal compressor operates at the adjusted speed.