Analysis and Implementation of a ROS Based Controller for a Bi-copter System PDF

Title Analysis and Implementation of a ROS Based Controller for a Bi-copter System
Author George Mohsen
Course Control
Institution The German University in Cairo
Pages 78
File Size 2.5 MB
File Type PDF
Total Downloads 72
Total Views 164

Summary

Bachelor Thesis...


Description

Faculty of Engineering and Materials Science German University in Cairo

Analysis and Implementation of a ROS-based Controller for Bi-copter System A thesis submitted in partial fulfilment of the requirements for the degree of Bachelor of Science in Mechatronics Engineering By

George Mohsen Roshdy Zaky

Supervised by

Prof. Elsayed Ibrahim Imam Morgan Dr. Omar Mahmoud Mohamed Shehata M.Sc. Catherine Malak Elias

May 26, 2019

This is to certify that: (i) the thesis comprises only my original work toward the Bachelor Degree of Science (B.Sc.) at the German University in Cairo (GUC), (ii) due acknowledgment has been made in the text to all other material used

George Mohsen Roshdy Zaky May 26, 2019

ii

Acknowledgments ”Give thanks to the Lord for He is good, His love endures forever.” Ps. 118:29. I would like to thank Prof. Elsayed Ibrahim Imam Morgan for this great opportunity to work under his supervision. Furthermore, I would like to thank Dr. Omar Mahmoud Mohamed Shehata and M.Sc. Catherine Malak Elias for giving me all the help, assistance, support and push i ever needed throughout the track. I would like also to state that the joy not only at the end but in the trip itself. Also I would like to thank my mother and sister for their endless support and love. I wish that i could have done a great work to make my dad feel proud in heaven. Finally, I would like to thank all my friends and the family of MRS Lab who supported me along this path offering all possible help to achieve this wonderful work.

iii

Abstract Unmanned Aerial Vehicles (UAVs) are becoming increasingly popular in the research community of robotics as they can be used in various aspects of human life, such as safety, education, and entertainment. Over the past few years, UAVs have attracted attention as technology advances have made them cheaper and easier to build. The aim of this Bachelor Thesis is to design and build autonomous Bi-copter to achieve flight stability on a fabricated Bi-copter that is operated and controlled using PID. Firstly, the dynamics model was established of the Bi-copter. Afterwards, the prototype is designed and built to obtain the relevant physical parameters. All the electronic components used to build the Bi-copter and the flight controllers was also discussed as well as the Matlab/Simulink simulations. Finally, the real flight experiments were applied and verified the correctness and effectiveness of the proposed PID controller of the Bi-copter in terms of smooth response and small overshoot.

iv

Contents Acknowledgments

iii

List of Abbreviations

vii

List of Figures

ix

List of Tables

xi

1

Introduction 1.1 Robots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 Definition of Robots . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.2 History of Robots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Robot Locomotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2.1 Types of Locomotion . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Types of Aerial Vehicles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.1 Conventional Take-off and Landing . . . . . . . . . . . . . . . . . . . 1.3.2 Vertical Take-off and Landing . . . . . . . . . . . . . . . . . . . . . . 1.4 Unmanned Aerial Vehicles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 History of Unmanned Aerial Vehicles . . . . . . . . . . . . . . . . . . 1.4.2 Types and Applications of Unmanned Aerial Vehicles . . . . . . . . . 1.5 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 Thesis Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 1 1 1 3 3 6 6 7 8 8 9 12 12

2 Literature Review 13 2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Thesis Proposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3

Methodology 24 3.1 Design of Bi-copter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.1.1 Bi-copter Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.1.1.1 Frame Type . . . . . . . . . . . . . . . . . . . . . . . . . . 25

v

3.2

3.3

3.4

3.1.1.2 Bi-copter Arm . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1.3 Bi-copter Bases . . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 Test Bench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.2.1 Fixed Base . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.2.2 Rotating Base . . . . . . . . . . . . . . . . . . . . . . . . . Electronic Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.3 Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.4 Micro-controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Motion Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 State Space Representation . . . . . . . . . . . . . . . . . . . . . . . . Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

Results 4.1 Numerical Analysis Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Numerical Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Experimental Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Results and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

Conclusion

26 28 32 32 33 35 35 41 41 44 45 45 48 50 52 52 53 56 57 58

6 Future Work

59

Appendix

60

References

64

vi

List of Abbreviations UAVs

Unmanned Aerial Vehicles

CTOL

Conventional Take-off and Landing

VTOL

Vertical Take-off and Landing

BLDC

Brushless Direct Current

ESC

Electronic Speed Control

3D

Three Dimensions

PETG

Polyethylene Terephthalate Glycol

PLA

Poly Lactic Acid

