• Sonuç bulunamadı

Modeling And Control Of Quadrotor Unmanned Aerial Vtol Vehicle

N/A
N/A
Protected

Academic year: 2021

Share "Modeling And Control Of Quadrotor Unmanned Aerial Vtol Vehicle"

Copied!
97
0
0

Yükleniyor.... (view fulltext now)

Tam metin

(1)

ISTANBUL TECHNICAL UNIVERSITY GRADUATE SCHOOL OF SCIENCE ENGINEERING AND TECHNOLOGY

M.Sc. THESIS

MAY 2014

MODELING AND CONTROL OF QUADROTOR UNMANNED AERIAL VTOL VEHICLE

Zafer YİĞİT

Department of Control and Automation Engineering Control and Automation Engineering Programme

(2)
(3)

MAY 2014

ISTANBUL TECHNICAL UNIVERSITY GRADUATE SCHOOL OF SCIENCE ENGINEERING AND TECHNOLOGY

MODELING AND CONTROL OF QUADROTOR UNMANNED AERIAL VTOL VEHICLE

M.Sc. THESIS Zafer YİĞİT

504111133

Department of Control and Automation Engineering Control and Automation Engineering Programme

(4)
(5)

MAYIS 2014

İSTANBUL TEKNİK ÜNİVERSİTESİ FEN BİLİMLERİ ENSTİTÜSÜ

DİKEY İNİŞ KALKIŞ YAPABİLEN DÖRT ROTORLU İNSANSIZ HAVA ARACININ MODELLENMESİ VE KONTROLÜ

YÜKSEK LİSANS TEZİ Zafer YİĞİT

504111133

Kontrol ve Otomasyon Mühendisliği Anabilim Dalı Kontrol ve Otomasyon Mühendisliği Programı

(6)
(7)

v

Thesis Advisor : Asst. Prof. Dr. Sıddık Murat YEŞİLOĞLU ... İstanbul Technical University

Jury Members : Prof. Dr. Metin GÖKAŞAN ... İstanbul Technical University

Asst. Prof. Dr. A. Ersan OĞUZ ... Air Force Academy

Zafer YİĞİT, a M.Sc. student of ITU Graduate School of Science Engineering and Technology student ID 504111133, successfully defended the thesis entitled “Modeling and Control of Quadrotor Unmanned Aerial VTOL Vehicle”, which he prepared after fulfilling the requirements specified in the associated legislations, before the jury whose signatures are below.

Date of Submission : 05 May 2014 Date of Defense : 26 May 2014

(8)
(9)

vii

(10)
(11)

ix FOREWORD

'If this instrument made with a screw be well made - that is to say, made of linen of which the pores are stopped up with starch and be turned swiftly, the said screw will make its spiral in the air and it will rise high.'

Since Leonardo Da Vinci’s invention of the helicopters, Humans have never lost interest in aerial vehicles as helicopter. They are developed day by day with new technology and used in different areas such as military, investigation, observation, rescue missions. Different types of controller systems in academical studies to stabilize and control of quadrotor, which is one of types of unmanned aerial vehicles, are designed and experienced in this thesis.

I would like to thank my thesis advisor Asst. Prof. Dr. Sıddık Murat YEŞİLOĞLU. I completed this thesis with his guidance and teaching. Also, it is my duty to say my thankfulness to research asistant Musa Nurullah YAZAR, electrical and electronics engineer Emre KUL, electrical and electronics engineer İlhami SUNMAN, computer engineer Murat GÜVENÇ for helping to me to overcome this project.

Finally, I am particularly indebted to my parents and my wife for encouraging me to complete this thesis.

(12)
(13)

xi TABLE OF CONTENTS Page FOREWORD ... ix TABLE OF CONTENTS ... xi ABBREVIATIONS ... xiii LIST OF TABLES ... xv

LIST OF FIGURES ... xvii

LIST OF SYMBOLS ...xix

SUMMARY ...xxi

ÖZET ... xxiii

1. INTRODUCTION ...1

1.1 Purpose of Thesis ...1

1.2 History of Quadrotor ...2

1.2.1 Breguet-Richet gyroplane no.1 ...2

1.2.2 Oemnichen no.2 ...3

1.2.3 De Bothezat ...4

1.2.4 Convertawings model a ...4

1.2.5 Curtis – Wright VZ-7 ...5

1.3 State of The Art ...6

2. MODELING THE QUADROTOR ...9

2.1 Overview ...9

2.2 Equations of Motion ... 10

2.3 Rotor Dynamics ... 14

3. CONTROLLER DESIGN AND SIMULATIONS ... 15

3.1 Control Types and Modelling for Control ... 15

3.2 Pid Control Technique ... 16

3.2.1 PID control simulation results... 19

3.3 Lyapunov Theory Based Control ... 20

3.3.1 Lyapunov theory based control simulation results ... 23

3.4 Backstepping Technique Based Control ... 25

3.4.1 Backstepping technique based control simulation results ... 27

4. QUADROTOR DESIGN AND IMPLEMENTATION ... 29

4.1 Quadrotor Body Frame ... 29

4.1.1 Calculating moment of inertia of the quadrotor ... 30

4.2 Propellers ... 31

4.2.1 Calculating moment of inertia of the rotor and propeller ... 32

4.3 Brushless Motor ... 33

4.4 Power System ... 36

4.4.1 Electronic speed contollers ... 36

4.4.2 Battery ... 37

4.5 Microcontroller Unit ... 38

(14)

xii

4.7 Ultrasonic Distance Sensor ... 42

4.8 RC Transmitter and Receiver Unit ... 43

4.9 Quadrotor Wiring Schematics ... 44

4.9.1 Power system connections ... 44

4.9.2 Controller part connections ... 45

4.10 Quadrotor Software Algorithm ... 46

5. TEST BENCHES AND CONCLUSIONS ... 49

5.1 Roll and Pitch Axis Control Test Bench ... 49

5.2 Attitude Control Test Bench ... 50

5.3 Altitude Control Test Bench ... 52

5.4 General Conclusion ... 53

REFERENCES ... 55

APPENDICES ... 57

(15)

xiii ABBREVIATIONS

AHRS : Attitude and Heading Reference System AWG : American Wire Gauge

ESC : Electronic Speed Controller GPS : Global Positioning System IMU : Inertial Measurement Unit MEMS : Microelectromechanical Systems PD : Proportional Derivative

PID : Proportional Integral Derivative PWM : Pulse width Modulatiion UAV : Unmanned Aerial Vehicle VTOL : Vertical Take-off and Landing

(16)
(17)

xv LIST OF TABLES

Page

Table 3.1 : Maximum bound values using with constant optimization. ... 19

Table 3.2 : PID controller constant values ... 19

Table 3.3 : Lyapunov controller constant values ... 23

Table 3.4 : Backstepping controllers constant values ... 27

Table 4.1 : Quadrotor part list and parameter... 30

Table 4.2 : Quadrotor part moment of inertia results... 31

Table 4.3 : Propeller parts parameters and moment of inertia ... 32

Table 4.4 : Turnigy battery pack parameters ... 37

Table 5.1 : Attitude test bench test results ... 52

(18)
(19)

xvii LIST OF FIGURES

Page

Figure 1.1 : Quadrotor UAV with a payload. ...1

Figure 1.2 : Breguet’s gyroplane no.1. ...3

Figure 1.3 : Oemnichen no.2. ...3

Figure 1.4 : De Bothezat. ...4

Figure 1.5 : Convertawings model a. ...5

Figure 1.6 : Curtis – Wright VZ-7. ...5

Figure 1.7 : Cooperative ball throwing and catching. ...6

Figure 1.8 : Hybrid terrestrial and aerial quadrotor. ...7

Figure 2.1 : Quadrotor movements and coordinate system. ...9

Figure 3.1 : PID controller structure. ... 17

Figure 3.2 : Traditional PID controller (pitch control block diagram). ... 18

Figure 3.3 : Enhanced PID controller (roll and yaw control block diagram). ... 18

Figure 3.4 : Altitude control block diagram. ... 19

Figure 3.5 : Simulation results for PID controllers of angles. ... 20

Figure 3.6 : Simulation PID controller result for altitude. ... 20

Figure 3.7 : Lyapunov based controller for attitude control block diagram. ... 22

Figure 3.8 : Lyapunov based controller for altitude control block diagram. ... 23

