How to determine instantaneous phase using complex wavelets ?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Signal Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!