Thread Subject:
Processing accelerometer data

Subject: Processing accelerometer data

From: M.

Date: 28 May, 2012 09:36:06

Message: 1 of 7

Hi,

I have a matrix which contains 4 columns of data from an accelerometer. The data is read in from a .csv file. The first column in the matrix is the timestamp and columns 2,3 and 4 are the X,Y and Z values respectively.

I create a another matrix from the original imported data which is a selection of the original raw data.

I would like to filter the data in columns 3,4 and 5 as the accelerometer data is quite noisy. I believe an FIR filter would be appropriate for this type of data.

What is the best way to filter the data in the three columns?

I would also like to change the timestamp values in the second matrix so that the first value is 0 and the subsequent values are relative.

Thanks.

Subject: Processing accelerometer data

From: M.

Date: 28 May, 2012 15:03:05

Message: 2 of 7

"M." wrote in message <jpvgu6$a3o$1@newscl01ah.mathworks.com>...
> Hi,
>
> I have a matrix which contains 4 columns of data from an accelerometer. The data is read in from a .csv file. The first column in the matrix is the timestamp and columns 2,3 and 4 are the X,Y and Z values respectively.
>
> I create a another matrix from the original imported data which is a selection of the original raw data.
>
> I would like to filter the data in columns 3,4 and 5 as the accelerometer data is quite noisy. I believe an FIR filter would be appropriate for this type of data.
>
> What is the best way to filter the data in the three columns?
>
> I would also like to change the timestamp values in the second matrix so that the first value is 0 and the subsequent values are relative.
>
> Thanks.

Sorry, the third paragraph should read:

I would like to filter the data in columns 2,3 and 4...

Subject: Processing accelerometer data

From: TideMan

Date: 28 May, 2012 20:03:56

Message: 3 of 7

On Monday, May 28, 2012 9:36:06 PM UTC+12, M. wrote:
> Hi,
>
> I have a matrix which contains 4 columns of data from an accelerometer. The data is read in from a .csv file. The first column in the matrix is the timestamp and columns 2,3 and 4 are the X,Y and Z values respectively.
>
> I create a another matrix from the original imported data which is a selection of the original raw data.
>
> I would like to filter the data in columns 3,4 and 5 as the accelerometer data is quite noisy. I believe an FIR filter would be appropriate for this type of data.
>
> What is the best way to filter the data in the three columns?
>
> I would also like to change the timestamp values in the second matrix so that the first value is 0 and the subsequent values are relative.
>
> Thanks.

What do you plan to do with the acceleration data?
If you intend to integrate once or twice, then high-frequency noise is likely to be irrelevant, it's low-frequency noise that will be your problem.

As for changing the time stamps, you can just subtract the first time from all the others.

Subject: Processing accelerometer data

From: M.

Date: 28 May, 2012 23:13:06

Message: 4 of 7

TideMan <mulgor@gmail.com> wrote in message <3f5cabe4-5be5-467e-b91c-27dfffa3cefd@googlegroups.com>...
> On Monday, May 28, 2012 9:36:06 PM UTC+12, M. wrote:
> > Hi,
> >
> > I have a matrix which contains 4 columns of data from an accelerometer. The data is read in from a .csv file. The first column in the matrix is the timestamp and columns 2,3 and 4 are the X,Y and Z values respectively.
> >
> > I create a another matrix from the original imported data which is a selection of the original raw data.
> >
> > I would like to filter the data in columns 3,4 and 5 as the accelerometer data is quite noisy. I believe an FIR filter would be appropriate for this type of data.
> >
> > What is the best way to filter the data in the three columns?
> >
> > I would also like to change the timestamp values in the second matrix so that the first value is 0 and the subsequent values are relative.
> >
> > Thanks.
>
> What do you plan to do with the acceleration data?
> If you intend to integrate once or twice, then high-frequency noise is likely to be irrelevant, it's low-frequency noise that will be your problem.
>
> As for changing the time stamps, you can just subtract the first time from all the others.

Thanks for your reply TideMan. I have analysed the raw data from some of the files and as you say there does seem to be low-freqency noise as opposed to high-frequency. I think it was around 5 or 6Hz - would you expect that?

I want to use peak detection to characterise certain movements i.e. walking, jogging, up gentle inclines etc. Is using peak detection the best way? Should I FFT the data first which will hopefully take care of the noise too?

I was thinking the same thing about subtracting the first value from the other values this morning!

Subject: Processing accelerometer data

From: vbpaixao

Date: 29 May, 2012 13:25:34

Message: 5 of 7

On May 29, 12:13

Subject: Processing accelerometer data

From: M.

Date: 1 Jun, 2012 13:32:10

Message: 6 of 7

vbpaixao <vbpaixao@gmail.com> wrote in message <d43df195-e518-457a-b49f-62974e9e96eb@6g2000vbv.googlegroups.com>...
> On May 29, 12:13

?

Can anyone help with this...

Subject: Processing accelerometer data

From: Star Strider

Date: 1 Jun, 2012 21:28:18

Message: 7 of 7

"M." wrote in message <jqag8q$jpe$1@newscl01ah.mathworks.com>...
> vbpaixao <vbpaixao@gmail.com> wrote in message <d43df195-e518-457a-b49f-62974e9e96eb@6g2000vbv.googlegroups.com>...
> > On May 29, 12:13
>
> ?
>
> Can anyone help with this...

--------------------------------------------------------------------

I’ll give it a go ...

I don't know what your timestamp format is, but I suggest you import it in a format MATLAB recognises and can work with. Convert it to a MATLAB format if at all possible. That will make your data analysis immeasurably easier, especially if you want to use ‘datetick’ later.

In my experience, 5-6 Hz accelerometer noise is not likely to be physiological if you have reasonably healthy subjects. I suggest you see if it's correlated in all channels. This paper (http://www.extra.research.philips.com/hera/people/aarts/RMA_papers/aar09pu8.pdf) says they used a LPF with a 5 Hz cutoff, so perhaps their strategy is something for you to consider.

Parkinsonian (basal ganglia) and cerebellar tremors have frequencies in the region of 4-5 Hz and 3-4 Hz respectively (http://www.cmdg.org/TREMOR/tremor.htm). If your subjects have these disorders, it's likely not a good idea to filter out those frequencies, since activity could change their amplitude and that could be important for your study. (I'm guessing. I have absolutely no idea what you're doing.)

As for detecting specific activities, I suggest you ask a few healthy male and female friends who have absolutely no idea what your goal is to wear an accelermometer and do the activities you describe. Be sure to record their height, weight, gender, and anything else you consider important. That will give you some idea of what the accelerometer signals for those activities look like so you can determine the best way to process your signals.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
filter noisy data Simon 27 Sep, 2012 04:41:31
filter noisy data M. 28 May, 2012 05:39:06
accelerometer M. 28 May, 2012 05:39:06
rssFeed for this Thread

Contact us