You are on page 1of 26

Laboratory Report Part 2 Mechanical Vibration 2019-ME-104

Shuraim
VIBRATION MEASURMENT USING TRIAXIAL 2019-ME-104
ACCELEROMETER AND ANALYSIS IN MATLAB

0
Shuraim Laboratory Report Part 2 2019-ME-104

Table of Contents
VIBRATION MEASURMENT USING TRIAXIAL ACCELEROMETER AND
ANALYSIS IN MATLAB........................................................................................................0
Vibration Measurement using Triaxial Accelerometer and Analysis in MATLAB..................2
Abstract......................................................................................................................................2
Objective....................................................................................................................................2
Introduction................................................................................................................................2
Methodology..............................................................................................................................4
Results........................................................................................................................................4
MATLAB Mobile..................................................................................................................4
Trial 1.................................................................................................................................6
Trial 2.................................................................................................................................7
Trial 3.................................................................................................................................8
Physics Toolbox Sensor.........................................................................................................9
Trial 1...............................................................................................................................10
Trial 2...............................................................................................................................11
Trial 3...............................................................................................................................12
Phyphox Sensor....................................................................................................................13
Trial 1...............................................................................................................................15
Trial 2...............................................................................................................................16
Trial 3...............................................................................................................................17
Accelerometer Meter............................................................................................................17
Trial 1...............................................................................................................................18
Trial 2...............................................................................................................................20
Trial 3...............................................................................................................................21
Numerical Differentiation....................................................................................................22
Discussion................................................................................................................................23
Conclusions..............................................................................................................................24
References................................................................................................................................24

1
Shuraim Laboratory Report Part 2 2019-ME-104

Vibration Measurement using Triaxial Accelerometer and


Analysis in MATLAB
Abstract
In this laboratory report, vibration is measured with the help of mobile phone accelerometer
by manual hand movement along a 12-inch wooden ruler. Data is recorded for 5 complete
vibrations along the length of the ruler using four different mobile phone applications i.e.,
MATLAB Mobile App, Phyphox, Physics Toolbox and Accelerometer Meter. All the
readings have been recorded at a sampling rate of 100 Hz and data was saved in any suitable
format to be exported to MATALB for analysis. On MATLAB, data was detrended,
smoothed and numerically integrating to get velocity and displacement plots against time.
The plots obtained from MATLAB Mobile application have been found to be better than
other applications. This may be due to proper recording of data through this application and
good data acquisition through the app. Similarly, numerical differentiation is applied to data
for vibration of cantilever beam without mass. The plots of velocity and acceleration have
been plotted against time domain in this manner.

Objective
 To measure acceleration using mobile phone sensor through Android or IOS
Applications.
 To perform numerical integration for velocity and displacement.
 To perform numerical differentiation for velocity and acceleration.

Introduction
Vibration may be defined as a repetitive or oscillatory motion which occurs about some
equilibrium point. It is a mechanical phenomenon and may be periodic or random in nature
[1]. The motion of a pendulum about its mean position is an example of periodic vibration
while movement of a tire on a rough road result in production of random vibration. Vibration
may be desirable and undesirable depending upon its case. In some cases, like the motion of a
tuning folk, working of sieves, hoppers, washing machines, clocks, electric toothbrush etc.
vibration is quite desirable and these instruments work due to their vibratory motion [2].
However, vibration is undesirable in many cases such as transmission of vibration to human
body which can cause discomfort, creation of unnecessary sound and most importantly
occurrence of the phenomenon of resonance in machinery and structures which is extremely
detrimental for their stability [3].
Resonance is the phenomenon in which natural frequency of the vibration of a machine or a
structure match or coincides with the external excitation frequency. This results in large
amplitude vibration in the machine or structure which leads to excessive deflections and
failure. This phenomenon is termed as resonance. There are a number of examples present in
literature which depicts failure of systems due to excessive vibration and resonance [4]. So,
owing to the fact that vibration may be desirable or undesirable, it is extremely important to
measure vibration so that it’s effect can be studied for the safety of machinery and structures
and for the comfort of human being [5]. Vibration measurement can also help in determining
any fault or warning sign leading to a failure. It ultimately determines the durability and
reliability of machinery/structures, help in safety management, improving the quality of
products, research and development and much more.

