A NOVEL HYBRID FUZZY PID CONTROLLER FOR ATTITUDE STABILIZATION OF A REMOTE OPERATED QUADROTOR UNMANNED AERIAL

24  Download (2)

Full text

(1)

A NOVEL HYBRID FUZZY PID CONTROLLER FOR ATTITUDE STABILIZATION OF A REMOTE OPERATED QUADROTOR UNMANNED AERIAL

VEHICLE

ZUL AZFAR BIN AHMAM

UNIVERSITI MALAYSIA PERLIS

2012

(2)

A NOVEL HYBRID FUZZY PID CONTROLLER FOR ATTITUDE STABILIZATION OF A REMOTE OPERATED QUADROTOR UNMANNED AERIAL

VEHICLE

by

ZUL AZFAR BIN AHMAM (0930610364)

A thesis submitted in fulfillment of the requirements for the degree of Master of Science (Mechatronic Engineering)

School of Mechatronic Engineering UNIVERSITI MALAYSIA PERLIS

2012

(3)

i

UNIVERSITI MALAYSIA PERLIS

NOTES : * If the thesis is CONFIDENTIAL or RESTRICTED, please attach with the letter from the organization with period and reasons for confidentially or restriction.

DECLARATION OF THESIS

Author’s full name : ZUL AZFAR BIN AHMAM Date of birth : 29TH JANUARY 1986

Title : A NOVEL HYBRID FUZZY PID CONTROLLER FOR ATTITUDE

STABILIZATION OF A REMOTE OPERATED QUADROTOR UNMANNED AERIAL VEHICLE

Academic Session : 2009-2011

I hereby declare that the thesis becomes the property of Universiti Malaysia Perlis (UniMAP) and to be placed at the library of UniMAP. This thesis is classified as :

CONFIDENTIAL (Contains confidential information under the Official Secret Act 1972)*

RESTRICTED (Contains restricted information as specified by the organization where research was done)*

OPEN ACCESS I agree that my thesis is to be made immediately available as hard copy or on-line open access (full text)

I, the author, give permission to the UniMAP to reproduce this thesis in whole or in part for the purpose of research or academic exchange only (except during a period of _____ years, if so requested above).

Certified by:

_________________________ _________________________________

SIGNATURE SIGNATURE OF SUPERVISOR

__________________________ ______________________________

(NEW IC NO. / PASSPORT NO.) NAME OF SUPERVISOR

Date :_________________ Date : _________________

(4)

ii ACKNOWLEDGEMENT

Thanks to Allah with His wisdom and permission, this thesis can be completed in time. This research project would not have been possible without the support of many people. I wish to express my gratitude to the supervisor, Assoc. Prof. Dr. Hazry Bin Desa who was abundantly helpful and offered invaluable assistance, support and guidance.

Deepest gratitude also due to the examiners, without their knowledge and advices this study would not have been successful. A high appreciation to Ministry of higher Education Malaysia (MOHE) for funding this project through Fundamental Research Grants Scheme (FRGS-9003-00215). I would also like to convey thanks to the School of Mechatronic Engineering and Autonomous System & Machine Vision Research Cluster, University Malaysia Perlis (UniMAP) for providing facilities in finishing this project. I offer my regards and blessings to my beloved families; for their understanding and endless love, through the duration of my studies and great thanks to all my friends those who supported me in any respect during the completion of the project.

(5)

iii TABLE OF CONTENTS

PAGE

THESIS DECLARATION i

ACKNOWLEDGEMENT ii

TABLE OF CONTENTS iii LIST OF TABLES vii LIST OF FIGURES viii LIST OF ABBREVIATION xii LIST OF SYMBOLS xiv ABSTRAK xvi ABSTRACT xvii CHAPTER 1 - INTRODUCTION 1.1 Research Background 1

1.2 Problem Statements 2

1.3 Research Objectives 4

1.4 Thesis Outline 4

(6)

iv CHAPTER 2 - LITERATURE REVIEW

2.1 Introduction 6

2.2 Quadrotor Unmanned Aerial Vehicle (UAV) 7

2.3 Attitude Control System 10

2.4 Hybrid Fuzzy PID (FPID) Controller 13

CHAPTER 3 - QUADROTOR SYSTEM 3.1 Introduction 27

