Detecting phase difference between two channels

조회 수: 17(최근 30일)
David Jones
David Jones 2021년 6월 3일
댓글: David Jones 2021년 6월 10일
I dont have a lot of experiance using MATLAB, Can someone please show me how to detect the phase differance between my 2 signals attached, number of samples are 6000 and sample rate is 0.01
Any Help would be greatly appreciated.
Kind Regards
  댓글 수: 16
David Jones
David Jones 2021년 6월 10일
Yes it does, I had never used it before, but after testing I think there is to much small phase noise to be able to use the phase.

댓글을 달려면 로그인하십시오.


Bjorn Gustavsson
Bjorn Gustavsson 2021년 6월 10일
Does something like this extract variations that are related to the breathing-pattern:
phi_u = unwrap(atan2(raw_ad_data_sine,raw_ad_data_cosine));
fK = hanning(1001); % Arbitrary choise of low-pass filter
fK = fK/sum(fK);
plot(t,phi_u) % Raw unwrapped phase
hold on
plot(t,filtfilt(fK,1,phi_u)) % low-pass-filtered phase
plot(t,phi_u-filtfilt(fK,1,phi_u)) % unwrapped phase with slow variations removed.
Since we dont know what signal to extract it is difficult to advice. My gues is that your mixing signals are too close to the breath-pattern in frequency.
  댓글 수: 1
David Jones
David Jones 2021년 6월 10일
Hi Bjorn
Thanks for getting back I have attached the sample data the signals of interest are 0.1 hertz to 0.45 hertz the mixer frequency is in the Mega Hertz, I then filter in the electronics the sine and cosine as above, I have also attacted the amplitude output from Matlab, can I ask you please to take a look and le me know your thoughts
Thank you

댓글을 달려면 로그인하십시오.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by