Figure 3.9 : Simulation results for lyapunov controllers of attitude. ... 23

Figure 3.10 : Simulation results for lyapunov controllers of altitude. ... 24

Figure 3.11 : Backstepping controller for altitude control block diagram. ... 27

Figure 3.12 : Simulation results for backstepping controllers of attitude. ... 28

Figure 3.13 : Simulation results for backstepping controllers of altitude. ... 28

Figure 4.1 : BumbleBee quadrotor frame. ... 29

Figure 4.2 : Propeller 10x3.8. ... 32

Figure 4.3 : Brushless motor ST2812. ... 33

Figure 4.4 : Precision scale and laser tachometer. ... 34

Figure 4.5 : Motor thrust values for angular velocity. ... 34

Figure 4.6 : Motor thrust values for pwm. ... 35

Figure 4.7 : Motor’s thrust and velocity datas during the hover. ... 35

Figure 4.8 : Turnigy plush 30A electronic speed controller. ... 36

Figure 4.9 : Turnigy 4000mAh 11.1 V lipo battery. ... 37

Figure 4.10 : Arduino mega 2560 R3. ... 38

Figure 4.11 : Pololu minImu-9 v2. ... 39

Figure 4.12 : Direct cosine matrix (DCM) algorithm. ... 39

Figure 4.13 : Kalman filter mathematical formulation. ... 40

Figure 4.14 : Pitch angle from imu calculated dcm based on complementary filter. 41 Figure 4.15 : Pitch angle filtered by Kalman filter. ... 41

Figure 4.16 : Pitch angle filtered by complementary filter and Kalman filter. ... 41

Figure 4.17 : Imu sensor AHRS filtered pitch angles. ... 42

(20)

xviii

Figure 4.19 : Futaba 6EX – 2.4 ghz radio controller. ... 43

Figure 4.20 : Power system wiring schematics. ... 44

Figure 4.21 : Controller part connections. ... 45

Figure 4.22 : Quadrotor software algorithm. ... 46

Figure 4.23 : Quadrotor frame types. ... 47

Figure 5.1 : Pitch axis control test. ... 49

Figure 5.2 : Spherical joint and attitude test bench. ... 50

Figure 5.3 : Test results for PID controller of attitude. ... 51

Figure 5.4 : Test results for lyapunov based controller of attitude. ... 51

Figure 5.5 : Test results for back stepping controller of attitude. ... 51

Figure 5.6 : Test results for comparison of all controllers of attitude. ... 51

Figure 5.7 : Rope grip and steel pulley. ... 52

Figure 5.8 : Altitude and attitude test bench. ... 52

Figure 5.9 : Hovering quadrotor... 54

Figure B.1 : Model of quadrotor ... 59

Figure B.2 : Omegasqr subsystem ... 60

Figure B.3 : Angles subsystem ... 61

Figure B.4 : Displacement subsystem ... 61

Figure B.5 : Backstepping control for attitude control block diagram ... 62

Figure C.1 : ST2812 brushless motor ... 63

Figure C.2 : Turnigy plush 30 A. ESC ... 63

Figure C.3 : Arduino mega 2560 R3 schematic part 1. ... 64

Figure C.4 : Arduino mega 2560 R3 schematic part 2. ... 65

Figure C.5 : Arduino mega 2560 R3 pin map ... 65

Figure C.6 : Pololu minIMU-9 v2 schematic diagram ... 66

Figure C.7 : Ultrasonic distance sensor module HC-SR04 ... 67

(21)

xix LIST OF SYMBOLS

A : Propeller Disk Area

b : Thrust Factor

B : Body Fixed Frame

E : Earth Fixed Frame

Cq : DragCoeeficient

d : Drag Factor

g : Acceleration of Gravity

Ix,y,z : Inertia moments

Jm : Motor Inertia

Jr : Rotor Inertia

Ke : Motor Electrical Constant

Km : Motor Torque Constant

l : Horizontal Distance

R : Rotation Matrix

U : Control Inputs

ρ : Density of Air

τ : Torque

x,y,z : Position in body coordinate frame

ϕ : Roll Angle

θ : Pitch Angle

ψ : Yaw Angle

ω : Body Angular Rate

(22)
(23)

xxi

MODELING AND CONTROL OF QUADROTOR UNMANNED AERIAL VTOL VEHICLE

SUMMARY

The subject has been studied on modelling and attitude and altitude control of quadrotor (four rotors), a type of unmanned aerial vehicles whose popularity and usage increasing day by day in this thesis. Firstly, historical development of important studies done so far are searched and then academical studies done so far about aerial vehicles are explained.

A mathematical model of quadrotor aerial vehicle acquired by using Newton-Euler equations. Three different controllers are designed to supply attitude and altitude control including PID, Lyapunov stability based, and back stepping. Before testing controllers on real system, a model of quadrotor is prepared only to see controllers’ characteristics on Matlab/Simulink and results of controllers are compared.

One of the commercial model Bumblebee is used for the body of the quadrotor frame to compare the performance of controllers on the real system. Quadrotor aerial vehicle is designed with selecting suitable equipments (propeller, motor, esc, lipo battery, microcontroller, sensors, and radio transmitter and receiver) on this body frame. Studies and information about selected body frame and equipments are explained in detailed. Technical datasheets about equipments also are given in appendices. The information about algorithm of programming of microcontroller and electrical circuits on quadrotor is given in detailed.

Three different test benches has been setup to test controllers on quadrotor safely. The system’s control of pitch or roll angle was tested on the first test bench. The system’s attitude control was tested and performances of controllers were compared on the second test bench. The altitude control on quadrotor was not allowed by this test bench. On third test bench, altitude control was tested besides attitude control and performances of controllers were compared. Three different controllers as PID, Lyapunov based, and back stepping were developed for quadrotor and their performances were compared on the designed test benches. Individually, all controllers were tested and compared for attitude and altitude control.

Consequently, test benches are setup with more advanced equipments and precise metering sensors help being more succesful in designing the controllers. Especially, the other nonlinear controller types must be tested on the control of quadrotor which is a nonlinear unmanned aerial vehicle for the best performance.

(24)
(25)

xxiii

DİKEY İNİŞ KALKIŞ YAPABİLEN DÖRT ROTORLU İNSANSIZ HAVA ARACININ MODELLENMESİ VE KONTROLÜ

ÖZET

Bu tezde, insansız hava araçları çeşitlerinden biri olan, popülerliği ve kullanım alanı günden güne artan dört rotorlu (quadrotor) insansız hava aracının modellenmesi, yükseklik ve durum kontrolü üzerinde çalışılmıştır. Öncelikle, dört rotorlu hava araçları hakkında akademisyen ve bilim adamı olan Charles Richet’ın ilk insansız helikopter çalışmalarından başlayarak 20. yüzyıldan itibaren yapılan insanlı ve insansız çalışmalar ve bu hava araçlarının tarihi gelişimi araştırılmış, Breguet-Richet gyroplane no.1, Oemnichen no.2, De Bothezat, Convertawings model a ve Curtis-Wright VZ-7 hakkında ayrıntılı bilgi verilmiştir. Daha sonra Mesicopter, OS4 test düzeneği, uçan makine sahası, arazide ve havada gidebilen quadrotor aracı çalışmaları gibi günümüzde yapılan küçük, büyük, farklı amaçlara yönelik (ortak çalışma, nesne taşıma, hareketli nesne takip etme, …) dört rotorlu hava araçları ve bu araçlarla ilgili çalışmalar için tasarlanmış mekan ve düzenekler hakkındaki akademik çalışmalara yer verilmiştir.

Newton-Euler denklemleri kullanılarak quadrotor hava aracının matematiksel modeli tanımlanmıştır. Matematiksel model elde edildikten sonra durum ve yükselme kontrollerini gerçekleştirmek için PID, Lyapunov kararlılık teoremi tabanlı ve geri adımlamalı olmak üzere üç farklı kontrolcü tasarlanmıştır. Tasarlanan kontrolcülerin yapılan düzenek üzerinde denenmesinden önce her birinin karakteristik özelliklerini kavrayabilmek için quadrotor hava aracının Matlab/Simulink kullanılarak bir modeli oluşturulup benzetimi yapılmıştır. Öncelikle sistem için sınır değerler belirtilerek Simulink’ in “signal constraints block” isimli modülü ile kontrolörlerin katsayıları belirlenmiş ve sonuçlar karşılaştırılmıştır.

