randomlly loss of power in limp mode how doyou change throttle position sensor
throttle position sensor on 2007 Hyundai Sonata
Do you have a code for that? Because if not, it could be many other things, like misfire, mass air flow sensor, crank sensor etc. Really best to get a diagnosis. If you have a TPS code then here is a replacement article, by the way, use a factory part to avoid even more headaches.
If you have the right OBD-II codes, go to a dealer. They need to reset the ECM using a GDS/VCI (which is not consumer friendly). You can replace the part yourself, but the 2007 Sonata's had a special set up which goes beyond a PCM program.