Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views5 pages

Self Balancing Robot - 1

This paper presents a dynamic model and controller design for a two-wheeled self-balancing robot using Lagrange equations and a robust control algorithm. The authors establish a simplified model based on ideal assumptions and perform kinematic and dynamic analyses to ensure balance control. The simulation results demonstrate the feasibility of the proposed nonlinear control algorithm for achieving stability in the robot's movement.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Self Balancing Robot - 1

This paper presents a dynamic model and controller design for a two-wheeled self-balancing robot using Lagrange equations and a robust control algorithm. The authors establish a simplified model based on ideal assumptions and perform kinematic and dynamic analyses to ensure balance control. The simulation results demonstrate the feasibility of the proposed nonlinear control algorithm for achieving stability in the robot's movement.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Proceeding of the 11th World Congress on Intelligent Control and Automation

Shenyang, China, June 29 - July 4 2014

Two-Wheeled Self-balancing Robot Dynamic Model


and Controller Design
Yufeng Zhuang Zeyan Hu and Yi Yao
Automation School Automation School
Beijing University of Posts and Telecommunications, Beijing University of Posts and Telecommunications,
Beijing, China Beijing, China
zhuangyf @bupt.edu.cn [email protected]

Abstract - In this paper, we focus on the two-wheeled self- pendulum system[6]. They established the dynamic model on
balancing robot dynamic model and controller design. Establishing the slope according to the classical Newtonian
the dynamic model, through Lagrange equation of the generalized mechanics principle and used the robust control algorithm to
coordinates of the robot system. According to the partial feedback ensure the dynamic and steady state performance.
linearization principle, making the two free degree of the left and
In this paper, the centroid of the two-wheeled self-balancing
right wheel be linear. The pitch angle between the vertical shaft
and the centroid direction of the under-actuated robot is as the robot is on the axis of the two wheels. We established the
internal dynamic consideration. We design the nonlinear control dynamic model, through Lagrange equation of the generalized
algorithm of the robot balance movement and use the Matlab coordinates of the robot system. According to the partial
simulation to achieve the balance control of the two-wheeled self- feedback linearization principle, we design the nonlinear
balancing robot. control algorithm of the robot balance movement. Through the
Index Terms - Two-wheeled self-balancing. Partial feedback
simulation, the method is reasonable and feasible, which can
linearization. Under-actuated. Nonlinear control. Lagrange quickly and smoothly realize the robot balance control.
equation II. THE DYNAMIC MODEL OF THE TWO-WHEELED SELF-
BALANCING ROBOT
I. INTRODUCTION
In view of the above background, we need to simplify the
As everyone knows, the wheeled robot has
physical structure, in order to make the dynamic model of the
distinctly superior in the mobile robots. This kind of robots
two-wheeled self-balancing robot easily. This chapter mainly
can keep high moving speed in the flat environment with a
shows the ideal assumptions, kinematics analysis and
certain stability. The drive and control of the robots are easy
dynamics model of the robot and so on.
relative to other mobile robots. In recent years, it has become
A. The ideal assumptions
one of the important direction in robot research[1].
The assumptions of the two-wheeled self-balancing robot
The two-wheeled robots which can have a high
are as follows. The part that connects the two wheels can be
complexity as the control object, have been a typical example
regarded as a particle and the mass concentrate on the center
of the application of control theory, because of their simple
of mass. The left and right wheels can be regarded as circles
structures and low cost. The different control methods of the
and the centroid on the center of the circle.
two-wheeled self-balancing robots will be the
We assume that the mass of left wheel is m and it equals
important embodiment of the control ability of the system
the right wheel. The radius of the wheel is r . The distance
with unstable essence.
The existing two-wheeled self-balancing robots are between the two wheels is 2l . The intermediate part of the
generally modeled as the structure model of the inverted robot exclusive of the wheels is as a cylinder connected on the
pendulum. There are two kinds of robots, fixed centroid and central axis of the two wheels, the mass is m1 and the radius is
moving centroid, according to the robots have weight unit or r1 . Its centroid is on the central axis and the distance between
not. This paper is for the fixed one. A. Salerno and others from
it and the axis of the two wheels is h . After a disturbance, the
the McGill University proposed a concept of two -
robot will deviate from the vertical direction and the pitch
wheeled robot named “Quasimoro”. The centroid is placed
angle is β .The robot will turn around the central axis and the
below the wheel. They used LQR method to achieve the
robust control of the performances and the dynamic angle is θ . In order to keep balance, need to add torque M 1
uncertainties[2-3]. R. C. Ooi used the structure of the inverted on the left wheel and torque M 2 on the right wheel. The angle
pendulum , the fixed centroid method and the pole placement of the wheels are α1 and α 2 .
method to achieve the balance of the two-wheeled
robot[4].The Ubot from MIT University used the fixed In addition, the assumptions also include follows.
centroid and the inverted pendulum method similarly. It (1) The body of the robot and the wheels are rigid.
equipped with a camera and can obstacle avoidance[5]. (2) The geometric dimensions and mass of left and right
Xudong Duan and Henghua Wei from University of Science wheels are equal.
and Technology of China designed a two-wheeled inverted (3) The wheels always keep contact with ground. They are
pure rolling and do not slip during the movement. The