ABS

Acrylonitrile Butadiene Styrene

CAD

Computer-Aided Design

IMU

Inertial Measurement Unit

GUC

German University in Cairo

V

Volt

RPM

Rotation Per Minute

LiPo

Lithium Polymer

PDB

Power Distribution Board

PID

Proportional Integral Derivative

LQR

Linear Quadratic Regulator

GA

Genetic Algorithm

FBD

Free Body Diagram

TMI

Total Moment of Inertia vii

MIMO

Multi Input Multi Output

BEMT

Blade Element Momentum Theory

SISO

Single Input Single Output

SMC

Sliding Mode Control

ROS

Robot Operating System

viii

List of Figures 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9

Flying Wooden Pigeon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Modern Robots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Wheeled Locomotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Skid Locomotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Legged Locomotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Flight Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Vertical Take-off and Landing . . . . . . . . . . . . . . . . . . . . . . . . . . 8 The Kettering Bug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Types of Unmanned Aerial Vehicles . . . . . . . . . . . . . . . . . . . . . . . 11

2.1 2.2 2.3

Control Architecture [1] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Cascade PID Control Structure [2] . . . . . . . . . . . . . . . . . . . . . . . . 20 Block Diagram of The Proposed Control Structure[3] . . . . . . . . . . . . . . 21

3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16 3.17

Bi-copter Drone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bi-copter Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Acrylic Sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Top Base Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Top Base with mounted boards . . . . . . . . . . . . . . . . . . . . . . . . . . Bottom Base Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bottom Base with mounted boards . . . . . . . . . . . . . . . . . . . . . . . . Fixed Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rotating Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Full Model view 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Full Model view 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Brushless Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Propeller Pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BLDC Motor MT2204 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EMAX BLHeli-30 Ampere ESC . . . . . . . . . . . . . . . . . . . . . . . . . ESC Motor Direction Control . . . . . . . . . . . . . . . . . . . . . . . . . . . ESC Calibration Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ix

25 27 29 29 30 31 31 33 33 34 34 35 36 37 39 39 40

3.18 3.19 3.20 3.21 3.22 3.23 3.24 3.25

MPU-6050 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LiPo Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Power Distribution Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arduino UNO Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Full Functional Bi-copter Model . . . . . . . . . . . . . . . . . . . . . . . . . Free Body Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Thrust Force Relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PID Closed Loop Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41 42 43 44 44 45 47 51

4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8

Theta equal zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Theta increases in negative direction . . . . . . . . . . . . . . . . . . . . . . . Theta increases in positive direction . . . . . . . . . . . . . . . . . . . . . . . PID Tuning Flow Chart [4] . . . . . . . . . . . . . . . . . . . . . . . . . . . . Closed Loop Response for certain angle stabilizing using PID Control . . . . . Equal thrust test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Clockwise rotation due to different thrusts . . . . . . . . . . . . . . . . . . . . Counter clockwise rotation due to different thrusts . . . . . . . . . . . . . . . .

53 53 54 54 55 56 56 57

1 2 3 4 5

Arm Dimensions . . . . . Top Base Dimensions . . . Bottom Base Dimensions . Fixed Base Dimensions . . Rotating Base Dimensions

61 61 62 62 63

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

x

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

List of Tables 3.1 3.2

Motor Datasheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 LiPo Battery Size Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.1

Parameters of The Bi-copter . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

xi

Chapter 1 Introduction 1.1 Robots 1.1.1

Definition of Robots

A machine capable of carrying out a complex series of actions automatically, especially one programmable by a computer.

1.1.2

History of Robots

• Early Conceptions of Robots: One of the first instances of a mechanical device built to regularly carry out a particular physical task occurred around 3000 B.C.: Egyptian water clocks used human figurines to strike the hour bells. In 400 B.C., Archytas of Tarentum, inventor of the pulley and the screw, also invented a wooden pigeon that could fly. Reference to figure 1.1. Hydraulically-operated statues that could speak, gesture, and prophecy were commonly constructed in Hellenic Egypt during the second century B.C. In the first century A.D., Petronius Arbiter made a doll that could move like a human being. Giovanni Torriano created a wooden robot that could fetch the Emperor’s daily bread from the store in 1557. Robotic inventions reached a relative peak (before the 20th century) in the 1700s; countless ingenious, yet impractical, automata (i.e. robots) were created during this time period. The 19th century was also filled with new robotic creations, such as a talking doll by Edison and a steam-powered robot by Canadians. Although these inventions throughout history may have planted the first seeds of inspiration for the modern robot, the scientific progress made in the 20th century in the field of 1

CHAPTER 1. INTRODUCTION

2

robotics surpass previous advancements a thousand fold.

