29.01.2015 Views

Preparation of Papers in Two-Column Format - International Journal ...

Preparation of Papers in Two-Column Format - International Journal ...

Preparation of Papers in Two-Column Format - International Journal ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>International</strong> <strong>Journal</strong> <strong>of</strong> S<strong>of</strong>t Comput<strong>in</strong>g and Eng<strong>in</strong>eer<strong>in</strong>g (IJSCE)<br />

ISSN: 2231-2307, Volume-3, Issue-1, March 2013<br />

Tun<strong>in</strong>g Of PID Controller Of Inverted Pendulum<br />

Us<strong>in</strong>g Genetic Algorithm<br />

K.Chakraborty, R. R. Mukherjee, S.Mukherjee<br />

Abstract-This paper presents different types <strong>of</strong> mathematical<br />

modell<strong>in</strong>g <strong>of</strong> Inverted Pendulum and also a Proportional-Intregal-<br />

Derative (PID) controller is designed for its stabilization. After<br />

desig<strong>in</strong>g <strong>of</strong> PID controller some reference stable system has been<br />

selected and then different types <strong>of</strong> error has been optimized<br />

(m<strong>in</strong>imized) by us<strong>in</strong>g Genetic algorithms. The proposed system<br />

extends classical <strong>in</strong>verted pendulum by <strong>in</strong>corporat<strong>in</strong>g two mov<strong>in</strong>g<br />

masses. Also a tun<strong>in</strong>g mechanism is done by genetic algorithm for<br />

optimiz<strong>in</strong>g different ga<strong>in</strong>s <strong>of</strong> controller parameter. Also here<br />

different performance <strong>in</strong>deces are calculated <strong>in</strong> MATLAB<br />

environment. This paper addresses to demonstrate the capability <strong>of</strong><br />

genetic algorithm’s to solve complex and constra<strong>in</strong>t optimization<br />

problems via utiliz<strong>in</strong>g GA’s as a general purpose optimiz<strong>in</strong>g tool to<br />

solve different control system design problems.<br />

Index Terms-Inverted pendulum,Mathematical modell<strong>in</strong>g,sw<strong>in</strong>g<br />

up control ,PID controller,Tun<strong>in</strong>g,Genetic Algorithm,Performance<br />

Indeces,Error m<strong>in</strong>imization.<br />

I. INTRODUCTION<br />

The <strong>in</strong>verted pendulum is a classical problem <strong>in</strong> dynamics<br />

and control theory[1] and is widely used as a benchmark for<br />

test<strong>in</strong>g control algorithms(PID controllers, L<strong>in</strong>ear Quadratic<br />

Regulator (LQR), neural networks, fuzzy logic control,<br />

genetic algorithms, etc).The <strong>in</strong>verted pendulum is unstable <strong>in</strong><br />

the sense that it may fall over any time <strong>in</strong> any direction<br />

unless a suitable control force is applied. The control<br />

objective <strong>of</strong> the <strong>in</strong>verted pendulum is to sw<strong>in</strong>g up[4] the<br />

pendulum h<strong>in</strong>ged on the mov<strong>in</strong>g cart by a l<strong>in</strong>ear motor from<br />

stable position (vertically down state) to the zero<br />

state(vertically upward state) and to keep the pendulum <strong>in</strong><br />

vertically upward state <strong>in</strong> spite <strong>of</strong> the disturbance[5]. In the<br />

field <strong>of</strong> eng<strong>in</strong>eer<strong>in</strong>g and technology the importance <strong>of</strong><br />

benchmark needs no explanation. They make it easy to check<br />

whether a particular algorithm [6] is giv<strong>in</strong>g the requisite<br />

results.<br />

Manuscript received on March, 2013<br />

Kunal Chakraborty, is a f<strong>in</strong>al year student <strong>of</strong> M.Tech <strong>in</strong> the department<br />

<strong>of</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g <strong>of</strong> Asansol Eng<strong>in</strong>eer<strong>in</strong>g college Kanyapur,<br />

Vivekananda Sarani, Asansol, Burdwan-713305. He received his B.Tech<br />

degree <strong>in</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g from West Bengal.<br />

