All the vehicle manufacturers set a specific RPM level so that the vehicle can run at idle speed. To make sure the RPM is within expected parameters, the Powertrain Control Module (PCM) will monitor the RPM frequently.
If problems are found, the PCM attempts to return the RPM to normal. If this fails, a P0511 OBDII DTC will be set.