Least squares optimization of zero crossing technique for frequency estimation of power system grid distorted sinusoidal signals