PURPOSE: To drive a compressor at a value close to maximum efficiency at all times regardless of load and output frequency from an inverter device by varying an operation pattern so that a current value is minimized.
CONSTITUTION: A PWM waveform synthetic section 7 synthesizes an output waveform on the basis of an operation pattern in an operation-pattern memory section 8 by a command from a frequency command section 9, and a drive circuit section 6 works an inversion section 4 with the synthesis of the output waveform. On the other hand, a pattern-shift arithmetic section 10 commands the change of the operation pattern to the operation-pattern memory section 8 on the basis of the result of the comparison of the current values of a motor 5 for a compressor before the shift of the operation pattern and after the shift of the operation pattern compared by a current comparison section 14. When the operation pattern is altered, an output from the inversion section 4 varies only by output voltage, thus also changing the current value of the motor 5 for the compressor. Consequently, the current value of the motor 5 for the compressor is also altered. Accordingly, the operation pattern is varied as the same frequency is left as it is until the current value is minimized.