I'm trying to solve an exercise where I need to derive the MLE of the phase parameter.

I'm given the below signal with white noise $w[n] \sim \mathcal{N}(0, \sigma^2) $, amplitude $A$, angular frequency $\omega \notin \{0, \pi\}$, $N$ measurements and unknown phase $\phi$.

$$ x[n]=A \cos (\omega n+\phi)+w[n], \; \; n= 1,...,N $$

Usually I'd get the log-likelihood function, compute the first derivative, set it to zero and solve for the unknown parameter which is $\phi$ in this case. However, I am unable to solve for $\phi$ in the 1st derivative as I am can't extract it from inside the sine and cosine functions.

$$ \begin{gathered} \frac{\partial}{\partial \phi} \ln p(x ; \phi)=-\frac{1}{\sigma^{2}} \sum_{1}^{N}(x[n]-A \cos (\omega n+\phi))(A \sin (\omega n+\phi)) \\ \frac{\partial}{\partial \phi} \ln p(x ; \phi)=0 \end{gathered} $$

Can someone please help me solve this?

  • $\begingroup$ hi! You seem to know how to typeset formulas in $\LaTeX$! That's great. If you put them between $, for example as $\phi$, they get rendered as LaTeX (just for the future) $\endgroup$ Aug 2, 2022 at 15:50
  • $\begingroup$ I wasn't aware of that and I was just adding the equations as images, thanks a lot for the hint! :) $\endgroup$
    – sadghi
    Aug 2, 2022 at 16:20
  • $\begingroup$ You're welcome! When you want "freestanding" equation lines, you'd do $$ w[n] \sim \mathcal{N}(0,\sigma^2) $$; you can also do \begin{align} \frac{\partial}{\partial \phi} \ln p(x;\phi) &= \ldots \\ & 0 \end{align} $\endgroup$ Aug 2, 2022 at 16:28
  • $\begingroup$ This problem is really tricky because of the non-additive noise $w$ that appears both in and outside the cosine. $\endgroup$ Aug 3, 2022 at 1:13
  • $\begingroup$ @MarcusMüller There's also this (but nevermind, just learned free is limited) - btw how'd you type that l a t e x? ironically this software can't figure it out $\endgroup$ Aug 3, 2022 at 2:48

2 Answers 2


I'm not sure that there's a closed-form solution for the ML estimate of phase, but if you recast the definition of $x[n]$ to $$x[n] = a \cos (\omega n) + b \sin (\omega n) + w[n], \; \; n= 1,...,N $$ then you can easily find the ML estimates of $a$ and $b$, and take $$\hat \phi = \tan^{-1}\frac{\hat b}{\hat a}.$$

This PDF seems to back up the assumption, though it calls the resulting estimator only an approximate maximum likelihood estimator.

Screenshot from relevant page of linked PDF


Maybe you cannot get an analytical solution. Or maybe you can assume the phase is very small, and use some approximation like $\cos \left( \phi \right) = 1$ and $\sin \left( \phi \right) = \phi$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.