1935
978-1-4799-5825-2/14/$31.00 ©2014 IEEE
instantaneous speed of the landing places of the wheels is 1 2 1 v
zero. T1 =mv1 + J1 ( 1 ) 2 . (5)
2 2 r
(4) Neglect the gear clearance and sensor noise in actual The kinetic energy of the right wheel is
use.
1 1 v
(5) Neglect the inductance in the armature winding and T2 = mv22 + J 2 ( 2 )2 . (6)
the friction of the motor. Neglect the no-load torque and 2 2 r
assume that the motor output torque is the electromagnetic In addition, J1 = J 2 = mr 2 .
torque. Assume the centroid speed of the cylinder is v3 [7]. The
(6) Neglect the system internal energy loss. movement of the body is the rotation around the
(7) Neglect the moment of couple of the frictional
absolute instantaneous center of velocity O1 at the rate of v0
resistance and only consider the friction and friction torque.
B. The Kinematic analysis and the rotation around the central axis at the rate of hβ . The
moment of the inertia is J 3 . The angle of v0 and hβ is
Z
β .Then from the vector correlation we can get the following
equation.
v32 = v02 + ( h β ) 2 + 2v0 h β cos β (7)
Y
v0 The kinetic energy of the intermediate part is
1 1
T3 = m1v3 2 + J 3 β 2 . (8)
2 2
β 4
v1
We can know J 3 = m1h 2 .
α1 3
Above all, the total kinetic energy of the two wheeled
h robot is
v2 T = T1 + T2 + T3 . (9)
O1 θ After the simplification, we can get
X
m
L r α2 T = mr 2 (α12 + α 22 ) + 1 r 2 (α1 + α 2 ) 2 +
8 . (10)
1  7 2 2
m1rh(α1 + α 2 ) β cos β + m1h β
2 6
Take the ground as a reference surface. The total
Fig. 1 the kinematic analysis chart of the two-wheeled self-balancing potential energy of the robot is
robot. V = 2mgr + m1 g (h cos β + r ) . (11)
We assume that the centroid speed of the left wheel is v1 .
The movement of the left wheel is that the centroid turn C. The dynamics equation of the two- wheeled robot
around the central axis at the rate of rα1 . The moment of the Then we synthesize the total kinetic energy and potential
energy, and get the Lagrange operator of the system[8].
inertia is J1 .It rotates around its absolute instantaneous center
m1 2
of velocity O1 . L = mr 2 (α12 + α22 ) +
r (α1 + α2 )2
8
Similarly, we assume that the centroid speed of the right
1 7
wheel is v2 . The movement of the right wheel is that the + m1rh(α1 + α2 )β cos β + m1h2 β 2 (12)
centroid turn around the central axis at the rate of rα 2 . The 2 6
moment of the inertia is J 2 . It rotates around its absolute -2mgr - m1g(h cos β + r)
instantaneous center of velocity O1 . So, we can get the The second Lagrange equation is
d ∂L ∂L
following equations. Qi = ( ) − (i = 1, 2,3..., k ) . (13)
v1 = rα1 (1) dt ∂qi ∂qi
v2 = rα 2 (2) In the above equation, L = T − Ve , qi is the generalized
v1 + v2 coordinate and Qi is the corresponding generalized force.
v0 = (3) In this system, we choose the angle of the left wheel α1 ,the
2
v1 − v2 angle of the right wheel α 2 and the pitch angle β as the
θ = (4)
generalized coordinates. The left and right motors output
L
Among the above equation L = 2l . torque M 1 and M 2 are as the generalized forces.
The kinetic energy of the left wheel is

