DWT vs. MODWT vs. EMD
4 views (last 30 days)
Show older comments
Hello,
I have decomposed fmri time series. At my first try, I used wavedec and wrcoef with db10 wavelet, level 10. Then I did it with modwt and modwtmra. To compare the results, I summed up the decompositions to receive a reconstructed original signal. After I subtracted and summed up the reconstructed from the original signal in absolute value.
So, why is MODWT in this case better (smaller value of summed up differences) than DWT? Which wavelet I should use for DWT or for MODWT? Which wavelet use Matlab for MODWT if I do not choose one explicit. How MODWT choose the number of levels? I always receive 11 decompositions with MODWT of a time signal.
I also did a decomposition with EMD. The result of EMD seems more exactly (means less variance of the summed up decompositions regarding to the original signal).
Is there any way to get a better solution with wavelets as with EMD?
Thanks
1 Comment
shivi varshney
on 29 Apr 2019
hello sir , i am also using modwt and modwtmra in my project work. can you please share your modwt decomposition code with my email. address varshneyshivi31@gmail.com
. it will very helpful to me.
thankyou somuch
Answers (2)
Wayne King
on 5 May 2016
Marc, MODWT uses the 'sym4' wavelet by default if one is not specified. That is given in the help and documentation. Also, the default level depends on the signal length. Basically, it goes as far down as it can. If you increase or decrease your signal length, you will see the number of levels change.
For example,
load wecg;
wt = modwt(wecg);
size(wt)
ts = wecg(1:512);
wt1 = modwt(ts);
size(wt1)
If you look at the details in wt(end,:), you will see that it is a constant (to within numerical precision) equal to the mean of the signal.
plot(wt(end,:))
ylim([mean(wecg)-0.1 mean(wecg)+0.1])
mean(wecg)
MODWT will exactly preserve the energy in the signal at the decomposition. It is a redundant wavelet transform, but it still acts like an orthogonal transform. If you then obtain the mulitresolution analysis using MODWTMRA and sum the components, you will reconstruct the signal exactly.
See the examples in the reference pages for demonstrations of this.
I'm not sure what "The result of EMD seems more exactly (means less variance of the summed up decompositions regarding to the original signal)." this means, summing up the modwtmra will give you the signal back exactly. The maximum absolute error for any given sample will be something like 10^(-12)
load wecg; wt = modwt(wecg); mra = modwtmra(wt); ts = sum(mra); norm(abs(wecg'-ts),Inf)
Or using IMODWT
wt = modwt(wecg);
xrec = imodwt(wt);
norm(abs(wecg'-xrec),Inf)
That is perfect reconstruction. So can you be more specific or include code samples of what you mean by better?
Wayne King
on 7 May 2016
EMD is an adaptive technique. This has strengths but also weaknesses so whether you might use EMD vs MODWT depends a lot on your ultimate goal. The MODWT lends itself to robust statistical analysis because there is a lot known about the statistical properties of the wavelet coefficients, see for example MODWTVAR, MODWTXCORR for example. We are able to put confidence intervals around variance (power) estimates for the MODWT subbands precisely because we have good knowledge of the statistical behavior of the wavelet transform. That cannot be said for EMD. EMD is data adaptive.
I don't know which implementation of EMD, you are using, but there are at least four stopping criteria I know of for EMD algorithms. Depending on which you are using you may get a slightly different point at which the "sifting process" (as it is called) stops. Basically, it goes until it cannot generate any more (new) intrinsic mode functions -- how it determines that again depends on the algorithm you are using.
How far, the MODWT goes down is based on the sample size (and again with any wavelet transform, you don't have to go all the way). Bascially the MODWT will go down until what is left as the scaling coefficients is just equal to the mean of the signal. I'll demonstrate here:
load wecg;
wt = modwt(wecg);
Now look at
app = wt(end,:);
The above is essentially just a constant vector equal to the mean of the signal. Taking the wavelet transform any further is pointless, the wavelet coefficients will be nothing but zeros and the scaling coefficients won't change.
I think the differences in reconstruction you show above don't mean EMD is better than MODWT. These are very small differences. For example for my version of EMD,
load wecg;
imf = emd(wecg);
wt = modwt(wecg);
xrec = imodwt(wt);
imfrec = sum(imf);
max(abs(wecg'-imfrec))
max(abs(wecg'-xrec))
4.4409e-16
ans =
2.3253e-12
So in the case of the EMD, the worst mismatch between the reconstruction and the signal sample is 10^(-16) for the MODWT (10^(-12)). Are we really worried about that difference? They both reconstruct the signal perfectly.
As far as the wavelet to choose, that depends on the goal of your analysis. What is your ultimate reason for doing a multiresolution analysis of these signals?
See Also
Categories
Find more on Signal Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!