The way I look at it is this...
I. Anakin vs Dooku
Anakin/Obi-Wan were extremely weak during that duel in the first place because take Anakin, he just found out his mom was killed, he slaughtered the TRs, flew over to Geonosis, fought the battle in the factory, got captured, possibly was tortured (we don't know for sure), fought with the 3 monsters, AND THEN had to fight in the Battle of Geonosis. No wonder he would be so worn out before fighting one of the greatest Jedi who also is more powerful now that he is using the dark side!
II. Luke vs Palpatine
Luke was being toyed with by Palpatine, and if you look at it, after the first attack, Luke falls down, very much the same with Anakin. He doesn't defend himself, he is just constantly attacked and never goes anywhere but on the ground writhing in pain.
III. Luke vs Vader duels
Vader does not want to kill his son, this has been expressed many times. He simply defends himself and screws around with Luke. Plus Vader has his injuries.
Anakin in his prime vs Luke in his prime, I think would have to go to Anakin. He believed in the Force all his life, and embraced it (even if he did embrace the wrong side for a great section of that life), whereas Luke doubted the Force up until about the end of Empire I'd say. Think about the struggle Luke had in retrieving his lightsaber in the Wampa's cave, compared to Anakin flicking his wrist and hurling all that machinery at the Geonosians. Luke had trouble in the Endor forest with the speeder, but Anakin completely whooped the Pod Race, and he was NINE, with NO Force training. I think Anakin is way more powerful than Luke, Luke just got lucky being the son of the most powerful being in history, being taught by two of the greatest Jedi ever, and having the will of the Force on his side along with the unfulfilled prophecy.