Click on link for EGR valve location.Egr Valve
This link here will take you to the 6.0 manual, it will give you ALOT of info of your engine.PDF Tech manual
Even with the current ford flashes for rough idle, you maybe experiencing injector stiction or weak FICM and/or weak batteries.
The black smoke means you are getting too much fuel and not enough boost. This maybe due to a cracked up-pipe or a torn Inner Cooler (IC) boot. The blue IC boot coming off the turbo is the usual suspect, but you should also inspect the other rubber boots. When you go to inspect the IC boots, look for rips on the boot. You may need to use a mirror to inspect the underside of the boot, sometimes the rip is under or at the clamp where you can't see it until you remove the clamp. You said you are seeing black smoke from the top-rear of motor, I'm suspecting that one of the up-pipes are cracked.
If your throwing a CEL, you will need to pull the code to see what might be going on.
2004 F350 CC DRW King Ranch
X-3 tunes by DJ'S,QT,GH,ID. Gryphon FICM tunes, ARP studs,Stage 1turbo,ATS coolant recirc lines,Swamp's 48v ficm,coolant filter,AD2,Snow Perf stage II,EGR delete,4" turbo back straight pipe,S&Bintake,Quad "A" pillar autometer gauges,Suncoast Tri Disk Conv.,Billet input shaft,Suncoast superduty rebuild kit,Trans-go shift kit,Mag-Hytec trans pan,CFM+ elbow,ccv mod,15K reese 5er,17" LCD TV/DVD,Cobra 29 Nitewatch CB