Rabi Ranjan Mukherjee, is a f<strong>in</strong>al year student <strong>of</strong> M.Tech <strong>in</strong> the<br />

department <strong>of</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g <strong>of</strong> Asansol Eng<strong>in</strong>eer<strong>in</strong>g college<br />

Kanyapur, Vivekananda Sarani, Asansol, Burdwan-713305. He received<br />

his B.Tech degree <strong>in</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g from West Bengal.<br />

Suvobratra Mukherjee, is a f<strong>in</strong>al year student <strong>of</strong> M.Tech <strong>in</strong> the<br />

department <strong>of</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g <strong>of</strong> Asansol Eng<strong>in</strong>eer<strong>in</strong>g college<br />

Kanyapur, Vivekananda Sarani, Asansol, Burdwan-713305. He received<br />

his B.Tech degree <strong>in</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g from West Bengal.<br />

A lot <strong>of</strong> work has been carried out on the <strong>in</strong>verted<br />

pendulum <strong>in</strong> terms <strong>of</strong> its stabilization. Many attempts have<br />

been made to control it us<strong>in</strong>g classical control [3]. In this<br />

paper,it is proposed that the controller be tuned us<strong>in</strong>g Genetic<br />

Algorithm(GA) technique. Genetic Algorithm[2] have been<br />

shown to be capable <strong>of</strong> locat<strong>in</strong>g high performance areas <strong>in</strong><br />

complex doma<strong>in</strong>s without experienc<strong>in</strong>g the difficulties, also<br />

associated with high dimensionality or false optima as many<br />

occur with some other optimization method. pendulum<br />

h<strong>in</strong>ged on the mov<strong>in</strong>g cart by a l<strong>in</strong>ear motor from stable<br />

position (vertically down state) to the zero state(vertically<br />

upwardstate) and to keep the pendulum <strong>in</strong> vertically upward<br />

state <strong>in</strong> spite <strong>of</strong> the disturbance[1]. pendulum h<strong>in</strong>ged on the<br />

mov<strong>in</strong>g cart by a l<strong>in</strong>ear motor from stable position (vertically<br />

down state) to the zero state(vertically upward state) and to<br />

keep the pendulum <strong>in</strong> vertically upward state <strong>in</strong> spite <strong>of</strong> the<br />

disturbance[1].<br />

II. MECHANICAL CONSTRUCTION<br />

The system comprises <strong>of</strong> a horizontal plate that is<br />

connected to two wheels through a connect<strong>in</strong>g rod. The<br />

wheels are <strong>in</strong>dependent <strong>of</strong> each other and are placed <strong>in</strong> the<br />

centre <strong>of</strong> the rail. Thus the platform can move on a horizontal<br />

surface and is able to rotate about the axis <strong>of</strong> wheels. There<br />

are two masses on top <strong>of</strong> the system that can slide along the<br />

horizontal rail, the masses be<strong>in</strong>g on both sides <strong>of</strong> the rail. The<br />

system is shown <strong>in</strong> fig (1)<br />

III. MATHEMATICAL MODEL OF THE PLANT<br />

Def<strong>in</strong><strong>in</strong>g the angle <strong>of</strong> the rod from the vertical (reference)<br />

l<strong>in</strong>e as and displacement <strong>of</strong> the cart as . Also assume the<br />

force applied to the system is F , centre <strong>of</strong> gravity <strong>of</strong> the<br />

pendulum rod is at its geometric centre and be the half<br />

length <strong>of</strong> the pendulum rod. The physical model <strong>of</strong> the<br />

system is shown <strong>in</strong> fig (2).<br />

The Lagrangian <strong>of</strong> the entire system is given as,<br />

21


Tun<strong>in</strong>g Of PID Controller Of Inverted Pendulum Us<strong>in</strong>g Genetic Algorithm<br />

2<br />

L= ( +2 cos +<br />

2 +<br />

2 2<br />

)+ ]- cos<br />

The Euler-Lagrange’s equation for the system is given as<br />

=<br />

Us<strong>in</strong>g these two above equations we get the dynamics <strong>of</strong> the<br />

entire system<br />

……….(1)<br />

……..(2)<br />

F<br />

