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

Segway

Development of Inverted Pendulum System MODELING AND CONTROLLER DESIGN

Uploaded by

Pepe Alba Juarez
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)
200 views5 pages

Segway

Development of Inverted Pendulum System MODELING AND CONTROLLER DESIGN

Uploaded by

Pepe Alba Juarez
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

Development of Inverted Pendulum System

at KMITL
Pittaya Pannil*, Aroosh Klaeoyotha*, Prapart Ukakimaparn*, Thanit Trisuwannawat*, Kitti Tirasesth*
and Noriyuki Kominet
Department of Instrumentation, Faculty of Engineering,
King Mongkut's Institute of Technology Ladkrabang (KMITL), Bangkok, 10520, Thailand
Tel: +66-2-3264203/-4, E-mail: [email protected]
tSchool of Information and Telecommunication Engineering
Tokai University, Hiratsuka, Kanagawa 259-1292 Japan
Tel: +81-463-581211, E-mail: [email protected]

Abstract- This paper presents the development of Inverted


Pendulum System at King Mongkut's Institute of Technology
Ladkrabang (KMITL), including the designing, construction
and control system design. The stabilizing of an unstable system

using this software, some parameters from system modeling


can be obtained. Fig. l(b) shows that the inverted pendulum
as the robot chassis of a two wheels robot. The system
consists of four parts: two DC motors with gearboxes

the quadratic derivatives of state variables term in the usual


standard performance index for Linear Quadratic Gaussian
optimal control as an extra weighting function to play the role in
swing suppressor is presented. Finally, a new Inverted Pendulum
System nearly SEGWAY function is shown in this paper.

A.

in optimal control scheme via state-space approach is applied.


The LQG controller design examples including the addition of

I. INTRODUCTION
Usually, the Inverted Pendulum System (IPS) is used to
verify the control system design for unstable systems [1]. In
recent years, there are some researches on IPS as TwoWheeled Balancing Robot [2]-[3], their work aim to design
the controller for stabilizing the inverted pendulum that pivot
to the standing of balancing robot. Recently, at the
Department of Instrumentation Engineering, KMITL has built
a Two-Wheeled Balancing Mobile Robot by undergraduate
students, the aim is not only to use as a research tool, but also
to utilize as an education tool [4, 5]. In [4], we proposed the
teaching of analog controller design for unstable system with
LQR, LQE and LQG control structure. In addition [5] still.
proposed the analog controller design by using method in [6].
The addition of the quadratic derivatives of state variables
term in the usual standard performance index for LQG
optimal control to dampening the angle of inverted pendulum
is described in this paper. Currently at KMITL, a new
Inverted Pendulum System can be developed as SEGWAY
application.
II.

Controller Unit

. .

The ter for


implementds on6a16-i
High-Performance Digital Signal Controllers (dsPIC30F6010).
thsye
Di

It's composed of 12-bit A/D converters and four PWM


modules for controlled the motor.
B. State Measurements
The CRS03 gyroscope mounted on the robot to measure the
states of angle and angular velocity when the robot movement.
This gyroscope is also provided a good performance under
vibration and temperature change. However, it is difficult to
get the initial angle of the robot chassis. So, the inclinometer
is installed on the robot to give the reference angle for the
system. Also, the current sensor is employed to obtain the
motor information used to calculate another state.

INVERTED PENDULUM SYSTEM IMPREMENTATION

A prototype of IPS as a

Two-Wheeled Balancing Mobile

Design Software before to make the parts and construction the


actual IPS. Therefore, almost of part must be translated
dimension to build in software as shown in Fig. 1(a). By

(a) SolidWorks

Fig. 1.

(b) Actual
The Inverted Pendulum System.

978-1-4244-2336-1/08/$25.00 2008 IEEE

389

The 16-bit
dPCOF00

microcontrolleAr-2km,ke(MPlr-Jp/~ ~MP12)
-42

