0% found this document useful (0 votes)
22 views4 pages

16 - Inverted Pendulum Control System Based On GA Optimization

This document summarizes a study that proposed a new genetic algorithm (GA) to optimize control parameters for an inverted pendulum system based on GA. The study developed a mathematical model of the elastic inverted pendulum system. It then used the GA to evolve gene populations to find optimal proportional-derivative (PD) controller parameters that maximize phase margin as a measure of robustness. The GA approach found excellent controller parameters that achieved good control of the inverted pendulum in experiments.

Uploaded by

ahmed.almohammed
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)
22 views4 pages

16 - Inverted Pendulum Control System Based On GA Optimization

This document summarizes a study that proposed a new genetic algorithm (GA) to optimize control parameters for an inverted pendulum system based on GA. The study developed a mathematical model of the elastic inverted pendulum system. It then used the GA to evolve gene populations to find optimal proportional-derivative (PD) controller parameters that maximize phase margin as a measure of robustness. The GA approach found excellent controller parameters that achieved good control of the inverted pendulum in experiments.

Uploaded by

ahmed.almohammed
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/ 4

Workshop on Intelligent Information Technology Application

Inverted Pendulum Control System Based on GA Optimization

Fu Wei Giang Liangzhong Yang Jin Bian Qingqing


College of Mechanical Engineering, South University of Technology, Guangzhou, China
E-mail:[email protected]

Abstract velocity and the configuration of rod. can be measured


by some Sensors.For nomenclature and information
A kind of new GA is put forward by this paper, on the motor and encoder see Tab1e 1
that calculate way satisfies the control demand of the Table 1. For nomenclature and information on the
Inverted Pendulum. Adopt the gene to carry out the motor and encoder
evolution operation for the unit .Cross with the
average Euclid distance of the gene control gene with Symbol Description unit
the variation.. Adopt the phase margin is the function F output acceleration of 2
m/s
Panasonic AC servo motor
of penalty that one adaptive degree calculate.
x cart position m
Guaranteed the calculate way don’t sink into the part Angle of 1-th rod from the rod
θΦ
to refrain from rash action. Considered the index sign vertical position.. (θ= π+Φ)
of time domain and robustness of the system to unify at M Mass of the cart 1.096 kg
the same time. The good result is through certificated. m Mass of the rod 0.109 kg
Applied in the actual engineering by the Inverted L Length of the rod 0.25 m
Pendulum PD control parameter that based on the b friction coefficient between the 0.1 N/m/s
cart and the trail
new SAGA acquires excellent results
I moment of inertia of rod 0.0034
Keywords: Inverted Pendulum; Genetic algorithms; around its center of gravity kg*m*m
g acceleration of gravity 2
Robust stability; PD controller 9.8 m/s
1. Introduction
2. Mathematical modeling of elastic
inverted pendulum
By analyzing the bearing forces of the rods and
the cart,we earl get the differential equation
describing the locomotion of the inverted pendulum as
follows:
•• • •• •
(M + m) x +b x + ml θ cos θ -ml θ sin θ = F (1)
2

•• ••
(I + ml ) θ + mg.l sin θ + ml x cos θ = 0
2
(2)
We assume θ and Φ are very small and are
respectively the displacement and deviate angle of the
Figure. 1 One stage elastic inverted pendulum rod .According to the assumption above the elastic
model can be simplified into a linear model( cos θ =0;
The inverted pendulum is an important subject in •
control theory and experiments . Many physical sin θ =-Φ; θ 2
=0) . Setting the horizontal line
models can be simplified as elastic inverted pendulums. through the hinge is the zero potential position.
[1].[ 2 ]

such as rockets and walking robots.The inverted Substituting (1) and (2), Laplace transforms,
pendulum system is illustrated in Fig . 1. A motor into (3)
drives a moving cart. The cart is connected with an
inverted pendulum with a hinge . he kinetic
parameters of this device , including position and

0-7695-3063-X/07 $25.00 © 2007 IEEE 347


