I am sampling a sine wave of 50Hz(stepped down from 230V) at the rate of 500KHz. For identifying disturbances in the wave, i was thinking of comparing a cycle of incoming sine values with reference sine values(pure sine wave). But will the method be accurate? one of my friends told that there will be loss of synchronization and so number of samples in one cycle wont be the same every time we measure and comparison will give wrong answer. If so, could anyone suggest some method for doing the same? Also,how to detect the zero crossing point without using any hardware?