3.2 Hardware Design and Specification 27

3.2.1 Quadrotor Structure 28

3.2.2 Hardware Architecture 30

3.3 Quadrotor Kinematics 38

3.4 Quadrotor Dynamics 41

3.5 Identification of the Constant 45

3.6 Summary 46

CHAPTER 4 - ATTITUDE CONTROLLER DESIGN 4.1 Introduction 48

4.2 Quadrotor Attitude Control Systems 48

4.3 Attitude Controller Using PID Controller 52

4.4 Attitude Controller Using FPID Controller 54

4.4.1 Fuzzy Logic Membership Function 56

4.4.2 Fuzzy Logic Controller Rules 31

(7)

v

4.4.3 Defuzzification 62

4.5 Attitude Control Block Diagram 64

4.5.1 Roll Axis Stabilization Control 64

4.5.2 Pitch Axis Stabilization Control 65

4.5.3 Yaw Axis Stabilization Control 65

4.6 Attitude Controller Simulation 66

4.7 Summary 69

CHAPTER 5 - EXPERIMENT SETUP, RESULT AND DISCUSSION 5.1 Introduction 70

5.2 Finite Element Analysis (FEA) of Quadrotor Structure 70

5.3 Trust Measurement Experiment 73

5.4 Simulation Results 75

5.4.1 Roll and Pitch Axes 76

5.4.2 Yaw Axis 84

5.5 Testing Platform 92

5.6 Attitude Controller Implementation 94

5.6.1 Roll and Pitch Axes Implementation Results 96

5.6.2 Yaw Axis Implementation Results 100

5.6.3 PID and FPID Controller Comparison 102

5.7 Flight Test 103

5.8 Discussion 104

5.9 Summary 104

(8)

vi CHAPTER 6 – CONCLUSION AND FUTURE WORKS

6.1 Introduction 106

6.2 Conclusion 106

6.3 Future Work 107

REFERENCES 109

APPENDIX A 113

APPENDIX B 114

APPENDIX C 118

LIST OF PUBLICATIONS 121

LIST OF AWARDS 122

(9)

vii LIST OF TABLES

NO. PAGE

3.1 Comparison of the BLDC and BDC motors 34

3.2 Quadrotor constants 46

5.1 Thrust measurement result 75

5.2 Analysis of PID controller results for roll and pitch axes 77 5.3 Analysis of FPID controller results for roll and pitch axes 80 5.4 Comparison result for PID and FPID controller for roll and pitch axes 82 5.5 Analysis of PID controller result for yaw axis 85 5.6 Analysis of FPID controller results for yaw axis 88 5.7 Comparison result for PID and FPID controller for yaw axis 91 5.8 Comparison result for PID and FPID controller for roll, pitch and yaw axes 102

(10)

viii LIST OF FIGURES

NO. PAGE

2.1 Breguet-Richet quadrotor helicopter “Gyroplane No.1” 8

2.2 Quadrotor Propellers Configuration 9

2.3 General attitude control block diagram for quadrotor 12 2.4 Results of PID and Fuzzy PID Controllers for grate cooler in cement plant 13

2.5 A simple electromagnetic suspension system 14

2.6 Types of Fuzzy PID Controller structures 15

2.7 PID vs Fuzzy PID Controller output response 16

2.8 Fuzzy PD control with integral controller 18

2.9 Fuzzy PI control with derivative controller 19 2.10 Fuzzy PI controller with fuzzy PD controller 20 2.11 Simulation result of fuzzy PID compared to classical PID controller 22 2.12 Fuzzy P controller with integral and derivative controller 22 2.13 Simulation result for fuzzy P + ID controller 24 2.14 Fuzzy P controller with fuzzy I and fuzzy D controller 24 2.15 Simulation result for fuzzy P + fuzzy I + fuzzy D controller 26

3.1 Quadrotor structure illustration 28

3.2 Real quadrotor structure 29

3.3 Quadrotor hardware architecture 30

3.4 Flight control board 32

3.5 Placement of FCB on quadrotor structure 33

3.6 Li-Po battery 33

(11)

ix LIST OF FIGURES

NO. PAGE

3.7 Robbe ROXXY 2827-35 BLDC motor 35