1936
Take the Lagrange operator into the Lagrange equation ⎡ 1 ⎤
2
and arrange the equation. ⎢ − 2 m1rhβ sin β ⎥
J (q)q + f (q, q )q + G(q) = τ (14) F1 = ⎢ ⎥ (20)
⎢ − 1 m rhβ 2 sin β ⎥
Among this equation, some unknown parts are as follows. ⎢⎣ 2 1 ⎥⎦
q T = [α1 , α 2 , β ] , τ T = [ M 1 , M 2 , 0] , F2 = −m1 gh sin β (21)
⎡ m1 2 m1 2 m1 ⎤ τ = [M1, M 2 ]
T
(22)
2
⎢ 2mr + 4 r r rh cos β ⎥
4 2
⎢ ⎥ ⎡m m1 ⎤
m1 2 m m1
J (q ) = ⎢ r 2mr 2 + 1 r 2 rh cos β ⎥ , M 21 = ⎢ 1 rh cos β rh cos β ⎥ ≠ 0 , we could get the
⎢ 4 4 2 ⎥ ⎣2 2 ⎦
⎢ ⎥
⎢ m1 rh cos β m1
rh cos β
7
m1h 2 ⎥ equation below.
⎢⎣ 2 2 3 ⎥⎦ Θ = − M −1 ( M Θ 
1 21 22 2 + F2 ) (23)
⎡ 1  ⎤ Take the equation (23) into the equation (15), we could
⎢0 0 − 2 m1rh β sin β ⎥ get
⎢ ⎥
1  −
(− M 11M 21−1 M 22 + M12 )Θ
f (q, q ) = ⎢0 0 − m1rh β sin β ⎥ , 2
. (24)
⎢ 2 ⎥
⎢ ⎥ M11 M 21−1 F2 + F1 = τ
⎢0 0 0 ⎥ Then apply the partial feedback linearization. Make Θ 2 be
⎣⎢ ⎦⎥  =υ .
linear and Θ 2
⎡ 0 ⎤
⎢ ⎥. The equation (24) would be
and G ( q ) = ⎢ 0 ⎥ τ = (−M 11M 21−1M 22 + M12 )υ
⎢⎣ − m1 gh sin β ⎥⎦ . (25)
− M11M 21−1 F2 + F1
The system model could be rearranged.
III. THE DESIGN OF BALANCE CONTROLLER FOR THE TWO-  = − M −1 ( M Θ 
WHEELED ROBOT
⎧Θ 1 21 22 2 + F2 )
⎪  =υ
⎨ Θ 2 (26)
According to the dynamic model, we establish the balance ⎪ T
controller for the two wheeled robot. The model is from the ⎩ y =[ Θ 1 Θ2 ]

generalized coordinates of the robot system through the


Take the Θ1 = [α1 , α 2 ] , Θ2 =β , equation (18), equation
Τ
Lagrange equation. The dynamic model contains drive system
and under-actuated system. According to the partial feedback (19) and equation (21) into the equation (26).
linearization principle, we make the two drive degrees of ⎡g 7h ⎤
freedom of the left and right wheels be linear. The pitch angle ⎢ r tan β − 3r cos β β ⎥
is as the internal dynamic of the system. Consequently, the  = ⎢
Θ ⎥ (27)
1
⎢g 7h ⎥
dynamic model could be rewritten into two subsystems[9]. ⎢r tan β − β
 ⎤ ⎡ F1 ⎤ ⎡τ ⎤ ⎣ 3r cos β ⎥⎦
⎡ M 11 M 12 ⎤ ⎡ Θ
⎢  ⎥ + ⎢ ⎥ = ⎢ ⎥ (15)
1
⎢M M ⎥ So, we could get in the system α1 = α 2 = α . Take the
⎣ 21 Θ
22 ⎦ ⎣ 2 ⎦ ⎣ F2 ⎦ ⎣ 0 ⎦
equation (16-22) into the equation (25), we could get
Θ1 is the drive part and Θ1 = [α1 , α 2 ] . Θ2 is the under-
Τ
M1 = M 2 = M .
actuated part and Θ2 =β . The equation (26) could be simplified as the follow
⎡ m1 2 m1 2 ⎤ equation.
2
⎢ 2mr + 4 r 4
r ⎥ ⎧ g 7h 
M 11 = ⎢ ⎥ (16) ⎪α = r tan β − 3r cos β β
⎢ m1 2 m
r 2mr 2 + 1 r 2 ⎥ ⎪⎪
⎣⎢ 4 4 ⎦⎥ ⎨ β = υ (28)
⎡ m1 ⎤ ⎪
⎪ y = [α β ]
T

