did the low idle, stalling start after the battery replacement? is the check engine light on? did you get the vehicle scanned for trouble codes?
It is common for carbon build up in the throttle body to cause this. When the PCM loses power and has to relearn idle this can happen. These vehicle has electronic throttle control, no cable. The PCM uses 2 sensors in the throttle body and 2 in the accelerator pedal to control engine RPM. When the base throttle position is off or sticks at base setting the relearn cannot be done. Most of the time If you clean the throttle body with a soft pipe brush and use a spray cleaner it corrects itself. Remove the inlet hose to the throttle body and hold the throttle plate open with you fingers, spray the throttle cleaner and then clean with the soft pipe brush. You can get the spray cleaner from most parts places and the soft pipe brush from walmart or a dollor store type. It may smoke and be hard to startup from the cleaner, it will clear up.
let me know what you find