how to convert a accelerometer data to displacements
Show older comments
I have an accelerometer data which i have collected from gyroscope. I like to convert those acceleration to displacements as disturbances for calculating the dynamics of suspension. The problem is when i tried to convert the acceleration data to displacement by using two integrators in series the displacement data seems non realistic. In actual acceleration data i found there are decelerations as well but in displacement output i see all positive values. Please suggest me some techniques.......
4 Comments
Sean de Wolski
on 6 Oct 2011
How are you doing the double integration?
jawad
on 6 Oct 2011
Dr. Seis
on 7 Oct 2011
jawad, did the solution below help?
Mahshid karimi
on 2 Apr 2015
How we can do spotting any trends in FFT peaks as a "function" of water depth Using function command?
Accepted Answer
More Answers (1)
Fangjun Jiang
on 6 Oct 2011
0 votes
There is really no solution for this problem except that you need to check the quality of your accelerometer signal data. Is it noisy?
You can make up an ideal acceleration signal first and feed that signal to you double-integrator model to verify that you have everything right, for example, sample time, initial value, coefficient, etc.
14 Comments
Dr. Seis
on 6 Oct 2011
Not true. This conversion should be performed in the frequency domain, not the time domain. Will provide solution later.
Fangjun Jiang
on 6 Oct 2011
@Elige, Why does it have to do with frequency domain or time domain?
Sean de Wolski
on 6 Oct 2011
@Fangjun: I'm curious as well.
Sean de Wolski
on 6 Oct 2011
And why the value intuitively seems low for:
acc_time_data = 0:99;
jawad
on 6 Oct 2011
Dr. Seis
on 6 Oct 2011
acc_time_data should be acceleration amplitudes. For example, if the measured acceleration is a 1Hz sine wave:
dt = 0.01; % seconds per sample
N = 512; % number of samples
t = 0 : dt : (N-1)*dt; % in seconds
wave_freq = 1; % in Hertz
acc_time_data = sin(2*pi*wave_freq*t);
Fangjun Jiang
on 6 Oct 2011
You should assume any measurement has some kind of noise. The approach for you is to test your double-integrator with an ideal signal first.
jawad
on 6 Oct 2011
Sean de Wolski
on 6 Oct 2011
a free web hosting site somewhere. Make sure it's saves as .mat file, .txt file or .rtf file or we won't open it.
Fangjun Jiang
on 6 Oct 2011
That's not really necessary. If you don't have a clue what is the noise, we won't have any better idea. Again, test your algorithm first with an idea signal. It won't be that hard to prove this simple algorithm. Then, if the result from measured data doesn't seem right, you need to trace back to find out the quality of the measurement. Elige Grant's answer seems to be promising since he had lots of similar experience before. You could also test out that function first with an ideal signal and then test it out on your measured data.
Dr. Seis
on 6 Oct 2011
I'm working on getting the code to work for my sine wave now.
jawad
on 6 Oct 2011
Dr. Seis
on 6 Oct 2011
See my answer for corrected Matlab code.
Mohamed Sayed
on 3 Dec 2013
could you please re-share the uploaded file again with us, as i think the (4shared) link you are sharing is expired. thanks in advance.
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!