# How do I measure max oscillation of building using accelerometer?

For my school project, I am trying to measure the effect of a mass damper by changing the length of the string (that carries the mass), my setup is similar to the following video: https://youtu.be/f1U4SAgy60c?t=4m4s

I am trying to find a relationship between the length of the string and the oscillation of the "building". But I don't know exactly what the guy in the video is trying to measure and if it is related to what I'm trying to do.

Is it possible to use an accelerometer to map the oscillation of the "building" and if so, is there a relationship between the accelerometer data and the displacement of the oscillation?

My aim is to find the maximum amplitude for different lengths of string, so does a larger amplitude from the accelerometer data correspond to a larger amplitude in the displacement time graph?

I am desperate for help as I would much rather use accelerometer data rather than use a ruler in the background to measure the displacement of the oscillation.

Thank you in advance!!!

• You should look at the relationship between distance, time and acceleration, any decent physics book or google can remind you of those. – Solar Mike Apr 20 '18 at 4:51

## 2 Answers

If you insist on using the accelerometer data, there are probably libraries, searching "accelerometer tool" (on the google play store returns several results that allow exporting of data etc), depending on your platform that do most of the maths for you. but seeing as acceleration is rate of change of velocity which in turn is rate of change of distance. you should be able to numerically integrate the the acceleration to get a value for displacement.

IMHO: At the end of the day though this sounds like a school/lab experiment and you are much more likely to get good results using the ruler.

The guy in the video actually used an accelerometer to measure the linear acceleration of the building. If you followed you noticed he did not pay any attention to the displacement. While comparing the different cases, he focused only in acceleration. Actually it is very common to measure acceleration while experimenting with vibrating objects. Since it is directly related to force, you may deduce useful information about possible mechanical failure and may also find standardizations dealing with allowed/recommended vibration levels of different devices (I realize you are not interested in those right now). You may also plot the results in both time and frequency domains to obtain natural frequencies, damping coefficients, time constants and similar nice and handy stuff.

I guess you would use MATLAB to manipulate the recorded data - in this case, all you have to do is to integrate the acceleration over time in order to get the velocity, and then integrate the velocity over time to have the displacement. You will easily find a lot of ready to use codes out there. If for some reason you are not able to find any, let us know and we will help.

• In MATLAB the command is as simple as v - cumsum(a) where a is the accelerometer output and v is the time series integration. There will need to be some sort of calibration to real units however. – Eric S Oct 16 '18 at 21:59
• Sorry should be v = cumsum(a). – Eric S Oct 16 '18 at 22:57