Can the TPS be related to an EGR problem?

They are not related. But back to your EGR problem. In addition to the EGR valve and the tube, there are passages molded into the intake and exhaust manifolds that the exhaust gasses must pass through. These can get clogged up. Quick fix is to get a can of spray carburetor cleaner (i.e. Gumout) and attach the little hose to the sprayer. Stick it into each of the passages and spray until you stop getting spray back. Pulse spray, not continuous.