2
Shuraim Laboratory Report Part 2 2019-ME-104

Since, measurement of vibration is extremely important, this task is done using different
devices. These include measurement of displacement through vibrometer, velocity through
velocity-meter or acceleration through accelerometer [6]. Any of these above-mentioned
variables can be measured in time-domain using vibrometer, velocity-meter or accelerometer
and other respective variables could be determined through numerical integration or
differentiation. Earlier, vibration measurement was most commonly done through the
measurement of displacement. However, nowadays accelerometers are more common world-
wide to measure vibration. Accelerometers are of different types depending upon the number
of directions along which vibration is measured. Usually uniaxial and triaxial accelerometers
are used which measure acceleration along one or three axes respectively. Since, there is not
much difference in accuracy of the both, uniaxial accelerometers are more commonly used in
industry due to their cheaper cost [7].
A commercially used uniaxial accelerometer is shown in Figure 1. The accelerometers
usually work by attaching it to a system where vibration is to be measured. The accelerometer
is connected to a data acquisition box which gathers data in time domain from the
accelerometer. The data acquisition box transmits the data to a computer where a data is
recorded and displayed on screen.

3-axis accelerometers are the other type of accelerometers available world-wide for
measurement of acceleration and ultimately help in studying vibrations [8]. These
accelerometers measure acceleration in 3-dimensions i.e., along x, y and z axis
simultaneously. These devices tend to provide better information about those vibrations
which occur in more than one direction. The accelerometers used in mobile-phones are 3-axis
accelerometers. There use in mobile phone devices is to help in screen rotation, measurement
of steps/distance travelled by device, and help in determining position of device.
Different mobile phone applications are commercially available in google play store or IOS
store to use accelerometers and gather data for vibration analysis. These applications can
record acceleration of the system using mobile phone in 3-axis and simultaneously display it
on screen [9]. The data can be recorded using these applications and exported to other devices
in different formats as per user’s ease and requirement. Some of the most common
applications include MATLAB Mobile App, Phyphox, Accelerometer Meter and Physics
Toolbox etc. All of these mobile applications possess a number of different features and uses
mobile sensors to record several types of readings. To measure acceleration, these mobile
applications use three-axis accelerometer of mobile phone to record acceleration in three
directions simultaneously. The accelerometer is attached to the chip of the mobile phone;
hence data is analyzed by the mobile phone as per sampling rate provided and the results are

3
Shuraim Laboratory Report Part 2 2019-ME-104

visually shown on screen, these mobile phone apps can record data for a specified period of
time and export it to different formats [10]. The most commonly used form of data is in excel
file format. In MATLAB Mobile app, data can be stored in mat format which is readable in
MATLAB. This format can be loaded in MATLAB and data can be acquired to plot graphs
for acceleration, velocity and displacement by numerical integration.
Numerical differentiation is the process of determining the derivative of a function by
numerical techniques. Several methods and formulae are available in literature to perform
numerical differentiation of a function. All of them have different type of usages and
accuracy accordingly. To find the derivative, the function is replaced by the best interpolating
polynomial and then differentiated as many times as desirable. The assigned value of x at
which derivative is desired determines the interpolation formula. Newton forward formula,
backward formula, Lagrange’s and Stirling formula are commonly used to solve for
numerical differentiation of functions [11].
In the similar manner, numerical integration is the process of finding definite integral from a
set of tabulated values of the integral function. This type of problem is solved by representing
the function by an interpolation formula as in case of numerical differentiation and then
integrating it between the given limits [12]. Numerical differentiation and integration are
performed with respect to time domain to get displacement, velocity and acceleration.
Numerical differentiation of displacement results in velocity whose differentiation gives
acceleration of the body. Revere is the case when acceleration is known and displacement is
to be evaluated. Acceleration is integrated twice with respect to time to get velocity and
displacement.