Kontrolcülerin performanslarını gerçekte karşılaştırmak için ticari bir model olan Bumblebee quadrotor hava aracının dört kollu iskelet yapısı seçilmiştir. Gövde merkezindeki plakalar ve kollar, hafif ve dayanıklı olması için karbon fiber kaplı bir malzemeden seçilmiştir. İskeletin kol açıklığı 55 cm, boş ağırlığı ise yaklaşık 450 g kadardır. Motorun ve sürücülerin yerleştiği kısım ise sert plastik malzemeden yapılmıştır. Eyleyici olarak sessiz, güçlü, yüksek hız ve torka sahip ve az bakım gerektiren fırçasız motor kullanılmıştır. Seçilen ST2812 fırçasız motor uygulanan volt başına dakikada 920 devir yapabilmektedir. Motorun modelini elde etmek adına yeterli teknik veri olmadığı için hassas bir terazi ve lazer takometre ile motor ve pervane çiftinin hız ve itme kuvveti değerleri çıkartılmıştır. Maksimum 19 amper çekebilen ST2812 fırçasız motorlar için 30 amper daimi akım verebilen programlanabilen sürücüler seçilmiştir. Güç kaynağı olarak anlık 120 A verebilen 4000 mAh kapasiteli lityum polimer (lipo) batarya tercih edilmiştir. Quadrotor hava aracına yaklaşık olarak 3,5-6 dakikalık bir uçuş sağlamaktadır. Batarya, üç seri hücreden oluşup 11,1 V gerilim sağlamaktadır. Yaklaşık ağırlığı 347 gram olup en ağır donanım parçasıdır. Gerilimi güç kaynağından motorlara eşit ve güvenli şekilde

(26)

xxiv

iletmek için bir güç dağıtım kartı kullanılmıştır. Bağlantılar için altın kaplama konnektörler ve en az 14 AWG silikon kablolar kullanılmıştır. Yükseklik kontrolü için ultrasonik mesafe ölçen sensör durum kontrolü için atalet ölçüm sensörü kullanılmıştır. Kullanılan sensörler arasındaki iletişimi sağlaması ve uçuşu gerçekleştirmesi için mikrodenetleyici olarak Atmega 2560 tabanlı Arduino Mega 2560 R3 platformu seçilmiştir. Radyo sinyalleri ile uzaktan kontrol için altı kanallı 2,4 Ghz Futaba 6EX radio alıcı verici kontrol sistemi seçilmiştir. Ayrıca donanımlar hakkındaki teknik verilerin tamamı ek bölümünde verilmiştir.

Durum kontrolünü sağlamak için üç eksen jiroskop, üç eksen ivmeölçer ve üç eksen manyetometre içeren atalet ölçüm sensörü kullanılmıştır. Sensörden elde edilen veriler filtrelenerek quadrotor hava aracının yalpalama, yunuslama ve dönme açıları elde edilir. Açıların nasıl elde edildiği ve ele alınan komplementer ve Kalman filtreleme yöntemlerinin yapıları ayrıntılı olarak anlatılmış ve hata oranı karşılaştırmaları yapılmıştır. Quadrotor hava aracı üzerindeki bütün donanımsal parçaların elektriksel bağlantı devreleri ve mikro denetleyici programlanmasında esas alınan yazılım algoritması hakkında ayrıntılı olarak bilgi verilmiştir.

Kontrolcülerin quadrotor hava aracı üzerinde güvenle test edilebilmesi ve sonuçların doğru bir şekilde karşılaştırılması amacıyla üç ayrı test düzeneği kurulmuştur. İlk test düzeneğinde, sistemin yunuslama ya da yalpalama açılarındaki kontrolü test edilmiştir. Bu amaçla karşılıklı olan iki rotor iptal edilmiş ve quadrotor hava aracı bu rotorların bulunduğu kollardan sabitlenmiştir. Hava aracının tek bir eksen doğrultusunda serbestçe hareket etmesine olanak verilerek bu eksende istenilen açı değerlerinin elde edilmesine çalışılmıştır. İlk düzenekte kontrolörlerin performanslarından ziyade çalışıp çalışmadığı üzerinde durulmuş, davranışları gözlemlenmiştir. İkinci test düzeneğinde sistemin durum kontrolü üzerine testler yapılmıştır. Durum kontrolü düzeneği, sistemi yükselme ve yatay hareketlerden koruyacak şekilde sabit kalabilmesi için yeterli ağırlıkta demir bir iskeletten oluşmaktadır. İskeletin üst kısımında küresel bir mafsal kullanılarak hava aracının yunuslama, yalpalama ve dönme hareketlerini yapması sağlanmıştır. Üçüncü test düzeneğinde sistemin durum kontrolünün yanında yükseklik kontrolünün yapılması amaçlanmıştır. Bu düzenekte geniş kapalı bir alanda dört adet paslanmaz çelik makara ve çelik tel kullanılmıştır. Çelik tel quadrotor hava aracının orta noktasından quadrotor gövdesiyle hiçbir bağlantı olmadan serbestçe geçirilerek klemens ile birleştirilmiştir. Quadrotor hava aracının yatay hareketleri kısıtlanarak yunuslama, yalpalama, dönme ve yükselme hareketlerini yapmasına olanak verilmiştir. Quadrotor hava aracı için PID, Lyapunov kararlılık teoremi tabanlı ve geri adımlamalı olmak üzere üç farklı kontrolör geliştirilmiş ve tasarlanan test düzeneklerinde performansları karşılaştırılmıştır. Bütün kontrolörlerin ayrı ayrı durum ve yükseklik kontrolü üzerine testleri ve karşılaştırmaları yapılmıştır.

Sonuç olarak kontrolcülerin performansları göz önüne alınacak olursa PID kontrolörün quadrotor hava aracının kontrolü için oldukça başarılı ve yeterli bir kontrolör olduğu söylenebilir. Lyapunov kararlılık tabanlı kontrolör durum ve yükseklik kontrolünde PID ve geri adımlamalı kontrolcüye göre daha kötü bir performans sergilese de özellikle dönme kontrolünde oldukça başarılı olmuştur. Geri adımlamalı kontrolörün durum ve yükselme kontrolünde başarılı ve yeterli sonuçlar aldığı görülmüştür. Özellikle sürtünme gibi dış etkilerin yüksek olduğu zamanlarda bile etkili bir performans göstermiştir.

(27)

xxv

Quadrotor hava aracının uçuş kontrolünde daha etkili sonuçlar alabilmek için dikkat edilmesi gereken hususlar bulunmaktadır. Quadrotorun ana iskeleti ve pervaneler oldukça hafif, sağlam, simetrik ve katı olmalıdır. Gövde yapısı, motorlar, sürücüler, pervaneler ve pil seçilirken beklenen manevra kabiliyeti ve uçuş süresi için hesaplama ve optimizasyon dikkatlice yapılmalıdır. Kontrolcülerin performanslarını daha iyi karşılaştırabilmek ayrıca daha iyi bir uçuş kontrolü sağlamak amacıyla sensörlerden anlık veri alabilmek için kablosuz iletişim araçları kullanılabilir. Bunun yanında sensörlü motorlar kullanılarak bu motorlardan hız geri bildirimi alınmasıyla daha iyi bir kontrol yapılması sağlanabilir. Üç eksenli kuvvet ve tork sensörü kullanılarak daha iyi bir matematiksel model çıkartılarak gerçeğe yakın benzetimler hazırlanabilinir ve kontrolcülerin performansları bu şekilde iyileştirilebilir. Yükseklik kontrolünde ultrasonik mesafe sensörü yanısıra basınç sensörü kullanılarak daha doğru ve iyi sonuçlar alınabilir. Aynı zamanda daha güçlü işlemciler seçmek, performanslı bir uçuş sistemi tasarımında daha güçlü bir mimari oluşturmaya olanak verecektir.

Bunların yanısıra gelecekteki çalışmalarda en uygun ve etkili quadrotor hava aracı kontrolünü sağlayabilmek için doğrusal olmayan farklı kontrol teknikleri denenerek farklılıkları ve performansları analiz edilmelidir. Quadrotor hava aracı için kendinden havalanma, yere inme, otomatik pozisyon alma, sabit pozisyonda kalma, önceden verilen bir rotaya görere uçuş yapma gibi farklı uçuş şekilleri tasarlanabilir ve bahsedilen tüm kontrol teknikleri bu uçuş şekillerinde kullanılarak karşılaştırılabilinir.

