ZAILANI BIN AB GHANI

26
PID OFFLINE TUNING USING GRAVITATIONAL SEARCH ALGORITHM ZAILANI BIN AB GHANI UNIVERSITI TEKNOLOGI MALAYSIA

Transcript of ZAILANI BIN AB GHANI

Page 1: ZAILANI BIN AB GHANI

PID OFFLINE TUNING USING GRAVITATIONAL SEARCH ALGORITHM

ZAILANI BIN AB GHANI

UNIVERSITI TEKNOLOGI MALAYSIA

Page 2: ZAILANI BIN AB GHANI

PID OFFLINE TUNING USING GRAVITATIONAL SEARCH ALGORITHM

ZAILANI BIN AB GHANI

A project report submitted in partial fulfilment of the

requirements for the award of the degree of

Master of Engineering (Electrical - Mechatronics & Automatic Control)

Faculty of Electrical Engineering

Universiti Teknologi Malaysia

JUNE 2013

Page 3: ZAILANI BIN AB GHANI

iii

Thanks to ALLAH S.W.T and his Prophet Muhammad S.A.W.

Especially dedicated to my beloved mother, father, wife, daughter and friends who

have encouraged, guided and inspired me throughout my journey of education.

Page 4: ZAILANI BIN AB GHANI

iv

ACKNOWLEDGEMENT

Praise to Allah S.W.T., the Most Gracious and the Most Merciful, whose

blessing and guidance have helped me to complete this project report. There is no

knowledge or power without His permission, the Highest and the Greatest. Peace and

blessing of Allah be upon our Prophet Muhammad S.A.W. who has given light to

mankind. I would like to take this opportunity to express my deepest gratitude to my

supervisor, Dr. Sophan Wahyudi Bin Nawawi for his invaluable guidance, assistance

and support throughout the project. Under his supervision, many aspects regarding on

this project has been explored. With the knowledge, idea and support that have been

received from him, I am able to complete this project and thesis in the time given.

Besides, I would like to thanks to my parent, wife, daughter, family and

friends for their understanding during the period of this project. They have been very

supportive throughout the study and provided me with moral support in times of

hardship that drive me to complete this study. Unfortunately, it is impossible to list

all of them in this page. However, your contribution will always be remembered.

My utmost thanks also go to Kementerian Pelajaran Tinggi (KPT) Malaysia

and Politeknik Ibrahim Sultan (PIS) for funding my Master study at Universiti

Teknologi Malaysia (UTM). With this knowledge, it will be shared with other student

and academician in PIS.

Page 5: ZAILANI BIN AB GHANI

v

ABSTRACT

PID controller is a common controller which is applied for many applications

around the world. The simple structure and less effort of tuning make this controller

being chosen in industrial and many research areas. The PID controller parameters

usually tune heuristically to obtain the required output performance. This method has

no systematic way of tuning procedure thus make the controller parameters tuning

consuming a lot of time and effort. This problem will be more complicated when the

system is dynamic and the performance of output response is the priority. With

motivation of this problem, the Gravitational Search Algorithm (GSA) can be

developed to make the process of PID controller tuning can be more easily and has

systematic procedure of tuning method.

Page 6: ZAILANI BIN AB GHANI

vi

ABSTRAK

Pengawal PID banyak digunakan untuk aplikasi di seluruh dunia. Strukturnya

yang mudah dan kurang usaha penalaan membuatkan pengawal ini banyak dipilih

dalam bidang penyelidikan dan perindustrian. Parameter pengawal PID biasanya

ditala secara heuristic untuk mendapatkan prestasi keluaran yang dikehendaki.

Kaedah ini tidak mempunyai cara prosedur penalaan yang sistematik, membuatkan

penalaan parameter pengawal mengambil banyak masa dan usaha. Masalah ini akan

menjadi lebih rumit apabila sistem dinamik dan prestasi sambutan output menjadi

keutamaan. Sehubungan dengan masalah ini, Algoritma Pencarian Graviti (GSA)

boleh dibangunkan untuk membuatkan proses penalaan pengawal PID menjadi lebih

mudah dan mempunyai prosedur kaedah penalaan yang lebih sistematik.

Page 7: ZAILANI BIN AB GHANI

vii

TABLE OF CONTENTS

