Integrating accelerometer data in gs to get velocity data in IPS

조회 수: 20 (최근 30일)
Ronald Bednarczyk
Ronald Bednarczyk 2019년 3월 13일
I'm trying to figure out how to integrate accelerometer data measured in gs in order to get velocity in inches/second (IPS). I created a 100Hz 1g sine tone in a program called ME'scope (see first attachment). Within ME'scope I can click on "Integrate" and it will integrate that waveform (see second attachment). The 1g acceleration comes out to ~0.6IPS peak. This is confirmed by using the equation v = 61.4*G/f = 61.4*1/100 =0.614. I exported the 100Hz 1g data to an Excel file.
Using the following code I read in the Excel file. I convert the gs to in/sec^2 by multiplying by 386.09. I then run cumtrapz on it.
data_filename='100Hz Sine Tone.xlsx';
[Time,txt] = xlsread(datafilename,1,'A:A');
[Data_g,txt] = xlsread(datafilename,1,'B:B');
Data_insec = Data_g * 386.09;
Data_v_cum = cumtrapz(Time,Data_insec);
Attachment 3 is the read in data (Data_g).
Attachment 4 is the output of cumtrapz (Data_v_cum).
Since cumtrapz is cumulative I subtracted each proceeding value from the next one. Attachment 5 shows that output.
None of these give me the answer of a 0.6IPS sine tone.
Hoe can I integrate accelerometer time domain data?
  댓글 수: 1
Muhammad Anugrah Husen Aidilla
Muhammad Anugrah Husen Aidilla 2019년 8월 4일
편집: Muhammad Anugrah Husen Aidilla 2019년 8월 4일
Just to be clear, isn't that output (attachment 4) 0.6 + 0.6*sin ? If you don't want the constant you can just substract it by the mean of itself.
Oh, and I don't think that 'substracting each proceeding value from the next one' is needed, just cumtrapz is enough, it's how integration works.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by