have you tryed changing the cat converter and maybe the egr valve? I had the same problem with my car but I didn't know what all codes popped up when my car did that because my dad took it to autozone and had them scan it but he never told me the codes. but I changed the egr valve and cat converter and it cleared up