Running electric compressor on inverter