5

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.

Royi
  • 19,608
  • 4
  • 197
  • 238
cadillac
  • 59
  • 3

2 Answers2

1

Kalman filters assume that you know the model and that you want to estimate the real state of $x[n]$, and if I understand well this is not your problem.

You should probably look into frequency estimation. If your noise is really high I suggest you to use MUSIC. If not just FFT your signal and pick the highest peak. Having the frequency estimating the phase should be easy with correlation.

If you really want to filter your signal then start by finding the missing values as I described, proceed by finding a differential equation for which the sine wave is a solution, transform the differential equation into a difference equation by finite differences and finally the difference equation into a state-space model.

gsmafra
  • 248
  • 3
  • 7
0

The answer is given in Estimate and Track the Amplitude, Frequency and Phase of a Sine Signal Using a Kalman Filter which generalizes your case.

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.

Royi
  • 19,608
  • 4
  • 197
  • 238