Hello, actually I noticed that my code is working in some cases but not all of them and I cannot figure out why.
for signal = cos(2*pi*timesignal/1+95*pi/180) + 2*cos(2*pi*timesignal/0.5+140*pi/180);
it is estimating the 2 phases correctly, but for : signal = cos(2*pi*timesignal/1+95*pi/180) + 2*cos(2*pi*timesignal/0.49+140*pi/180);
(the only thing I changed is the period T2 of the second cosinus), the estimation of the phase of the second cosinus is incorrect (107 instead of 140). So why does it work sometimes but not all the time and what can I do to correct it? Is this method with the fft a good method or should I use another method?
Many thanks,