inverse CWT using coif4
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I have an ECG signal s(t) to be analysed using 'coif4' mother wavelet. My scales are linear from 1 to 10. For each scale, I want to compute the inverse CWT so as to reconstruct my signal s(t) in time-domain from that particular vector containing the wavelet coefficients.
Since, since cwt does not have inverse option and cwtft does not support _'coif4' _wavelet, what is the alternative to achieve my goal?
Please suggest.
댓글 수: 0
채택된 답변
Wayne King
2012년 7월 13일
편집: Wayne King
2012년 7월 13일
Hi Zozo, I'll give you a couple examples where you reconstruct an approximation to a time-localized 100 Hz component.
But first, I should say the following. Your time- and scale-localized reconstruction of a signal will be better if you use cwtft.m and icwtft.m with logarithmically-spaced scales. The reason for that is that you have to keep in mind the inverse CWT is a single integral approximation to a double integral problem. It turns out that the stability of the reconstruction is better when we use certain scales and for certain wavelets where the Fourier transform has a nice expression. For the coif4 wavelet, that is not the case.
dt = 0.001;
t = linspace(0,1,1000);
x = cos(2*pi*100*t).*(t<0.5)+sin(2*pi*300*t).*(t>=0.75)+0.2*randn(size(t));
scales = 1:30;
cwtcoefs = cwt(x,scales,'coif4');
cwtstruct = struct('wav','coif4','cfs',cwtcoefs,'scales',scales,'meanSIG',mean(x),'dt',dt);
xrec = icwtlin(cwtstruct,'IdxSc',6:8);
plot(t,x,'r-.');
hold on;
plot(t,xrec,'k');
legend('Original Signal','Reconstruction with coif4 wavelet');
%Now using cwtft.m and icwtft.m
s0 = 2*dt;
ds = 0.4875;
NbSc = 20;
wname = 'morl';
sig = {x,dt};
sca = {s0,ds,NbSc};
wave = {wname,[]};
cwtsig = cwtft(sig,'scales',sca,'wavelet',wave);
newcfs = zeros(size(cwtsig.cfs));
indices = 4:6;
newcfs(indices,:) = cwtsig.cfs(indices,:);
cwtsig.cfs = newcfs;
xrec1 = icwtft(cwtsig);
figure;
plot(t,x,'r-.');
hold on;
plot(t,xrec1,'k');
legend('Original Signal','Reconstruction with Morlet Wavelet');
If you compare the two, you'll see that both techniques essentially isolate the 100-Hz component, but that the Morlet wavelet with logarithmically-spaced scales does a better job at the getting the amplitude right.
If you just want to find the localization of the signal feature at certain scales, then the coif4 wavelet works. If you are concerned about an accurate amplitude scaling, then cwtft and icwtft work better than cwt.m paired with icwtlin.m
Hope that helps, Wayne
추가 답변 (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!