⎢ 2 rh cos β ⎥
M 12 = ⎢ ⎥ (17) ⎪⎩
⎢ m1 rh cos β ⎥ Assume the expected value of the system is
⎢⎣ 2 ⎥⎦
y d =[ α d α d β d β d ]T . (29)
⎡m m1 ⎤ The ideal target of the system is the static equilibrium
M 21 = ⎢ 1 rh cos β rh cos β ⎥ (18)
⎣ 2 2 ⎦ position, [α d α d β d β d ]T = [0 0 0 0]T .
7 Then select the state variables as : x1 =α − α d ,
M 22 = m1h2 (19)
3
x2 =α − α d , x3 =β − β d , x4 =β − β d .

1937
The controlling quantity is we select the appropriate k1 , k2 , k3 , k4 . The
υ =β d − k1 x1 − k 2 x2 − k3 x3 − k 4 x4 . (30) characteristic equation is critical stable and the output of the
k1 , k2 , k3 and k4 are the parameters can be adjusted. system is stable.
The whole system can be written as V. THE SIMULATION ANALYSIS OF THE BALANCE
⎧ x = f ( x) + g ( x)υ CONTROLLER
⎨ . (31)
⎩ y = Cx Take the specific parameters in the TABLE 1. g=9.8m/s 2 .
The variables of the equation (31) are We used the Matlab Simulilnk to build the nonlinear systems
⎡ x2 ⎤ showed by the equation (26). The system block diagram is
⎡ x1 ⎤ ⎢ ⎥
⎢x ⎥ g shown as follows.
⎢ tan x ⎥
x = ⎢ ⎥ , f (x ) = ⎢
2
r
3
⎥,
⎢ x3 ⎥ ⎢ ⎥
⎢ ⎥ x
x ⎢ 4