The system poles lies on R.H plane, hence system is<br />

unstable.<br />

Table 1. Parameters <strong>of</strong> the system from feedback<br />

<strong>in</strong>strument .U.K.<br />

Parameter Value unit<br />

Cart mass( ) 1.206 Kilo gram<br />

Mass <strong>of</strong> the<br />

pendulum( )<br />

Half Length <strong>of</strong><br />

pendulum( )<br />

Coefficient<br />

frictional force( )<br />

<strong>of</strong><br />

Pendulum damp<strong>in</strong>g<br />

coefficient(q)<br />

Moment <strong>of</strong> <strong>in</strong>ertia <strong>of</strong><br />

pendulum( )<br />

0.2693 Kilo gram<br />

0.1623 meter<br />

0.05 Ns/m<br />

0.005 /rad<br />

0.099 /<br />

Gravitation force( ) 9.8 /<br />

Fig 2 : The Inverted Pendulum System<br />

The above equation (1&2) shows the dynamics <strong>of</strong> the entire<br />

system.<br />

In order to derive the l<strong>in</strong>ear differential equation modell<strong>in</strong>g,<br />

we need to l<strong>in</strong>earaize the non l<strong>in</strong>ear differtional equation<br />

obta<strong>in</strong>ed as above so far. For small angle deviation around<br />

the upright equilibrium (fig.2) po<strong>in</strong>t assume<br />

Us<strong>in</strong>g above relation we can write as,<br />

r +q -k +d =0………..(3)<br />

…….(4)<br />

Where, ( + )= p, =k, =q, = r<br />

Eq (3&4) is the l<strong>in</strong>ear differential eqution modell<strong>in</strong>g <strong>of</strong> the<br />

entire system. In order to f<strong>in</strong>d the transfer function <strong>of</strong> the<br />

system , Laplace transform <strong>of</strong> Eq (3 & 4) has been taken out<br />

and substitut<strong>in</strong>g the parameter value (table 1), we got<br />

and<br />

IV. PERFORMANCE INDECES<br />

The design <strong>of</strong> a control system is an attempt to meet a set <strong>of</strong><br />

specifications which def<strong>in</strong>e the overall performance <strong>of</strong> the<br />

system <strong>in</strong> terms <strong>of</strong> certa<strong>in</strong> measurable quantities. In the<br />

normal way design <strong>of</strong> control system, some specific<br />

parametric values <strong>of</strong> the system are assumed and the control<br />

system is designed accord<strong>in</strong>gly to meet desired performance<br />

<strong>of</strong> the system. Here we used four most commonly<br />

mathematical functions as a performance <strong>in</strong>dex associated<br />

with error <strong>of</strong> a closed loop system. A performance <strong>in</strong>dex is a<br />

number which <strong>in</strong>dicates goodness <strong>of</strong> system performance.<br />

The objective is to design an optimal system by proper<br />

choice <strong>of</strong> its parameters such that the specified performance<br />

<strong>in</strong>dex is extremum-either m<strong>in</strong>imum or maximum. A<br />

performance <strong>in</strong>dex must be a s<strong>in</strong>gle positive number or zero,<br />

the latter be<strong>in</strong>g obta<strong>in</strong>ed if and only if the measure <strong>of</strong> the<br />

deviation becomes identically zero.<br />

The commonly used performance <strong>in</strong>deces (PI) are:<br />

Integral <strong>of</strong> squared error (ISE),<br />

J =<br />

Integral <strong>of</strong> time multiplied squared error (ITSE),<br />

J =<br />

Integral <strong>of</strong> absolute error (IAE),<br />

J =<br />

Integral <strong>of</strong> time multiplied absolute error (ITAE),<br />

J=<br />

Here the error is def<strong>in</strong>e as<br />

We have<br />

taken the stable reference model for angle whose transfer<br />

function is<br />

22


<strong>International</strong> <strong>Journal</strong> <strong>of</strong> S<strong>of</strong>t Comput<strong>in</strong>g and Eng<strong>in</strong>eer<strong>in</strong>g (IJSCE)<br />

ISSN: 2231-2307, Volume-3, Issue-1, March 2013<br />

And the transfer function <strong>of</strong> our system when angle be the<br />