DOI 10.1109/IITA.2007.85
ml There into: w4 is weight coefficient, ΔY=Y(t)-
φ ( s) q
s
Y(t-1) is the output increment for the control system.
=
F ( s ) 3 b( I + ml 2 ) 2 ( M + m)mgl bmgl When negative increment appears, it means over
s + s − s− movement and control needed. In order to make use
q q q of the robustness of the control system, the following
φ ( s) ml
(3)
functions of penalty are adopted:
= −α (ϕ m −ϕ 0 )
v( s) ( I + ml 2 s 2 − mgl JL=J* (1 + e ) (8)
••
There into: φ0 = π /6 is the expected phase
2 2
Among them: q =[(M+m)(I+ml )-(ml) ];v = x margin, φm is the practical phase margin. α is the
Substituting into Table 1 parameter: gene of penalty chosen by man. From the analyzing
point of the frequency filed: phase margin φm is
φ (s) 2.357 s larger, the robustness of the control system is better.
=
u ( s ) s + 0.0883s 2 − 27.917 s − 2.309
3
When phase margin φm < φ0 ,the evaluation index of

G(S) =
φ ( s) 0.02725
(4)
function of penalty JL is increasing evidently ,When
=
v( s ) 0.0102125s 2 − 0.26705 phase margin φm > φ0 , the evaluation index of
The transfer function for PD controller : function of penalty JL is unaltered.
The better adaptability function is :
G C (S) = k p (1 + TD S
) 1
TD S K D + 1
F= *1/J (9)
Reflect the phase margin degree of the control system 1 + e − α (φ m − φ 0 )
robustness:
φ m = arg[G ( jω c )GC ( jω c )] + π ; 3. Genetic algorithms (GA)
G ( jω c )G c ( jω c ) = 1 (5) Step1:Searching space of GA [ 4][5][ 6] regards result
[3]
of Z-N method as the center and extends left and
there into: KP is the ratio coefficient. K D =2.8,TD
right equally to form n=30*2 genes. Thus, it can use
differential coefficient , ω c is cut frequency. The reasonable kernel of Z-N method and reduce GA
index sign of time domain for evaluating the control searching time. It adopts decimal coding to get one
system adopts the functions as: follows. gene at random from P、D 、gene, connects from
.∞ beginning to end, so to form initial chromosome of
J= ∫ .0
[ w1 e(t ) + w2 u 2 (t )]dt + w3 t p (6) n=30 as the following and compose optimized initial
population:
There into-e ( t ) is systemic error , u 2 (t ) is the
x1P ...x1D x1
output of controller, t p is the rise time of the control
x 2 P ...x 2 D x2
system, w1 ; w2 ; w3 is weight coefficient of the index
X(n,2)= = ... (10)
sign of time domain. ..............
Among the index functions of time domain for xn
evaluating the control system, the first item is to x nP ...x nD
achieve the satisfied dynamic identity. The second Step2:Define adaptation probability expression of
item is to spend less energy for system control. The each chromosome(individual) in equation:
third one is to achieve a good systemic speed. n
Meanwhile adopts two kinds of functions of penalty.
In order to avoid over movement, the following Psi = fi ∑f
i =1
i (11)
function of penalty is adopted:
if ΔY<0 ; J= There into: Psi is the probability distribution of “s”
.∞ generation and “i” piece chromosome; f i is the
∫.0
[ w1 e(t ) + w2u 2 (t ) + w4 ∆Y ]dt + w3t p (7) adaptation of i piece chromosome.
Step3: Reproduction operation

348
Reproduction operation simulates competing process There into: Pm is mutation probability, n =30 is
of biology pollution and genetic algorithms also obey the number of one generation biology population, n (i)
this rule. It produces number r at random distributed is i individual in biology population. Computer deals
between 0 and 1 equably at first, then the as the following method: Sort order of current biology
chromosome with adaptation probability Psi >r was population adaptation as direction of small to big.
copied, and chromosome with adaptation probability Then produces number “r” at random distributed
Psi <r was washed out. equably between 0 and 1.If Pm>r , execute
Step4: Crossover operation chromosome mutation population to produce new
Crossover operation simulates multiplying chromosome individual; if Pm<r , not to execute
process of biology population, exchanging and chromosome mutation population without producing
combination of two chromosomes to produce new new chromosome individual. With mutation
optimized breed. Crossover operation process of GA probability Pm descending, population with bad
is-select two chromosomes at random in matching adaptation carries on mutation operation first.
pool, use the following crossover expression:
s +1 4. Optimizing method for Inverted
= βx1 + (1 − β ) x2
s s
x1 ; Pendulum to control parameter
s +1
= βx2 + (1 − β ) x1
s s
x2 (12) Figure. 2 Comparing figure between Z-N method
Two new chromosomes combination were produced.
There into:β produces coefficient distributed equably
between 0 and 1, superscript “s” is the algebra to born
new body for chromosome. Crossover operation of
GA is controlled by crossover probability Pc=0.9,
the computer produces number “r” between 0 and 1 at
random equably. If Pc>r,execute chromosome
crossover operation to produce new chromosome
individual; if Pc<r,not execute crossover operation
without producing new chromosome individual.
Step5: Mutation operation
Mutation operation simulates gene mutation of
biology population under natural environment
because of incidental reasons. Mutation operation of
GA changes inherit gene at random as small and genetic algorithms
probability Pm, producing method of chromosome Figure 3:Systematic bode diagram
gene mutation is
s +1
x1 = ( xmax + xmin ) / 2 +
( xmax − xmin ) * ( r − 0.5) (13)
There into: xmax , xmin is the upper limit and
lower limit of chromosome real codes constructed by
P、D parameter, superscript “s” is the algebra to born
new body for chromosome, r is the number
distributed equably between 0 and 1 and produced by
computer at random.
Mutation operation of chromosome is controlled
by mutation probability Pm. Mutation of biology Use Z-N correcting method to produce controller
population usually incurred on population with bad parameter P、D of inverted pendulum, and regard
adaptability, which is good for produce excellent P、D parameter as off-line optimized initial points of
breed. For this character of bionics biology GA. Kp*=37、 TD *=0.1。 Genes made up of P、D
population, it adopts the following the expression of
mutation probability: parameters to form initial population, population
Pm=0.10- n(i) / n (14) number n=30 , penalty function 。 α =10 、 phase

349
margin φ0 =π/6 , set crossover probability evaluating and control system in GA method include
Pc=0.9..Mutation probability Pm was brought by output increment of GA control system absolute value
expression (12), weight coefficient of time and space of system error, and square of controller output; and
add penalty function that regard lifting time and phase
performance index . w1 =0.999; margin as adaptation. So Inverted Pendulum can get
dynamic character with good speediness performance
w2 =0.001; w3 =2.0; w4 =100 。 Range of K P and robust stability, and controlling energy of system
is small, too. In order to improve speediness
is[0 , 74] 、 range of T D is[0 , 0.2] , maximum
performance, adopt two penalties function at the same
heritage afterworld s max =100 , number of time. Good result is certificated: optimized Inverted
Pendulum PD control parameters obtained by GA
population chromosome n=30,finally simulated by
method acquire satisfied result in real application.
Matlab7.0 system. For figure 2, it indicates the time
and space dynamic response when the PD parameters
(produced by Z-N method and GA method) were References
acted on inverted pendulum. From response speed of
controlling system, the difference between Z-N [1]. Xiao-Bing Mao , Guo-Zhang Gao ,“ Analysis of the
method and GA method is not too much; but from Controllability of a Nonlinear Inverted Pendulum with the
super-adjusting index and stabilization time index, New Method of a Rational Function System ” Control,
Communication and Network Systems, Technologies and
GA method is much better than Z-N.
Applications。USA, 2004 ,vol.8,pp.247-250.
[2.]. Haresh A. Suthar; Kaushal B. Pandya。“ DESIGNING
FUZZY LOGIC CONTROLLER FOR INVERTED
PENDULUM” 。 Artificial Intelligence Applications and
Innovations Beijing , 2005, pp.61-68.
[3]. Ziegler J.G. N.B. Nichols. “Optimum settings for auto-
mastic controllers Trans.” ASME , 1942,pp.759-768.
[4].FU SHUANWEN, “ etal..New Approach to Alarm
Process in gin Power Systems Based on the et Covering
Theory and A Refined Genetic Algorithm ” .
ELECTRICMACHINEANDPOWERSYSTEMS,
1998,25(1), pp.50--67.
[5]. Hatsuda ,Takeshi,Yoneta and Sadayoshi.“Genetic
Algorithm Application to Efficient Utilization of the
GSO ” IEEE Transactions on Aerospace & Electronic
Figure4 :Optimization process diagram Systems, 2004(4), pp.1217- 1221.

5. Result [6]. Han H. Luo , A. Yang Y, “A nonlinear PID controller


based on genetic tuning algorithm” CONTROL AND
Because of Inverted Pendulum significance, this DECISION, 2005(4),pp. 448-451.
article presented optimized PD parameters based on
GA method ( Kp=33.7873、 TD =0.1065). Because

350

You might also like