CHAPTER TITLE PAGE

DECLARATION ii

DEDICATION iii

ACKNOWLEDGEMENTS iv

ABSTRACT v

ABSTRAK vi

TABLE OF CONTENTS vii

LIST OF TABLES x

LIST OF FIGURES xi

LIST OF ABBREVIATIONS xiii

LIST OF SYMBOLS xiv

1 INTRODUCTION 1

1.1 Background 1

1.2 Overview of Project 2

1.3 Problem Statement 3

1.4 Significant of Project 4

1.5 Objectives of Project 4

1.6 Scopes of Project 5

1.7 Methodology of Project 5

1.8 Outline of the Project Report 7

Page 8: ZAILANI BIN AB GHANI

viii

2 LITERATURE REVIEW 8

2.1 Introduction 8

2.2 Heuristics algorithm 8

2.3 Gravitational Search Algorithm 10

2.4 Developments in Optimization for Gantry Crane

System 14

3 PID AND GANTRY CRANE SYSTEM 16

3.1 Introduction 16

3.2 PID Control System 17

3.2.1 The Characteristics of P, I, and D Controllers 18

3.2.2 Traditional Tuning Method of PID Controller 19

3.3 Gantry Crane System 20

3.3.1 Model of Gantry Crane System 21

3.3.2 Non Linear Gantry Crane System Model using

Matlab & Simulink 22

4 IMPLEMENTATION, RESULTS AND DISCUSSION 25

4.1 Introduction 25

4.2 Simulation Model of Non Linear Gantry Crane System 27

4.3 First Phase: Analysis of a Gantry Crane System

without Controller 28

4.4 Second Phase: Analysis of a Gantry Crane System

with Controller 30

4.5 Implementation of GSA 31

4.6 Results Analysis 35

4.7 Simulation Analysis 42

4.8 Comparison Results and Simulation Analysis

Between GSA and PSO 48

4.8.1 Case 1 48

4.8.2 Case 2 50

Page 9: ZAILANI BIN AB GHANI

ix

4.8.3 Case 3 52

4.9 Discussion 54

5 CONCLUSION AND FUTURE WORKS 55

5.1 Conclusion 55

5.2 Future Works 56

REFERENCES 57

Page 10: ZAILANI BIN AB GHANI

x

LIST OF TABLES

TABLE NO. TITLE PAGE

3.1 PID Controller Properties 19

3.2 System Parameters 22

4.1 Three Cases with Different Setting of Weight

Summation 35

4.2 PID and PD Based on GSA LWS Approach for

Case 1 36

4.3 PID and PD Based on GSA LWS Approach for

Case 2 37

4.4 PID and PD Based on GSA LWS Approach for

Case 3 38

4.5 Performances of Gantry System for Case 1 39

4.6 Performances of Gantry System for Case 2 40

4.7 Performances of Gantry System for Case 3 41

4.8 PID and PD Based on Linear Weight Summation

Approach 42

4.9 Performances of Trolley Displacement and Payload

Oscillation 42

4.10 Best Performances of Trolley Displacement and

Payload Oscillation 54

Page 11: ZAILANI BIN AB GHANI

xi

LIST OF FIGURES

FIGURE NO. TITLE PAGE

1.1 Methodology 6

3.1 PID Controller Construction 17

3.2 Gantry Crane System 20

3.3 Schematic Diagram of a Gantry Crane System 21

3.4 Nonlinear block diagram 23

3.5 Block diagram with PID controller in the Gantry

Crane Model system 23

3.6 Block diagram inside the Gantry Crane Model 24

4.1 Project Implementation 26

4.2 Simulink of Gantry Crane Model 27

4.3 Block Diagram Inside the Gantry Crane Model 27

4.4 List of Parameters 28

4.5 Trolley Displacement 29

4.6 Payload Oscillation 29

4.7 Control Structure with Five Controller Gains

(PID and PD) 30

4.8 Nonlinear Gantry Crane System 30

4.9 Flowcharts of GSA Implementation to tune PID

Parameters 33

4.10 Pseudo Code of GSA in Solving Gantry Crane

Problem 34

Page 12: ZAILANI BIN AB GHANI

xii

4.11 Performances of Trolley Displacement for Case 1 43

4.12 Performances of Payload Oscillation for Case 1 43

