I have to calculate phase difference between two signals. I'm not very strong mathematically but I understand and interested in implementing F.F.T. algorithm on my electronic signals for calculating exact phase difference between them. I read lots of documents and papers. In some papers I obtained following understanding:- 1. FFT is good when integer no. of sampled period. 2. And when your frequency of interest is in the bins of FFT. 3. There are different methods such as 3/4-parameter sine wave fit which claims accurate phase difference based on LSE(least square error)method.
I need to calculate the phase difference between to signals (Current and Voltage) On real time basis where frequency of my signals wont be constant but at any instant both signals will have the same frequency(~50kHz).
Considerations: My signals will be filtered using FIR and SNR will be moderate. Noise : First harmonic of the fundamental + Gaussian Noise
My question and concerns are:- 1. What should be the sampling frequency? 2. How much should be the length of the FFT / How many number of cycles of input signals be sampled?
According to this document SWFM is the best method:- http://www.metrology.pg.gda.pl/full/2005/M&MS_2005_427.pdf
As I'm weak in mathematics can you please help me understand the basics of this method ? which are the input signals to this algorithm ?