Got Questions? Get Answers.
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:
Wavelet coefficients doubt

Subject: Wavelet coefficients doubt

From: palmar

Date: 5 Mar, 2010 11:21:19

Message: 1 of 3

My current work is about analyzing vibration is a signal from an
accelerometer in a moving vehicle. After some math operations we get a
signal that represents the vertical displacement of the vehicle versus
travel distance. No big deal.

We want to locate ithe intervals where excess vibration occurred, in a
certain frequency band (loose), and have applied Discrete Wavelet
Transform to that effect. Analyzing the coefficients in that frequency
band we can locate the intervals where the vibration was higher. The
thing seems to be working as planned, with actually pretty good and
motivating results.

Now come our doubts: why look at the coefficients (which time
resolution has been reduced, depending on the level you are) and not
reconstruct the signal corresponding to that coefficients, therefore
gaining the original time resolution and squaring it (to get energy,
likewise with the coefficients). So, the question is basically should
we reconstruct the signal and square it to get energy, or use the
wavelet coefficients which represent energy, anyway.

Thanks in advance for your input.

Palmar

Subject: Wavelet coefficients doubt

From: Wayne King

Date: 5 Mar, 2010 12:23:07

Message: 2 of 3

palmar <runge_kuta@hotmail.com> wrote in message <99843a13-703f-4848-bdc7-318e2184306f@33g2000yqj.googlegroups.com>...
> My current work is about analyzing vibration is a signal from an
> accelerometer in a moving vehicle. After some math operations we get a
> signal that represents the vertical displacement of the vehicle versus
> travel distance. No big deal.
>
> We want to locate ithe intervals where excess vibration occurred, in a
> certain frequency band (loose), and have applied Discrete Wavelet
> Transform to that effect. Analyzing the coefficients in that frequency
> band we can locate the intervals where the vibration was higher. The
> thing seems to be working as planned, with actually pretty good and
> motivating results.
>
> Now come our doubts: why look at the coefficients (which time
> resolution has been reduced, depending on the level you are) and not
> reconstruct the signal corresponding to that coefficients, therefore
> gaining the original time resolution and squaring it (to get energy,
> likewise with the coefficients). So, the question is basically should
> we reconstruct the signal and square it to get energy, or use the
> wavelet coefficients which represent energy, anyway.
>
> Thanks in advance for your input.
>
> Palmar

Hi Palmar, often people look at the proportion of the signal's energy represented by wavelet coefficients at a given scale. This gives you a picture of how the signal's energy is distributed across those scales and therefore gives a picture of what scales are most important. The energy is conserved in the decimated wavelet transform as you have indicated:

 reset(RandStream.getDefaultStream)
 x = randn(1024,1);
 [C,L] = wavedec(x,5,'haar');
norm(x,2)
norm(C,2)
% now look at the allocation of this energy by scale
[Ea,Ed] = wenergy(C,L)

The problem with interpreting the above in terms of what scales contributed most significantly is that the number of coefficients at each level are different so you need to scale it accordingly. Doing that you arrive at an estimate of the wavelet variance.

The nice thing about working with the wavelet coefficients and not reconstructing an approximation to the signal based on a given scale as you have indicated is that for many processes, the DWT is a decorrelating transform. In other words, while correlation may exist (and usually does) in the reconstructed waveform (even from a single branch), the DWT coefficients can be treated as uncorrelated random variables, which facilitates all sorts of statistical tests.

The other thing you can do is look at the estimating the wavelet variance by scale for the undecimated wavelet transform. Of course there you don't have the decorrelation property of the DWT, but you also don't have the problem with shift variance and the simple loss of coefficients as you go deeper in the transform. For an example, see the paper by Professor Percival at

http://faculty.washington.edu/dbp/PDFFILES/wavevar.pdf

Wayne

Subject: Wavelet coefficients doubt

From: palmar

Date: 5 Mar, 2010 16:30:50

Message: 3 of 3

Dear Wayne

Thank you for your reply.

As our project looks to locate, in the vehicle track path, the places
where excess vibration occurred I have to plot the energy of the
coefficients (their square) versus coefficient number (which I can
easily translate to distance, with lower resolution though). So the
balance of the coefficients variances in each scale versus signal
variance should not allows us to detect with accuracy the places where
vibration exceed certain values, will only tell you in which scales
the percentage of the total energy was higher, a too coarse result for
us. The energy (or power, depending on if you normalize or not)
versus distance has given us some nice results-- basically just
ploting the square of the normalized coefficients values. My doubts
were a bit along the line "should I plot the coefficients or the
reconstructed signal?". At the end of the day all we want is say"
excess vibration in this frequency band occurred from 2.5 to 3.3 km
in the track, and we are achieving that both ways, at least with the
present data. I have now come to the conclusion that, is the number
of the coefficients in a certain wavelet level that *set* the
resolution. Say, you are in a level where you get 128 coefficients,
but your signal has 1024 samples. If you invert the 128 coefficients
using the idwt you get a signal with 1024 samples, but actually you
did not gain any time resolution, this has been set to 64 by the
coefficients so your resolution is now 1024/64=64, which means your
time axis comes in chunks of 64 samples with the same variance and
that's it. So, it looks to me that you are correct that we ought to
use the coefficients.

I am actually using the wavelet packets, I did not mentioned it my
earlier post because I wanted to keep it simple with the basic dwt.

Regards

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