with 12 bi

A/D converters and four

2
'

0 { ' J

,_5
_|

IdflvesbyMhe

FT

km,k,(r/83-Mpl)
~~~2A'43
~ ~~~~~42
A3

PM _2-MPlr)

ee

~~~~
a

821

gl/8

A4~2km ([ Rr2a

[Wirless control

2km (MPl-rr,)
Rr
~~~~~~~~~~~~~~~~~~~~~~Rrar
4b1
Rr

and

wmotor ith gearboxes ar

dietyculed to the wheelsopsesL


Fig. 2.

~~

M~gl2

-23

~~Rr 2 a

8i

2M,, + r2 +M ap,c= LIP8+2MI 2 M,

+ 2J

The structure of Inverted Pendulum System.


TABLE I

Motor Drives and Motion control Unit


The speed of each motor is controlled by PWM signal from
dsPIC3OF6010 through the 4Q (4 quadrant) drives by
MOSFET. The motion control of this robot is commanded
via wireless control unit (Futaba T9CAP) so that the
necessary radio receiver is stick on the robot.

C.

IV
a
km
ke
|/
r

NOMENCLATURE
Applied terminal voltage (V)
Torque constant (0.1837 N in/A)
Back EMF constant (0.287304 V sec/rad)
Mass of the robot's chassis (10.5 kg)
Distance between the centers of the wheel and the robot's centre

r0Iofgravity (0.07 1334 m)

Radius of the wheel ( 0.245 m)


Moment of inertia of the robot's chassis (0.025725 kg' M2)

Acceleration due to gravity on earth (9.81 m/s2)


Nominal terminal resistance (0.29 Q)
Mass of the wheel connected to the both sides of the robot
(1.5 kg)
Moment inertia of the wheels (0.04501875 kgmin2)

Controller Design
The problem is to design a controller so that when an
impulse input is given to the system, the Pendulum should be
displaced and eventually return to zero. Fig. 4 shows block
diagram of the closed-loop control system.

B.

Fig. 3.

A Two-Wheeled Balancing Mobile Robot shown in KtMITL


exhibition 2006.

III.

r(t)(

MODELING AND CONTROLLER DESIGN

Sate-Space Modeling
The state-space model of the prototype Inverted Pendulum
System at the Mechatronics Laboratory of the department can
be expressed in (1) and the list of variables and theirs+
magnitudes also [4].

A.

Fx1F

A22 A23

Ox

01A

B 21

11101 0

re

|~~~~~~~~~~l
l

2Is

40 C2

FI

y(t)

FO
0

K] Lo 28.3293
y

0L

xi

1
1.0103

0Hk

8.7872

175.9778 0
F

0
-0.8616

Fo C2D11 D21 1
L
i

From (1) and table I, the state and output equations


(A, B2, C2) can be rewritten as

The derivative state constrained optimal

1K2K()(s) forforthecontrolledplantis
the cotole pati

iLI-24.1579

!222x

K2i(S) =

10001~~~~~~~~~~~~~~~~~~~~~~~~~

0 1 o0 x x

0]{.

This plant is unstable system since it has one open-loop


pole located on the right-half-plane at s = 13.9709. However,
the paper focuses on dampening the Pendulum's angle 0 by
using
derivtive
te
stte
using the derivative
state constrained.
From the Linear Quadratic Gaussian (LQG) optimal control
scheme, this approach corresponds to the addition of the
quadratic derivatives of state variables term in the usual

H2X

controller

L2

There are two choices to compute F2. and L2X: first, we


may use the method proposed in [6] and second, we can use
MATLAB Robust Control Toolbox (h2lqg.m) in [7].
Usually, the weight D1I is specified in the form of diagonal
m
D a t
d
Dii , and their diagonal elements are corresponding

consrained.matrix

standard performance index. Hence, the standing generalized


plant G(s) is assumed to be given as

weight to each state variable.


L'
Dii

y(t)

C2x(t)

B1w(t) +

D11w(t)

B2u(t),

D12u(t),

D21w(t).

Normally the weighting matrices includes the extra


derivative state constraints weight are specified as
B,= [Bi

0 0], C= 0jD,

D12~

=01 Di 0j

0
0

441

me

= 10 ,. .

Substitute the derivative state constraints x and merge its


weighting matrix D1I into both control and estimation
weights, then equivalent form of generalized plant becomes
=

z(t)

y(t)
where

Ax(t)
C1x(t)

C2x(t)

B1w(t)
D21w(t).

Dii

04

0 o0 1 o

B2u(t),

D12u(t),

Cl

0 0 0 0

, D12 =
00 1 , Bi =
LO 0 1 0
0 0 1 0
Lo 0 0 0]
L0i
L0 0 0 0
F1 0 001
L

(3)

1 0 0 0

0 1 0

Hence, equivalent form weighting matrices are


- A
=
B1 B1 AD o]
0

