Speed regulation of the compressor