The car has a knock sensor to detect for detonation. However detonation usually starts out as inaudible and by the time it's audible the damage has already been done. Knocking can come from a variety of sources, including the spark plugs. I've heard of lose spark plugs causing it. If they have never been replaced try that. However I suggested bad gas first because that's usually the most common. People think its okay to use 87 octane and hear a knock but when they fill up with 91 again it goes away.
And your 100% sure this knock is coming from the engine itself, not just under the hood? I have heard of a issue were the fan was hitting a hose and causing a knock sound as well.