Chen Xiao Fan wrote: > Maybe FFT is the way to go for PF analyzing. FFT would not be very useful. You are looking for relative phase relationship between two signals, not the spectra of the signals separately. Think of the case where the voltage is a pure sine and you have three different loads, resistive, capacitive, and inductive. If the magnitude of the load currents are the same, an FFT will give the same result in all cases even though one has a power factor of 1 and the other two of 0. To compute power factor, compute the RMS voltage and current, and the actual power. Power factor is the ratio of the true power divided by the product of the RMS voltage and current. You can see that this can be at most 1, which is what you get only with a resistive load. The extremes are pure capacitive and inductive loads where the delivered power is 0 and the power factor therefore is 0. Technically an active load could produce negative power factors, but this means the load is actually delivering power back to the AC line. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist