• No results found

Development of a genetic algorithm controller for cartesian robot

N/A
N/A
Protected

Academic year: 2020

Share "Development of a genetic algorithm controller for cartesian robot"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)
(3)

UNIVERSITI TUN HUSSEIN ONN MALAYSIA

PENGESAHAN STATUS PROJEK SARJANA

DEVELOPMENT OF A GENETIC ALGORITHM CONTROLLER FOR CARTESIAN ROBOT

SESI PENGAJIAN: 2008/2009

Saya ONG JOO HUN mengaku membenarkan Projek SaIjana ini disimpan di Perpustakaan dengan syarat -syarat kegunaan seperti berikut:

1. Tesis adalah hakrnilik Universiti Tun Hussein Onn Malaysia.

2. Perpustakaan dibenarkan membuat salinan tmtuk tujuan pengqjian sahaja.

3. Perpustakaan dibenarkan mcmbuat salinan tesis ini sebagai bahan pertukaran antara institusi pengajian tinggi.

4.

**

Sila tandakan (..j)

o

SULIT

TERHAD

TIDAK TERHAD

(TANDATANGAN PENULIS)

Alamat Tetap:

72, Mcdan Mayang Pasir, Bayan Baru,

11950 Pulau Pinang

Tarikh: 5 NOVEMBER 2008

CATATAN:

(Mcngandungi maklumat yang berdaIjalt keselamatan atau kcpcntingan Malaysia seperti yang tcrmaktub di dalam AKT A RAHSIA RASMI 1972)

(Mengandungi maklumat TERHAD yang telalt ditcntukan oleh organisasilbadan di mana pcnyclidikan dijalankan

(TANDATANti

~PENYELIA)

HJ. MOHD AZLAN BIN ABD.SHUKOR (Nama Pcnyelia)

Tarikh: 5 NOVEMBER 2008

(4)

"I hereby declare that I have read this thesis and in my opinion this thesis in terms of

content and quality requirements fulfill the purpose for the award ofthe

Master of Electrical Engineering."

Signature

Name of Supervisor HJ. MOHO AZLAN BIN ABD. SHUKOR

(5)

DEVELOPMENT OF A GENETIC ALGORITHM CONTROLLER

FOR CARTESIAN ROBOT

ONGJOOHUN

Thesis submitted as a partial fulfilment of the requirement for the degree of

Master of Electrical Engineering

Faculty of Electrical and Electronic Engineering

University Tun Hussein Onn Malaysia

(6)

DEVELOPMENT OF A GENETIC ALGORITHM CONTROLLER FOR CARTESIAN ROBOT

ONGJOOHUN

Thesis submitted as a partial fulfilment of the requirement for the degree of Master of Electrical Engineering

Faculty of Electrical and Electronic Engineering University Tun Hussein Onn Malaysia

(7)

"I hereby declare that the work in this thesis is my own except for quotations and

summaries which have been duly acknowledged"

Signature ...

h/U-7J~

/.

... .

Name of Student ONGJOOHUN

Date 5 NOVEMBER 2008

(8)

III

(9)

IV

ACKNOWLEDGEMENT

The success of this thesis involves many valued contributions from a number

of persons. I am grateful to my project supervisor, Tuan Haji Mohd Azlan Bin Abd.

Shukor and co-supervisor, Pn. Hjh. Anita Binti Azmi for their invaluable

supervision, advice and guidance in the development of this project till its

completion. They have given me lot of encouragements, and supports that had

motivated me to successfully manage this project.

I would like to acknowledge the Public Service Department of Malaysia

(JP A) for sponsoring my master degree study. I also thank to Associate Professor Mr.

Pang Che Fong for his support. I am deeply indebted to Dr. Johnny Koh Siaw Paw

whose professional careers have always revolved around motion control, reviewed

the motion systems chapter for me, and participated in many more technical

discussions.

Finally, I would like to thank my friend especially Mr. Kantan NL P.

Saminathan who has always given me a full support in studies. Heartfelt gratitude

dedicated to my father, mother and sisters for their kindness, care and

encouragements.

It is my hope that this thesis would contribute to the organizations In

(10)

\.

ABSTRACT

(11)

VI

ABSTRAK

(12)

CHAPTER

CHAPTER I

TABLE OF CONTENTS

CONTENTS

THESIS STATUS CONFIRMATION SUPERVISOR'S CONFIRMATION TITLE

TESTIMONY DEDICATION

ACKNOWLEDGEMENT ABSTRACT

ABSTRAK

TABLE OF CONTENTS LIST OF FIGURES LIST OF TABLES

INTRODUCTION

1.1 Introduction 1.2 Problem Statement

1.3 Project Aims and Objectives 1.4 Project Scope

1.5 Overview of the Project 1.6 Project Contributions 1.7 Thesis Layout

\'\1

PAGE

II

III

IV

V

VI

VII

XII

XV

2

(13)

CHAPTER II LITERA TURE REVIEW 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 Introduction

Modem Technology of Robots

Applications of Robot

Laws of Robots

Classification of Robots

Robot Configurations

Literature Review for Similar Cartesian Robot

Drive Technology

2.8.1 Stepper Motor

Electro-Pneumatic System

Types of Robot Controller and Programming

Software

Literature Review for Similar Projects

2.11.1 Offline Path Planning of Cooperative

Manipulators Using Co-evolutionary

Genetic Algorithm

2.11.2 Cartesian Path Generation of Robot

Manipulators Using Continuous Genetic

Algorithms

Other Intelligent Control Techniques

2.12.1 Neural Networks

2.12.2 Hill Climbing

2.12.3 Simulated Annealing

Overview of Genetic Algorithm (GA)

2.13.1 Encoding

2.13.2 Initial Population Generation

2.13.3 Selection Criteria

2.13.3.1 Methods of Selection

2.13.4 Genetic Algorithm Operators

2.13.4.1 Crossover

2.13.4.2 Mutation

(14)

CHAPTER III 2.14

2.15 2.16

2.13.5 Fitness Evaluation Genetic Algorithm Parameters 2.14.1 Crossover Rate 2.14.2 Mutation Rate 2.14.3 Population Size

Advantages of Genetic Algorithms Summary of Literature Review

METHODOLOGY

3.1 Introduction

3.2 Hardware Development 3.3 Electrical Design

3.3.1 Electrical Protection System 3.3.2 Power Distribution System 3.3.3 Main Controller

3.3.4 Input and Output Module 3.3.4.1 Optical Micro Sensor 3.3.4.2 LED Equipped Reed Switch 3.3.5 Electro-Pneumatic System Design for End

Effector (Z Axis)

3.3.6 Control of Stepper Motors 3.3.7 Encoder

3.4 Mechanical Design

3.4.1 Mechanical Drives 3.4.2 Leadscrew Driven Load

3.4.2.1 Movement Profile 3.4.2.2 Acceleration Torque 3.5 Software Development

3.5.1 Simulation Package 3.5.2 GUI Control System

3.5.3 Machine Learning and Database

(15)

3.6

3.5.4 3.5.5

GA and Database

Genetic Algorithm Optimization Method 3.5.5.1 Genetic Algorithm Operation 3.5.5.2 3.5.5.3 3.5.5.4 3.5.5.5 Population Crossover Operation Mutation Method GA Optimization Result Machine Synchronization Method

CHAPTER IV RESULTS AND DISCUSSION

4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 Overview

Cartesian Robot Arm Kinematics XY Axes Move Module

Parts Fabrication

Machine Performance Results Comparison of GA and Random Efficiency of GA Operators Effect of GA Control Parameters 4.8.1

4.8.2 4.8.3 4.8.4

Number of Maximum Generation Population Size

Effect of Crossover Rate Effect of Mutation Rate

(16)

CHAPTER V CONCLUSION

5.1 Conclusion 5.2 Recommendations

REFERENCES

APPENDICES

XI

100 102

104

(17)

XII

LIST OF FIGURES

FIGURE TITLE PAGE

1.1 A typical genetic algorithm control system for Cartesian robot 5 1.2 Cartesian robot for laser marking / spot welding application 6

1.3 Block diagram of genetic algorithm controller for Cartesian robot 7

2.1 Components of a robot system 10

2.2 Sensor and control system 11

2.3 Comparison chart ofleading robot applications 12

2.4 Classification of robots 14

2.5 Robot configurations 15

2.6 Stepper motor movements 18

2.7 Electro-pneumatic drive system 19

2.8 A simple feedforward neural network 23

2.9 Flow chart of genetic algorithm 27

2.10 General structure of genetic algorithm 28 2.11 Situation before ranking (graph of fitnesses) 33 2.12 Situation after ranking (graph of order numbers) 33 2.13 Illustration of crossover operation 34 2.14 Mutation operator 35

3.1 Flow chart of the developed Cartesian robot system 42

3.2 Block diagram of the robotic system design 43

3.3 Circuit breaker and noise filter 44

3.4 Wiring diagram for electrical protection system 45

(18)

FIGURE TITLE 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18 3.19 3.20 3.21 3.22 3.23 3.24 3.25 3.26 -3.27 3.28 3.29 3.30 3.31 3.32 3.33 3.34 3.35 3.36 3.37

OEM750X micro stepping drive/controller and wiring connections

Photo micro sensor for limit and horne signal

Reed switch

Signal flow diagram and pneumatic elements

Pneumatic system

Electronic control circuit diagram

The use of limit switches

Operating pattern of detecting horne position

Incremental encoder (Omron E6B2-CWZ6C)

Leadscrew drive system

Basic motion system

Move profile

The generated XY axes report

Basic system software architecture

Simulation package for Cartesian robot system control

VB form layout window

VB source code for opening and reading data from Excel file

Conceptual design of the machine learning process

Machine learning database

Block diagram of machine learning

Visual Basic code for rank based selection

Genetic algorithm operation program

Population with permutation encoding chromosomes

Random numbers for 9 coordinates points

Ranked population

Evaluation subroutine for population

Sorting subroutine

Crossover operation

Mutation subroutine

Resultant of mutation

Resultant of genetic algorithm optimization

Machine synchronization method

(19)

FIGURE TITLE 3.38 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16

Daisy chain configuration for PC communication with controller

The developed Cartesian robot with laser head

Denavit~Hartenberg (D-H) transformation matrix for Cartesian robot

Velocity graph for stepper motor axis # 1 & #2

Torque graph for stepper motor axis #1 & #2

Performance curves for XY axes using S57-102-MO stepper motor

VB source code for XY axes motion and laser marking

Step angle accuracy

Distance comparison between GA and random

Real time control for GA and random

Random search

GA optimization

Percentage of each operator in searching the best solution

Graph of difference versus number of maximum generation

Graph of difference versus population size

Graph of difference versus crossover rate

Graph of difference versus mutation rate

(20)

LIST OF TABLES

TABLE TITLE

1.1

2.1

2.2 3.1

3.2 4.1

Number of possible solutions

Explanation of genetic algorithm terms

Various encoding methods

OEM750X micro stepping drive/controller's performance parameter

Leadscrew coefficient of friction and typical efficiencies

Performance parameters

xv

PAGE

3

25

29

46

56

(21)

CHAPTER I

INTRODUCTION

1.1 Introduction

A Cartesian coordinate robot is an industrial robot whose one or more

principal axes of control are linear. They move in a straight line rather than rotate.

Among other advantages is that this mechanical arrangement simplifies the robot

control arm solution. Cartesian robots are being widely employed in industrial

applications such as automobile spot welding or assembling lines that handle a

variety of car models. In order to avoid the risk factor in spot welding application,

various steps can be taken. One of the prominent method is by substituting the human

hands with the robotic arm in handling these dangerous and hazardous environments.

It is with these reasons that this study was conducted with the primary objective to design and develop a new low-cost, high-efficiency Cartesian robotic

arm for application such as spot welding. A new evolutionary computation method

using Genetic Algorithm (GA) to control and optimize the system performance in

terms of its positioning and speed that would contribute towards encouraging a

productive and quality process will be developed. GA operates on populations of

(22)

2

candidate controller is repeatedly grown according to crossover, mutation and other GA operators and then culled according to the fitness function.

The competition between different companies regarding pnce and performance of the Cartesian robot and control system has been the most important motivation. In case of cost saving on robotics equipments, the solution is an alternative. It also to aware national interest in science and technology and this constitutes a prerequisite for an inventive society.

1.2 Problem Statement

The problem can be stated as: Given a Cartesian robot with a spot welding torch (laser head as replacement of torch), a set of known fixed coordinates with the initial and final configurations, find a coordinated motion plan for the laser head from its initial to final configuration and optimizing the overall time taken for the laser head to perform the spot welding.

To give an idea of the complexity of the problem, let's consider a number of n coordination points and one origin points for the laser head to be fixed at positions (xo, yo). For this application, the search space is a discrete space and there are (n!) permutation scheme of the close routes or path that this robot has to go through. GA will be the search algorithm to find the best or approximate optimization solution for the shortest path and time in this problem.

(23)

3

n

~(PI

_ql)2 +(P2 -q2)2 + ... +(Pn -qn)2 =

2)p,

_q,)2 (Ll)

;=1

The developed Cartesian robot is scheduled of a route for the spot welder to perfonn welding on a work piece. In this robotic application, the "cities" are points to weld, and the "cost of travel" includes the time for retooling the robot (single machine job sequencing problem).

Thus, given a set of points C = {ct, C2, ... ,cd, for each pair (cj, Cj), ii:j, let

d(cj, Cj) be the distance between point Cj and c} Solving the TSP entails finding a

pennutation n' of the points (c 1t' (1), ... ,C 1t'(k)), such that

k k

Ld(c"'(i),c"'(i+I))

~

Ld(c"(i)'C"('+I)) (1.2)

;=1 ;=1

The size of the solution space, q is given in equation 1.2 for n > 2, where n is the number of points. This is the number of Hamiltonian cycles in a complete graph of n nodes, that is, closed paths that visit all nodes exactly once.

1 q = -(n-l)!

2 (1.3)

For a laser head with n number of coordination points, the numbers of possible solutions / routes are n! where n = the number of points are given in Table 1.1. Therefore, an evolutionary solution such as genetic algorithm is introduced to optimize the perfonnance and solve the path planning sequences problem in shortest time.

No. of Points

M

Number of Solutions

5

120

10

3628800

50

3.04E+64

[image:23.595.177.438.608.668.2]
(24)

4

1.3 Project Aims and Objectives

The main objective of this project is to design and develop a new low-cost, high efficiency Genetic Algorithm (GA) controller used in Cartesian robotic arm for spot welding application. To achieve this objective, the following works will be carried out during the research period:

1. To design and develop the hardware of the proposed robotic system. This includes both its electrical and mechanical components.

(a) The electrical components consist of two Parker Compumotor OEM750X micro stepping drive/controller as the main controller, an electrical protection system, a power distribution system, input/output modules, an electro-pneumatic-based Z axis, two stepper motors with encoder feedback system and a laser pointer that will replace the spot welding torch for demonstration purpose in this project.

(b) The mechanical components of the proposed robotic system consist of two lead screw drive systems for both X and Y axes, a jig and fixture module and a mechanical base.

2. To develop a machine-learning system and program via a new genetic algorithm that is capable of performing the following analysis:

(a) Reliably and consistently learn and repeat a given tasks.

(b) Ability to look for the optimum sequences via genetic algorithm evolutionary solutions.

Figure

Table 1.1: Number of possible solutions

References

Related documents

The obtained results of rate determination of statistical correlation between selected variables by means of classical canonical analysis and non-parametric correlation

The deposit that has 100 m polygons (dashed lines), partially covers some hills, high albedo mounds (white arrow), and impact craters (black arrow). d) The deposit (white symbols)

Introduction : Importance and nature of marketing research, Marketing research in international context, Complexity and issues, International data reliability and

John with aid worker Jennifer Freeman, BA ’92, at the Oruchinga refugee settlement, southern

Results from comparison studies show that models chosen by maximizing the training class balance accuracy consistently yield both high overall accuracy and per class recall on the

By coupling sophisticated machine learning and artificial intelligence with a unique understanding of a hacker’s mentality, Cylance provides the technology and services to be

Keywords: orange peels, corn cobs, biomass, briquettes, composite solid fuel, proximate analysis, ultimate analysis, water boiling test.. Citation: Aliyu,