Professional Documents
Culture Documents
Ghanbari 2015
Ghanbari 2015
Ghanbari 2015
fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JSEN.2014.2366874, IEEE Sensors Journal
IEEE SENSORS JOURNAL 1
Abstract—In this paper, the inaccuracies of the tilt sensor based paper, we focus on these types of systems. In these applica-
on MEMS (Micro Electro Mechanical Systems) accelerometer tions, the measurement of the angle is not trivial; hence sensors
and gyroscope during the process of the angle measurement such as gyroscope, tilt sensor or acceleration sensor are used
are considered and a new method is proposed to compensate
them, using data fusion of sensors. The tilt sensor has a constant instead of encoder. However, each of these sensors has some
delay and low bandwidth. In the gyroscope, drift phenomena disadvantages too. Thus, these sensors are seldom used alone.
makes some difficulties in the angle measurement. A model for Tilt sensor directly measure the angle with respect to its
the sensory system is developed and a modified Kalman filter vertical axis but it has some problems such as delay and
is proposed to compensate the delay of the tilt sensor using low bandwidth. Angle could be obtained by integrating the
the data fusion technique. A complementary filter is designed
to overcome the problem of low-bandwidth in the tilt sensor. gyroscope output; but in practice, due to the drift problem in
The overall proposed sensor fusion consists of a complementary gyroscope, the measured angle is far away from its actual value
filter as a pre-filter and a modified Kalman filter as a post-filter in a long time. Angle measurement in acceleration sensor is
to solve the problems of bandwidth and delay, respectively. The based on component of the vector of gravitational acceleration
experimental tests are performed to evaluate the effectiveness on axes of the sensor and use of trigonometric relations [10].
of the proposed sensor fusion scheme. In these experiments, the
accuracy in the tilt measurement is improved from 10◦ to 0.9◦ and For this reason, only in a quasi-static mode, exact angle can
15◦ to 0.6◦ in low-frequency tests, and from 18◦ to 0.8◦ in higher be obtained from the acceleration sensor. In the dynamic
frequency test. Also, the bandwidth of the tilt measurement is mode, the angle measurement from this sensor becomes highly
enhanced from 0.16 Hz (bandwidth of tilt sensor) to 6 Hz. The inaccurate, because of the influence of other accelerations in
results show proper performance of the proposed approach in addition to the gravity acceleration. In [11], data fusion of
the line of delay compensation and increment of the bandwidth.
acceleration sensor and gyroscope by Kalman filter are used
for measuring the angle of the pendulum. However, due to the
Index Terms—Tilt sensor, complementary filter, gyroscope, drawbacks of the acceleration sensor in measuring the angle,
Kalman filter, sensor fusion.
just small deviation of pendulum from the vertical axis (which
causes slow motion of pendulum) is investigated. Another
I. INTRODUCTION way for data fusion of gyroscope and acceleration is using a
complementary filter. Authors of [12] used this filter for linear
NGLE MEASUREMENTS are used in many applica-
A tions such as navigation systems, robotics, motion anal-
ysis, motion control, etc. [1]–[9]. Each of these applications
model identification of a robot. However, due to acceleration
sensor problem in measurement of angle, it cannot be used for
nonlinear model identification. In [3], authors used fusion of
require suitable sensor to measure the angle. Typical sensors tilt sensor and gyroscope with combination of a Kalman filter
for measurement of angle are encoders, acceleration sensor, tilt and complementary filter algorithms to control two wheeled
sensor and gyroscope. For applications in which axis of angle mobile inverted pendulum robot. In [4], for increasing the
measurement is connected to a fixed reference (for example bandwidth of tilt measurement, a combination of acceleration
ground), measurement of the angle with high precision can sensor, tilt sensor, and gyroscope is used. They modeled tilt
be achieved by means of an encoder [7]. However, in many sensor as a simple pendulum, obtained its transfer function,
applications, such as aerospace systems, mobile robot with and then used system identification methods to estimate the
inverted pendulum, navigation systems, etc, axis of the angle corresponding parameters. By using the transfer function as
measurement is not connected to a fixed reference. In this the tilt sensor’s dynamics and applying the Kalman filter
algorithm, they fused data of tilt sensor, acceleration sensor
Manuscript submitted December 01, 2013; revised April 04, 2014 and July
14, 2014; accepted October 17, 2014. and gyroscope to estimate the angle.
M. Ghanbari is an M.Sc. student in the School of ECE, University of In terms of time response and in a specific classification,
Tehran, Tehran, Iran. (e-mail: mi.ghanbari@ut.ac.ir) there are two types of tilt sensor. The first type is sluggish
M. J. Yazdanpanah is with the Control & Intelligent Processing Center
of Excellence (CIPCE) and Advanced Control Systems Laboratory (ACSL), and the second type has a delay. In this paper, the second
College of Engineering, School of ECE, University of Tehran, Tehran, Iran. type of tilt sensors is utilized. In [3] and [4], the first type
(e-mail: yazdan@ut.ac.ir) of tilt sensors is used. The second type of tilt sensors has a
Copyright (c) 2013 IEEE. Personal use of this material is permitted.
However, permission to use this material for any other purposes must be lower price compared to that of the first one. For example,
obtained from the IEEE by sending a request to pubs-permissions@ieee.org. we used CMPS10 tilt sensor which is cheaper than the tilt
1530−437X (c) 2013 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JSEN.2014.2366874, IEEE Sensors Journal
2 IEEE SENSORS JOURNAL
Fig. 2. CMPS-10 Tilt sensor [24] (left), Gyroscope [25] (middle) and Encoder
TABLE I
CHARACTERISTICS OF SENSORS
1530−437X (c) 2013 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JSEN.2014.2366874, IEEE Sensors Journal
GHANBARI AND YAZDANPANAH: DELAY COMPENSATION OF TILT SENSORS BASED ON MEMS ACCELEROMETER USING DATA FUSION TECHNIQUE 3
50
20 Encoder Signal
Tilt Sensor Signal Encoder Signal
40
Integration from Gyroscope Signal
15 30
20
10
Angle (deg)
Angle (deg)
10
5
0
0 −10
−20
−5
−30
−10 −40
0 0.5 1 1.5 2 2.5 3 3.5 4 0 5 10 15 20 25 30 35 40
Time (sec) Time (sec)
Fig. 3. Angle measured by encoder and tilt sensor to demonstrate delay and Fig. 4. Angle measured by encoder and gyroscope to demonstrate the drift
low bandwidth of the tilt sensor phenomena
output. However, in practice, this is not possible because input and output. We consider a linear time invariant discrete
of the drift phenomenon and the accumulation of numerical system with zero-delay measurement in the state space form
integration errors incurred in obtaining the angle from angular as follows:
rate. In practice, output of gyroscope has a bias in addition to
its actual angular velocity, as stated below: xk = F xk−1 + Guk−1 + wk−1 (3)
yk = Hxk + vk (4)
ωgyro = ωactual + b (1)
where x ∈ Rn is the state, u(t) ∈ Rm is the input, y(t) ∈ Rp
where ωactual and ωgyro are actual angular rate and angular
is the measurement, wk ∼ N (0, Qk ) is process noise, vk ∼
rate measured from gyroscope, respectively. The gyroscope
N (0, Rk ) is the measurement noise and F, G, H are known
bias depends on several factors [26]. Two of the most impor-
matrices of appropriate dimensions.
tant factors are output of gyroscope in zero angular velocity
The optimal state estimator minimizing the variance of
and internal temperature of the device. The output signal of
the estimation error is Kalman filter. A derivation of the
gyroscope sensor is an analog voltage. The relation between
Kalman filter equations can be found in [27]. The equations
angular velocity corresponding to this output voltage is:
for estimation are summarized below:
V − Vω=0
ωgyro = (2) x̂− +
k = F x̂k−1 + G uk−1 (5)
scale f actor
Pk− = +
F Pk−1 F ⊤ + Qk−1 (6)
The scale factor and Vω=0 are given in the datasheet
of gyroscope. However, Vω=0 may slightly change during Kk = Pk H[H Pk− H ⊤ + Rk ]−1
−
(7)
operation of the sensor and over time which causes a bias in x̂+
k = x̂− −
k + Kk [yk − H x̂k ] (8)
Eq. (2). Due to this bias, integration from gyroscope does not Pk+ = [I − Kk H] Pk− (9)
lead to the actual angle and cause a drift term. To describe the
drift problem in the gyroscope, we performed an experiment where x̂− +
k is prior estimation, x̂k is posterior estimation,
− +
on the test apparatus which is shown in Fig. 4. As it is evident Pk is prior covariance, Pk is posterior covariance, Kk is
in the figure, due to drift phenomenon, angle measured from Kalman gain and Q and R are process and measurement noise
gyroscope deviates from its actual value over time. covariance matrices, respectively. The steps of the Kalman
The following part of the paper is devoted to this topic filter estimation depicted in Fig. 5, which consists of two
which resolves the problems of delay and bandwidth of the parts: prediction and correction. As can be seen, using Kalman
tilt sensor by designing appropriate filters for data fusion of filter requires a model of the system. Consequently, in the next
the tilt sensor and gyroscope. subsection a model for this system will be developed.
IV. FILTER DESIGN FOR COMPENSATION OF DELAY A. Modeling of the Sensory System
As investigated in the previous section, one of the major The first equation for modeling the sensory system is the
problems of tilt sensor in the measurement of the angle is angular momentum equation:
existence of a constant delay in its response. In this section,
we design a suitable filter in order to combine data of the θ̇ = ω = ωgyro + b (10)
tilt sensor and gyroscope to remove the effect of delay in the As previously mentioned, bias of the gyroscope depends
output of this filter. on several factors such as output in zero angular velocity
One of the common and well known algorithms in sensor and internal temperature of the device. In [26], the relatively
fusion is Kalman filter. A Kalman filter is a stochastic recursive accurate model of gyroscope was investigated. The relatively
estimator, which estimates the state of a system based on accurate model for bias of gyroscope is as follows:
the knowledge of the system input, the measurement of the
system output, and a model of the relation between the b = bb + bR + bm (11)
1530−437X (c) 2013 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JSEN.2014.2366874, IEEE Sensors Journal
4 IEEE SENSORS JOURNAL
1530−437X (c) 2013 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JSEN.2014.2366874, IEEE Sensors Journal
GHANBARI AND YAZDANPANAH: DELAY COMPENSATION OF TILT SENSORS BASED ON MEMS ACCELEROMETER USING DATA FUSION TECHNIQUE 5
1530−437X (c) 2013 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JSEN.2014.2366874, IEEE Sensors Journal
6 IEEE SENSORS JOURNAL
1530−437X (c) 2013 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JSEN.2014.2366874, IEEE Sensors Journal
GHANBARI AND YAZDANPANAH: DELAY COMPENSATION OF TILT SENSORS BASED ON MEMS ACCELEROMETER USING DATA FUSION TECHNIQUE 7
80
80 Signal of Tilt Sensor Signal of Tilt Sensor
Integration of Gyroscope Signal Integration of Gyroscope Signal
60
Signal of Encoder Signal of Encoder
60 Estimated Angle by the Proposed Sensor Fusion Estimated Angle by the Proposed Sensor Fusion
40
40
Angle (deg)
Angle (deg)
20
20
0
0
−20
−20
−40
−40
−60
0 0.5 1 1.5 2 0 1 2 3 4 5
Time (sec) Time (sec)
Fig. 11. Angle measured by the encoder, tilt sensor and gyroscope, and Fig. 12. Angle measured by the encoder, tilt sensor and gyroscope, and
estimation angle in one direction test estimated angle in swinging mode test
RMS of the tilt error maximal tilt error RMS of the tilt error maximal tilt error
before applying before applying
5.51◦ 10◦ 12.25◦ 15◦
the proposed method the proposed method
after applying after applying
1.1◦ 0.9◦ 1.3◦ 0.6◦
the proposed method the proposed method
the test apparatus which consist of low frequency and higher the proposed method”, we mean the error existing in the tilt
frequency movement. sensor signal. The effectiveness of the proposed method is
investigated based on RMS (Root Mean Square) and maximum
A. Low Frequency Test of error criterions. As can be seen from these tables, the
proposed sensor fusion reduces the error of tilt measurement
In this subsection, the proposed sensor fusion algorithm is
with a high ratio.
investigated in order to compensate delay. We test a slow mo-
tion on the pendulum of the experimental setup. Then with the
proposed sensor fusion, implemented on the microcontroller, VII. CONCLUSION
data filtering of the tilt sensor and gyroscope is done. Two In this paper, a new method for combining data from the
experiments have been done on the test apparatus. One in tilt sensor and gyroscope to produce an accurate angle in
single direction and the other in a swinging mode. The data the presence of the difficulties such as the delay and low
of the tilt sensor, encoder, gyroscope and estimated angle by bandwidth of the tilt sensor was presented. First, we modeled
the proposed sensor fusion are shown in Figs. 11, 12. As seen our sensory system as a linear time invariant state space
in this figure, angle measured from gyroscope (by integration) system. A modified Kalman filter algorithm was proposed to
has a drift and in the high frequency motions, the accuracy of compensate for the delay of the tilt sensor. To overcome the
the tilt sensor is decreased. As it can be seen from Figs. 11, problem of bandwidth in the tilt sensor, a complementary filter
12, the proposed sensor fusion is able to compensate the delay was designed. As verified in the experiments, the proposed
appropriately and can estimate the angle with a high accuracy. sensor fusion is able to reduce the maximum error of the
tilt measurement from 10◦ to 0.9◦ and 15◦ to 0.6◦ in low-
B. Higher Frequency Test frequency tests, and from 18◦ to 0.8◦ in higher frequency.
Also, it was shown that the bandwidth of the tilt measurement
In the next experimental test, the effectiveness of the pro-
can be enhanced from 0.16 Hz (bandwidth of the tilt sensor)
posed sensor fusion in order to increase bandwidth of the
to 6 Hz. Since the complementary filter uses the data of
output of the tilt sensor is investigated. For this purpose,
the gyroscope in the range of high frequency, the bandwidth
the fast motion on the pendulum of the experimental setup
of the tilt measurement is limited by the cutoff frequency
is performed. The data of the tilt sensor, encoder, gyroscope
and also maximum measurable angular rate of the gyroscope.
and estimated angle by the proposed sensor fusion are shown
Therefore, by the proposed sensor fusion method to achieve
in Figs. 13. As seen in this figure, angle measured from
higher frequency range in the tilt measurement, a gyroscope
gyroscope (by integration) has a drift and in the high frequency
with a higher bandwidth and higher maximum measurable rate
motions, the accuracy of the tilt sensor is decreased. In the
must be used.
meantime, the angle estimated by the proposed sensor fusion
has a proper accuracy in the higher frequency region. In order
to investigate the quantitative specifications of the tilt error ACKNOWLEDGMENT
before and after applying the proposed sensor fusion, tables The authors would like to thank the anonymous reviewer
II, III and IV may be considered. By the error “before applying for his/her valuable comments and suggestions that improved
1530−437X (c) 2013 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JSEN.2014.2366874, IEEE Sensors Journal
8 IEEE SENSORS JOURNAL
−50
Signal of Encoder attitude estimation,” in Proc. IEEE IFAC, 2014, pp. 7585–7591.
Estimated Angle by the Proposed Sensor Fusion
[18] I. Prayudi and D. Kim, “Design and implementation of imu-based human
−60 arm motion capture system,” in Proc. IEEE ICMA, 2012, pp. 670–675.
0 0.5 1 1.5 2 2.5 3
Time (sec) [19] S. Chen, C. Ding, Y. Han, and Y. Chen, “Study on information fusion
algorithm for the miniature ahrs,” in Proc. IEEE IHMSC, 2012, pp.
Fig. 13. Angle measured by the encoder, tilt sensor, gyroscope and estimated 114–117.
angle (higher frequency test) [20] B. Strah and S. Rinderknecht, “High dynamics tilt estimation using
simple observer,” in Proc. IEEE EUROCON, 2013, pp. 1964–1971.
TABLE IV [21] A. Tayebi, S. Mcgilvary, A. Roberts, and M. Moallem, “Attitude
QUANTITATIVE SPECIFICATIONS OF THE TILT ERROR IN HIGHER estimation and stabilization of a rigid body using low-cost sensors,”
FREQUENCY TEST in 46th Proc. IEEE CDC, New Orleans, USA, 2007.
[22] H. Rehbinder and X. Hu, “Nonlinear state estimation for rigid-body
motion with low-pass sensors,” SYST CONTROL LETT, vol. 40, pp.
RMS of the tilt error maximal tilt error
183–190, jan 2000.
before applying
6.92◦ 18◦ [23] H. L. Alexander, “State estimation for distributed systems with sensing
the proposed method delay,” in Proc. IEEE SPIE. Data Structures and Target Classification,
after applying
0.68◦ 0.8◦ 1991.
the proposed method
[24] (2013) Devantech CMPS10 Tilt sensor datasheet. [Online]. Avail-
able:http://www.pishrobot.com/files/products/datasheets/cmps10.pdf.
[25] (2013) Sparkfun Electronics MLX90609 gyroscope datasheet. [Online].
Available:https://www.sparkfun.com/datasheets/Sensors/MLX90609
the quality of this paper as well as members of Advanced datasheet.pdf.
Control Systems Lab of the University of Tehran for the [26] H. Sun, J. F, X. Yuan, and W. Tang, “Analysis of the kalman filter with
fruitful discussion on the subject. different ins error models for gps/ins integration in aerial remote sensing
applications,” ISPRS journal of Photogrammetry and Remote Sensing,
vol. 7, pp. 883–890, 2008.
R EFERENCES [27] D. Simon, Optimal State Estimation. Hoboken, New Jersey: John Wiley
& Sons, 2006.
[1] L. Vermeiren, A. Dequidt, T. M. Guerra, H. R. Tirmant, and M. Parent,
“Modeling, control and experimental verification on a two-wheeled
vehicle with free inclination: An urban transportation system,” Control.
Eng. Pract, vol. 19, pp. 744–756, 2011.
[2] S. C. Lin, C. C. Tsai, , and H. C. Huang, “Adaptive robust self-balancing
and steering of a two-wheeled human transportation vehicle,” J. Intell. Milad Ghanbari was born in Kermanshah, Iran,
Robot. Syst., vol. 62, pp. 103–123, 2011. in 1989. He received his B.Sc. degree in electrical
[3] H. Lee and S. Jung, “Balancing and navigation control of a mobile engineering from Shahed University, Tehran, Iran, in
inverted pendulum robot using sensor fusion of low cost sensors,” 2011, and M.Sc. degrees in control engineering from
Mechatronics, vol. 23, pp. 95–105, 2012. the University of Tehran, Tehran, Iran, in 2014 (with
[4] J. Leavitt, A. Sideris, and J. E. Bobrow, “High bandwidth tilt measure- high honors). His research interests include non-
ment using low-cost sensors,” IEEE/ASME Trans. Mechatronics, vol. 11, linear systems control, mechatronic, sensor fusion,
pp. 320–327, jun 2006. control of autonomous vehicles, real-time control
[5] U. X. Tan, K. C. Veluvolu, W. T. Latt, C. Y. Shee, C. N. Riviere, and and controller implementation.
W. T. Ang, “Estimation displacement of periodic motion with inertial
sensors,” IEEE Sensors J, vol. 8, pp. 1385–1388, aug 2008.
[6] J. Lim and D. Hong, “Cost reference particle filtering approach to high-
bandwidth tilt estimation,” IEEE Trans. Ind. Electron, vol. 57, pp. 3830–
3839, nov 2010.
[7] S. Jung, H. T. Cho, and T. C. Hsia, “Neural network control for position
tracking of a two-axis inverted pendulum system: Experimental studies,” M. J. Yazdanpanah received his B.Sc., M.Sc., and
IEEE Trans. Neural Netw, vol. 18, pp. 1042–1048, jul 2007. Ph.D. degrees all in Electrical Engineering from Isfa-
[8] J. H. M. Bergmann, S. A. Ivanova, I. Spulber, V. Gulati, P. Georgiou, han University of Technology, Isfahan, Iran in 1986,
and A. McGregor, “An attachable clothing sensor system for measuring University of Tehran, Tehran, Iran, in 1988, and
knee joint angles,” IEEE Sensors J, vol. 13, pp. 4090–4097, oct 2013. Concordia University, Montreal, Quebec, Canada in
[9] S. B. Lazarus, I. Ashokaraj, A. Tsourdos, R. Zbikowski, P. M. G. Silson, 1997, respectively. His Ph.D. thesis entitled “Control
N. Aouf, and B. A. White, “Vehicle localization using sensors data of flexible-link manipulators using nonlinear H∞
fusion via integration of covariance intersection and interval analysis,” techniques” was ranked outstanding. From 1986 to
IEEE Sensors J, vol. 7, pp. 1302–1314, sep 2007. 1992, he worked with the Engineering Research
[10] S. Luczak, W. Oleksiuk, and M. Bodnicki, “Sensing tilt with MEMS Center, Tehran, Iran, as an R&D engineer and cul-
accelerometers,” IEEE Sensors J, vol. 6, pp. 1669–1675, dec 2006. minating as the chairman of the System Design
[11] N. G. M. Thao, D. H. Nghia, and N. H. Phuc, “A pid backstepping Division. In 1998, he joined the School of Electrical and Computer Engi-
controller for two-wheeled self-balancing robot,” in Proc. IEEE IFOST, neering, University of Tehran, Tehran, Iran, where he is now a Professor,
2010, pp. 76–81. director of the Control & Intelligent Processing Center of Excellence (CIPCE)
[12] G. Y. Morales, S. A. Plazas, and L. F. Combita, “Implementation and and director of the Advanced Control Systems Laboratory (ACSL). Dr.
closed loop identification of a two wheeled inverted pendulum mobile Yazdanpanah’s research interests are in the areas of analysis and design of
robot,” in Proc. IEEE SBR-LARS, 2012, pp. 97–102. nonlinear/optimal/adaptive control systems, robotics, control on networks, and
[13] (2013) Rion-Tech HCA528T Tilt sensor datasheet. [Online]. Available: theoretical and practical aspects of neural networks.
http://www.rion-tech.us/newen/showproduct.asp?ID=60.
1530−437X (c) 2013 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.