(28)
(29)

1 1. INTRODUCTION

Unmanned aerial vehicle is an aircraft having capability flying without a human pilot on board using aerodynamical effects. Its flight is controlled either autonomously by loaded mission or with a remote controller of a pilot on the earth. UAVs are generally ideal for military, investigation, observation, and rescue missions which are not suitable or more dangerous for human such as war, fire, border security. They are also used for taking photography, shooting movie, playing and relaxation.

UAVs can be classified in two main groups as fixed wings and rotary wings. Controlling rotary wings is more difficult and complex than fixed-wings but rotary wings have an advantage that is vertical takeoff and landing capability. There are different types of rotary wing air vehicles whose names are called with number of their wings such as single rotor, twin rotor, tri rotor, quadrotor and so on.

1.1 Purpose of Thesis

The proposed structure of UAV quadrotor is a kind of rotary wing unmanned air vehicle has four rotors and each rotor has a propeller. Quadrotor is generally choosen for its low dimension, good maneuverability, simple mechanics and payload capability (see Figure 1.1).

Figure 1.1 : Quadrotor UAV with a payload.

(30)

2

The purpose of thesis is to design control systems to stabilize and control attitude and altitude control of quadrotor. The study of kinematics and dynamics helps to understand the physics of the quadrotor and its mathematical model. After the derivation of model’s equations of motion using with Newton and Euler equations to stabilize and control quadrotor, controllers based on PID and Lyapunov stability are designed with using these equations. Designed controllers are tested in simulink and implemented into the real model and compared their performances.

The real model has been developed by creating a system of interconnected devices. The characteristics of mechanical and electronics parts are detailed to create better test bench such as microcontroller, motor, propeller, ESC, IMU, ultrasonic sensor, lipo battery, radio control system.

In the future, the different non-linear controller types in literature could be implemented to the real model. A better mathematical model and test bench could be design with 3-axis force and torque sensors to improve performance of controllers. Furthermore, different academic researches could be studied such as aggressive moving, target tracking, mapping, cooperation…

1.2 History of Quadrotor

Fascination of flying always affects humans. Humankind always expresses these ideas in legends, myths, and arts.

Although rotary wing aerial vehicles seem more technologic, complex and new, they have history more than a hundred year. After Chinese flying toys and Leonardo Da Vinci’s helical airscrew, Forlanini’s rotary wing aircraft model able to fly 20 seconds at 12 meters in 1877. After this time, interest about helicopters and multicopters increase intensively day by day with developing technology.

1.2.1 Breguet-Richet gyroplane no.1

In the 20th century, in 1907, Charles Richet, a French scientist and academician, built a small, un-piloted helicopter .Although his attempt was not a success, Louis Bréguet, one of Richet’s students, was inspired by his example. It had a 45 hp (34 kW) eight cylinder Antoinette engine located just above the pilot that powered four four-bladed biplane rotors. Gross weight was 578 kg. Thrust to weight was just

(31)

3

sufficient to achieve vertical flight, but there was no means whatsoever of providing stability or control except to use four men, each one holding the end of one of the arms (see Figure 1.2). [1]

Figure 1.2 : Breguet’s gyroplane no.1. 1.2.2 Oemnichen no.2

In 1920, Etienne Oehmichen started to experiment with rotorcraft design and among the six designs, 'Oehmichen No.2' was chosen (see Figure 1.3). It had steel tube frame, four rotors and eight propellers, and a pilot. It had also five horizontal propellers stabilized the machine laterally. After a thousand flight tests, this machine achieved a considerable degree of stability and controllability.

(32)

4

It was able to maintain its flight for several minutes in 1923. On April 14, 1924, the machine was airborne for fourteen minutes and it demonstrated the ability to complete a closed circuit flight more than half a mile. [2]

1.2.3 De Bothezat

In January 1921, the US Army awarded a contract to Dr. George de Bothezat and Ivan Jerome to develop a vertical flight machine. They developed an aircraft which was 1678 kg, X-shaped structure supported 8.1 m diameter six bladed rotors at the end of the 9m arm. Two small propellers with variable pitch were used for thrust and yaw control. The aircraft shown in Figure 1.4 weighed 3,748 lb (1,700 kg) at take-off and made its first flight in October 1922. The engine was soon upgraded to a 220 hp. About 100 flights were made by the end of 1923, the highest it ever reached was about 5 m instead of 100 m. It was too expensive, underpowered, unresponsive, and mechanically complex so the army cancelled the program. [1]

Figure 1.4 : De Bothezat. 1.2.4 Convertawings model a

The army wanted to develop De Bothezat so a first prototype was completed in 1955 and it has since flown successfully. In the experimental prototype, the fuselage was of tubular steel, the booms supporting the rotors in aluminium alloy. Two engines connected to the rotor drive system by multiple vee belts provide power. Shafting and transmission cases ensure inter-connection between the four rotors, so that at need either engine can drive all of them.

(33)

5

There is a tricycle undercarriage with two wheels in the rear section and a nose wheel which can swivel (see Figure 1.5). The first flights took place in March 1956. [3]

Figure 1.5 : Convertawings model a. 1.2.5 Curtis – Wright VZ-7

The army began to research flying trucks with the introduction of turboshaft engines. The Curtiss – Wright Corporation, which is an army product manufacturer, designed VTOL quadrotor helicopter called ‘flying jeep’ shown in Figure 1.6. Although smaller and more maneuverable than helicopters, it was cancelled because of higher fuel consumption and shorter endurance. [2]

(34)

6 1.3 State of The Art

With developing sensors and MEMS technology, quadrotor control has changed and developed fast in the last few years. Universities, students and researchers continuously work to introduce controllers that are more robust and different modelling techniques, so that they can provide detailed and accurate representations of real-life quadrotors. Some projects are based on radio controller toys like Draganflyer [4] modified sensors, communication modules, and developed softwares.

One of these projects is Mesicopter, started in 1999 and ended in 2001. It aimed to study the feasibility of a centimeter scale quadrotor.

Swiss Federal Institute of Technology developed OS4 test bench to test designed different controller types such as pid control, sliding mode control, back-stepping control… OS4 test-bench has 4 propulsion groups, each one is composed of a 29 g motor including magnetic encoders, a 6 g gearbox and a 6 g propeller. [5]

Swiss Federal Institute of Technology in Zurich devote a portable space named “Flying Machine Arena” to develop autonomous flight. Its measure 10 x 10 x 10 meters, it consists of a high-precision motion capture system (200 frames per second), a wireless communication network, and custom software executing sophisticated algorithms for estimation and control. Researchers and students study on quadrotors about balancing objects, collaboration such as building tower and catching ball… with using that system (see Figure 1.7). [6]

(35)

7

Robotics Lab@IIT team in Illinois Institude of Technology study on a robot having capability travelling on both aerial and terrestrial locations. Flight is achieved through a quadrotor. Adding a rolling cage to the quadrotor makes terrestrial locomotion possible using the same actuator set and control system (see Figure 1.8). For terrastial locomotion, the quadrotor only needs to overcome rolling resistance and consumes much less energy compared to the aerial mode. It also solve avoiding from obstacle problem for terrastial robots. [7]

(36)
(37)

9 2. MODELING THE QUADROTOR

2.1 Overview

The quadrotor has four propellers in a cross configuration and each of them is connected to the motors. Propellers are parallel to the frame. They have fixed – pitch blades and their airflows to the downwards to get upward lift. The front and the rear propellers rotate counter-clockwise, while the left and the right ones turn clockwise because of negating opposite torque.

Quadrotor is an aerial robot and has six degrees of freedom like every aerial robot. These are pitch, roll, yaw angles, x, y, and z positions (see Figure 2.1). However, it has four actuators on each arm to control four basic movements which allow the quadrotor to reach the right height and attitude (pitch, roll, yaw angles and z position) so it is called an underactuated system. For these four movements, four commands must be described;

Figure 2.1 : Quadrotor movements and coordinate system.

The first command is throttle (U1) which is provided by increasing or decreasing the speed of all propelles. Quadrotor is in hovering condition, where all the propellers have the same speed. Hovering means resist and counterbalance the acceleration of gravity. If the hovering speed is changed with same amount, body frame will rise or descend according to this amount.

