determine the initial phase phi.