1
$\begingroup$

Consider the measurements of two modulated AC signals (voltage and current) which may have noise, harmonics and a DC bias. Each measured signal consists of a list for the time and a list for the corresponding values.

My goal is to find out the phase shift in degrees between these two signals in a robust way.

I would like to realize this in the frequency domain perhaps by calculating and evaluating the fundamental waves of the signals.

Any help or sample code (MATLAB) would be very much appreciated.

$\endgroup$
  • 1
    $\begingroup$ By "phase shift" do you really mean "time shift"? $\endgroup$ – Jim Clay Sep 13 '13 at 18:21
  • $\begingroup$ I mean the phase shifting between current and voltage. E.g.: In the case of a capacitor, the current leads the voltage by 90 degrees. I want to calculate that 90 degrees. $\endgroup$ – lR8n6i Sep 14 '13 at 11:56
  • $\begingroup$ correct. filtering does nothing for the accuracy. accuracy is improved by using a longer fft, not filtering. $\endgroup$ – Jerry Oct 2 '13 at 23:42
0
$\begingroup$

Do this procedure on both signals, and subtract the results to get what you want (it would be a nearly constant sequence whose value is phase shift in radians)

  1. Perform FFT on the signal to obtain its spectrum.

  2. Find the dominant harmonic of the signal : $f_c$ (where the peak of FFT occurs).

  3. Filter the signal with a narrow-band linear phase filter (center = $f_c$, bandwidth as less as possible).

  4. Again, perform FFT on the signal and extract its phase.

Note : It is assumed that the signal has a dominant frequency otherwise a phase shift is pointless

$\endgroup$
  • $\begingroup$ Hi! Thank you for your response. I could accomplish 1 and 2. Could you maybe recommend a suitable filter type for task 3? Do you think a linear phase filter should be used? $\endgroup$ – lR8n6i Sep 13 '13 at 14:40
  • $\begingroup$ My knowledge is not enough to recommend you a suitable filter type. You can try most important ones, and choose one that works well. Yes the filter must be a linear, otherwise it will distort the phase of the inputs. $\endgroup$ – Mahdi Khosravi Sep 13 '13 at 16:05
  • $\begingroup$ Why don't you just read the phases from the FFT bins? What's the filter for? $\endgroup$ – endolith Sep 14 '13 at 3:40
  • $\begingroup$ @endolith the filter is arbitrary and its usage depends on the level of the noise. $\endgroup$ – Mahdi Khosravi Sep 14 '13 at 6:12
  • $\begingroup$ @MahdiKhosravi: but what does it do? what is its purpose? the peak bin will be the same before and after the filter $\endgroup$ – endolith Sep 14 '13 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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