Discrete Sinusoidal to State Space I'm looking to apply an optimal LQR filter to a discrete signal of the form

$x[n]=A\sin[\omega_0n + \phi]+ v[n]$

The amplitude $A$ and the phase $\phi$ are unknown variables I want to estimate using the filter, and $v[n]$ is an uncorrelated noise signal of variance ${\sigma_v}^2$.

I don't know how to build a state model to generate this sine wave, and proceed from there.

Thanks in advance for your help.
You may have a look on Paul Zarchan's lecture note about tracking a Sine Wave - Paul Zarchan - Fundamentals of Kalman Filtering: A Practical Approach - Tracking a Sine Wave.

You also may have a look on Tracking a Sine Wave with Kalman Filter - How to Account for Offset (DC Signal)?

Yet in practice, as @gsmafra wrote, using the DFT, since you know the frequency, is the best choice SNR wise.