It could be a bad knock sensor, or bad gas, the Octane rating of gas is determined by the Research Octane number added to the Motor Octane number then divided by 2. If the research octane number is high (this is a theory test) then the Octane will rate high even though it is actually low. There is a 30 amp fuse under the hood, remove this fuse for 1 minute and then replace it and drive the car, stop and take off fast three times making it to high gear. This will reset the driving condition programmed into the car. This program determines the timing and injector sequences.