4.13 Performances of Trolley Displacement for Case 2 44

4.14 Performances of Payload Oscillation for Case 2 44

4.15 Performances of Trolley Displacement for Case 3 45

4.16 Performances of Payload Oscillation for Case 3 45

4.17 Performances of Trolley Displacement for

Different Cases 46

4.18 Performances of Payload Oscillation for

Different Cases 47

4.19 Performances of Trolley Displacement for Case 1 48

4.20 Performances of Payload Oscillation for Case 1 49

4.21 Performances of Trolley Displacement for Case 2 50

4.22 Performances of Payload Oscillation for Case 2 51

4.23 Performances of Trolley Displacement for Case 3 52

4.24 Performances of Payload Oscillation for Case 3 53

Page 13: ZAILANI BIN AB GHANI

xiii

LIST OF ABBREVIATIONS

PID - Proportional Integral Derivative

PD - Proportional Derivative

GSA - Gravitational Search Algorithm

PSO - Particle Swarm Optimization

MOPSO - Multi Objective Particle Swarm Optimization

LWS - Linear Weight Summation

Page 14: ZAILANI BIN AB GHANI

xiv

LIST OF SYMBOLS

SSE - Steady State Error

OS - Overshoot

Ts - Settling Time

max - Maximum Angle of Payload Oscillation

T - Period of 1 Cycle Oscillation

P - Proportional

I - Integral

D - Derivative

KP - Parameter of Proportional

KI - Parameter of Integral

KD - Parameter of Derivative

ω - Initial Weight

wSSE - Weight for Steady State Error

wOS - Weight for Overshoot

wTs - Weight for Settling Time

V - Input Voltage

m1 - Payload Mass

m2 - Trolley Mass

l - Cable Length

x - Horizontal Position of Trolley

- Payload Oscillation

T - Torque

F - Force

Page 15: ZAILANI BIN AB GHANI

xv

g - Gravitational

B - Damping Coefficient

R - Resistance

KT - Torque Constant

KE - Electric Constant

rP - Radius of Pulley

z - Gear Ratio

Page 16: ZAILANI BIN AB GHANI

CHAPTER 1

INTRODUCTION

1.1 Background

Nowadays, there has been lot of efforts in developing algorithms based on the

behaviors of natural phenomena. Various heuristic optimizations for example

Harmony Search Algorithm (HSA), Artificial Bee Colony Algorithm (ABC), Firefly

Algorithm (FA), Genetic Algorithm (GA), Particle Swarm Optimization (PSO) etc.

methods have been proposed to solve variety of complex computational problems.

These algorithms are very useful especially in terms of solving such as optimization

problem in control engineering. Many researcher in many different areas are

progressively analyzed these algorithms to solve different optimization problems.

Some algorithms give a better solution for some particular problems than others

because there is no specific algorithm to achieve the best solution for all optimization

problems [1]. Hence, a new optimization algorithm called Gravitational Search

Algorithm (GSA) have been proposed and applied to PID offline controller. The

results show that performance of the proposed approach will be analyzed and

compared with other optimization algorithms.

Page 17: ZAILANI BIN AB GHANI

2

1.2 Overview of Project

Gravitational Search Algorithm (GSA) is a new optimization algorithm based

on the law of gravity. This algorithm is based on the Newtonian gravity: ‘‘Every

particle in the universe attracts every other particle with a force that is directly

proportional to the product of their masses and inversely proportional to the square of

the distance between them” [2].

In this project, gantry crane system is being selected as a test bed model and

GSA is implemented in find best optimal parameter for the controller. Gantry crane is

a transporter system that widely used to transfer very heavy loads from one to another

location. It supported by two or more legs and trolley. Crane operator will seat inside

the trolley and responsibility to control and move the trolley with the payload hanged

via cable hook which is directly connected to the trolley. The trolley will move along

the horizontal rail until reach to the desired location [3].

There are two important roles to be considered in this test bed model which

are position of trolley and payload swing angle. Trolley should move as fast as

possible while payload should not give huge impact on the swing angle that can cause

accident and harm people surroundings [4]. In order to control both of it, PID for

position control and PD for anti-sway control are needed [5].

Page 18: ZAILANI BIN AB GHANI

3

1.3 Problem Statement

