how to estimate the phase parameter of a complex function There is a complex serie: $f(t_n)=\alpha_n+\beta_n i$, for $n = 1,...,N$,$t_n,\alpha_n$ and $\beta_n$ are known.When we have know that $f(t)$ has the following form:
$$f(t)=Ae^{-iBt}$$
with unknown amplitude $A$ and unknown phase $B$, how to estimate the parameters $A$ and $B$ by using a numerical optimization method?
 A: As written by Martín-Blas Pérez Pinilla, let us suppose that you want to find the optimum values of parameters $A$ and $B$ which minimize the objective function $$\Phi(A,B)=\sum _{n=1}^N (\alpha_n-A\cos (Bt_n))^2+(\beta_n+A\sin (Bt_n))^2=\sum _{n=1}^N r_n$$ Now, since you want the objective function to be minimum, write its derivatives with respect to  $A$ and $B$ and set them equal to zero. This will then correspond to  $$\sum _{n=1}^N  \frac{dr_n}{dA}=0$$ $$\sum _{n=1}^N  \frac{dr_n}{dB}=0$$ This corresponds respectively to $$\sum _{n=1}^N [A-\alpha _n \cos (B t_n)+\beta_n \sin (B t_n)]=0$$ $$\sum _{n=1}^N [A t_n (\alpha_n \sin (B t_n)+\beta_n \cos (B t_n))]=0$$ What is nice is that the first equation allows to explicit $A$ as a function of $B$; so, only the second equation is left and you can solve it using Newton method provided that you have a reasonable guess (notice than $A$ disappears from the second equation). 
As written by Martín-Blas Pérez Pinilla, you could start your iterations computing the average value of the $$B_n= -\frac1{t_n}\arctan\frac{\alpha_n}{\beta_n}$$ over the entire data set.
A: $$f(t)=Ae^{−iBt}=A(\cos(Bt)-i\sin(Bt))$$
$$\alpha_n+\beta_n i=f(t_n)=A(\cos(Bt_n)-i\sin(Bt_n))$$
$$A=|\alpha_n+\beta_n i|=\sqrt{\alpha_n^2+\beta_n^2}$$
$$B= -\frac1{t_n}\arctan\frac{\alpha_n}{\beta_n}$$
$$\cdots$$