Methodology
In this experiment, vibration measurement is studied using triaxial accelerometers of mobile
phone using Android or IOS mobile applications. The data measurement is performed by
sliding the mobile phone along the length of 1-foot wooden scale. The device is slide for 5
complete vibrations along the length of the scale and the data is recorded in the mobile
application. This data was then exported either in excel, csv, mat or text file format to
MATLAB where different plots were plotted by analysing the data. Numerical differentiation
and integration commands are used in MATLAB to get displacement, velocity or acceleration
of the vibration. The data was finally used to determine the maximum displacement in each
cycle. This should be equal to or close to 30 cm which is the actual length of wooden scale.
The sampling rate is defined as the number of data points captured by a measurement device
in one second. For the acquisition of data using mobile phone, sampling rate was kept as 100
Hz which means that 100 data points were collected in every second [13]. More is the data
points; smoother will be the curve in plots. Higher samplings rate can determine minute
change in acceleration as more data points are being captured in every second.

Results

MATLAB Mobile
The plots for data taken from MATLAB Mobile application are shown in the figures below.

4
Shuraim Laboratory Report Part 2 2019-ME-104

Figure 1: Plot of Raw Data for MATLAB Mobile App

Figure 2: Detrended Data Plot for MATLAB Mobile App

5
Shuraim Laboratory Report Part 2 2019-ME-104

Figure 3: Smoothed Data Plot for MATLAB Mobile App

Trial 1

0.6

0.4

0.2
velocity

-0.2

-0.4

-0.6
0 2 4 6 8 10 12 14
time (s)
Figure 4: Velocity-Time Graph for MATLAB App - Trail 1

6
Shuraim Laboratory Report Part 2 2019-ME-104

0.35

0.3

0.25

0.2
displacement

0.15

0.1

0.05

-0.05
0 2 4 6 8 10 12 14
time (s)
Figure 5: Displacement-Time Graph for MATLAB App - Trail 1

Trial 2

Velocity along z
0.6

0.4

0.2

0
velocity

-0.2

-0.4

-0.6

-0.8
0 2 4 6 8 10 12 14
time (s)
Figure 6: Velocity-Time Graph for MATLAB App - Trail 2

7
Shuraim Laboratory Report Part 2 2019-ME-104

Dispacement along z
0.6

0.5

0.4
displacement

0.3

0.2

0.1

-0.1
0 2 4 6 8 10 12 14
time (S)
Figure 7: Displacement-Time Graph for MATLAB App - Trail 2

Trial 3

Velocity along z
0.8

0.6

0.4

0.2
velocity

-0.2

-0.4

-0.6

-0.8
0 2 4 6 8 10 12 14
time (s)
Figure 8: Velocity-Time Graph for MATLAB App - Trail 3

8
Shuraim Laboratory Report Part 2 2019-ME-104

Dispacement along z
0.5

0.4

0.3
displacement

0.2

0.1

-0.1
0 2 4 6 8 10 12 14
time (S)
Figure 9: Displacement-Time Graph for MATLAB App - Trail 3

Physics Toolbox Sensor


The plots for data taken from Physics Toolbox Sensor application are shown in the figures
below.

Figure 10: Raw Data Plot for Physics Toolbox Sensor

9
Shuraim Laboratory Report Part 2 2019-ME-104

Figure 11: Smooth Data Plot for Physics Toolbox Sensor

Trial 1

Figure 12: Velocity-Time Graph for Physics Toolbox Sensor - Trail 1

10
Shuraim Laboratory Report Part 2 2019-ME-104

Figure 13: Displacement-Time Graph for Physics Toolbox Sensor - Trail 1

Trial 2

Velocity along z
0.6

0.4

0.2
velocity

-0.2

-0.4

-0.6
0 2 4 6 8 10 12 14
time
Figure 14: Velocity-Time Graph for Physics Toolbox Sensor - Trail 2

11
Shuraim Laboratory Report Part 2 2019-ME-104

Dispacement along z
0.5

0.4

0.3
displacement

0.2

0.1

-0.1
0 2 4 6 8 10 12 14
time
Figure 15: Displacement-Time Graph for Physics Toolbox Sensor - Trail 2

Trial 3

0.6

0.4

0.2
velocity

-0.2

-0.4

-0.6
0 2 4 6 8 10 12 14
Time (s)
Figure 16: Velocity-Time Graph for Physics Toolbox Sensor - Trail 3

12
Shuraim Laboratory Report Part 2 2019-ME-104

0.45

0.4

0.35

0.3
displacement

0.25

0.2

0.15

