A new approach to the Fourier analysis of periodic signals for the minimization of the phase error