output is<br />

VI. SIMULATION & RESULTS<br />

Table 2. The different performance <strong>in</strong>deces when the angle<br />

<strong>of</strong> the pendulum is output.<br />

Performance Indexes<br />

PID<br />

ISE<br />

ITSE<br />

IAE<br />

ITAE<br />

Fig. 3.ISE GA PID Controller <strong>of</strong> angle<br />

Table 3. The different performance <strong>in</strong>deces when position<br />

<strong>of</strong> the cart is output.<br />

Performance Indexes<br />

PID<br />

ISE<br />

ITSE<br />

IAE<br />

ITAE<br />

Fig. 4.ITSE GA PID Controller <strong>of</strong> angle<br />

Also we have taken the stable reference model for position<br />

<strong>of</strong> the cart whose transfer function is<br />

Reference Model<br />

And the transfer function <strong>of</strong> our system when position be the<br />

output is<br />

Fig. 5.IAE GA PID Controller <strong>of</strong> angle<br />

V. GENETIC ALGORITHM<br />

Genetic algorithms (GA) are search procedures <strong>in</strong>spired by<br />

the laws <strong>of</strong> natural selection and genetics. They can be<br />

viewed as a general-purpose optimization method and have<br />

been successfully applied to search, optimization and<br />

mach<strong>in</strong>e learn<strong>in</strong>g tasks. GA has the ability to solve difficult,<br />

multi dimensional problems with little problem-specific<br />

<strong>in</strong>formation and hence has been chosen as the optimization<br />

technique to solve various problems <strong>in</strong> control systems.<br />

It has been shown that compared with other traditional<br />

heuristic optimization method, Genetic Algorithm is likely<br />

to be more computationally efficient. The controller<br />

parameters are usually determ<strong>in</strong>ed by trial-and-error through<br />

simulation. In such case, the paradigm <strong>of</strong> GA appear to <strong>of</strong>fer<br />

an effective way for automatically and efficient search<strong>in</strong>g<br />

for a set <strong>of</strong> control performance.<br />

Fig. 6.ITAE GA PID Controller <strong>of</strong> angle<br />

23


Amplitude<br />

Tun<strong>in</strong>g Of PID Controller Of Inverted Pendulum Us<strong>in</strong>g Genetic Algorithm<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

Step Response<br />

PID<br />

GA PID<br />

Mr.kunal chakraborty is a lecturer <strong>of</strong> IMPS<br />

eng<strong>in</strong>eer<strong>in</strong>g college, Malda. He recived his B.Tech<br />

degree from Haldia Institute <strong>of</strong> Technology <strong>in</strong> 2010.<br />

He also a f<strong>in</strong>al year student <strong>of</strong> Asansol Eng<strong>in</strong>eer<strong>in</strong>g<br />

College <strong>of</strong> M.Tech <strong>in</strong> Electrical Department. He has a<br />

numbers <strong>of</strong> publications[Both <strong>in</strong> <strong>Journal</strong>s & <strong>in</strong><br />

Proceed<strong>in</strong>gs <strong>of</strong> Conferences, National &<br />

<strong>International</strong>]. His research <strong>in</strong>terests are <strong>in</strong> control<br />

system,Measurement.<br />

0.4<br />

0.2<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

Time (sec)<br />

Fig. 7.ISE GA PID Controller <strong>of</strong> cart<br />

Mr Rabi Ranjan Mukherjee is a f<strong>in</strong>al year student <strong>in</strong><br />

M.Tech <strong>in</strong> the Department <strong>of</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g,<br />

Asansol Eng<strong>in</strong>eer<strong>in</strong>g College, Kanyapur, Vivekananda<br />

Sarani, Asansol, Burdwan-713305, India. He received<br />

his B.Tech degree <strong>in</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g from West<br />

Bengal University <strong>of</strong> Technology <strong>in</strong> the year 2010. He<br />

has a numbers <strong>of</strong> publications[Both <strong>in</strong> <strong>Journal</strong>s & <strong>in</strong><br />

Proceed<strong>in</strong>gs <strong>of</strong> Conferences, National & <strong>International</strong>]. His research<br />

