Determining periods using Continuous Wavelet Transform

Hi, I have a signal which contains some quasi-periodic patterns which I would like to determine.
As its spectral content changes with time, I think that Wavelet analysis is the method which best fits to my purpose. So that, I was wondering if there exists a canonical way to detect reasonable periods in this signal by looking to CWT coefficients.

 채택된 답변

Wayne King
Wayne King 2012년 1월 28일
Hi Richard, you can use the approximate relationship between scale and frequency to do this.
Create a signal to illustrate this:
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = zeros(size(t));
x([625,750]) = 2.5;
x = x+ cos(2*pi*100*t).*(t<0.25)+cos(2*pi*50*t).*(t>=0.5)+0.15*randn(size(t));
plot(t,x);
Set up the scale vector and spacing:
ds = 0.15;
J = fix((1/ds)*log2(length(x)/8));
dt = 1/Fs;
scales = 2*dt*2.^((0:J).*ds);
Obtain the CWT and plot the response:
cwtstruct = cwtft({x,0.001},'Scales',scales,'Wavelet','morl');
periods = cwtstruct.scales.*(4*pi)/(6+sqrt(38));
freq = 1./periods;
cfs = cwtstruct.cfs;
contour(t,freq,abs(cfs));
set(gca,'xtick',[0 0.25 0.4 0.5 0.6 0.75 1]); grid on;
xlabel('Time (seconds)'); ylabel('Hz');

추가 답변 (1개)

Richard
Richard 2012년 1월 28일

0 개 추천

thanks for this useful explanation

카테고리

도움말 센터File Exchange에서 Continuous Wavelet Transforms에 대해 자세히 알아보기

질문:

2012년 1월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by