00 010
~~~~~1

- - 0 l l- l O0 00 0i0 0

L0]

,,

] d3

where, other four weighting matrices are given as:


1 0 0 0

d x(t)

d11 iS for

There are two cases to be considered. In the first case, all


elements of diagonal matrix D11 are zero called "Special
Case of H2 Control Problem" or LQG Control Problem. And
another case, at least one of the diagonal elements of D11 is
non-zero, this may call "Modified Derivative State
Constrained Optimal H2 Control Problem".

For a givenplant, If d33

0
0 , jD2, = Lo 0 D21].

o
-x(t) = Ax(t) +
dt
z(t) = C1x(t)

0 d22

Di

0
87.872

010 0 001

0i0 0 00

Lo 0 00 0 10 0 1759.788 0 10 0 001

2008 International Symposium on Communications and Information Technologies (ISCIT 2008)

391

__

Ci00

rDiiAj

Cv,

0.08

0 0 0 0

0.04
0.02-

12

0 0

00

lo

0-00
0-0.02

0 0 0 00
D12

H2dtCnrl(oilne

D11 bar with d33= 0 to 10

<-0.04

0r LQG Control (dotted line)

0I0.06

H2 Basic

0
I~~~~~~~~~

D21[0 C2D11~ D21

L-0.26630 0 0 0
0 0

Inltial State Responses for Angle of the Pendulum

..

1.21 Fig.

5. Initial state responses of pendulum angle .


1

0
a
0 0]

0 0

0000

2.

~~~~~~~~~~~~~~~~~~~~~~~~Time
(secs)

WhenImergedagiveofd33 10 in D to e a z m t t
_~~~~~~~~~~~~~~~~~~~~~~~~~nta
Stat Initalsttrtspnes
Repnea for
IPenuuofPendulum
Angla
VeILoct
angle
we deeoe
0~~~~~~~~
~Ls yerFigew

form~~~~~~~~~~~~a
weghin matricesnt BIt Casstnd
Dimla
and Dthe theeriaBallc
controller
othe6obot
erLeGCotroni (dotevies) uh a
, -9.8736 -6.702 5 -200.2711
K2(s inTDl
(4)A
is0
then2
obtine
einad
by,SGA.Ti
arcthoo
L-o2
663=LO
F. 6. OmInitial rjetwst
State Responses ofpendulum
Angular
Velocity .

B
oo fisbepneiyote
o
K2staing from o0s thnob1.thied

bour
at d.epmenst.at w
i the cerclu veh as
stado te rbo. A1
eto
NeWIPSce
ATc
KMIT
- orzero
themantrix,rbem1
usingrdcdt
tod carryar aeoc- hm as functin Fig. 7(a)(s
Ifden0ce12itial1tate0esponses
11i
then
lal
then
,~~~~~~~~~~~~~Ls
yist
we aote
develpdew
Inve rlted
enduu Syistsngem
J
L Do11B
D
.
a rlear,ul
1
d
sPir
0]
] Tieta a

angle and angular velocity of the Pendulum


in cas ofmethes
It is thewn
OptbershimalfH2X
control Problem
tohdsPeC3OF6O1
c
t ad a
Whene,
derv
and
InF
bnvte
d
Horm
sheowthe
,
case Biahsting CnatroiePrsoblem.
the

reduced

without6.ofnderivativeestatesconstraintsluweight.aVaryingimm

hip,

r d

gyrolscopelinc
e ae Eb
f ri ton thisvsintg
e

0, ivei StatenC eonstraining w heigh


the3Deia
thatlpeane Ivetditnumisse
powerful tool for dampening witheparment.It excellence. theFinally,lvehthisa
a abiattoroo
t
maeuedal h giet selctth sutal weighths rjet
esDnad
carr a h
satisfyin
designing engineers.
(a)a Conctrolle boar.

showsa,

7a

hw

and
Infowhe
392
2008oQGCnto IntbernatIona Sypoium onCmuiain
bord.Dmatonstechinologhies
InvCItedP2008)Sytei
inta3 saerepne for8 Itherangeatinda nglavelocitym
o shmuict
f
owsnd
Inforaig. 7(c). lge (ISI
08

ACKNOWLEDGMENT

The authors would like to thank Mr. Krit Smerpitak for his
assemblies this Inverted Pendulum includes experimental
result so much. Also thank Emeritus Professor Michihiko
lida for his kindly the valuable suggestions.
REFERENCES

[1] Katsuhiko Ogata, Modern Control Engineering, 2nd ed.

Editions,
Englewood1990.Cliffs, New Jersey: Prentice-Hall InteRational
[2] Felix Grasser, Aldo D'Arrigo, Silvio Colombi and Alfred C.

Rufer, "JOE: A Mobile, Inverted Pendulum," IEEE


No. 1, pp.
Transactions on Industrial Electronics, Vol. 49,

Fig. 7. IPS
Anew narly SEGAY at

V. CONCLUSIONS

b. Zialbdn, "Designl Andte


SuhukArittp
K[3]. OngKYineChee, Mohma
Autentonomu alancingrRobot,"
Deeopmteahnt of Twon Wheelersdesg,
~ ~ ~ t Studnernt,ConferencieonReseac and Devenlog,pmen (SCOReD,

[4] P. Pannil, P. Ukakimapamn, T. Trisuwannawat, K. Tirasesth,an


The dvelomentof Inerte Penulum yste at MITL
SEWA
IPS nerlatwo-TL
o
N. Komine, "and p.euci,n" pnvrottyed aendunstable
Fsdecig.d 7. Ahi naew.Apooyeo
sysivtiem
ofcntrlesdig,Inernational
Conference
Egneig
SteateChntring
s,
on
Wheeled Blancing obile
Root
incluedstrucureafor
oI
P l P T. Trisuwannawat K. TirasesthM
P5.
and
.T..
Engineering, ee sow. heLQ Applied Sciences, and Technology, pp. 6 87-69
new ~ ~ ~ V COCLSIN
0,207
controller design for stabilizing the inverted pendulum is
extended with the swing suppressor too. On the other hand,
the suitable weights selection for the control system is
suggested. Furthermore, the discrete controller design for IPS
is still remained at this moment.

Trswnnwt
Tiaesh.
.KoieadY
.. "DerivativeK.State
Ochiai,
Constrained Jia
Optimal
H2 Control for
Oscillatory Systems and Its Application," Transactions ofIEEJ,
Vol. 120-D, No. 6, pp. 775-781, 2000.
[7] Richard Y. Chiang, Michael G. Safonov, Robust Control
Toolbox User's Guide, The MathWorks, Inc., Natick, MA, 1992.

[6

2008 International Symposium on Communications and Information Technologies (ISCIT 2008)

393

You might also like