From: "Bill " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Integration with experimental data
Date: Sun, 27 Mar 2011 20:49:05 +0000 (UTC)
Organization: Iowa State University
Lines: 23
Message-ID: <imo7s1$pia$>
References: <imlndk$8iu$> <>
Reply-To: "Bill " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1301258945 26186 (27 Mar 2011 20:49:05 GMT)
NNTP-Posting-Date: Sun, 27 Mar 2011 20:49:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2718350
Xref: comp.soft-sys.matlab:718488

TideMan <> wrote in message <>...
> On Mar 27, 10:56 am, "Bill " <> wrote:
> > I have experimental acceleration data, A, and a corresponding time vector, t.  I would like to integrate this data so I can obtain a position vs time graph.
> >
> > How do I go about integrating this data without having a function?  Is it correct to use cumtrapz?
> >
> > i.e. will cumtrapz(t,A) provide me with velocity data?
> You need to high-pass filter to remove spurious low-frequency noise
> from your signal, otherwise it gets amplified and will dominate the
> result.  Dealing with this is much more important than worrying about
> whether you should use cumtrapz or whatever.  In fact, I just use
> cumsum.
> I've found that orthogonal wavelet decomposition is the best high-pass
> filter (if you have the wavelet toolbox), but there are others, like
> Butterworth.

We are mainly concerned with low frequencies, so we have a buttersworth low-pass filter with a cutoff frequency of 100Hz.  This cuts out quite a bit of the noise.

Our time data is equally spaced with each point being 0.0001 seconds after the last one.  We have 30,000 data points (acceleration) at a sampling frequency of 10kHz, so we have 3 seconds of data.

Using trapz provides us with only one number, I don't really understand that.  Using cumtrapz provides us with position, however the output isn't what we expected so it's hard for us to understand if the cumtrapz output is accurate.