0.1

0.05

-0.05
0 2 4 6 8 10 12 14
Time (s)
Figure 17: Displacement-Time Graph for Physics Toolbox Sensor - Trail 3

Phyphox Sensor
The plots of time domain data of acceleration with suitable smoothening and detrending for
Phyphox Sensor app are shown below.

Figure 18: Raw Data Plot for Phyphox Mobile Sensor

13
Shuraim Laboratory Report Part 2 2019-ME-104

Figure 19: Detrended Data Plot for Phyphox Mobile Sensor

Figure 20: Smooth Data Plot for Phyphox Mobile Sensor

14
Shuraim Laboratory Report Part 2 2019-ME-104

Trial 1

Figure 21: Velocity-Time Graph for Phyphox Mobile Sensor - Trail 1

Figure 22: Displacement-Time Graph for Phyphox Mobile Sensor - Trail 1

15
Shuraim Laboratory Report Part 2 2019-ME-104

Trial 2

Figure 23: Velocity-Time Graph for Phyphox Mobile Sensor - Trail 2

Figure 24: Displacement-Time Graph for Physics Toolbox Sensor - Trail 2

16
Shuraim Laboratory Report Part 2 2019-ME-104

Trial 3

Figure 25: Velocity-Time Graph for Phyphox Mobile Sensor - Trail 3

Figure 26: Displacement-Time Graph for Physics Toolbox Sensor - Trail 3

Accelerometer Meter
The plots for data from accelerometer meter application are shown in the figures below.

17
Shuraim Laboratory Report Part 2 2019-ME-104

Trial 1

Figure 27: Raw Data Plot for Accelerometer Meter App

Figure 28: Detrended Data Plot for Accelerometer Meter App

18
Shuraim Laboratory Report Part 2 2019-ME-104

Figure 29: Smooth Data Plot for Accelerometer Meter App

0.6

0.4

0.2

0
velocity

-0.2

-0.4

-0.6

-0.8
0 2 4 6 8 10 12 14
time (s)
Figure 30: Velocity-Time Graph for Accelerometer Meter App - Trail 1

19
Shuraim Laboratory Report Part 2 2019-ME-104

0.4

0.35

0.3

0.25
displacement

0.2

0.15

0.1

0.05

-0.05
0 2 4 6 8 10 12 14
time (s)
Figure 31: Displacement-Time Graph for Accelerometer Meter App - Trail 1

Trial 2

0.5

0.4

0.3

0.2

0.1
velocity

-0.1

-0.2

-0.3

-0.4

-0.5
0 5 10 15
Time (s)
Figure 32: Velocity-Time Graph for Accelerometer Meter App - Trail 2

20
Shuraim Laboratory Report Part 2 2019-ME-104

0.6

0.5

0.4
displacement

0.3

0.2

0.1

-0.1
0 5 10 15
Time (s)
Figure 33: Displacement-Time Graph for Accelerometer Meter App - Trail 2

Trial 3

0.6

0.4

0.2
velocity

-0.2

-0.4

-0.6
0 2 4 6 8 10 12 14
Time (s)
Figure 34: Velocity-Time Graph for Accelerometer Meter App - Trail 3

21
Shuraim Laboratory Report Part 2 2019-ME-104

0.45

0.4

0.35

0.3
displacement

0.25

0.2

0.15

0.1

0.05

-0.05
0 2 4 6 8 10 12 14
Time (s)
Figure 35: Displacement-Time Graph for Accelerometer Meter App - Trail 3

Numerical Differentiation
The plots of time domain data for vibration of cantilever beam without mass and respective
plots for velocity and acceleration obtained from numerical differentiation are shown in
Figure 36, 37 and 38 respectively.

Disp vs Time
15

10

5
Displacement(mm)

-5

-10

-15
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time(s)
Figure 36: Time Domain Plot for Cantilever Beam without Mass

22
Shuraim Laboratory Report Part 2 2019-ME-104

Velocity vs Time
1500

1000

500
Velocity (m/s)

-500

-1000

-1500
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time(s)
Figure 37: Velocity Domain Plot for Cantilever Beam without Mass

105 Acc vs Time


2.5

1.5

1
Acceleration(m/s 2 )

0.5

-0.5