i. PID controller parameter tuning is a constraint for optimum condition value.

Finding the optimal value for PID controller parameter is significantly

contributed to the advancement of control system knowledge and fulfills with

industrial needs.

ii. A variety of efforts have been made in order to tune PID controller parameters

for the best systems performance but still there is no optimal solution. In this

work a tuning method for PID controller parameters will be presented to

improve the performance for the gantry system. The GSA method which

design based on computational artificial intelligence is believed can provide a

better solution for this optimization problem.

Page 19: ZAILANI BIN AB GHANI

4

1.4 Significant of Project

i. This project focuses on using the PID controller to improve the stability

and performances of a control system.

ii. There are some difficulties in finding the optimal value of PID

parameters. Recently, meta-heuristic global optimization algorithms

become a popular choice for solving complex and intricate problems

that contribute difficulties to solve by traditional methods. Therefore,

Gravitational Search Algorithm (GSA) is chosen and implemented to

tune PID parameter controller.

1.5 Objectives of Project

There are three objectives need to be achieved for this project.

To obtain optimal PID controller gains for a gantry crane system using GSA.

To verify the performance of the gantry crane in terms of position

displacement and payload oscillation.

To compare the result with other optimization method.

Page 20: ZAILANI BIN AB GHANI

5

1.6 Scopes of Project

There are three scopes of work focused in this study area:

Use MATLAB and Simulink in writing GSA code and for simulation

analysis.

Gantry crane control system is used as the test bed for the algorithm.

Apply GSA method in finding the optimal PID gains of gantry crane system.

1.7 Methodology of Project

In term of methodology, it can be summarized as in Figure 1.1

Page 21: ZAILANI BIN AB GHANI

6

Figure 1.1: Methodology

Identification of

Research Area

Start

Literature Review

Studies in PID controller

for Gantry Crane System

(A test bed model)

Analysis on the Designed

Model with and without

Controller

Design and Analysis of

the GSA-Tuned Method

Comparison Result with

PSO Tuning Method

Conclusion

Identification of

Research Area

Area

Page 22: ZAILANI BIN AB GHANI

7

1.8 Outline of Project Report

This section presents the outlines of the project report. This report is

organized into five chapters and each of these chapters is generally explained.

Chapter 1 gives a brief introduction regarding on implementation of

Gravitational Search Algorithm (GSA) to tune PID parameter controller. Problem

statement, objectives, and significant of the project work will be stated and listed

clearly.

Chapter 2 discusses literature review on Gravitational Search Algorithm

(GSA). The development of optimization approach for the gantry crane system is

reviewed based on previous researcher’s findings.

Chapter 3 discusses characteristic of PID controller and gantry crane system

model and mathematical expression used in this project.

Chapter 4 consists of two phases of work. The first phase involves analysis

of gantry crane model without PID controller. The second phase involves analysis

with PID controller and it will be tuned by using GSA methods. At the end of this

chapter, results will be compared with PSO in order to identify the best technique

tuning method.

Chapter 5 contains conclusion regarding on the whole work and

recommendation for the future works.

Page 23: ZAILANI BIN AB GHANI

REFERENCES

1. D.H. Wolpert, W.G. Macready, No free lunch theorems for optimization.

IEEE Transactions on Evolutionary Computation. 1997. 67–82.

2. Esmat Rashedi, Hossien Nezamabadi-pour and Saeid Saryazdi. GSA: A

Gravitational Search Algorithm. Information Sciences 179. 2009. 2232-2248.

3. Hans Butler, Ger Honderd and Job Van Amerongen. Model Reference

Adaptive Control of a Gantry Crane Scale Model. IEEE Control Systems.

1991. 57-62.

4. Hazriq Izzuan Jaafar. PSO-Tuned PID Controller for a Nonlinear Gantry

Crane System. Tesis Sarjana. UTM; 2012.

5. Solihin, M.I., Wahyudi, Kamal, M.A.S. and Legowo. A. Optimal PID

controller tuning of automatic gantry crane using PSO algorithm. Proc. Of

International Symposium on Mechatronics and Its Application (ISMA 2008).

2008.

6. A. Lazar, R.G. Reynolds. Heuristic knowledge discovery for archaeological

data using genetic algorithms and rough sets. Artificial Intelligence

