How to determine the phase of a time-sampled periodic signal? I know this is a rather common and a rather simple problem, but somehow I can't find a solution that is equally simple to understand (and implement).

I have a signal that closely resembles a noisy sine wave (sample signal graph below). What I actually need for the practical problem I'm solving is to find the phase of that signal, more specifically - one of the extremum points for each period. I want to know at which sample the new period starts, either from the min or from the max point (doesn't matter which as long as I know which one it is). A real-time solution is preferable (i. e. with as little a delay as possible).



What are good general approaches to this problem? Do I need to find the fundamental frequency? If I do, I have found two algorithms for that: DFT/FFT (overkill because I only need the base frequency), and auto-correlation which would be my choice. Is there any simpler way than auto-correlation?

Of course, if there is a more direct way to get the "starting" point of each period, that would be even better.

Thanks in advance.

P. S. The naive solution I see as an engineer with no training in DSP is to apply a smoothing (low-pass) filter to the signal and calculate something resembling a derivative - s(t) - s(t-1). Where this value changes sign is an extremum - but only with sufficient filtering and sufficiently stable signal. This approach does not seem robust.
You could try to Fourier transform,

$F(k) = \int_{-\infty}^{\infty} x(t) e^{-2\pi i kt} dt$

which can be expressed in terms of magnitude and phase in the following way

$F(k) = |F(k)|e^{i\Phi(k)} = a(k) + ib(k)$

with magnitude $|F(k)|$ and phase $\Phi(k) = \tan^{-1}(\frac{b}{a})$ for each frequency component $k$. Since it looks like you have a dominant $k$ representing your sine wave you can find the phase of that wave pretty easily. There are probably more obvious ways than this though.