-1

-1.5

-2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time(s)
Figure 38: Domain Plot for Cantilever Beam without Mass

Discussion
The plots for recorded raw data, detrended and smooth data has been shown in the previous
section. This data is then used to find velocity and displacement with respect to time by
numerical integration. It can be observed in the plots that the displacement plot is not so
smooth and doesn’t determine correct value of displacement. This is basically due to manual
motion of hand being not so smooth or uniform while taking the readings. It is also possible
that the hand moves faster while recording a few cycles as compared to the other cycles

23
Shuraim Laboratory Report Part 2 2019-ME-104

causing faulty readings. Four different mobile phone applications were used to record the
observations. All the mobile phone applications were set to record data at a sampling rate of
100 Hz. The data was then stored in any format and exported to MATLAB for analysis. The
data was smoothed using the smoothing function to remove any unwanted errors. Similarly,
detrending of data set the reference vertical axis to 0. After seeing all the plots, the plots of
data from MATALB Mobile app have been found to be better than other applications. This
may be due to good data recording through the app or due to accurate data recording by the
application. Other mobile phone applications are also good for recording the same type of
data however the difference could be in inappropriate way of recording the readings. The plot
of displacement vs time for vibration of cantilever beam without mass have been shown in
Figure 36. This data has been differentiated with respect to time to get velocity as shown in
Figure 37. The data is differentiated for the second time to get acceleration which is shown in
Figure 38.

Conclusions
After analysing different applications for measurement of acceleration using mobile phone
devices, the MATALB Mobile Application is found to be the best in terms of accuracy in
data acquisition, ease of use. The application has multiple functions and modes available for
user’s ease and can record data at varying sampling rates. The data is displayed on the screen
simultaneously and can be exported in various desirable formats. A comparison of all the
plots for 4 various applications was performed in this experiment. The experiment reveals
that the importance of vibration measurement is extremely helpful for the determination of
faults, imbalance or risk of any potential failure in machinery or structures. The amount of
maximum displacement caused by vibration can be easily determined by analysing data
gathered using mobile application on MATLAB. It can then be decided whether the vibration
is safe or unsafe for the system and ultimately helps to determine reliability and sustainability
of the system.

References
1. Rao, S.S., Mechanical vibrations. 2001.
2. Balachandran, B. and E.B. Magrab, Vibrations. 2018: Cambridge University Press.
3. Dukkipati, R.V. and J. Srinivas, Mechanical vibrations. 2010: Alpha Science
International.
4. Landa, P. and P.V. McClintock, Vibrational resonance. Journal of Physics A:
Mathematical and general, 2000. 33(45): p. L433.
5. Magrab, E.B., Vibrations of elastic systems: With applications to MEMS and NEMS.
Vol. 184. 2012: Springer Science & Business Media.
6. Buzdugan, G., E. Mihailescu, and M. Rades, Vibration measurement. Vol. 8. 1986:
Springer Science & Business Media.
7. Vanhelst, J., et al., Comparison of uniaxial and triaxial accelerometry in the
assessment of physical activity among adolescents under free-living conditions: the
HELENA study. BMC medical research methodology, 2012. 12: p. 1-6.
8. Li, R.-J., et al., Development of a high-sensitivity optical accelerometer for low-
frequency vibration measurement. Sensors, 2018. 18(9): p. 2910.

24
Shuraim Laboratory Report Part 2 2019-ME-104

9. Marquardt, P., et al. (sp) iphone: Decoding vibrations from nearby keyboards using
mobile phone accelerometers. in Proceedings of the 18th ACM conference on
Computer and communications security. 2011.
10. Landreani, F. and E.G. Caiani, Smartphone accelerometers for the detection of heart
rate. Expert review of medical devices, 2017. 14(12): p. 935-948.
11. Knowles, I. and R.J. Renka, Methods for numerical differentiation of noisy data.
Electron. J. Differ. Equ, 2014. 21: p. 235-246.
12. Dar, G., Numerical integration. 2020.
13. Small, S., et al., Impact of reduced sampling rate on accelerometer-based physical
activity monitoring and machine learning activity classification. Journal for the
Measurement of Physical Behaviour, 2021. 4(4): p. 298-310.

25

You might also like