You have a problem with the flap in the inlet manifold. It's not unknown in the FSI (many might say this is an understatement).
Anyhow, it is what it is.
The flap changes the are of the inlet manifold, rather like those ramps in car parks that let drive in, but not out.
At higher engine speeds, (simplified, but near enough), the manifold is folded out of the air flow, at lower rpm, it rotates, reducing air flow, and causing the air to swirl.
Google "ssp 222" and "ssp 296" download them, and have a read. It's important to understand how the FSI works, before fixing it.
The error code P1031 indicates the flaps are not moving through the correct arc.
Mac.