Вы находитесь на странице: 1из 4

TECHNOLOGICAL ENGINEERING

volume XII, number 2/2015


ISSN 1336 - 5967

DOI: 10.1515/teen-2015-0011

NATURALLY INSPIRED FIREFLY CONTROLLER


FOR STABILIZATION OF DOUBLE INVERTED PENDULUM
Article history:
Kavirayani Srikanth, Research Scholar - Gundavarapu Nagesh Received 20.november 2015
Accepted 3.december 2015
Department of Electrical and Electronics Engineering, GITAM University, Available online 15.december 2015
Visakhapatnam, India

Abstract altogether a new dynamic system which is analyzed using


A double inverted pendulum plant as an established meta-heuristics methods.
model that is analyzed as part of this work was tested
under the influence of time delay, where the controller 2 MATHEMATICAL MODELING
was fine tuned using a firefly algorithm taking into A typical arrangement of the double inverted
considering the fitness function of variation of the cart pendulum dynamics involves Euler-Lagrangian equation
position and to minimize the cart position displacement as in [1]. The important system parameter state variables
and still stabilize it effectively. The naturally inspired include X , θ1 and θ2 which denote the cart position, the
algorithm which imitates the fireflies definitely is an lower pendulum angle with respect to the vertical , θ2 is
energy efficient method owing to the inherent logic of the the upper pendulum angle with respect to the pendulum
way the fireflies respond collectively and has shown that and θ3 is the angle with respect to the vertical. F is the
critical time delays makes the system healthy. force acting on the cart. The pendulum and cart masses
Keywords are m1,m2 and M. The non-linear model is described for
Time delay, Inverted Pendulum, Firefly Algorithm the two stage inverted pendulum by a set of three
nonlinear differential equations described by equations 1,
1 INTRODUCTION 2 & 3.
d T T U
Double Inverted Pendulum(DIP) has been analyzed as ( )   Qi /1/
dt q i q i qi
a system in control education. The classical Indian rope
Where
trick is one fine example where a rope is made to stand
L=T–U /2/
in thin air which dates back the stabilization problem to
T: kinetic energy
ancient Indian history. Typical the pendulum systems are
U: potential energy
underactuated and highly non-linear and difficult to
Qi: generalized forces not taken into account in T, U
control. The design of controllers for such a system can
qi: generalized coordinates
be further be extended to the fields of entertainment,
and the generalized coordinates can be taken as
mechatronics and robotics specifically. Various types of
controllers such as LQR, LQG, H-Infinity , Kalman filter  xc
 
based observer design have been applied by researchers qi   1 /3/
worldwide.  3
A typical double inverted pendulum has a cart and
also two pendulums at the center which are free to F 
oscillate about its axes from the unstable equilibrium  
Qi   0  /4/
position to the stable equilibrium position. Typically the
 0 
arrangement has a motor driven control for such a
system using which the stability can be achieved. The following assumptions are important in the modeling
Srikanth[1] has discussed about various types of of double inverted pendulum system dynamic analysis.
controllers applied to the double inverted pendulum and 1) The system starts in a state of initial conditions with
also applied neural networks to the identification and the pendulum position in less than 5 degrees away from
control of such a system. Researchers have investigated its unstable equilibrium position.
various aspects of controller design[6-12]. However, 2) A small perturbation is applied to the pendulum.
active research has not be done on the time delay aspect The pendulum is represented as given in figure 1 with
of double inverted pendulum. It is also to be noted that two links.
other versions of the inverted pendulum systems such as
the triple inverted pendulum and quadruple pendulum
systems and the rotary inverted pendulum have be
studied.
This paper investigates the case of including a time
delay in the signal transmitted to the motor that control
the input of the double inverted pendulum. The analysis
is also extended to the case where a Fire fly optimization
technique minimizes the motion of the states of the
pendulum and minimizes their displacement resulting in Figure 1 Double Inverted Pendulum [1]
an enhanced controller design. The paper proposes

14 TECHNOLOGICAL ENGINEERING, Volume XII, number 2/2015, ISSN 1336 - 5967