(38)

10

The roll command (U2) is provided by increasing or decreasing the left propeller speed and by decreasing or increasing the right one with same amount. It leads to a torque with respect to the body xaxis and the quadrotor turn with roll angle ( ϕ ) . The pitch command (U3) is very similar to the roll and is provided by increasing or decreasing the rear propeller speed and by decreasing or increasing the front one with same amount. It leads to a torque with respect to the body y axis and the quadrotor turn with pitch angle ( θ ).

The yaw command (U4) is provided by increasing or decreasing the front-rear propellers’ speed and by decreasing or increasing that of the left-right couple. It leads to a torque with respect to the body z axis and the quadrotor turn with yaw angle (ψ). The yaw movement is provided by the left-right propellers rotate clockwise while the front-rear ones rotate counterclockwise. If the overall torque is unbalanced, the helicopter turns on itself around body z axis.

2.2 Equations of Motion

F1, F2, F3, F4 and mg are main forces directly effect on quadrotor, ψ, θ, ϕ angles, B quadrotor’s body fixed frame, and E earth fixed frame are shown on Figure 2.1. The model developed in this thesis assumes the following;

• The body frame and propellers are supposed rigid. • The body frame is supposed symmetrical.

• Thrust and drag are proportional to the square of propeller’s speed. Force on the frame are depend on the angular speed of the rotor,

= . (2.1) b is a constant called as thrust factor. Total force on the quadrotor because of the propellers,

= . ∑ Ω (2.2) The acceleration occurred by that forces

= . ∑ Ω (2.3) The total acceleration according to E base,

(39)

11

= (− + ) (2.4) is a vector as [0 0 1]T to show the magnitude in axis z. R is rotation matrix is used as a transformation matrix in two different coordinates. It is explained in Appendix A. In rotation matrix, c is defined as cosine and s is defined as sine.

= $ψ cθ $ψ $θ sϕ + ψ cϕ $ψ $θ cϕ − $ϕ cψψ cθ ψ sθ sϕ − $ψ cϕ cψ sθ cϕ + $ψ sϕ

−$θ cθ $ϕ cθ ϕ % (2.5)

The time variation of angles ψ, θ, ϕ is a discontinuous function so it is different from body angular rates (p, q, r) which are physically measured with gyroscopes. The transformation matrix between them is defined as, [8]

&'( )* = + , ϕ θ ψ- (2.6) + = 10 ϕ $ϕ cθ0 −$θ 0 −$ϕ cϕ cθ% (2.7) Rotating speed of angular velocity ω occur angular momentums.

0 = 12 (2.8) I is the moment of inertia of the quadrotor. The quadrotor is a rigid body symmetric about its xz and yz plane, and the rotation axes coincidences with the principal axes, then the moment of inertia is,

1 = ,

13 0 0

0 14 0

0 0 15

- (2.9)

The torque on a body along axis of rotation determines the rate of change of the body's angular momentum.

6 = 0 (2.10) According to equations of (2.8) and (2.10),

6 = 2 × 12 + 12 (2.11) Gyroscopic effects because of changing in orientation of the rigid body and the propeller plane such as precession acting on a quadrotor directly.

(40)

12

Gyroscopic torque because of the rotational axis of rotating body is,

68= ∑ 9(2 × ) Ω (−1) (2.12)

J is inertia of a propeller. Each propeller rotation creates a force of thrust and exposes moment of the quadrotor body.

6: = ;

< (Ω − Ω ) < (Ω= − Ω )

>(−Ω + Ω − Ω= + Ω )

? (2.13)

In equation (2.13) l is the horizontal distance between the center of propeller and the center of the q uadrotor mass and d called drag factor is a constant.

The equation of torque is,

6:= 68+ 6 (2.14)

After expanding equations (2.11), (2.12), (2.13) in (2.14),

9 @,ϕθ ψ- × 0 0 1%A (−Ω +Ω −Ω=+Ω ) + , ϕ θ ψ- × , 13 0 0 0 14 0 0 0 15 - ,ϕθ ψ- + , 13 0 0 0 14 0 0 0 15 - ,ϕBθB ψB- = ; < (Ω − Ω ) < (Ω= − Ω ) >(−Ω + Ω − Ω= + Ω ) ? (2.15)

Quadrotor’s angular accelerometers, ϕB = ψθ CDEDFDG H I + J DHθ (−Ω +Ω −Ω=+Ω ) + K DH ( (Ω − Ω )) (2.16) θB = ψϕ LDGDFDH E M − J DEϕ (−Ω +Ω −Ω=+Ω ) + K DE ( (Ω= − Ω )) (2.17) ψB = θϕ CDHDFDE G I +DG (>(−Ω + Ω − Ω= + Ω )) (2.18)

Following the expansion of the equation (2.4), xB yB zB% = 0 0 -g% + ; cψ cθ cψ sθ sϕ-sψ cϕ cψ sθ cϕ+sψ sϕ sψ cθ sψ sθ sϕ+cψ cϕ sψ sθ cϕ-sϕ cψ -sθ cθ sϕ cθ cϕ ? 00 1% b m(Ω12+Ω22+Ω3 2 +Ω42) (2.19)

(41)

13

Accelerations of positions in body coordinate frame are,

xB = (sψsϕ+cψ sθ cϕ)mb(Ω12+Ω22+Ω32+Ω42) (2.20)

yB = (sψ sθ cϕ-sϕ cψ)mb(Ω12+Ω22+Ω32+Ω42) (2.21)

zB = − (cθ cϕ)mb(Ω12+Ω22+Ω32+Ω42) (2.22) Input variables are choosen to simplify the equaitons above like below,

U = b (Ω12+Ω22+Ω32+Ω42) (2.23) U = b (Ω − Ω ) (2.24) U== b (Ω= − Ω ) (2.25) U = >(−Ω + Ω − Ω= + Ω ) (2.26) Ωr= −Ω +Ω −Ω=+Ω (2.27) ; U U U= U ? = ; 0 − 0 0 0 −> > −> > ? Z [ [ [ \Ω12 Ω22 Ω32 Ω42] ^ ^ ^ _ (2.28)

Input variables also could be defined according to angular velocities of the rotors.

Z [ [ [ \Ω12 Ω22 Ω32 Ω42]^ ^ ^ _ = ; 0 − 0 0 0 −> > −> > ? F ; U U U= U ? (2.29)

Consequently, quadrotors’ mathematical model is ϕB = ψθ C`aF`b `c I + d `cθ Ωr+ e `c U ) (2.30) θB = ψϕ L`bF`c `a M − d `aϕ Ωr+ e `a U=) (2.31) ψB = θϕ C`cF`a `b I +`b U ) (2.32) xB = (sψsϕ+cψ sθ cϕ)fg m (2.33) yB = (sψ sθ cϕ-sϕ cψ)fg m (2.34) zB = g − (cθ cϕ)fg m (2.35)

(42)

14 2.3 Rotor Dynamics Dc motor’s equations [5, 9] h = Ljjk+ l + mn2 (2.36) J 2 = 6 − 6j (2.37) 6 = m l (2.38) mn and m have the same value even though the units of measurement differ

combination of (2.36) and (2.37) differential equation is,

J 2 = −psqr 2 − 6j+psqh (2.39) After propeller and gear box models, the equation is,

2 = −t2 −u+jvJw2 +pqth (2.40)

t =

pqr

sJw (2.41)

The equation (2.40) can be linearized around an operation point 2 to the form x = −Ax + Bu + C,

y = t+ jz{

u+vJw | =pqt } = jz{ r

(43)

15

3. CONTROLLER DESIGN AND SIMULATIONS

3.1 Control Types and Modelling for Control

Several control techniques are evaluated, tested and compared in this work. These different control techniques are designed with using inputs U1, U2, U3, and U4 for altitiude and attitude control of quadrotor.

The simulation of quadrotor model with controllers is prepared with using Matlab/Simulink. The model of quadrotor and the main block’s subsystems are shown in Appendix B.1. Not all hardwares are modeled on simulation. Simulations are prepared only to see controllers’ characteristics and behaviours. Then designed controllers are implemented to the quadrotor test bench and compared their characteristics.

The system mathematical model defined in subsection 2.2. It can be rewritten in state space to define controllers input equations easily and some variables are chosen below to simplify equations.

~ = [€ € • • ‚ ‚ x x ƒ ƒ] (3.1) X is the system’s state vector and U the input vector is,

… = [… … …= … ] (3.2) x = €, x = x = € x= = •, x = x= = • x† = ‚, x‡= x†= ‚ xˆ = , x = xˆ= xŠ= x, x = xŠ= x x = ƒ, x = x = ƒ (3.3)

(44)

16

Combining equations of mathematical model and inputs with (3.1) and definitions below we obtain, =DEFDG DH = K DH =JŒ DH = K DE = =DGDFDEH ==DG =JŒ DE † =DHDFDGE (3.4) …3 = ( •$€ $lŽ• •$‚ + $lŽ€ $lŽ‚) …4= ( •$€ $lŽ• $lŽ‚ − $lŽ€ •$‚) (3.5) Now, the dynamics of all angle and position variables can be described by,

•(~, …) = ‘ ’ ’ ’ ’ ’ ’ ’ ’ ’ ’ ’ “ € ψθ + θ Ωr+ U • ψϕ =− ϕ Ωr+ U= ‚ θϕ †+ = U − (cθ cϕ)fg m x …3fmg ƒ …4fmg ” • • • • • • • • • • • – (3.6)

3.2 Pid Control Technique

PID controller is the most used linear regulator in the industrial area because of its simple structure, good performance and tuned easily. The traditional PID controller has a structure composed three constant parameters that are proportional, derivative and integrator.

(45)

17

The aim of the PID controller is minimizing the error (difference between the input and output) of the system by adjusting the output with changing parameters. According to Figure 3.1, PID controller’s form is,

Figure 3.1 : PID controller structure.

h(—) = ˜š(—) + ˜D› š(6)k >6 + ˜œjn(k)jk (3.7) Four controller are designed to stabilize the altitude and attitude behaviour of the quadrotor. To stabilize euler angles roll (ϕ) and pitch (θ), the controller’s form is,

… = ˜™•j− ϕ) + ˜D•›(ϕj− ϕ) >t + ˜œ•j− ϕ) (3.8) U= = K ¡¢− θ) + K›(θ¢− θ) dt + K¤¡¢− θ) (3.9) To stabilize heading attitude behavior, controller form for Euler angles yaw (ψ) is,