3.8 Arrowind electronic speed controller 36

3.9 12X4.5 contra-rotating propeller 36

3.10 Futaba 2.4 GHz 6EX transmitter with R617FS receiver 37

3.11 Speed variation in quadrotor movements 38

3.12 Quadrotor structure and earth inertial frame 41 4.1 Relationship of rotational movements to translation movements

on quadrotor system 49

4.2 Attitude controller block diagram 51

4.3 PID controller block diagram 53

4.4 FPID attitude controller block diagram 54

4.5 FPID controller block diagram 55

4.6 Membership function for error (e) 57

4.7 Membership function for derivative error (de/dt) 58 4.8 Membership function for proportional gain (Kp) 58 4.9 Membership function for integral gain (Ki) 59 4.10 Membership function for derivative gain (Kd) 60

4.11 Fuzzy logic rules 61

4.12 Defuzzification values 63

4.13 FPID stabilization controller for roll axis 64 4.14 FPID stabilization controller for pitch axis 65

(12)

x LIST OF FIGURES

NO. PAGE

4.15 FPID stabilization controller for yaw axis 66

4.16 Quadrotor simulation block diagram 67

4.17 Quadrotor simulator using Simulink 3D animation 68 5.1 A 30 N force applied on the center of quadrotor structure in FEA 71

5.2 Displacement result of FEA 71

5.3 Stress result of FEA 72

5.4 Strain result of FEA 72

5.5 Quadrotor structure with 500N load applied 73

5.6 Experiment setup for thrust measurement 74

5.7 Thrust measurement result 74

5.8 Simulation result for roll and pitch axis using PID controller 76 5.9 Result of PID controller simulation for desired angle= 20° 78 5.10 Result of PID controller simulation for desired angle= -20° 78 5.11 Simulation result for roll and pitch axis using FPID controller 79 5.12 Result of FPID controller simulation for desired angle= 20° 80 5.13 Result of FPID controller simulation for desired angle= -20° 81 5.14 Result of PID vs FPID controller simulation 82 5.15 Result of PID vs FPID controller simulation for desired angle= 20° 83 5.16 Result of PID vs FPID controller simulation for desired angle= -20° 83 5.17 Simulation result for yaw axis using PID controller 85 5.18 Result of PID controller simulation using desired angle= 20° 86

(13)

xi LIST OF FIGURES

NO. PAGE

5.19 Result of PID controller simulation using desired angle= -20° 87 5.20 Simulation result for yaw axis using FPID controller 88 5.21 Result of FPID controller simulation using desired angle= 20° 89 5.22 Result of FPID controller simulation using desired angle= -20° 89 5.23 Result of FPID vs PID controller simulation 90 5.24 Result of FPID vs PID controller simulation for desired angle= 20° 91 5.25 Result of FPID vs PID controller simulation for desired angle= -20° 92 5.26 Quadrotor testing platform for roll and pitch axes 93

5.27 Quadrotor testing platform for yaw axis 93

5.28 Programming sequence for hardware implementation 95 5.29 Implementation test result using PID controller on roll axis 96 5.30 Implementation test result using PID controller on pitch axis 97 5.31 Implementation test result using FPID controller on roll axis 98 5.32 Implementation test result using FPID controller on pitch axis 99 5.33 Implementation test result using PID controller on yaw axis 100 5.34 Implementation test result using FPID controller on yaw axis 101

5.35 Stability test on quadrotor while in flight 103

(14)

xii LIST OF ABBREVIATIONS

UAV Unmanned Aerial Vehicle PID Proportional-Integral-Derivative LQR Linear Quadratic Regulator FCB Flight Control Board ESC Electronic Speed Controller BLDC Brushless Direct Current

IDE Integrate Development Environment mAh mili Ampere hour

Li-Po Lithium Polymer BDC Brushed Direct Current EMI Electro-Magnetic Interference RPM Rotation Per Minute

PWM Pulse Width Modulation

RF Radio Frequency

FLC Fuzzy Logic Controller FPID Fuzzy PID

DOF Degree of Freedom

NB Negative Big

NS Negative Small

ZE Zero

PS Positive Small

(15)

xiii

PB Positive Big

PM Positive Medium

PL Positive Large

