Roger Federer overcame a second set wobble to beat home player Daniel Brands 3-6 6-3 6-2 on his return to action at the German Tennis Championships.