Unauthentifiziert | Heruntergeladen 23.09.19 21:49 UTC


The total kinetic energy for the system is the sum Den  M * p 4 * p 5 + 2 * p1 * p 2 * p 3
of the kinetic energies for the cart and the two links, is
- p 2 * p 2 * p 4 - M * p 3 * p 3 - p1 * p1 * p 5
given by equation 5 as
T  Tcart  Tpend 1  Tpend 2 /5/ Where the matrix parameters are
((p2 * p 3 - p1 * p5 ) * p1 * g);
T 
1 1
Mx c2  m1 [( x c  l11 cos 1 ) 2
A42 
2 2 Den
((p1 * p 3 + p 2 * p 4 ) * p 2 * g);
 1
 (l11 sin 1 ) ]  J 112
2 A43 
2 /6/ Den
1 -((p4 * p5 - p3 * p 3 ) * f);
 
 m2 [( x c  L11 cos 1  l 23 cos  3 ) 2 A44 
2 Den
1 ((M * p5 - p 2 * p 2 ) * p1 * g)
 ( L11 Sin1  l 23 sin  3 ) 2  J 232 A52 
2 Den
The total potential energy of the system is the sum of -((M * p 3 - p1 * p 2 ) * p 2 * g);
the potential energies of the cart and the two pendulums A53 
which is found to be Den
-((p1 * p 5 - p 2 * p 3 ) * f
U  U Cart  U pend 1  U pend 2 /7/ A54 
Den
U  m1 gl1 cos1 ((M * p 3 - p1 * p 2 ) * p1 * g)
/8/ A62 
 m2 g[ L1 cos1  l2 cos3 ] Den
Using these equations and based on assumptions as in ((M * p 4 - p1 * p1 ) * p 2 * g)
[5] the system developed would appear as follows: A63 
Den
( M  m1  m2 ) xC  A64 
-((-p1 * p3 + p 2 * p 4 ) * f);
Den
(m1l1  m2 L1 )(1 cos  1  12 sin  1 /9/
(p4 * p5 - p3 * p3 )
 m l ( cos    2 sin  )  F B41 
2 2 3 3 3 3 Den
(m1l1  m2 L1 )( xC Cos1  gSin1 )  (m1l12  m2 L12  J 1 )1 B51 
(p1 * p5 - p 2 * p 3 )
Den
 m l L [ Cos(   )   2 Sin(   )]  0
2 2 1 3 1 3 3 1 3
(p1 * p 3 + p 2 * p 4 )
/10/ B61 
Den
m2 l2 ( xc Cos 3  gSin 3 )  (m l  J 2 )3 2
The states x1 to x6 indicate cart position, cart velocity,
2 2
/11/ upper pendulum position, upper pendulum velocity, lower
 m l L [ cos(   )   2 sin(   )]  0
2 2 1 1 1 3 1 1 3 pendulum position, lower pendulum velocity.
Where The measurement noise is neglected and only a
desired cart position is considered. The time delay
M = M_C+ m1 + m2 /12/ parameter which is considered here is at the output
measurement which directly affects the system
A linearized model is obtained by small signal performance. The delay could be considered as a
approximation using the above equations. This will yield component due to the time delay, a transport delay, that
the state space matrices that define the system for such could well be considered added at the encoders. With the
a model would be given as follows below help of Pade approximation, the shift operator can be
approximated by a rational transfer function of first order
 x1  0 0 0 1 0 0  x1   0  as
 x  
 2  0 0 0 0 1 0  x 2   0  (1  s / 2)
e s  /15/
 x 3  0 0 0 0 0 1  x 3   0  (1  s / 2)
       u /13/
 x 4  0 A42 A43 A44 0 0  x 4   B41  Where  in equation refers to the time delay in the
 x  0 A52 A53 A54 0 0  x5   B51  control input which is applied to the cart and Y m denotes
 5      the modified output state condition. Now introducing a
 x 6  0 A62 A63 A64 0 0  x6   B61 
new state variable into the system as the state x7,
 y1  1 0 0 0 0 0  x   0 The time delay parameter would dynamics would involve
 y  0 an additional state defined from the following
 2  1 0 0 0 0  x 2  0
 y 3  0 0 1 0 0 0  x 3   0 s s /16/
       u /14/ xm (1  )  x1 (1  )
 y 4  0 0 0 1 0 0  x 4   0 2 2
 y 5  0 0  x 5   0  /17/
  
0 0 0 1
    xm  x1  ( x m  x1 )
 y 6  0 0 0 0 0 1  x6  0 2

Let Where  in equation refers to the time delay in the


control input which is applied to the cart position and Xm
p1 = (m1 + 2 * m2 ) * L1 ; denotes the modified output state condition. Now
p 2 = m2 * L 2 introducing a new state variable X7 into the system,
p3 = 2 * m2 * L1 * L2
2 4 /18/
p4 = (m1 + 4 * m2 ) * L1 * L2 x7  x7  1
 
p5 = m2 * L1 * L1

TECHNOLOGICAL ENGINEERING, Volume XII, number 2/2015, ISSN 1336 - 5967 15

Unauthentifiziert | Heruntergeladen 23.09.19 21:49 UTC


The modified state matrices because of addition of
time delay parameter causes a new state to arise which 4 Results
modifies the system as given below:
The block diagram representation by which the
system can be represented is as follows shown in
 x 1   0 0 0 1 0 0 0
 x1   0  figure2. Transport delay was incorporated into the
 x   0 0 0 0 1 0 0      system and the stabilization was achieved and tested for
 2  x2 0
 x 3   0 0 0 0 0 1 0     the cases where the system fails and the constraints for
   0 
   0  3 x obtaining the boundary conditions were obtained. The
A42 A43 A44 0 0 0      u
 x 4    x4 B41 firefly parameters utilized are as follows in table 1.
 x   0 A52 A53 A54 0 0 0  x  B 
 5  0   5   51 
0  x  B 
 x 6  
A62 A63 A64 0 0
 x    4 2   x 6   061 
 7   
 7    0 0 0 0 0
 
/19/
 y1  1 0 0 0 0 0 0  x  0
 
 y  0 1 0 0 0 0 0  x  0
 2     
2
Figure 2 Full state feedback with Firefly(FF) optimization
 y 3  0 0 1 0 0 0 0  x  0
   0 0 0 1 0 0
 3
0  x   0u /20/ Table I indicates the values that define the characteristic
 y4    4   properties of the firefly algorithm. The choice of the
 y 5  0 0 0 0 1 0 0  x5  0 values was strictly based on faster convergence and
 y  0 
0  x6  0
 6  various iterations that yielded in the optimal
0 0 0 0 1
   
 y 7  0 0 0 0 0 0 1  x7  0 performance of the algorithm and figure 3 indicates
relative significance of parameter definition by using a
3 Advanced Firefly Methodology radar graph.
Table 1
The firefly algorithm is an algorithm where the natural
Firefly Parameters
life cycle of fireflies is imitated for obtaining the fitness of
Quantity Value Remarks
a function. The algorithm is better than the conventional
gradient descent method[18] applied to systems in terms Alpha 0.25 High Randomness
of energy as fireflies use optimized energy whereas Beta 0.2 Minimum value of Beta
gradient descent does not use specifications like Gamma 1 Absorption coefficient
intensity of light. The species of fireflies are a vivid variety No. of Fireflies 40 -
which have distinct mechanism of communicating with No. of generations 50 -
one another and which observes certain patterns as they
mutate based on how they respond to the individual
patterns. It is known that the intensity of light at a certain
point is understood by inverse square law and it is also to Value
be known that fireflies uses flashing light patterns were Alpha
there are certain characteristics such as rhythm and rate 50
No.… Beta
of flashing and duration of flash. Taking these into 0 Value
account, an algorithm is developed which gives us a No.… Ga…
fitness. The parameters that are of significance in the
algorithm are light intensity variation and brightness. A
typical algorithm when applied to the double inverted Figure 3 Radar Graph for Parameters with Firefly(FF)
pendulum is given as follows:
Algorithm: The poles that are determined by using the firefly algo-
rithm are closer to the imaginary axis and confined to be
1) Begin; dominant in nature. The obtained values for the poles are
2) Initialize algorithm specifications such as indicated below and the convergence is given in figure 4.
Maximum generations(N), light absorption Poles = [-2.00 -0.250 -2.91 -2.91 -2.91 -2.9 -2.91]
coefficient(Gamma), particular distance from
the light source(r) and D domain space Figures 5 to 7 show the control effort is reduced when
the input is delayed which could possibly be an indication
3) Define the objective function that the time delay has helped the system to get
4) Generate the initial population of fireflies stabilized with lesser energy than compared to that
5) Determine light intensity using fitness without time delay. This is clear from the cart position,
evaluation pendulum position variations. Similarly variation in
While (t<MaxGen) velocites clearly indicated that the variation in energy or
For i=1 to N the damping is higher before the two pendulums settle
For j=1 to n down to the final steady state and the cart also settles
If( Ij >Ii), down and reaches the final value.
Move firefly i towards j by using update equation
End if Fitness Variation with
Attractiveness varies with distance r Firefly Algorithm
Evaluate new solutions and update light intensity
End for j 100
End for i; Fitness
0
Rank the fireflies and find the current best; Value
0 1000 2000
End while; -100
Evaluation;
6) End Figure 4 Fitness variation
16 TECHNOLOGICAL ENGINEERING, Volume XII, number 2/2015, ISSN 1336 - 5967