Figure 1.1: Flying Wooden Pigeon • The First Modern Robots: The earliest robots as we know them were created in the early 1950s by George C. Devol, an inventor from Louisville, Kentucky. He invented and patented a reprogrammable manipulator called ”Unimate”, Reference to figure 1.2a, from ”Universal Automation.” For the next decade, he attempted to sell his product in the industry, but did not succeed. In the late 1960s, businessman/engineer Joseph Engleberger acquired Devol’s robot patent and was able to modify it into an industrial robot and form a company called Unimation to produce and market the robots. For his efforts and successes, Engleberger is known in the industry as ”the Father of Robotics.” Academia also made much progress in the creation new robots. In 1958 at the Stanford Research Institute, Charles Rosen led a research team in developing a robot called ”Shakey”,Reference to figure 1.2b. Shakey was far more advanced than the original Unimate, which was designed for specialized, industrial applications. Shakey could wheel around the room, observe the scene with his television ”eyes,” move across unfamiliar surroundings, and to a certain degree, respond to his environment. He was given his name because of his wobbly and clattering movements.

3

CHAPTER 1. INTRODUCTION

(a) Unimate Robot

(b) Shakey Robot

Figure 1.2: Modern Robots

1.2 Robot Locomotion Locomotion is the method of moving from one place to another. The mechanism that makes a robot capable of moving in its environment is called as robot locomotion. Locomotion involves the conversion of some source of energy electricity, air pressure, steam or nuclear power into a mechanical action that moves a vehicle or other carriage. Consider the lowly car: gas you put into the tank is converted to mechanical power by means of internal combustion. The gas is compressed as a vapor and explodes against a cylinder. The explosion pushes the cylinder down; this cylinder is in turn is connected to a drive shaft, which spins the wheels. The process repeats itself thousands of times per minute. Mobile robots use a variety of techniques to achieve motion. Most use an electric power source (usually a battery) that operates an electric motor. In the typical arrangement the direction of the motors can be changed, allowing the robot to be propelled forward or backward. There are other power train techniques used for robots, but the battery and motor pair is by far the most common.

1.2.1

Types of Locomotion

1. Wheeled Locomotion: It requires less number of motors for accomplishing a movement. It is little easy to im-

4

CHAPTER 1. INTRODUCTION plement as there are lesser stability issues in case of more number of wheels.

• Castor wheel - It rotates around the offset steering joint and wheel axle. (Figure1.3a) • Standard wheel - It rotates around the contact and the wheel axle. (Figure1.3b) • Ball or spherical wheel - This wheel is technically difficult to implement due to architectural complexity. It is an Omni directional wheel with only one directional movement is allowed. (Figure1.3c) • Swedish 45 and Swedish 90 wheels - It is an Omni-wheel, which rotates around the contact point, around the wheel axle, and around the rollers. (Figure1.3d)

(a) Castor Wheel

(b) Standard Wheel

(c) Spherical Wheel (d) Omni Wheel

Figure 1.3: Wheeled Locomotion

CHAPTER 1. INTRODUCTION

5

2. Slip/Skid Locomotion: In Slip/Skid locomotion the vehicles use tracks as available in a tank. The robot is steered by moving tracks with different speeds in the same or opposite direction. It offers stability because of large contact area of ground and track. (Figure1.4)

Figure 1.4: Skid Locomotion

3. Legged Locomotion: • It comes up with the variety of one, two, four, and six legs. If a robot has multiple legs then leg coordination is required for locomotion. • Legged locomotion consumes more power while demonstrating jump, hop, walk, trot, climb up or down etc. • It requires more number of motors for accomplish a movement. It is suited for rough as well as smooth terrain where irregular or too smooth surface makes it consume more operational power. It is little difficult to implement because of stability issues. (Figure1.5)

CHAPTER 1. INTRODUCTION

6

Figure 1.5: Legged Locomotion

1.3 Types of Aerial Vehicles 1.3.1

Conventional Take-off and Landing

Conventional Take-off and Landing (CTOL) is the process whereby conventional aircraft (such as passenger aircraft) take off and land, involving the use of runways. During takeoff, the aircraft will accelerate along the runway, resting on its wheels, until its takeoff speed is reached, at which point the pilot manipulates the flight controls to make the aircraft pivot around the axis of its main landing gear while still on the ground, this increases the lift from the wings and affects takeoff as shown in Figure(1.6a). During landings, a commercial passenger-carrying aircraft will arrive over the runway while still at flight speed. The landing consists of the final approach phase, the flare, the touchdown, and roll-out phase.as shown in Figure(1.6b). Seaplanes, instead of using runways, use water.

7

CHAPTER 1. INTRODUCTION

(a) Take-off Procedure


Similar Free PDFs