Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
inverse continuous wavelet transform issue

Subject: inverse continuous wavelet transform issue

From: Frank

Date: 20 Oct, 2011 22:21:52

Message: 1 of 3

I have a signal that is a combination of several different
frequencies. I want to try to isolate certain frequencies using
wavelet transforms. Here is an example of what I am trying to do...

>> dt = 1.0; %sample rate, 1 Hz
>> time = 0:2047;
>> f = scal2frq([50 100 200], 'morl'); %create pseudo-frequencies based on certain scales

create 3 different signals with the above frequencies...

>> x1 = sin(2*pi*t*f(1));
>> x2 = sin(2*pi*t*f(2);
>> x3 = sin(2*pi*t*f(3));
>> x = x1+x2+x3;

compute the fft-based continuous wavelet transform with scales from 1
to 300...

>> cw = cwtft(x, 'scales', 1:300);

Now, according to Mathworks doc (http://www.mathworks.com/products/
wavelet/demos.html?file=/products/demos/shipping/wavelet/
cwtftdemo.html), I can create an approximation to scale-localized
components. So I use icwtft to isolate scales that make up my example
signal and plot...

>> xrec = icwtft(cw, 'IdxSc', 50);
>> plot(t,x1,t,xrec);

The plot shows that the phasing is about right, so I know that I have
isolated that frequency. However, the amplitude are way off. I have to
same problem with the other two signals. It is important to me that I
reproduce the amplitudes also.

I know that the reconstruction is just an "approximation", but I
wouldn't expect it to be that far off. So am I doing something wrong
or using the wrong tool? If it's just an artifact of the process, is
there a way to fix it?

TIA,
Frank

Subject: inverse continuous wavelet transform issue

From: TideMan

Date: 21 Oct, 2011 02:05:37

Message: 2 of 3

On Oct 21, 11:21 am, Frank <fble...@yahoo.com> wrote:
> I have a signal that is a combination of several different
> frequencies. I want to try to isolate certain frequencies using
> wavelet transforms. Here is an example of what I am trying to do...
>
> >> dt = 1.0;   %sample rate, 1 Hz
> >> time = 0:2047;
> >> f = scal2frq([50 100 200], 'morl');  %create pseudo-frequencies based on certain scales
>
> create 3 different signals with the above frequencies...
>
> >> x1 = sin(2*pi*t*f(1));
> >> x2 = sin(2*pi*t*f(2);
> >> x3 = sin(2*pi*t*f(3));
> >> x = x1+x2+x3;
>
> compute the fft-based continuous wavelet transform with scales from 1
> to 300...
>
> >> cw = cwtft(x, 'scales', 1:300);
>
> Now, according to Mathworks doc (http://www.mathworks.com/products/
> wavelet/demos.html?file=/products/demos/shipping/wavelet/
> cwtftdemo.html), I can create an approximation to scale-localized
> components. So I use icwtft to isolate scales that make up my example
> signal and plot...
>
> >> xrec = icwtft(cw, 'IdxSc', 50);
> >> plot(t,x1,t,xrec);
>
> The plot shows that the phasing is about right, so I know that I have
> isolated that frequency. However, the amplitude are way off. I have to
> same problem with the other two signals. It is important to me that I
> reproduce the amplitudes also.
>
> I know that the reconstruction is just an "approximation", but I
> wouldn't expect it to be that far off. So am I doing something wrong
> or using the wrong tool? If it's just an artifact of the process, is
> there a way to fix it?
>
> TIA,
> Frank

But with continuous wavelets, you get a transform that is continuous
in freq, so you need to integrate over the range of freq of interest.
I suspect what you really want is orthogonal wavelet transform.

Subject: inverse continuous wavelet transform issue

From: Frank

Date: 21 Oct, 2011 03:57:19

Message: 3 of 3

> But with continuous wavelets, you get a transform that is continuous
> in freq, so you need to integrate over the range of freq of interest.
> I suspect what you really want is orthogonal wavelet transform.

Yes...I figured as much. But then I can't choose the exact scales I
want, and it's difficult to isolate the low frequencies due to
bandwidth, which I was trying to do with wave packets.

Thanks TideMan

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us