From: TideMan <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: acceleration to displacement accelerometer data
Date: Mon, 26 Jul 2010 01:37:42 -0700 (PDT)
Lines: 38
Message-ID: <>
References: <hq8i78$j84$> <> 
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: 1280133462 18704 (26 Jul 2010 08:37:42 GMT)
NNTP-Posting-Date: Mon, 26 Jul 2010 08:37:42 +0000 (UTC)
Injection-Info:; posting-host=; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 
	Gecko/20100722 Firefox/3.6.8,gzip(gfe)
Xref: comp.soft-sys.matlab:656109

On Jul 26, 6:18 pm, "Johannes Korsawe"
<> wrote:
> Hello TideMan,
> I have some similar problem to solve and would like to test your idea of wavelet decomposition and integrating every part for itself. I have already found that a pure butterworth filter would not work for my data, as the drift is very near to the relevant data in a frequency domain measure.
> But i stick to the same question as Omio Abedin did: What parameters to use for the decomposition? I have not done that decomposition and transformations by now and would like to learn about it. My question(s):
> 1. Could you share some (pseudo-)code snippets on how to do the double time-integration in this wavelet-decomposed manner?
> 2. Or could you give some hints on what MATLAB commands to use, s.t. i can figure it out for myself.
> I willl be grateful for any help. Thank you in advance.
> Best Regards,
> Johannes

First of all, you need the wavelet toolbox.
Then you decompose your signal using wavedec. Don't get hung up on
which mother wavelet to use.  I use 'db5' for almost everything.
Decompose to the maximum level (determined from wmaxlev).
Now, you recompose the wavelet details individually using wrcoef.
And numerically integrate each one of them individually using cumtrapz
or whatever.
The wavelet details are orthogonal - prove this to yourself by
calculating their covariance - so can simply be added together, either
before or after integration.
You need to play with your data to find what works for you.
For my application, I discard all but a few details in the middle of
the range - the ones at low scale are noise I'm not interested in and
the ones at large scale are spurious instrument drift.