Unauthentifiziert | Heruntergeladen 23.09.19 21:49 UTC


Cart POS [3] Amit Konar (2010), Computational Intelligence Techniques
20 Principles, Techniques and Applications, Springer
Without Timedelay
With time delay of 4.0000 secs
[4] Arora, S.; Singh, S.(2013), "A conceptual comparison of
15 firefly algorithm, bat algorithm and cuckoo search," Control
Computing Communication & Materials (ICCCCM), 2013
International Conference on , vol., no., pp.1-4
10
[5] V. P. Makkapati, M. Reichhartinger and M. Horn, “The output
tracking for dual-inertia system with dead time based on
5 stable system center approach”, 2013 IEEE Multi-
conference on Systems and Control, Conference on Control
0 Applications, Hyderabad, India, August 28-30, 2013
[6] [6]K.Srikanth, Dr. G.V.Nagesh Kumar, “Stabilization at
Unstable Equilibrium Position of a Double Inverted Linear
-5
Pendulum using Modified Particle Swarm Optimization”,
Proceedings of 38th National system conference on real
-10
0 10 20 30 40 50 60
time systems –modeling, Analysis and control held from 5th
-7th Nov, 2014 in JNTU Hyd, Telangana, India. pp.160,164,
Figure 5 Cart Position variation
5-7 Nov. 2014, Elseiver ISBN 9789351072973
30
Low pend POS
[7] Kavirayani Srikanth , G V Nagesh Kumar,"Rotary inverted
Without Timedelay pendulum control and the impact of time delay on switching
20
With time delay of 4.0000 secs between stable and unstable states with enhanced particle
swarm optimization",International Journal of Computer and
10 Communication System Engineering, Volume 02, Issue 04,
August 2015
0 [8] Mingcong Deng, Akira Inoue, Tomohiro Henmi and Nobuyuki
Ueki, Analysis and experiment on simultaneous swing-up of
-10 a parallel cart-type double inverted pendulum,ASIAN
JOURNAL OF CONTROL,Volume 10, Issue 1, January 2008,
-20 Pages: 121–128
[9] Gisela Pujol, Leonardo AchoStabilization of the Furuta
-30 Pendulum with backlash using H∞-LMI technique:
experimental validation, ASIAN JOURNAL OF CONTROL,
-40 Volume 12, Issue 4, July 2010, Pages: 460–467
0 10 20 30 40 50 60
[10]Mohamed Karim Bouafoura, Naceur Benhadj Braiek, A State
Figure 6 Lower Pendulum Position variation Feedback Control Design for Generalized Fractional Systems
Upper pend POS Through Orthogonal Functions: Application to a Fractional
20
Without Timedelay Inverted Pendulum, ASIAN JOURNAL OF CONTROL, Volume
15 With time delay of 4.0000 secs 15, Issue 3, May 2013, Pages: 773–782
10 [11]Xianglin Hou; Cong Chen; Haifeng Yu, "Study on swing up
control algorithm and simulation about circular rail double
5
Inverted pendulum under limited torque," Control and
0 Decision Conference (CCDC), 2012 24th Chinese , vol., no.,
-5
pp.855,860, 23-25 May 2012
[12]Singh, Abhaya Pal; Kazi, Faruk S.; Singh, N.M.; Srivastava,
-10
Pallavi, "PIαDβ controller design for underactuated
-15 mechanical systems,", 2012 12th International Conference
-20
on Control Automation Robotics & Vision (ICARCV), vol., no.,
pp.1654,1658, 5-7 Dec. 2012
-25
[13]Ahmad, S.; Aminnuddin, M.; Shukor, M.A.S.M., "Modular
-30 hybrid control for double-link two-wheeled mobile robot,"
0 10 20 30 40 50 60
2012 International Conference on Computer and
Figure 7 Upper Pendulum Position variation Communication Engineering (ICCCE), vol., no., pp.807,813,
3-5 July 2012
5 Conclusions [14]Yeoun-Jae Kim; Joon-Yong Lee; Ju-Jang Lee, "A balance
control strategy of a walking biped robot in an externally
applied force,", 2012 International Conference on
The analysis using firefly has indicated that the Information and Automation (ICIA) , vol., no., pp.572,577, 6-
naturally inspired algorithm assigns the poles based on 8 June 2012
optimization of the given fitness function which is the [15]Cavdaroglu, M.E.; Olgac, N., "Trajectory tracking of cart-
displacement of the cart in this particular case. The pendulum dynamics using multiple time-delayed feedback,"
results have shown that the incorporation of time delay Control Theory & Applications, IET , vol.2, no.6, pp.458,466,
with bounds is healthy for the systems and would June 2008
decrease the control effort utilized by the system. This [16]Ying Zheng; Huajing Fang; Wang, H.O., "Takagi-sugeno fuzzy-
model-based fault detection for networked control systems
technique of incorporating the delay can be applied to
with Markov delays," Systems, Man, and Cybernetics, Part B:
higher order systems also keeping in view that the Cybernetics, IEEE Transactions on , vol.36, no.4, pp.924,929,
system can go into the verge of instability, even then the Aug. 2006
system could have critical time delays which make the [17]Yao Li; Levine, W.S.; Loeb, G.E., "A Two-Joint Human Posture
system more efficient in terms of control effort made by Control Model With Realistic Neural Delays," Neural Systems
the system for stabilization. and Rehabilitation Engineering, IEEE Transactions on ,
vol.20, no.5, pp.738,748, Sept. 2012
References [18] Miyajima, H., Shigei, N. & Miyajima, H. (2015). Performance
Comparison of Hybrid Electromagnetism-Like Mechanism
[1] Kavirayani Srikanth, Classical and Neural Net Control and Algorithms with Descent Method. De Gruyter Journal of
Identification of Non-linear Systems with Application to Artificial Intelligence and Soft Computing Research, 5(4), pp.
the Two-joint Inverted Pendulum Control Problem, Diss. 271-282. Retrieved 19 Nov. 2015, from doi:10.1515/jaiscr-
University of Missouri-Columbia, 2005
2015-0035
[2] S N Sivanandam, S N Deepa(2009) Control Systems
Engineering using MATLAB,Vikas Publishing house pvt. Ltd.

TECHNOLOGICAL ENGINEERING, Volume XII, number 2/2015, ISSN 1336 - 5967 17

Unauthentifiziert | Heruntergeladen 23.09.19 21:49 UTC

Вам также может понравиться