1.4 Petrol VW Golf

Hi, scanned my 2001 petrol 1.4 Golf today and got 1 code P0321 as EPC and Check engine light were showing and car was sluggish, would not rev over 3000rpm as in a limp mode and once i turned on ignition on/off it allowed me to rev higher than 300o rpm and epc went off after a few moments. car also jerks and feels as if it miss fires sometimes espeicially under a load. Just wondering what sensor it could be?? Cheers.