DCM Direction Cosine Matrix GPS Global Positioning System mmH2O Millimeters of Water FEA Finite Element Analysis

N Newton

(16)

xiv LIST OF SYMBOLS

𝐹𝑖 Force for motor i (N)

𝐴𝑖 Thrust Factor for motor i (N) 𝐵𝑖 Thrust Factor for motor i (N)

𝑈1 Input variable for take-off, landing and hover (Nm) 𝑈2 Input variable for roll (Nm)

𝑈3 Input variable for pitch (Nm) 𝑈4 Input variable for yaw (Nm)

td Drag torque

d Drag factor (Nms2)

𝜙 Roll angle (°)

𝜃 Pitch angle (°)

𝜓 Yaw angle (°)

𝑏 Thrust factor (Ns2) 𝜔𝑗2 Motor speed square 𝑇 Total thrust force (N) g Gravity (ms-2)

m Quadrotor mass (kg)

Ixx Inertias around x-axis (kgm2) Iyy Inertias around y-axis (kgm2) Izz Inertias around z-axis (kgm2)

L Lever length (m)

(17)

xv 𝜔𝑗 Rotational speed for motor j (rads-1)

𝑥 Acceleration on x-axis 𝑦 Acceleration on y-axis 𝑧 Acceleration on z-axis 𝜙 Acceleration on roll axis 𝜃 Acceleration on pitch axis 𝜓 Acceleration on yaw axis 𝜙 Velocity on roll axis 𝜃 Velocity on pitch axis 𝜓 Velocity on yaw axis Kp Proportional gain Ki Integral gain Kd Derivative gain

Ke Error gain

Kde Derivative error gain

e Error

φd Desired roll angle θd Desired pitch angle ψd Desired yaw angle

(18)

xvi Satu Pengawal Hibrid Fuzzy PID Asli untuk Penstabilan Gerak-Geri Pesawat Tanpa

Pemandu Jarak Jauh Quadrotor

ABSTRAK

Thesis ini membentangkan satu pembangunan kawalan gerak-geri baru yang akan diimplementasikan di dalam litar kawalan penerbangan (FCB) pesawat kawalan jauh tanpa pemandu (UAV). Satu truktur yang mudah telah dibangunkan untuk menguji kawalan gerak-geri tersebut. Struktur quadrotor berbentuk silang “+” memudahkan ia untuk dibangunkan. Quadrotor kawalan jauh terdiri daripada empat buah motor arus terus tanpa berus (BLDC) dengan gegala kipas tetap yang dipasangkan di atasnya, sebuah FCB yang dilengkapi sebuah pengesan unit pengukuran inersia (IMU), empat buah kawalan halaju elektronik (ESC), satu set pemancar dan penerima alat kawalan jauh dan sebiji bateri lithium polymer (Li-PO) yang mempunyai kadar nyahcas yang tinggi. Quadrotor mempunyai kawalan penerbangan enam darjah kebebasan (DOF). Tingkah laku quadrotor adalah sama seperti helikopter tetapi ia boleh terbang selaju pesawat bersayap tetap. Bagaimanapun, hanya empat pergerakan yang dihasilan daripada penerbangan enam darjah kebebasan iaitu berlepas/mendarat, roll, pitch dan yaw. Pergerakan- pergerakan ini dihasilkan daripada perubahan halaju empat kipas yang akan menghasilkan jumlah daya tujahan yang berbeza-beza. Perbezaan daya tujahan ini akan menghasilkan arah penerbangan quadrotor yang berbeza-beza. Satu pemodelan matematik telah dibuat untuk menganalilsis keberkesanan sistem kawalan ke atas model sebenar quadrotor. Model matematik ini digunakan untuk mewakilkan model quadrotor yang sebenar yang mana akan disimulasikan manggunakan Simulink yang terdapat dalam perisian Matlab. Kawalan gerak-geri baru tersebut melibatkan penggabungan kawalan proportional-integral-derivative (PID) dan kawalan fuzzy logic (FLC). Kawalan hybrid Fuzzy-PID (FPID) ini dibangunkan adalah untuk meningkatkan prestasi kawalan tradisional PID. Pendekatan bagi menggabungkan pengawal-pengawal ini adalah dengan menggunakan teknik penyelarian. Semua struktur Fuzzy-P, Fuzzy-I dan Fuzzy-D akan digabungkan untuk membentuk kawalan FPID yang baru. Tujuan hibrid ini dilakukan ialah untuk menggunakn FLC sebagai penala secara autonomi bagi pangawal PID. Gandaan PID yang telah ditala dengan baik digabungkan bersama FLC untuk mendapatkan prestasi yang lebih baik daripada penggunaan kawalan PID secara bersendirian. Kemudian, kedua-dua pengawal akan disimulasikan menggunakan perisian dan juga diimplimentasikan ke dalam quadrotor sebenar untuk dibandingkan prestasinya. Satu ujian penerbangan dijalankan untuk melihat perbezaannya dalam kawalan quadrotor dalam penerbangan menggunakan kawalan baru FPID selain daripada manggunakan kawalan PID. Proses pembangunan dan keputusannya dibincangkan dengan jelas di dalam thesis ini. Keputusan ujian telah menunjukkan bahawa kawalan FPID adalah lebih baik berbanding kawalan PID dari segi tindak balas dan kestabilan. Kawalan FPID sangat cepat untuk mencapat sasaran yang dikehendaki dan menghasilkan kurang lajakan berbanding kawalan PID dan lantas membuktikan bahawa FPID adalah lebih stabil berbanding dengan kawalan PID konvensional.

