Open Access Open Access  Restricted Access Subscription or Fee Access

A Kalman Filter based Sensor Fusion Technique for Balancing a 2-Wheel System

Vardhman J. Sheth, Prasheel V. Suryawanshi


The objective of the presented work is to design and
implement a sensor fusion algorithm using Kalman Filter for
balancing the system on 2-wheels. The system uses inertial sensors
such as 3-axis linear accelerometer and dual-axis gyroscope to
calculate the tilt for balancing. The estimation algorithm i.e. Kalman
filter continuously and recursively corrects the values obtained by
mathematical integration of the velocity, measured using gyroscope at
the rate of 20Hz. The correction is performed using the inclination
value obtained from accelerometer. This reduces the integration drift
that originates from errors in the angular velocity signal. In addition,
the gyroscope offset is continuously calibrated. The tilt estimated by
the Kalman filter is given to PID algorithm with a reference of 0
radian, to balance the system. The result shows the need of Kalman
filter to remove sensor noise. The control and filter algorithm are
implemented on Atmega32 microcontroller. This study reinforces the
significance of sensor fusion for optimum performance. The
conception presented in this paper will be of assistance in existing
applications and in new designs.


Accelerometer, Gyroscope, Kalman Filter, PID, 2-Wheel System

Full Text:



Sebastian Thrun, “Probabilistic Algorithms in Robotics”, April 2000

Salerno, A and Angeles, J, “Nonlinear Controllability of Quasiholonomic

Mobile Robot”, in Proc. IEEE ICRA, Taiwan, 2003.

R. C. Ooi, “Balancing a Two-Wheeled Autonomous Robot”, 2003,

(Retrieved January 18, 2009 from the World Wide


S. W. Nawawi, M. N. Ahmad, and J. H. S. Osman, “Real-Time Control of

a Two-Wheeled Inverted Pendulum Mobile Robot”, in International

Journal of Computer, Information, and Systems Science, and

Engineering, 2008.

Deepa S., Sivanandam S. and Sumathi S., “Introduction to Fuzzy Logic

using MATLAB”, Springer, New York, 2007.

D. D. Titterton and J. L. Weston, “Strapdown Inertial Navigation

Technology”, Stevenage, U.K., 1997.

Dabiel Roetenberg, Per J. Slycke, and Peter H. Veltink, “Ambulatory

Position and Orientation Tracking Fusing Magnetic and Inertial Sensing”,

in IEE Transactions on Biomedical Engineering, vol. 54, no. 5, May

Luinge and Veltnik, “Measuring orientation of human body segments

using miniature gyroscopes and accelerometers”, Netherlands.

Steven M. Kay, “Fundamentals of Statistical Signal Processing,

Estimation Theory”, pp. 125-140.

Kalman R. E., “A New Approach to Linear Filtering and Predictions

Problems”, in Transaction of the ASME-Journal of Basic Engineering,

pp. 35-45, March 1960.

Mohinder S. Grewal and Angus P. Andrews, “Kalman Filtering Theory

and Practice Using MATLAB”, 2nd Edition, pp. 114-130.

G. Welch and G. Bishop, “An Introduction to the Kalman Filter”, 2007,

(Retrieved February 16,2009 from World Wide Web: welch/kalman/kalmanIntro.html)

Chul Woo Kang, Young Min Yoo and Chan Gook Park, “Performance

Improve of Attitude Estimation Using Modified Euler Angle Based

Kalman Filter”, in Journal of Institute of Control, Robotics and Systems,

vol. 14, no. 9, September 2008.

Tzuu-Hseng S. Li, Yu-Te Su, Shao-Hsien Liu, Jhen-Jia Hu, and Ching-

Chang Chen, “Dynamic Balance Control for Biped Robot Walking Using

Sensor Fusion, Kalman Filter and Fuzzy Logic” in Proc. IEEE, 2011.

Karl J. Astrom and Tore Hagglund, “PID Controllers : Theory, Design

and Tuning”, 2nd Ed., Instrument Society of America, 1995.

Antonio Visioli, “Practical PID Control”, Advances in Industrial Control,

Springer-Verlag, 2006.

V. J. VanDoren, “PID: Still the One, Control Engineering”, October

, (Retrieved January 19, 2009 from the World Wide Web:

Neenu Thomas and P. Poongodi, “Position Control of DC Motor Using

Genetic Algorithm Based PID Controller”, in Proceedings of the World

Congress on Engineering , vol. II, London, 2009.

Aidan O’Dwyer, “Handbook of PI and PID Controller Tuning Rules”, 3rd

Ed., Imperial College Press, 2009.

Mr. Suryawanshi is a member of various professional societies like IEEE,

International Association of Engineers, Systems Society of India, Instrument

Society of India, Institution of Engineers, to name a few.



  • There are currently no refbacks.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.