<strong>in</strong>terests are <strong>in</strong> control system.<br />

Mr.Suvobratra Mukherjee is a f<strong>in</strong>al year student <strong>of</strong><br />

M.Tech <strong>in</strong> the department <strong>of</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g<br />

<strong>of</strong> Asansol Eng<strong>in</strong>eer<strong>in</strong>g college Kanyapur,<br />

Vivekananda Sarani, Asansol, Burdwan-713305. He<br />

received his B.Tech degree <strong>in</strong> Electrical Eng<strong>in</strong>eer<strong>in</strong>g<br />

from West Bengal University <strong>of</strong> Technology <strong>in</strong> the<br />

year 2007. He is also an Assistant Pr<strong>of</strong>essor <strong>in</strong> Dept.<br />

<strong>of</strong> E.E, IMPS Eng<strong>in</strong>eer<strong>in</strong>g College, Malda. He has<br />

two & one number <strong>of</strong> publications <strong>in</strong> National &<br />

<strong>International</strong> Conferences.<br />

Fig. 8.ITSE GA PID Controller <strong>of</strong> cart<br />

CONCLUSION<br />

Modell<strong>in</strong>g <strong>of</strong> <strong>in</strong>verted pendulum shows that system is<br />

unstable with non-m<strong>in</strong>imum phase zero. Results <strong>of</strong> apply<strong>in</strong>g<br />

PID controllers show that the system can be stabilized.<br />

while PID controller method is cumbersome because <strong>of</strong><br />

selection <strong>of</strong> constants <strong>of</strong> controller, Constant <strong>of</strong> the<br />

controllers can be tuned by some Genetic Algorithm<br />

technique for better result if same order <strong>of</strong> reference model<br />

like our system is chosen then the result will be<br />

comparatively better. If Walsh function can be used <strong>in</strong><br />

equation (1&2) then we will directly f<strong>in</strong>d out the solution <strong>of</strong><br />

non-l<strong>in</strong>ear differential equations and non-l<strong>in</strong>ear controller<br />

can be designed.<br />

REFERENCES<br />

[1] Elmer P. Dadias, Patrick S. Fererandez, and David J,”Genetic<br />

Algorithm on L<strong>in</strong>e Controller For The Flexible Inverted Pendulum<br />

Problem”, <strong>Journal</strong> Of Advanced Computational Intelligence and<br />

Intelligent Informatics<br />

[2] R. Murillo Garcia1, F. Wornle1, B. G. Stewart1 and D. K. Harrison1,<br />

“Real-Time Remote Network Control <strong>of</strong> an Inverted Pendulum us<strong>in</strong>g<br />

ST-RTL”, 32nd ASEE/IEEE Frontiers <strong>in</strong> Education Conference<br />

November 6 - 9, 2002, Boston, MA.<br />

[3] DONGIL CHOI and Jun-Ho Oh “Human-friendly Motion Control <strong>of</strong><br />

a Wheeled Inverted Pendulum by Reduced-order Disturbance<br />

Observer” 2008 IEEE <strong>International</strong> Conference on Robotics and<br />

Automation Pasadena, CA, USA, May 19-23, 2008.<br />

[4] W. Wang, “Adaptive fuzzy slid<strong>in</strong>g mode control for <strong>in</strong>verted<br />

pendulum,” <strong>in</strong> Proceed<strong>in</strong>gs <strong>of</strong> the Second Symposium <strong>International</strong><br />

Computer Science and Computational Technology(ISCSCT ’09)<br />

uangshan, P. R. Ch<strong>in</strong>a, 26-28, Dec. pp. 231-234, 2009.<br />

[5] Berenji HR. A re<strong>in</strong>forcement learn<strong>in</strong>g-based architecture for fuzzy<br />

logic control. <strong>International</strong> <strong>Journal</strong> <strong>of</strong> Approximate Reason<strong>in</strong>g<br />

1992;6(1):267–92.<br />

[6] I. H. Zadeh and S. Mobayen, “ PSO-based controller for balanc<strong>in</strong>g<br />

rotary <strong>in</strong>verted pendulum, ” J. AppliedSci., vol. 16, pp. 2907-2912<br />

2008.<br />

24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!