(19)

xvii A Novel Hybrid Fuzzy PID Controller for Attitude Stabilization of a Remote Operated

Quadrotor Unmanned Aerial Vehicle

ABSTRACT

This thesis presents a new attitude control development to be implemented in the flight control board (FCB) of quadrotor unmanned aerial vehicle (UAV). A simple structure of quadrotor was developed to test the attitude stabilization control. The cross “+” shaped structure of quadrotor make it is very easy to develop. A remote operated quadrotor consists of four brushless DC motors (BLDC) with fixed pitch propeller attached on it, the FCB equipped with an inertial measurement unit (IMU) sensors, four electronic speed controllers (ESC), a set of remote controller transmitter and receiver and a high discharge lithium polymer (Li-PO) battery.

Quadrotor have six degree of freedom (DOF) of flight control. The quadrotor flight behavior is same as helicopter but can fly as fast as fixed wing aircraft. However, only four movements are produced from 6 DOF flight control which are take-off/landing, roll, pitch and yaw. These movements are performed by varying speed of four propellers to produce different amount of thrust. The differences of thrusts will produce different quadrotor flight direction. A mathematical modeling was done to analyze the effectiveness of a control system to the real quadrotor. This mathematical model is used to represent the real quadrotor which was simulated using Simulink in Matlab Software. The new attitude control involved a hybrid controller of proportional-integral-derivative (PID) and a fuzzy logic controller (FLC). This new hybrid Fuzzy-PID (FPID) controller is developed to improve the performance of traditional PID controller. The approach to hybrid both of these controllers is using the parallel technique. All hybrid Fuzzy-P, Fuzzy-I and Fuzzy-D structures are combined together to form a new FPID controller. The purpose of designing the hybrid system is to use FLC as an automatic tuner for PID controller. The well-tuned PID gain of PID controller is combined with FLC to get a better performance compared to using the PID controller alone. Both controllers are simulated in Matlab software and then implemented to the real quadrotor to compare the performance. A test flight is conducted to observe the differences in controlling the quadrotor in flight using the new FPID controller instead of using PID controller. The result showed that the new FPID controller is better than PID controller in term of response and stability. The FPID controller is very quick to achieve the desired target and produce less overshoot than the PID controller and thus proof that the FPID controller is more stable compared to the conventional PID controller.

(20)

1 CHAPTER 1

INTRODUCTION

1.1 Research Background

Attitude stabilization is an important concept that needs to be implemented in the aircraft flight control. A stable flight control is needed for safety and a better control of the aircraft. Quadrotor is an unmanned aerial vehicle (UAV) that can be flown remotely or autonomously without a pilot. Quadrotor is an aircraft that uses four propellers to produce lifting and other flight control movements. The quadrotor is designed to simplify the complexity of helicopter mechanism using swatch plate to control the flight movements. The swash plate used in helicopter has many parts moves which can possibly malfunction if not well maintained.