⎣ 4⎦
⎣⎢ − k1 x1 − k2 x2 − k3 x3 − k4 x4 ⎦⎥
⎡ 0 ⎤
⎢ ⎥
⎢− 7h ⎥ ⎡1 0 0 0 ⎤
g(x) = ⎢ 3r cos x3 ⎥ , and C = ⎢ ⎥ . cos x3 ≠ 0
⎢ ⎥ ⎣0 0 1 0⎦
⎢ 0 ⎥
⎢⎣ 0 ⎥⎦ Fig. 2 The system block diagram of the two-wheeled self-balancing
robot.
IV. THE STABILITY ANALYSIS OF THE TWO-WHEELED Set the simulation time is 10s, the step is 0.005s. In order
ROBOT SYSTEM to adjust the system parameters quickly, we set the shaft with
In order to make the robot stable at the equilibrium a 5 degree angle in the initial state, that can reduce the
point, the closed-loop system should have the stability. The simulation time and show the simulation results. The initial
proofs are as follows. )
state is (α ,α ,β , β = ( 0, 0,0.0873,0 ) . With the set initial state,
The Jacobian matrix of the equation f ( x) , when the we choose the control parameters k1 =0.2 , k2 =0.32 , k3 =23 and
robot in the static equilibrium position is showed as the k 4 =10 for the equilibrium.
equation (32)
⎡ 0 1 0 0 ⎤ TABLE I
⎢ 0 0 w 0 ⎥⎥ THE PARAMETERS OF THE TWO-WHEELED SELF-BALANCING ROBOT
∂f ( x)
=⎢ (32) Na physical significance values
∂ ( x ) x=0, ⎢ 0 0 0 1 ⎥ me
⎢ ⎥
⎣ −k1 −k2 − k3 − k4 ⎦ m the mass of the wheel 4.73 kg
w = g r . The characteristic equation is m1 The mass of the intermediate 77.4 kg
4 3 2
D ( s ) = s + k 4 s + k3 s + wk 2 s + wk1 . (33) cylinder
According to the Hurwitz-Routh criterion[10], r The radius of the wheel 0.1 m
Routh decision table as follows. h the distance between the 0.366 m
centroid and the axis of the wheels
s4 1 k3 wk1
The Figure below is the simulation parameters curves
s3 k4 wk2 0 of the two-wheeled self-balancing robot motion control which
s2 b3 wk1 0 (34) from the set angle to the equilibrium position. From the figure,
s1 c3 0 0 we can see that after about 4S adjustment of the feedback
controller, the angle α and the pitch angle β converged to
s0 wk1 0 0
0.At the same time, the corresponding angular
k3 k4 − wk2 wk (k k − wk2 ) − wk1k4 velocity changed in a certain range, and eventually converged
b3 = , c3 = 2 3 4 . On the
k4 k3 k4 − wk2 to 0. In addition, the adjust torques of the two wheels
basis of the Routh criterion, conditions for the stability of the eventually stabilized for 0.
system is
⎧ k1 , k2 , k3 , k4 > 0

⎨ k3 k4 > wk2 . (35)
⎪ k (k k − wk ) > k k
⎩ 2 3 4 2 1 4

1938
10
0.15
8

0.1
6

Torque(N.m)
4
Angle(rad)

0.05 2

0
0
-2

-4
-0.05 0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10 Time(s)
Time(s)
e. the torque M
a. the pitch angle β
Fig. 5 The simulation parameters curves.

0.3 IV. CONCLUSION


0.2 Through the calculation and simulation analysis
above, we can see that the angle β and α become stable in a
Wvelocity(rad/s)

0.1
short time. The angular velocity of the β , α and the torque
0
M is in accordance with the physical significance .These also
-0.1 prove the dynamics model is correct. Therefore we have
-0.2
achieved the linearization of the two-wheeled self-balancing
robot nonlinear system. The designed controller is reasonable
0 1 2 3 4 5 6 7 8 9 10 and reliable. It can stabilize the robot faster and
Time(s) more smoothly and has laid a good foundation for the motion
b. the angular velocity of the pitch angle β control of the robot prototype .
3
REFERENCES
[1] F. Jifen, et al,“Controller Design of a Self-banlancing Two Wheeled
2 Mobile Robot, ” Development & Innovation of Machinery & Electrical
Products,vol.17, no.6, pp.75-77, 2004.
1
[2] A. Salerno and J. Angeles, “Design and Implementation of a
Angle(rad)

0
Quasiholonomic Mobile Robot,” in Proceedings of 2007 IEEE International
Conference on Robotics and Automation, Roma, , pp.2977-2983, 2007.
-1 [3] A. Salerno and J. Angeles, “A New Family of Two-Wheeled Mobile
Robots: Modeling and Controllability,” in Proceedings of IEEE Transactions
-2 on Robotics and Automation, vol. 23, no. 1, pp.169-173, 2007.
[4] R. C. Ooi, “Balancing a Two-Wheeled Autonomous Robot,” The
-3
0 1 2 3 4 5 6 7 8 9 10 Dissertation for Master Degree in the University of Western Australia, pp. 10-
Time(s) 15, 2003.
c. The angle of the wheels α [5] P. Deegan, et al, “Mobile Manipulators for Assisted Living in Residential
Settings,” Autonomous Robots, vol. 24, no. 2, pp.179-192, 2008.
6
[6] D. Xudong, W. Henghua and C. Xing , “Dual-wheel Cart-inverted
Pendulum System Based on DSP,” Control Engineering of China, vol. 11, no.
4
6, pp. 521-524, 2004.
[7] F. liyi, L. Haihong and Z. Fuhai, “Design and Kinematic Analysis of
Wvelocity(rad/s)

2
Anti- terrorism Robot With Wheel- tracked Variable Structure,” Machinery &
0 Electronics, no. 10, pp, 66-69, 2011.
[8] L. Tijun, “On Selecting Generalized Coordinates in Analytic Mechanics,”
-2
Journal of Changchun Normal University(Natural Science), no.4, pp.28-29,
2008.
-4
[9] D. Fuguo and L Yurong, “Consistency analysis of addition chains for
-6 several fast algorithms of modular exponentiation,” Computer Engineering
0 1 2 3 4 5 6 7 8 9 10
Time(s) and Applications, vol. 46, no. 36, 2010.
[10]R. C.Dorf and R. H.Bishop, Modern control system (Eighth Edition),
d. the angular velocity α Higher Education Press (HEP), pp. 250-257, 2001.06.

1939

You might also like