Determining periods using Continuous Wavelet Transform

4 次查看(过去 30 天)
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
thanks for this useful explanation

类别

Help CenterFile Exchange 中查找有关 Continuous Wavelet Transforms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by