Path: news.mathworks.com!not-for-mail
From: "Bill " <ringoranger@gmail.com>
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$1@fred.mathworks.com>
References: <imlndk$8iu$1@fred.mathworks.com> <215e3543-3fab-4e1b-9c81-2e92ba8a8834@b22g2000prb.googlegroups.com>
Reply-To: "Bill " <ringoranger@gmail.com>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1301258945 26186 172.30.248.46 (27 Mar 2011 20:49:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 27 Mar 2011 20:49:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2718350
Xref: news.mathworks.com comp.soft-sys.matlab:718488

TideMan <mulgor@gmail.com> wrote in message <215e3543-3fab-4e1b-9c81-2e92ba8a8834@b22g2000prb.googlegroups.com>...
> On Mar 27, 10:56 am, "Bill " <ringoran...@gmail.com> 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.