pyhht icon indicating copy to clipboard operation
pyhht copied to clipboard

bivariate EMD has some bugs

Open JuiceLemonLemon opened this issue 7 years ago • 12 comments
trafficstars

Hello, when I applied the code to complex list for bivariate EMD, the result is not cosistent with matlab's.

JuiceLemonLemon avatar Jun 13 '18 00:06 JuiceLemonLemon

Thanks, @Orangeyzao for pointing this out, as I work on #42, I am realizing that the bivariate framework will require some debugging and improvement. I'll update here when it is fixed.

jaidevd avatar Jun 14 '18 13:06 jaidevd

Hi @Orangeyzao,

Can you please re-install pyhht from the latest dev branch and check the bivariate EMD again? Please note that it is no longer necessary to specify the is_mode_complex option in the EMD class. It will automatically be inferred from the input provided. If the input signal has any non-zero imaginary component, EMD will automatically be bivariate.

Please let me know if this works.

jaidevd avatar Jun 18 '18 14:06 jaidevd

@jaidevd

Thinking about this a bit more, I'd expect the same modes as without the frequency translation, plus an additional mode at the frequency of the modulator (fc=0.1).

WRAR891 avatar Jun 18 '18 18:06 WRAR891

@jaidevd I have re-installed, but the result is still different from matlab's, the number of imfs is too small, sometimes just one imf component.

JuiceLemonLemon avatar Jun 21 '18 05:06 JuiceLemonLemon

@Orangeyzao, can you provide an example? Also, which MATLAB package are you using?

jaidevd avatar Jun 21 '18 05:06 jaidevd

self.nbit = 0 nbit's value should be reseted in "emd.py".

JuiceLemonLemon avatar Jun 21 '18 06:06 JuiceLemonLemon

Could you elaborate further? self.nbit has nothing to do with the number of IMFs. That variable simply records the number of iterations it takes to reach an IMF. It gets reset after each IMF is extracted.

jaidevd avatar Jun 21 '18 06:06 jaidevd

"while not(stop_sift) and (self.nbit < self.maxiter):" if "self.nbit" is not reseted, above while loop will be not executed.

JuiceLemonLemon avatar Jun 21 '18 06:06 JuiceLemonLemon

That's a serious bug. Thanks for this. Fixing.

jaidevd avatar Jun 21 '18 07:06 jaidevd

@Orangeyzao can you please re-install from the dev branch and try again?

jaidevd avatar Jun 23 '18 11:06 jaidevd

@jaidevd

Not sure if this was supposed to fix handling of complex-valued inputs, but I assume not as results on same are still incorrect.

WRAR891 avatar Jun 25 '18 18:06 WRAR891

@WRAR891 The problem discussed in #42 is not fixed, although I'm not sure if that and this issue are related.

jaidevd avatar Jun 25 '18 18:06 jaidevd