I am a power systems engineer and am doing preliminary leg-work for detection of a specific anomaly in power systems that cause the observed waveform to be distorted. False positives are somewhat acceptable here, as missing the said event can be catastrophic. This is what the signal looks like:
Now this waveform is an output of a anomaly simulating setup that has been fed a pure sine wave of $50\textrm{ Hz}$, captured using an Oscilloscope at $1000$ samples representing what was being displayed on the screen.
Questions:
How do I detect where one cycle starts and ends programatically, where there are multiple points representing the zero crossover?
I'd run an FFT over it once I can do that, but might need help in interpretation.
I do not have a formal background in DSP but am open to all reasonable ideas and suggestions, and willing to learn.
P.S.
Here are the $1000$ Samples
-3.15, -3.15, -3.24, -3.34, -3.53, -3.63, -3.73, -3.82, -4.02, -4.02, -4.11, -4.21, -4.31, -4.50, -4.50, -4.50, -4.60, -4.70, -4.79, -4.89, -4.99, -5.08, -5.08, -5.18, -5.28, -5.37, -5.47, -5.57, -5.66, -5.66, -5.86, -5.95, -5.95, -6.05, -6.15, -6.15, -6.24, -6.34, -6.44, -6.44, -6.53, -6.53, -6.63, -6.73, -6.73, -6.82, -6.92, -6.92, -6.92, -7.02, -7.02, -7.12, -7.12, -7.21, -7.21, -7.31, -7.31, -7.31, -7.31, -7.31, -7.41, -7.41, -7.41, -7.50, -7.41, -7.50, -7.41, -7.50, -7.41, -7.41, -7.41, -7.31, -7.31, -7.21, -7.12, -6.92, -6.63, -6.15, -5.37, -4.21, -2.76, -1.60, -0.82, -0.44, -0.24, -0.15, -0.05, -0.05, 0.05, -0.05, 0.05, -0.05, -0.05, 0.05, -0.05, -0.05, -0.05, -0.05, 0.05, -0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, -0.05, 0.05, -0.05, -0.05, 0.05, 0.05, 0.05, 0.05, 0.05, -0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.15, 0.05, 0.15, 0.15, 0.15, 0.24, 0.15, 0.15, 0.15, 0.24, 0.15, 0.15, 0.15, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.44, 0.44, 0.44, 0.53, 0.53, 0.53, 0.63, 0.73, 0.73, 0.82, 0.82, 0.92, 1.02, 1.02, 1.11, 1.21, 1.21, 1.40, 1.40, 1.50, 1.69, 1.69, 1.79, 1.89, 2.08, 2.08, 2.28, 2.37, 2.37, 2.57, 2.66, 2.76, 2.95, 2.95, 3.05, 3.24, 3.44, 3.44, 3.53, 3.73, 3.82, 3.92, 4.02, 4.11, 4.21, 4.31, 4.40, 4.50, 4.50, 4.60, 4.70, 4.79, 4.89, 4.99, 4.99, 5.08, 5.18, 5.28, 5.37, 5.47, 5.57, 5.66, 5.76, 5.76, 5.95, 5.95, 6.05, 6.15, 6.15, 6.24, 6.34, 6.44, 6.44, 6.44, 6.63, 6.73, 6.73, 6.73, 6.82, 6.92, 6.92, 7.02, 7.02, 7.12, 7.12, 7.21, 7.21, 7.21, 7.31, 7.31, 7.31, 7.41, 7.41, 7.41, 7.50, 7.50, 7.50, 7.50, 7.50, 7.50, 7.50, 7.50, 7.41, 7.50, 7.50, 7.41, 7.41, 7.31, 7.21, 7.02, 6.63, 6.15, 5.37, 4.21, 2.76, 1.69, 0.82, 0.44, 0.15, 0.05, 0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.15, -0.15, -0.15, -0.05, -0.15, -0.15, -0.15, -0.05, -0.05, -0.05, -0.05, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.24, -0.24, -0.15, -0.24, -0.15, -0.24, -0.34, -0.24, -0.24, -0.24, -0.24, -0.24, -0.24, -0.34, -0.34, -0.24, -0.24, -0.34, -0.34, -0.34, -0.34, -0.44, -0.44, -0.44, -0.44, -0.53, -0.53, -0.53, -0.63, -0.63, -0.63, -0.73, -0.73, -0.82, -0.82, -0.92, -0.92, -1.02, -1.11, -1.21, -1.21, -1.31, -1.40, -1.50, -1.60, -1.69, -1.79, -1.89, -1.98, -2.08, -2.18, -2.28, -2.37, -2.47, -2.66, -2.76, -2.76, -3.05, -3.05, -3.24, -3.24, -3.34, -3.53, -3.63, -3.73, -3.82, -3.92, -4.11, -4.11, -4.21, -4.31, -4.40, -4.50, -4.50, -4.60, -4.70, -4.79, -4.89, -4.99, -5.08, -5.18, -5.28, -5.37, -5.37, -5.47, -5.57, -5.66, -5.76, -5.76, -5.95, -6.05, -6.05, -6.15, -6.15, -6.24, -6.34, -6.44, -6.44, -6.53, -6.53, -6.63, -6.73, -6.82, -6.82, -6.82, -6.92, -6.92, -7.02, -7.02, -7.12, -7.12, -7.12, -7.31, -7.31, -7.31, -7.31, -7.31, -7.41, -7.41, -7.31, -7.41, -7.41, -7.41, -7.50, -7.50, -7.41, -7.41, -7.41, -7.41, -7.31, -7.31, -7.21, -7.12, -6.92, -6.63, -6.15, -5.37, -4.21, -2.86, -1.69, -0.92, -0.44, -0.24, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, 0.05, 0.05, 0.05, 0.05, -0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, -0.05, 0.05, 0.05, 0.05, -0.05, -0.05, 0.05, -0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.15, 0.05, 0.05, 0.05, 0.15, 0.05, 0.15, 0.05, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.24, 0.15, 0.15, 0.24, 0.24, 0.24, 0.24, 0.15, 0.24, 0.24, 0.24, 0.24, 0.34, 0.34, 0.34, 0.34, 0.44, 0.44, 0.44, 0.53, 0.53, 0.53, 0.53, 0.63, 0.63, 0.73, 0.73, 0.82, 0.82, 0.92, 1.02, 1.02, 1.11, 1.21, 1.31, 1.31, 1.40, 1.50, 1.60, 1.69, 1.89, 1.89, 1.98, 2.08, 2.18, 2.28, 2.47, 2.57, 2.66, 2.76, 2.86, 3.05, 3.15, 3.24, 3.34, 3.44, 3.53, 3.73, 3.82, 3.82, 4.02, 4.11, 4.21, 4.40, 4.40, 4.50, 4.50, 4.60, 4.60, 4.79, 4.89, 4.89, 4.99, 5.18, 5.18, 5.28, 5.37, 5.47, 5.57, 5.66, 5.76, 5.76, 5.86, 5.95, 6.05, 6.15, 6.15, 6.24, 6.34, 6.44, 6.53, 6.53, 6.63, 6.63, 6.73, 6.73, 6.82, 6.82, 6.92, 7.02, 7.02, 7.12, 7.12, 7.21, 7.21, 7.31, 7.31, 7.31, 7.31, 7.41, 7.50, 7.41, 7.41, 7.50, 7.50, 7.50, 7.50, 7.50, 7.50, 7.50, 7.50, 7.50, 7.41, 7.50, 7.41, 7.31, 7.21, 7.02, 6.73, 6.15, 5.47, 4.40, 2.86, 1.69, 0.92, 0.44, 0.15, 0.15, 0.05, 0.05, -0.05, -0.05, -0.05, -0.05, 0.05, 0.05, 0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.05, -0.15, -0.05, -0.05, -0.05, -0.05, -0.05, -0.15, -0.05, -0.05, -0.05, -0.15, -0.05, -0.15, -0.15, -0.05, -0.15, -0.05, -0.05, -0.15, -0.05, -0.15, -0.15, -0.15, -0.15, -0.05, -0.24, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.24, -0.15, -0.15, -0.15, -0.15, -0.15, -0.15, -0.24, -0.15, -0.15, -0.24, -0.24, -0.24, -0.24, -0.24, -0.24, -0.24, -0.34, -0.34, -0.34, -0.24, -0.34, -0.34, -0.34, -0.44, -0.44, -0.44, -0.44, -0.53, -0.53, -0.53, -0.63, -0.63, -0.63, -0.73, -0.63, -0.73, -0.82, -0.92, -1.02, -1.02, -1.11, -1.11, -1.21, -1.31, -1.40, -1.50, -1.60, -1.69, -1.79, -1.79, -1.98, -2.08, -2.08, -2.37, -2.37, -2.57, -2.66, -2.76, -2.86, -2.95, -3.05, -3.24, -3.34, -3.44, -3.44, -3.53, -3.73, -3.82, -3.92, -4.02, -4.11, -4.11, -4.31, -4.50, -4.40, -4.60, -4.60, -4.70, -4.79, -4.89, -4.99, -4.99, -5.18, -5.18, -5.28, -5.37, -5.47, -5.57, -5.66, -5.76, -5.76, -5.86, -5.95, -6.05, -6.15, -6.24, -6.24, -6.34, -6.34, -6.44, -6.53, -6.53, -6.63, -6.73, -6.73, -6.82, -6.82, -6.92, -6.92, -7.02, -7.02, -7.12, -7.12, -7.12, -7.21, -7.31, -7.31, -7.31, -7.31, -7.41, -7.41, -7.41, -7.41, -7.41, -7.50, -7.41, -7.41, -7.41, -7.50, -7.41, -7.41, -7.41, -7.31, -7.21, -7.12, -6.92, -6.63, -6.15, -5.47, -4.40, -2.95, -1.69, -0.92, -0.53, -0.24, -0.15, -0.05, -0.05, -0.05, 0.05, -0.05, 0.05, 0.05, 0.05, -0.05, -0.05, -0.05, -0.05, -0.05, 0.05, -0.05, -0.05, -0.05, -0.05, -0.05, 0.05, 0.05, -0.05, 0.05, -0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, -0.05, 0.05, 0.05, 0.15, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.15, 0.05, 0.05, 0.05, 0.05, 0.05, 0.15, 0.15, 0.15, 0.05, 0.05, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.15, 0.24, 0.15, 0.15, 0.15, 0.24, 0.24, 0.24, 0.24, 0.24, 0.24, 0.34, 0.24, 0.34, 0.34, 0.34, 0.34, 0.34, 0.44, 0.44, 0.34, 0.44, 0.53, 0.53, 0.63, 0.63, 0.82, 0.73, 0.82, 0.73, 0.92, 1.02, 1.02, 1.11, 1.11, 1.21, 1.31, 1.40, 1.50, 1.60, 1.69, 1.79, 1.89, 1.98, 2.18, 2.28, 2.37, 2.47, 2.57, 2.66, 2.76, 2.95, 3.05