How to determine instantaneous phase using complex wavelets ?
조회 수: 10 (최근 30일)
이전 댓글 표시
I am trying to obtain the phase difference between two non-stationary signals. I have tried using both Hilbert transform and Complex Wavelet Transform. Sample codes for 2 signals x & y and corresponding output are given below:
% Using Hilbert Transform
t = linspace(0,1,2048);
x = sin(16*pi*t);
y = sin(16*pi*t+pi/6);
xh = hilbert(x);
yh = hilbert(y);
xphase = (unwrap(angle(xh)))';
yphase = (unwrap(angle(yh)))';
plot(t,rad2deg(xphase-yphase))

%Using Complex Guassian Wavelet
t = linspace(0,10,2048);
x = sin(16*pi*t);
y = sin(16*pi*t+pi/3);
xc=cwt(x,1:140,'cgau5');
yc=cwt(y,1:140,'cgau5');
lev=30;
xp=rad2deg(unwrap(angle(xc(lev,:))));
yp=rad2deg(unwrap(angle(yc(lev,:))));
figure(1)
plot(t,(xp-yp));

The phase difference using Hilbert transform is correct while Complex WT gives unusual results. How can phase between x and y be sinusoidal? I wonder if there is any mistake in the code?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Signal Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!