A good spot to farm this is mission 12 Armada.
When the mission starts, rush forward. Boost jump on the platforms and hit down on the pad. Kill all enemies, jump to the next platform and repeat.
Just reload the checkpoint or continue. There are small corridors inside the ship which are excellent for Sonic as well.