Hyundai Repair: 01 XG300 DTC codes P0171 and P0174, air flow sensor, vacuum leaks


Question
I own a 2001 XG300 that runs very well.  I recently drove from Florida out to Arizona and started having trouble as I passed through West Texas, up into NM, and then back down to AZ.  As I started climbing in altitude, I noticed some power loss.  Between Fort Stockton, TX and Roswell, NM, the engines sometimes behaved as if it were misfiring and generally running rough at 2500 rpm.  Once I got to Roswell, I filled up with 91 octane and added some injector cleaner.  It generally ran better up to Albuquerque.  While there, I figured I'd have the spark plugs changed at a Firestone...until they told me it called for almost 5 hours of labor and more than $500!  I filled up with another tank of 91 octane and some more injector cleaner for the ride down to Sierra Vista, AZ.  I bought a code reader and pulled  10 codes from the on-board computer.  I deleted them all since I don't know how old they are.  I've driven around town for two days now and only gotten P0171 and P0174.  I'm not sure where to start with these...please advise.

Answer
Most likely, your air flow sensor is inaccurate.  Check to be sure you have no vacuum leaks and that the air intake bellows between the air flow sensor and throttle body is secure and not leaking.  If all is okay, replace the air flow sensor.

Your ECM expects a certain fuel delivery rate based on the readings from the air flow sensor, coolant temperature, engine load, and engine rpm.  It adjusts the rate based on readings from the oxygen sensors.  P0171 and P0174 indicate that the fuel delivery rate is being adjusted higher than what the ECM considers to be the normal range.  Since you have one code for each bank, we know that the issue is one that would affect both banks, not just one, such as an oxygen sensor.