We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 26
Southern Taiwan University
Department of Electrical Engineering
Two Wheels Self Balancing Robot
Professor : Chi-Jo Wang
Student’s name : Nguyen Van Binh
Student ID : MA02B203CONTENT
. Overview of two wheel balancing robot
. Dynamic model
. Implement
. Conclusion
1
2
3. PID controller
4
5.( Overview of two wheel balancing robot |
Two wheel balancing robot based on inverted pendulum model.
Inverted pendulum model is a complex nonlinear object. In recent
years there have been many projects about the application of inverted
pendulum principle to make two wheel self balancing robot.
L
Figure 1: JOE Figure 2: nBot Figure 3: Balance bot I ‘Figure 4: Balancing robot
8 )( Overview of two wheel balancing robot |
A robot that is capable of balancing upright on its two wheels is
known as a two wheeled balancing robot. The process of balancing is
typically referred to as stability control. The two wheels are situated
below the base and allow the robot chassis to maintain an upright
position by moving in the direction of tilt, either forward or
backward, in an attempt to keep the centre of the mass above the
wheel axles. The wheels also provide the locomotion thus allowing
the robot to transverse across various terrains and environments.Overview of two wheel balancing robot )
Some applications of two wheels balancing robot
rt
Figure 1.2 TOYOTA Rolling Robot Figure 1.3 Segway i180 (2005)
eo )Overview of two wheel balancing robot
a
Top view
Robot
Chassis
Side view Front view
Figure 1.1 Views of the two wheeled balancing robotgf
Dynamic model
Two wheels balancing robot based on inverted pendulum dynamic
model. So, research about inverted pendulum dynamic model is
necessary in modeling robot . Consider inverted pendulum dynamic
model as following:
Figure 2.1 Inverted pendulum modela
Dynamic model
With
M: Weight ofvehicle [Kg] g: Acceleration of gravity [m/s"]
m : Weight of pendulum [Kg] x: Position of vehicle [m]
1: Lenght of pendulum [m] 9: Angle of the vertical pendulum [rad]
F : Force acting on vehiclefN]
O-I signals block diagram of model
2
FDynamic model
Suppose (xp; yp) is coordinate of m heavy at the top of the
pendulum, we have:
Xp=x+/sind 1]
Vp =1c0sé p2
Applying Newton's II law of motion in the x, we have:
a. 7 a&.
Mg 2 =F
ea
ps)Dynamic model
Change xp in [2-1] into [2-3], we have:
went ( +1sin@)=F
il 24]
Implement calculating from [2-4]
(M +m)x-mi(sin 6)6° +mi(cos6)6 = F ee
Applying Newton's II Law for rotation of the pendulum around axis
it ee i" ein aan
i 24Dynamic model
From [2-1], [2-2], [2-6] we have:
m+ (x+1sin8) 1c0s6-| m4 (1e0s6) Vsind = mglsind
dt" dt
Implement calculating from [2-7]
m¥cos@ + ml6 = mg sind
From [2-5] and [2-8] easy to have:
ge F+ml(sina)@? - mg cos@sin@
6
M +m-m(cos6)
5 F cos@-(M +m)g(sin 6) + ml(cos@sin 0)6"
ml(cos@)* —(M +m)I
27]
2-8]
2-9]
[2-10]
myDynamic model
Suppose F=u _
Set x)= 6,8,.x,x Jt: state-space, we have:
nd)
%(0)| | weosx, -(M +m)g(sin x,) + ml(cos x, sin x,)x?
0) a ml(cos x,)° —(M +m)l PA)
x(t) X4(t)
x, (0) u +m (sin x,)x? — mg cos x, sin x,
a a M +m-m(cosx,)*
fO
a(t)| [x (¢) 2-12)
th= =
0 [vol ol
—o
mnDynamic model
Balance point at the vertical position: (x,u) = (0.0)
Linear around at the balance point:
X(t) = AX (1) + Bale)
F(t) = CRO) + Dar)
With:
RA HK
& ey
aL &,
4 & &
arlen | K
&
HH
oxy, ex,
Ht.
Ox,
Hy
x,
He
Oxy
a
&,
(0,0)
cooo
[2-13]
oroogis
Dynamic model
A
e| [2
jan | [30 pag
iam |B 0
” i
eu =
Hs M
ou J0,0)
ai) OR, Ole, Oh
_|@& @& &, &,| _[1 0 0 0 my
cc) | Oh Oh Oh, hy oo10
Oy) Oy Oy ley
ay
_| ou -(*) p16
len | In 0
ou SemPID Controller
PID is “Proportional, Integral, and derivative”. PID is the three-
term controller.
PID controller based on a feedback control method.
y
Figure 3.1 PID controller block diagramPID Controller
Process is a controlled object. The purpose of control is to
make the output y (PV) followed r set point (set point-SP). To
do this, the controller will get the error between output signal
and input signal and then through the stages of control to make
control signals accordingly, to minimize this error.
A proportional controller (Kp) will have the effect of
reducing the rise time and will reduce ,but never eliminate, the
steady-state error. An integral control (Ki) will have the effect of
eliminating the steady-state error, but it may make the transient
response worse. A derivative control (Kd) will have the effect of
increasing the stability of the system, reducing the overshoot,
and improving the transient responsePID Controller
1. Proportional control
Proportional control generate the changes of output. This
change is proportional to the bias current value. Response of
Proportional control can be adjusted multiplying the difference
signal with Kp.
Pou = K,.e(t)
with Kp is Gain
e is error = SP-PV
t is current timePID Controller
raitee cpr
= e205
Kp=2
1
\
as
9
re)
Figure 3.1 PV with 3 value Kp
With larger Kp value is easy to adjust error. However, the system
lost stability. Kp is too small then the system will react very slowly
with the input errorPID Controller
2. Integral control
The value adjusted at Integral control is proportional with bias
in a period of time. It is total of bias. This signal are then
multiplied by the integral gain Ki and taken to adjust output
q
1,,=K, fe@ar
With I. is the integral of output
Ki is Gain of the integral
eis error = SP-PV
t is current timePID Controller
Kia?
Nupet Kiet kd=t
Figure 3.2 PV with 3 value K,
Integral control in PID controller increase process to output close
SP value and eliminate setting error of proportional control.
However, Integral control added up all bias in stages before, so It is
cause of overshoot.( PID Controller
3. Derivative control
Derivative control will determine the rate of change of error.
d
Daz =Kz anew
With D..: is the derivative of output
Kd is Gain of the derivative
e is error = SP-PV
tis current timePID Controller
ka=0s
Skpet Kiet Kent
Figure 3.3 PV with 3 value Ka
Integral control in PID controller increase process to output close
SP value and eliminate setting error of proportional control.
However, Integral control added up all bias in stages before, so It is
cause of overshoot.° Impl t
PINSV Gyro | Accelerometer
Source Microcontroller |, IR Receiver
Sv ATMEGA32
| ae PIN 9Vx2
Left wheel Right whee!
motor motor
e Figure 4.1 Block Diagram two wheel balancing robotConclusions
This project was successful in achieving its aims to
balance a two-wheeled autonomous robot based on the
inverted pendulum model.
The Kalman filter has been successfully implemented.
The gyroscope drift was effectively eliminated allowing
for an accurate estimate of the tilt angle and its derivative
for the robot.
More research is needed to investigate the effects of
linearising the dynamics of the system mode to improve
the stability and robustness of the robot. An attempt to
control the system using nonlinear methods is highly
recommended for future researchReferences
[1] Anderson, DP, 2007, nBot Balancing Robot, viewed 20 Th March 2008,
[2] Andrade-Cetto, J & Sanfeliu, A 2006, Environment Learning for Indoor Mobile
Robots, Springer, New York.
[3] Angeles, J 2007, Fundamentals of Robotic Mechanical Systems, Springer, New York.
[4] Banks, D 2006, Microengineering MEMs and Interfacing, Taylor & Francis, London.
[5] Bates, Hellebuyck, Ibrahim, Jasio, D, Morton, Smith, D, Smith, J & Wilmshurst
2008, PIC Microcontroller, Elsevier Inc, New York.
[6] Bergren, C 2003, Anatomy of a Robot, McGraw-Hill, Sydney.
[7] Bishop, R 2002, The Mechatronics Handbook, CRC Press, London.
[8] Bishop, R 2006, Mechatronics - An Introduction, Taylor & Francis, London.
[9] Bokor, J, Hangos, K & Szederkenyi, G 2004, Analysis & Control of Nonlinear
Process Systems, Springer, New York.
[10] Braunl, T 2006, Embedded Robotics, Springer, Perth.Thank you for your attention