A centrifugal compressor apparatus comprising: a centrifugal compressor that centrifugally compresses a gas; an electric motor that rotatably drives the centrifugal compressor; a current detector that detects a drive current of the electric motor at a sampling cycle and updates, in real time, as a current threshold, a value for which a plurality of drive currents measured in a sampling period serves as a population; an exhaust valve that discharges a compressed gas to a lower pressure section and further opens the exhaust valve to discharge the compressed when it is determined that surging has occurred; and a surge prevention control device is configured to control the exhaust valve so as to prevent surging in the centrifugal compressor, characterized in that the surge prevention control device: calculates the current threshold with a value ="(moving average) - n × (standard deviation)", wherein the number "n" is a positive number in the range of 3 to 4; determines that surging has occurred, when the exhaust valve is fully closed or an opening degree of the exhaust valve is intermediate, and the drive current is below the current threshold; and is configured further to set a surge prevention line having a surge margin from the surge line wherein the surge margin has magnitude for avoiding influence by seasonal or secular change; is configured to open the exhaust valve to discharge the compressed when an operating point of the centrifugal compressor is positioned on a lower flow rate side of the surge prevention line; is configured to shift the surge prevention line toward the surge line at a shift cycle so that the surge prevention line gradually approaches the surge line; and is configured to shift the surge prevention line to a larger flow rate side to reset the surge prevention line so that the surge prevention line has the surge margin, when determining that surging has occurred. a centrifugal compressor that centrifugally compresses a gas; an electric motor that rotatably drives the centrifugal compressor; a current detector that detects a drive current of the electric motor at a sampling cycle and updates, in real time, as a current threshold, a value for which a plurality of drive currents measured in a sampling period serves as a population; an exhaust valve that discharges a compressed gas to a lower pressure section and further opens the exhaust valve to discharge the compressed when it is determined that surging has occurred; and a surge prevention control device is configured to control the exhaust valve so as to prevent surging in the centrifugal compressor, the surge prevention control device: calculates the current threshold with a value ="(moving average) - n × (standard deviation)", wherein the number "n" is a positive number in the range of 3 to 4; determines that surging has occurred, when the exhaust valve is fully closed or an opening degree of the exhaust valve is intermediate, and the drive current is below the current threshold; and is configured further to set a surge prevention line having a surge margin from the surge line wherein the surge margin has magnitude for avoiding influence by seasonal or secular change; is configured to open the exhaust valve to discharge the compressed when an operating point of the centrifugal compressor is positioned on a lower flow rate side of the surge prevention line; is configured to shift the surge prevention line toward the surge line at a shift cycle so that the surge prevention line gradually approaches the surge line; and is configured to shift the surge prevention line to a larger flow rate side to reset the surge prevention line so that the surge prevention line has the surge margin, when determining that surging has occurred. calculates the current threshold with a value ="(moving average) - n × (standard deviation)", wherein the number "n" is a positive number in the range of 3 to 4; determines that surging has occurred, when the exhaust valve is fully closed or an opening degree of the exhaust valve is intermediate, and the drive current is below the current threshold; and is configured further to set a surge prevention line having a surge margin from the surge line wherein the surge margin has magnitude for avoiding influence by seasonal or secular change; is configured to open the exhaust valve to discharge the compressed when an operating point of the centrifugal compressor is positioned on a lower flow rate side of the surge prevention line; is configured to shift the surge prevention line toward the surge line at a shift cycle so that the surge prevention line gradually approaches the surge line; and is configured to shift the surge prevention line to a larger flow rate side to reset the surge prevention line so that the surge prevention line has the surge margin, when determining that surging has occurred.