U = K ¥(ψ¢− ψ) + K`¥›(ψ¢− ψ) dt + K¤¥(ψ¢− ψ) (3.10)

A traditional PID controller is used to control angle of theta in Figure 3.2. An enhanced PID controller (Figure 3.3) is more suitable for real system than traditional one and can be used for attitude and altitude control. In this controller, a derivative action is calculated from the only output to prevent sharp movements because of the sudden impulse.

(46)

18

Figure 3.2 : Traditional PID controller (pitch control block diagram).

Figure 3.3 : Enhanced PID controller (roll and yaw control block diagram). For the desired altitude value and movement on the z-axis, the equation (2.35) is used and the control input is defined as,

… = (¦G§¨)

©ª«¡ ¬-® • (3.11)

…¯ = ˜™¯(zj− z) + ˜D¯›(zj− z) >t + ˜œ¯(zj− z) (3.12)

… =©ª«¡ ¬-®•8 − (°±b(¯²F¯)§ °³b›(¯²F¯)j´§°µb(¯²F¯))

©ª«¡ ¬-® • (3.13)

(47)

19

Figure 3.4 : Altitude control block diagram.

The height control is looking more complex than the attitude control because of the depending from pitch and roll angles.

3.2.1 PID control simulation results

The simulation of quadrotor model with controllers is prepared to see controllers’ characteristics and behaviours using with Matlab/Simulink. Constants of PID are defined by signal constraints block with bounds in Table 3.1.

Table 3.1 : Maximum bound values using with constant optimization Angles and Height %Overshoot Settling Time %Settling Initial Value Desired Value Phi 10 4 2 0 1 Theta 10 4 2 0 1 Yaw 10 4 2 0 1 Height 10 3 2 0 3

PID controller’s constants are determined with response optimization tool Table 3.2. Table 3.2 : PID controller constant values

Angles and Height Kp Ki Kd Phi 4.71 0.3 0.35 Theta 4.94 0.3 0.35 Yaw 2.5 0.29 0.19 Height 16.22 1.083 5

Simulation results of PID controller for attiude and altitude control with these constants are shown in Figure 3.5 and Figure 3.6.

(48)

20

Figure 3.5 : Simulation results for PID controllers of angles.

Figure 3.6 : Simulation PID controller result for altitude. 3.3 Lyapunov Theory Based Control

This control technique depends on Lyapunov stability theory directly to control attitude of the quadrotor. According to the Lyapunov stability, when the system on equilibrium point x=0;

V (0) = 0, ·(x) > 0 lŽ ¹ , x ≠ 0

V (x) ≤ 0 in D (3.14) Then the equilibrium is stable in domain D. Also, if;

V (x) < 0 lŽ ¹ , x ≠ 0 (3.15) Then the equilibrium is asymptotically stable in domain D. [10].

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 Time (sec) A n g le ( ra d ) Roll (phi) Pitch (theta) Yaw (psi) 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0 0.5 1 1.5 2 2.5 3 3.5 Time (sec) H e ig h t (m ) Altitude (z)

(49)

21

First, a section, which includes stabilization angles and their time derivatives, is defined as desired position an equilibrium point of quadrotor for attitude control such as, X = (xj, 0, x=j, 0, xj, 0). x , x=, and x are the roll, pitch and yaw angles defined in equation (3.3). At the stabilization point, their angular velocities will be zero so their time derivatives must be zero.

V(x) = [Âx − xjà + x + Âx

=− x=jà + x + Âx†− x†jà + x‡] (3.16)

Let us V(X) positive defined Lyapunov function around the desired position X. V = Âx − xjÃx + x x + Âx

=− x=jÃx + x x + Âx†− x†jÃx‡+ x‡x‡ (3.17)

The function of angle and position described in equation (3.6) can be reduced in the case of perfect cross VTOL (Ix=Iy), when the system close to the equilibrium point (where the Ωr = 0, € = 0, • = 0, ‚ = 0 ). [5] V = Âx − xjÃx + x K DH… + Âx=− x= jÃx + x K DE…=+ Âx†− x† jÃx ‡+ x‡ DG(3.18) By choosing inputs for stability,

… = −1< Âx − x3 jà − m x …== −1< Âx4 =− x=jà − m x

… = −15Âx†− x†jà − m=x‡ (3.19) the equation (3.18) is,

V = −x DKHm − x DKEm − x‡DKGm= (3.20) k1, k2, k3 are positive constants defined by equation (3.19) which is only negative semi-definite. By Lyapunov theorem [11], the simple stability for equilibrium is ensured. Asymptotic stability is ensured by applying LaSalle theorem because the maximum invariance set of rotations’ subsystem under control (3.19) contained in the set Ä = {~ ∈ ℜ‡: V|Ê = 0} is restricted only to the equilibrium point. [5]. For the altitude control, the lyapunov function and its derivative according to angles and height described in equation (3.6) is,

(50)

22

V = Âxˆ− xˆjÃx‰+ x‰( − (cθ cϕ)fmg) (3.22)

By choosing input of altitude for stability,

… = −(cθ cϕ)Âx7>− x7− Ã − m5x‰ (3.23) the equation (3.22) is,

V = −x‰pG(cθ cϕ) (3.24) Kz is positive constant defined by equation (3.23) which is only negative semi-definite.

Defined inputs of the lyapunov controller minimized the error to control the attitude and altitude control of the system. The Lyapunov theory based controller’s block diagram for attitude and altitude control is shown in Figure 3.7 and Figure 3.8.

(51)

23

Figure 3.8 : Lyapunov based controller for altitude control block diagram. 3.3.1 Lyapunov theory based control simulation results

The system with Lyapunov controllers’ characteristics are bounded by signal constraints block in Table 3.1 and defined constants are shown in Table 3.3. Simulation results of Lyapunov controller for attiude and altitude control with these constants are shown in Figure 3.9 and Figure 3.10.

Table 3.3 : Lyapunov controllers constant values

Constant Phi Theta Yaw Height

K 0.020 0.024 0.0275 7.2

Figure 3.9 : Simulation results for lyapunov controllers of attitude.

0 2 4 6 8 10 0 0.2 0.4 0.6 0.8 1 1.2 1.4 Time (sec) A n g le ( ra d ) Roll (phi) Pitch (theta) Yaw (psi)

(52)

24

Figure 3.10 : Simulation results for lyapunov controllers of altitude.

If the lyapunov theory based controlled system’s inputs are analyzed well, the controller lyapunov controller’s structure is seen the same as PD controller’s structure. If the gyroscopic effects and assuming cross coupling are neglected, the model can be written as,

ϕB = 1< 3 U θB = 1< 4 U= ψB = D G U (3.25)

After rewritten the model in laplace domain in equation (3.25), ϕ(s) = $ 1<

3 U

θ(s) = $ 1<

4 U=

ψ(s) = «rDG U (3.26)

The model does not need an integrator because of the double pole on the origin. Hence, PD controller is also able to control the quadrotor model.

0 2 4 6 8 10 0 0.5 1 1.5 2 2.5 3 3.5 Time (sec) H e ig h t (m ) Altitude (z)

(53)

25 3.4 Backstepping Technique Based Control

Back stepping control is an adaptive control technique for nonlinear dynamic systems. Back stepping control depends on comparison of state variables with stable ones. About system stability analysis is performed using a Lyapunov theory. For this analysis, adaptation of control laws and Lyapunov direct method are combined. Back stepping controller designing , which is a recursive structure, starts with analysing the stability with lyapunov theory, continued with stabilizing the subsystems according to the knowing stable system, and terminate when the final external control is reached.

= x j− x (3.27)

First, the tracking error is defined. Then,

·( ) = (3.28) Lyapunov function of state variable is considered. The time derivative of function is,

·( ) = (3.29) ·( ) = (x j− x ) (3.30)

The time derivative function must be negative semi-definite so a new input x is defined for stabilization of function in equation (3.31).

x = x j+∝ (3.31)

∝ must be a positive number to provide negative semi definite. If the virtual control input x2 is written in equation (3.30).

·( ) = −∝ (3.32) The second variable change is,

= x − x j−∝ (3.33)

Now, new lyapunov function of desired variables can be defined as,

(54)

26 Its time derivative is,

· ( , ) = −∝ − + . x − ÂxB j−∝ ( +∝ )Ã (3.35)

According to equation (3.6) x can be written as,

x = ψθ + θ Ωr+ U (3.36)

The control input can be written with xB , ,=j=0, and · ( , ) < 0;

U = g( − x x‡− x Ωr−∝ ( +∝ ) −∝ ) (3.37)

The term ∝ ,(∝ > 0) is added to stabilize .

Inputs of controllers pitch and yaw angle could be extracted with same steps of roll angle. U== r( =− =x x‡− x Ωr−∝=( +∝= =) −∝ ) (3.38) U = v( †− †x x −∝†( ‡+∝† †) −∝‡ ‡) (3.39) With definitions, == x=j− x= = x − x=j−∝= = †= x†j− x† ‡= x‡− x†j−∝† † (3.40)

For the altitude control, the tracking error ˆis,

ˆ = xˆj− xˆ (3.41)

·( ˆ) = ˆ (3.42)

Lyapunov function of state variable is considered. The time derivative of function is, ·( ˆ) = ˆ(xˆj− x‰) (3.43)

A virtual input x is defined for stabilization of function ˆ in equation (3.44). x‰= xˆj+∝ˆ ˆ (3.44)

The second variable change is,

(55)

27

Now, new lyapunov function of desired variables can be defined as,

·( ˆ, ‰) = ˆ + ‰ (3.46)

Its time derivative is,

· ( ˆ, ‰) = −∝ˆ ˆ − ˆ ‰+ ‰. x‰− ‰ÂxBˆj−∝ˆ( ‰+∝ˆ ˆ)à (3.47)

x‰= − (cθ cϕ)fmg (3.48)

U =cosθ cosϕ( ˆ+ −∝ˆ( ‰+∝ˆ ˆ) −∝‰ ‰) (3.49)

Defined inputs of the backstepping controller minimized the error to control the attitude and altitude control of the system. Backstepping control for altitude control block diagram is shown in Figure 3.11. Backstepping control for attitude control block diagram is shown in Appendix B.2.

Figure 3.11 : Backstepping controller for altitude control block diagram. 3.4.1 Backstepping technique based control simulation results

The system with backstepping controllers’ characteristics are bounded by signal constraints block in Table 3.1 and defined constants are shown in Table 3.4.

Table 3.4 : Backstepping controllers constant values

Constant Phi(Alpha1,2) Theta(Alpha3,4) Yaw(Alpha5,6) Height(Alpha7,8)

Alpha 8.67 8 8.44 1.45

(56)

28

Simulation results of backstepping controller for attiude and altitude control with these constants are shown in Figure 3.12 and Figure 3.13.

Figure 3.12 : Simulation results for backstepping controllers of attitude.

Figure 3.13 : Simulation results for backstepping controllers of altitude.

0 2 4 6 8 10 0 0.2 0.4 0.6 0.8 1 1.2 1.4 A n g le ( ra d ) Time (sec) Roll (phi) Pitch (theta) Yaw (psi) 0 2 4 6 8 10 0 0.5 1 1.5 2 2.5 3 3.5 Time (sec) H e ig h t (m ) Altitude (z)

(57)

29

4. QUADROTOR DESIGN AND IMPLEMENTATION

The real time application of the controller techniques on the physical realization of the quadrotor is so essential to understand the controllers’ characteristics and differences of the nonlinear system application in the real world.

Quadrotor has several requisite and optinal mechanical and electronics components on a body frame such as propeller, motor, esc, microcontroller, imu sensor, ultrasonic sensor, barometer, remote control transceiver, gps, video transmitter kit…

4.1 Quadrotor Body Frame

One of the commercial model Bumblebee is used for the body of the quadrotor frame. (see Figure 4.1).

Figure 4.1 : BumbleBee quadrotor frame.

The body center plate and tubes are made of carbon fiber so the body frame is rigid, durable, and light. There are many holes to mount different devices easily on body center and it has hard plastic motor and esc mount on each end of the tube. Its wheel base length is 550 mm and its weight is 450 g (without motors and electronics).

(58)

30

4.1.1 Calculating moment of inertia of the quadrotor

The moment of inertia of the quadrotor body is an important parameter which influences dynamics of the quadrotor. The quadrotor body is seperated small reasonable parts to calculate the inertia easily. Each parts moment of inertia for three axis is calculated alone according to their weights, dimensions, and distance from the appropriate rotation axis given Table 4.1. Then all parts inertia are sum up to calculate the total moment of inertia.

Table 4.1 : Quadrotor part list and parameters

Part Shape Mass Dimensions Distance from

the axis [cm] Body Solid Cylinder 270 g h = 5cm, r = 7cm [0 0 0]

Battery Cuboid 347 g

d = 14.4cm, w = 5cm h = 2.2cm

[0 0 0]

Motor Point mass 91 g [22 22 22]

Leg’s arm rod 10 g l = 25cm [1 1 0]

Leg’s ski rod 10 g l = 25cm [25 19.3 15.8]

The body including all electronics devices of the platform will be modeled as solid cylinders attached by zero mass and frictionless arms to simplify the modeling. The moment of inertia of a cylinder rotating about each axis perpendicular to its body is given by in equation (4.1). [12, 13]

13, 14 =Ï)4 +Ïℎ12

15 = +

r

(4.1) The battery shape is similar to solid cuboid and its moment of inertia for each axis in equation (4.2).

13, 14=Ï(Ñ + > )12 +Ï(ℎ + > )12

15 = (Ò

r§Ór)

(59)

31

The motors’ moment of inertia is calculated as a point mass to be calculated simply in equation (4.3).

13, 14= 2Ï<

15 = 4Ï< (4.3)

The body frame has two leg’s arm and one leg’s ski on one side. The moment of inertia as a rod for each of them is calculated with equation (4.4) and equation (4.5). For the leg’s arm rods,

13, 14= K

r

= + Ï) (4.4)

For the leg’s ski rods,

13, 14= K

r

+ Ï) (4.5) Then all parts inertia are sum up to calculate the total moment of inertia (4.6). All parts of moment of inertia of quadrotor are shown in Table 4.2

1 = 1 ªj4+ 1 :kkn+4+ 1 ªkª+«+ 1Kn8_:+ + 1Kn8_«p (4.6)

Table 4.2 : Quadrotor part moment of inertia results Part Shape Moment of inertia (10-3)

(kgm2) Body Solid Cylinder [0.387 0.387 0.661] Battery Cuboid [0.672 0.863 0.614] Motor Point mass [8.8 8.8 17.6] Leg’s arm rod [0.0417 0.0417 0.0208]

Leg’s ski rod [0.0677 0.0424 0.0302]

Total [9.9684 10.1341 18.9260]

4.2 Propellers

Propellers convert rotational motion provided by motors into thrust by propellers. In that project, 10x3.8 propellers are used for normal and counter rotation. The use of two different styles of propeller is important for negating opposite torque. Propellers are made of hard plastic. However, for high efficiency the most modern propeller

(60)

32

designs use high technology composite light and durable materials such as carbon fibre.

4.2.1 Calculating moment of inertia of the rotor and propeller

To determine gyroscopic propeller effect, moment of inertia rotor must be calculated with moment of inertia motor’s rotor and propellers in equation (4.7).

9+ = 9 + 9Õ (4.7)

For the thin cylindrical shell the moment of inertia of rotor calculating with,

9 = Ï) (4.8) 9 = 8.67x10F‡ kgm2

The propeller shown in Figure 4.2 is divided three or more rectangular parts to calculate propeller’s moment of inertia simply. Propeller’s dimensions and calculated moment of inertia are shown in Table 4.3.

9Õ= Ò r = + Ór (4.9) Figure 4.2 : Propeller 10x3.8.

Table 4.3 : Propeller parts parameters and moment of inertia Part Mass (g) Width (cm) Height (cm)

Distance from shaft (cm) Moment of inertia (kgm2) Jpart3 2.8 g 3.5 1.5 0 4.96x10-7 Jpart2 5.1 g 6.8 2.4 2.2 5.41x10-6 Jpart3 2.5 g 2.2 2 9 2.07x10-5 Jtotal 10.4 g 12,5 2.66 x10-5

(61)

33

9Õ = 2x(9kªk:K) = 5.32x10F†m Ï (4.10)

The moment of the inertia of the whole propeller is shown in equation (4.10). The moment of inertia of rotor is calculated in equation (4.11) according to equation (4.7)

9+ = 6.18x10F†m Ï (4.11)

4.3 Brushless Motor

Brushless motors have a stationary internal core and windings with magnets on the rotor around the armature. Brushless DC motors are usually equipped with three phases and have three stator windings connected with star shape. Since no brushes are involved and the only friction points are at the shaft these motors are of much higher efficiency compared to standard brushed motors. To rotate the BLDC motor, the stator windings are energized in a sequence.

Brushless motors have been gaining popularity because they are quiet, powerful, and need less maintenance. There are two types of brushless motor which are inrunner and outrunner according to rotor of motor. For the outrunner ones, outer cylinder is the portion that rotates. The outrunner motors have lower Kv (a measurement constant for velocity, measureed in rpm per volt) but higher torque than inrunner motors. ST2812 brushless motors shown in Figure 4.3 are used in this project. Motor’s electrical technical datas are shown in Appendix C.1.

(62)

34

The technical datas about the burshless motor ST2812 is too less to determine modeling of the motor. So each motor’s thrust values are measured with precision scale and rpm values are measured with laser tachometer for each pwm values (see Figure 4.4).

Figure 4.4 : Precision scale and laser tachometer.

All measured values are given in Appendix D. It seems to be linear about motors characteristics in Figure 4.5 and Figure 4.6 and the relation between pwm and thrust can be written as,

Figure 4.5 : Motor thrust values for angular velocity.

0 100 200 300 400 500 600 700 800 900 0 100 200 300 400 500 600 700 800

Motor speed (rad/s)

M o to r T h ru s t (g ) Motor 1 Motor 2 Motor 3 Motor 4

(63)

35

Figure 4.6 : Motor thrust values for pwm. Ù•—•)1 = 8.21x − 1210 Ù•—•)2 = 7.53x − 1110 Ù•—•)3 = 7.82x − 1153

Ù•—•)4 = 7.58x − 1124 (4.12) There are two important aerodynamic coefficients for the quadrotor dynamics as thrust coefficient b and drag coefficient d. The thrust coefficient could be calculated with the angular rate of the propeller can be known from the motor data table (see Figure 4.7) during the hover position and the mass of the quadrotor.

Figure 4.7 : Motor’s thrust and velocity datas during the hover. The total weight of quadrotor equals to nearly 1320 g. The thrust constant is,

Ú = ∑Ω‹ 140 150 160 170 180 190 200 210 220 230 240 0 100 200 300 400 500 600 700 800 Motor Speed (pwm) M o to r T h ru s t (g ) Motor 1 Motor 2 Motor 3 Motor 4

(64)

36 = ∗Ω8

{r

= ∗Š . ‰.= ‹ = 3.85x10F†m $ /)š (4.13)

The drag constant could be calculated with drag coefficient found in propeller technical datas and the equation (4.14) [5]

}Þ = 0.0258;

' = l) •• >šŽ$l—ƒ = 1.1830 m /Ï= ¹) •) š = }Þ. '. y(Ω +:j) +:j = >Ω‹

> = 2.92x10F‡ m Ï$ /)š (4.14)

4.4 Power System

4.4.1 Electronic speed contollers

An Elctronic speed controller (ESC) is used to control speed of the brushless motor (see Figure 4.8). This hardware receives the power from the battery and control the motor according to a PWM signal provided by the microcontroller.

Figure 4.8 : Turnigy plush 30A electronic speed controller.

The motor ST2812 can draw approximately 19 A max current so turnigy plush 30 A electronic speed controller is used for each motor at this project. Turnigy plush is a programmable speed controller and has different settings can be used to optimize the

(65)

37

behavior of the motors such as selecting different types of battery, cutting the power supply to the engines to prevent damages to the battery if the battery runs low, smooth starts for greater safety. Turnigy plush technical specifications and programmable modes and features are shown in Appendix C.2.

4.4.2 Battery

A Turnigy lipo battery was selected as a power supply (see Figure 4.9). Parameters for battery pack are listed in Table 4.4.

Table 4.4 : Turnigy battery pack parameters Parameter Turnigy Lipo Battery

Capacity 4000mAh

Cell / Voltage 3s1p – 11.1 V

Discharge 30C

Peak Discharge 40C (for 10 sec.)

Weight 347g

Size 144x50x22mm

The lithium polymer battery provides excellent energy density for the weight of the battery, 30C battery is rated at 120A continues discharge rate, and the 4000 mAh capacity ensures adequate run time (depending on the all-up weight of the craft).

Figure 4.9 : Turnigy 4000mAh 11.1 V lipo battery.

Quadrotor with 10x3.8 propellers normally during the flying (taking off, climbing rapidly, stable hover position), each motor draws 10-17 A and quadrotor draws nearly 42-72A. So the quadrotor’s flying time can take 3.5 – 6 minutes.

Referanslar

Benzer Belgeler

Selçuk Alagöz, bunun üzerine yarışmaya kardeşi Rana Alagöz adma kayıt yaptırır.. O dönem Rana

Türk mimârî âbideleri arasında en küçük ölçüdeki binaları teşkil eden sıbyan mektepleri, tarihî gelişmeleri içinde, tesbit edilmiş değil­ dir.. Evliya

In this paper, a Unmanned Aerial Vehicle for traffic monitoring on roadway scheme is proposed where we capture the video of the roadway using the camera mounted on the drone

4.5 Lead acid battery current, voltage, energy and state of charge variations by time with the LA usage in the Rule Based control

CONCLUSIONS AND FUTURE WORKS In this paper, a robust position controller for a tilt-wing quadrotor for way-points tracking under external wind and aerodynamic disturbances

This thesis work focuses on the design, construction and flight control of a novel UAV (SUAVI: Sabancı University Unmanned Aerial VehIcle).. SUAVI is an electric powered compact

In this paper we are presenting our current work on the modeling and control of a new tilt-wing aerial vehicle (SUAVI: Sabanci University Unmanned Aerial VehIcle) that is capable

İrtifa, öteleme hareketleri ve yönelme için kullanılan bulanık mantık kontrolcülerdeki x ve y öteleme hareketleri için gerekli olan θ ve Φ açıları klasik kontrolcülerle