Top seed Janko Tipsarevic survived a major scare against home favourite Bjorn Phau, but eventually won in three sets to reach the semi-finals of the Mercedes Cup.