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.
0 件のコメント
採用された回答
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');
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Continuous Wavelet Transforms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!