You might do a search for threads on the eccentric shaft position sensor (or just eccentric shaft sensor). There are at least a couple of these suggesting a tendency of this component to fail in the 328i at about this time, with symptoms relating to RPM fluctuation.