In the quadrotor system, only motors and propellers are moving. Besides safety, it is maintenance less taxing on because of the only parts to be checked are the motors and the propellers. With a proper flight control, quadrotor can be used several times without maintenance. The differences in speed of each propeller will result various flight control movements. The rotation of propellers will produce thrust which will affect the flight control movements. The stabilization of the quadrotor is operated by controlling the speed of each motor. An algorithm to control the stability of the aircraft is designed by controlling the speed of the motors.

(21)

2 There are many types of methodologies that have been used for stabilization of attitude control. The method such as Kalman Filter is widely used in this application.

There are also other methods such as using proportional-integral-derivative (PID) controller, Fuzzy Logic, and Neural Network.

1.2 Problem Statements

Quadrotor UAV Design

Quadrotor UAV structure design is not complicated and easy to build. Many researchers have developed this type of UAV for their research previously. There are enough references which can be used as guidance. But the main problem for developing this type of UAV requires a special type of propeller which is called contra-rotating propeller. Contra-rotating propeller is a pair of normal plane propeller with a contra pitch direction of the same propeller which is used to cancel the torque produced due to motor rotation. In Malaysia, this type of propeller is rare or may be do not exist is market. It is only available in other country such as USA, Germany, Denmark and Japan. This special propeller must be imported directly from the manufacturer in outside country.

Attitude Flight Control

A stable attitude control design must deal with the uncertainty parameter such as nonlinearity, noise, responses and much more. All this parameter must be taken and managed properly to produce a good result. In designing the control system, the sensor

(22)

3 readings are very important because the obtained data could be manipulated as the input references of an attitude control. The sensors used for this system commonly are accelerometers and gyroscopes which measure acceleration due to gravity and rate of rotation respectively. The sensor readings itself will be not consistent values because of vibration and drift effect. The sensor reading must be filtered properly before extracting data to be used to the control system.

Quadrotor UAV is an omni-directional aircraft similar to the helicopter. Actually quadrotor UAV is an aircraft which have the flight control liken to the helicopter. The directional controls for Quadrotor UAV are roll, pitch and yaw which controlled along X-Y-Z axis. The dynamic movement of this aircraft must be calculated precisely for each rotation and transition of the quadrotor. The changes of rotation and transition of the quadrotor give an algorithm that can be developed to determine how much quadrotor can rotate and transit along the X-Y-Z axis. This can be used as a parameter in stabilizing the aircraft using proper method.

The hardware development for this quadrotor must be lightweight and compact as well as easy for use. The flight duration is also the main problem to this type of aircraft. This aircraft type uses four electric motors and electronics components to operate and thus, need more power than a single motor which is usually used in the fixed wing aircraft. The heavy body structure design and additional load carried also consume more power from the motor and may drain the battery and thus may shortens the battery supply power and limit the flight duration as well.

(23)

4 1.3 Research Objectives

The objectives of this research are described below:

i. To design the remote operated quadrotor UAV.

ii. To develop stabilization attitude control of quadrotor UAV using hybrid Fuzzy Logic and PID controller.

iii. To simulate the attitude stabilization control system of quadrotor UAV using Matlab software.

iv. To implement the control system into flight control board (FCB).

1.4 Thesis Outline

This thesis consists of 6 chapters. Chapter 1 provides the introduction of the research and an overview on how the thesis is organized.

Chapter 2 briefly reports a literature review that necessitates about quadrotor, UAV, attitude control and Fuzzy PID controller. This chapter also provides a short overview of previous research works of the quadrotor system and the control system being used.

Chapter 3 describes the development of the quadrotor system and its components used to develop the system. The quadrotor kinematics and dynamics and identification of the constant are also be described in this chapter.

Chapter 4 presents the development of the hybrid Fuzzy PID controller for stabilizing attitude control system of quadrotor. The comparison between conventional PID and hybrid Fuzzy PID control system is discussed in this chapter.

(24)

5 Chapter 5 concludes with the simulation and testing results for attitude stabilization control system. The results are compared between the conventional PID and hybrid Fuzzy PID as the attitude stabilization control system for quadrotor.

Chapter 6 summarizes the contribution made in this thesis. Suggestions for the future research direction are discussed.

Figure

Updating...

References

Related subjects :