It won't be the knock sensor, as it would do it all the time, worse the more load you are under.
I think you need to look for air leaks, as the system is not tolerant at all of air leaks on the induction side, then reset the ecu by pulling the "KAM" fuse(violet 3 amp) for a minute or two, the ecu will then go into a relearn mode, it may be a bit iffy for a few miles but ok afterwards.
tabetha