Knock sensors tell the PCM how much knock you are getting, PCM then adjusts which timing table you are on.