What could cause your problem is a dirty or non-functioning IAC (Idle Air Controller). It's located next to and in back of the throttle body. Erratic idle and surging has been cured by taking off and cleaning and in some cases replacing the controller.
