inverse CWT using coif4

1 vue (au cours des 30 derniers jours)
zozo
zozo le 13 Juil 2012
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.

Réponse acceptée

Wayne King
Wayne King le 13 Juil 2012
Modifié(e) : Wayne King le 13 Juil 2012
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 commentaire
zozo
zozo le 13 Juil 2012
@Wayne: Thank you so mcuch for your patience Sir. It was helpful in understanding the working of inverse operation on cwt. However, since I am dealing with ECG signals containing arrythmias(Atrial Fibrillation), 'coif4' wavelet is recommened for these kind of signals. But unfortunately, there is this scaling problem during reconstruction. My idea was to use CWT to compute weighted fine-scale (s=1...7) and coarse-scale(s=24....30) signals, convert them into time-domain and use their amplitudes for thresholding my original signal so that I can de-noise the signal(remove high frequency spectra corresponding to fine-scales) to a certain extent so that the activation cycles are viewed better. Do you have any suggestions for this?
Also, I would like to know the criteria for choosing IdxSc.

Connectez-vous pour commenter.

Plus de réponses (1)

Wayne King
Wayne King le 13 Juil 2012
You want to use icwtlin, icwtlin supports the 'coif4' wavelet.
  1 commentaire
zozo
zozo le 13 Juil 2012
yes, but what should be my input arguments for icwtlin? I have:
coef=cwt(s,scales,'coif4');
now coef is 1xN vector containing the wavelet coefficients of signal s(1xN) for scales=1:10
xrec=icwtlin(..???..);

Connectez-vous pour commenter.

Catégories

En savoir plus sur Continuous Wavelet Transforms 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!

Translated by