Austin, I will kindly agree with the others. A knock sensor is not an emissions sensor. Pinging literally sounds like a ping inside your motor. The "real" word for it is predetonation. This is when your mixture detonates before the spark hits.
Check out this website So the knock sensor literally "hears" the knock inside the motor and adjusts the timing so it detonates on time. So the different octanes of gasoline have different detonation points that correpond with the optimal detonation point designed into the motor. So when it is predetonating, and the timing is adjusted, it is not at its optimal point, so your motor is not running at peak efficiency. Maybe we need stevebfl, MBDOC or gilly to explain this.