Laboratory, Department of Computer Science, Wayne State University. 2003.

Page 24: ZAILANI BIN AB GHANI

58

7. S.J. Russell, P. Norvig. Artificial Intelligence a Modern Approach. Prentice

Hall, Upper Saddle River, New Jersey. 1995.

8. K.S. Tang, K.F. Man, S. Kwong. Q. He, Genetic algorithms and their

applications. IEEE Signal Processing Magazine 13 (6) .1996. 22–37.

9. M. Dorigo, V. Maniezzo, A. Colorni. The ant system: optimization by a

colony of cooperating agents. IEEE Transactions on Systems, Man, and

Cybernetics – Part B 26 (1).1996. 29–41.

10. J. Kennedy and R.C. Eberhart. Particle swarm optimization. Proceedings of

IEEE International Conference on Neural Networks, vol. 4. 1995. 1942–1948.

11. Mahmud Iwan Solihin, Wahyudi. M.A.S Kamal and Ari Legowo Objective

Function Selection of GA-Based PID Control Optimization for Automatic

Gantry Crane. International Conferences on Communication Engineering. 13-

15 May. Kuala Lumpur, Malaysia. 2008. 883-887.

12. Abachizadeh, M., Yazdi, M.R.H., and Yousefi-Koma. A. Optimal Tuning of

PID Controllers Using Artificial Bee Colony. Proceedings of the IEEE/ASME

International Conference on Advanced Intelligent Mechatronics. 6-9 July.

Montréal, Canada.2010. 379-384.

13. Jiajia He and Zaien Hou. Adaptive ant colony algorithm and its application to

parameters optimization of PID controller. Proceedings of the 3rd

International Conference on Advanced Computer Control (ICACC 2011). 18-

20 January. Harbin, China. 2011. 449-451.

14. Olympia Roeva and Tsonyo Slavov. Firefly Algorithm Tuning of PID

Controller for Glucose Concentration Control during E.Coli Fed-Batch

Page 25: ZAILANI BIN AB GHANI

59

Cultivation Process. Proceedings of the Computer Science and Information

Systems (FedCSIS). 9-12 September. Wroclow, Poland. 2012. 455-462.

15. Hugh Jack. Dynamic System Modeling and Control. Version 2.2. 19 Jul 2002.

16. Kitamura, S., Mori, K., Shindo, S., Izui, Y. and Ozaki, Y. Multiobjective

energy management system using modified MOPSO. Proceedings of the 2005

IEEE International Conference on Systems, Man and Cybernetics. October

10-12. Hawaii, USA. 2005. 3497- 3503.

17. Sharaf, A.M., El-Gammal, A.A.A. A novel discrete multi-objective Particle

Swarm Optimization (MOPSO) of optimal shunt power filter. Power Systems

Conference and Exposition, 2009. PSCE '09. IEEE/PES, March 15-18.Seattle.

WA. 2009. 1-7.

18. Jinzhong Li, Jintao Zeng, Jiewu Xia, Manhua Li and Changxin Liu. Research

on Grid Workflow Scheduling Based on MOPSO Algorithm. Proceedings of

the 2009 WRI Global Congress on Intelligent Systems. May 19-21.Xiamen,

China. 2009. 199-203.

19. Fdhila, R., Hamdani, T.M., and Alimi, A.M. A new hierarchical approach for

MOPSO based on dynamic subdivision of the population using Pareto

fronts.Proceedings of the 2010 IEEE International Conference on Systems,

Man and Cybernetics. October 10-13. Istanbul, Turkey. 2010. 947-954.

20. Fdhila, R., Hamdani, T.M., and Alimi, A.M. Distributed MOPSO with a new

population subdivision technique for the feature selection. Proceedings of the

2011 5th International Symposium on Computational Intelligence and

Intelligent Informatics. September 15-17.Floriana, Malta. 2011. 81-86.

Page 26: ZAILANI BIN AB GHANI

60

21. Hazriq Izzuan Jaafar, Z. Mohamed, M.F Sulaima, J.J. Jamian. Optimal PID

Controller Parameters for Nonlinear Gantry Crane System via MOPSO

Technique. IEEE International Conference On Sustainable Utilization and

Development in Engineering and Technology (CSUDEP). MMU, Cyberjaya

2013. 85-90.