2009 development and implementation of a control system for a quadrotor uav

Please download to get full document.

View again

of 89
21 views
PDF
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Document Description
1. M.Sc. Mechatronics Master ThesisDevelopment and Implementation of a Control System for a quadrotor UAV by Yiting Wu March 20091. Supervisor: Prof. Dr. –Ing Holger…
Document Share
Documents Related
Document Transcript
  • 1. M.Sc. Mechatronics Master ThesisDevelopment and Implementation of a Control System for a quadrotor UAV by Yiting Wu March 20091. Supervisor: Prof. Dr. –Ing Holger Voos2. Supervisor: Prof. Dr. –Ing Konrad Wöllhaf
  • 2. Acknowledgments I would like to thank my thesis supervisor, Prof. Dr. Voos, for his guidance and support throughout the duration of this thesis. Thank you to Achim Feucht for his active support in the lab and his experiences of electrical engineering always helps me a lot to solve the problems. Thank you to Martin Binswager for his help on explanation of his bachelor thesis which made the work on electrical board and IMU sensor much easier. Many thanks to my family and my girlfriend for their patience and understanding, no matter where they were. In particular, my girlfriend who studied industrial design for her bachelor helped me to design the figure of "course of events". Last but not least, I would also like to thank my friends and fellow students for the great time spent together in the lab. These experiences in the duration of my thesis will be a great treasure for my memory of the study in University of Applied Science Ravensburg-Weingarten in Germany.
  • 3. Declaration Hereby I declare that this report has never been accepted in substance of anydegree. I have composed it myself as a result of my own investigations, except whereotherwise stated. Weingarten, Germany, 31st March 2009 _______________________ Yiting Wu
  • 4. ABSTRACT Development and Implementation of a Control System for a quadrotor UAV Yiting Wu Master of Science Department of Electrical and Computer Engineering University of Applied Science Ravensburg-Weingarten Small quadrotor UAVs are considered as one important type of vehicle for futureunmanned aerial missions. In spite of the four actuators of the system, the quadrotoris a dynamically unstable system that has to be stabilized by a suitable control system.During control systems design however, the nonlinear dynamics of the system has tobe taken into account. Based on an already existing simulation model inMatlab/Simulink and already derived control concepts, a control system for aquadrotor UAV has to be developed in this Master thesis and implemented in a testbed. The test bed is a quadrotor vehicle which will be fixed on a spherical bearing inorder to allow test flights.
  • 5. The first task herein comprises the final construction of the test platform andthe implementation of an inertial measurement unit (IMU, from Xsense) in thevehicle. Furthermore, the quadrotor vehicle with implemented IMU is connectedwith an ATMega2560™ microcontroller board. The microcontroller is able tocommand the rotational speed of the rotors and to get the measurements of theIMU as input signals. In the first step, the microcontroller board is placed outside ofthe vehicle. With the help of the test platform, the main parameters of the quadrotorvehicle are identified via some suitable experiments. In a second step, three control algorithms are developed based upon theMatlab™/Simulink™ simulation model and the already available control concepts.The control algorithms then are optimized for implementation in the microcontrollerthrough C/C++ language, taking the limitations of the hardware into account. Thecontrol algorithms are implemented in the test platform, evaluated and comparedagainst each other. Finally, the best control algorithm is determined.
  • 6. Table of ContentsABSTRACT ............................................................................................................................. Ⅳ1 Introduction ............................................................................................. 1 1.1 Motivation .................................................................................................... 2 1.2 Course of events ........................................................................................... 3 1.3 Outline of Thesis ........................................................................................... 52 Hardware Design and Specification ............................................. 7 2.1 Hardware Architecture ................................................................................. 7 2.1.1 Real-Time Implementation .................................................................... 8 2.1.2 Microcontroller-on-Board Implementation ........................................ 11 2.1.3 Results ................................................................................................. 12 2.2 Quadrotor Structure ................................................................................... 14 2.3 Test Platform .............................................................................................. 15 2.4 IMU ............................................................................................................. 16 2.4.1 Sensor Communication Features ........................................................ 16 2.4.2 Co-ordinate systems ............................................................................ 17 2.4.3 Output Modes ..................................................................................... 18 2.5 Microcontroller Board ................................................................................ 19 2.6 Motor Controller ........................................................................................ 20 2.7 Motor and Propeller ................................................................................... 21 2.8 Identification of the constants ................................................................... 243 Software Preparation and Specification .................................. 25 3.1 IMU Initialization and Configuration .......................................................... 25 3.1.1 Message Structure ............................................................................... 25 3.1.2 Message usage in “imu_init()” ............................................................ 28 3.2 Pulse-Width Modulation (PWM) ................................................................ 29 3.3 USART Interrupt Routine ............................................................................ 314 Quadrotor Kinematics and Dynamics ............................................... 35 4.1 Quadrotor Kinematics ................................................................................ 35 4.2 Quadrotor Dynamics .................................................................................. 37
  • 7. 5 Attitude Control Algorithm Design .................................................... 41 5.1 Nonlinear Control using Feedback-Linearization[1] .................................... 43 5.1.1 Control Algorithm Design .................................................................... 43 5.1.2 Control Algorithm Implementation ..................................................... 46 5.2 Simple PD Controller .................................................................................. 47 5.2.1 Controller Algorithm Design ................................................................ 47 5.2.2 Controller Algorithm Implementation ................................................ 49 5.3 PD controller Design with Partial Differential ............................................ 50 5.3.1 Controller Algorithm Implementation ................................................ 50 5.3.2 Controller Algorithm Implementation ................................................ 52 5.4 Motor Torque Design ................................................................................. 536 Simulation and Implementation Results .......................................... 55 6.1 Nonlinear Feedback Control....................................................................... 56 6.2 Simple PD Controller .................................................................................. 60 6.3 PD Controller with partial differential ........................................................ 637 Conclusion .................................................................................................. 67 7.1 Comparison of the control algorithms ....................................................... 67 7.2 Project Contributions ................................................................................. 69 7.3 Future Work................................................................................................ 70List of Figures ....................................................................................................... 73List of Diagrams.................................................................................................... 75List of Tables ........................................................................................................ 76Appendix .............................................................................................................. 76Bibliography ......................................................................................................... 77
  • 8. Chapter 1Introduction This thesis work focuses on the attitude control of a Vertical Take-Off andLanding (VTOL) Unmanned Aerial Vehicle (UAV). The proposed structure is four-rotormicro aerial robot, so called quadrotor. The UAVs has seen a growing interest over the past decade because of the widearea of applications, e.g. near-area surveillance, crop dusting, fire fighting andexploration both in military and commercial in- and outdoor applications etc. Thequadrotor is one of the most preferred types of UAV which can apply in abovementioned fields. The reason is the very easy construction and steering principleusing four rotors in a cross configuration against the traditional helicopterconstruction using one main rotor and one tail rotor. The first question one is asked about the quadrotor is how it stands out fromthe traditional one. Hence a short introduction about the quadrotor construction andsteering principle is necessary. The quadrotor is a mechatronic system with fourrotors that provide the lift and control. With respect to hover, the main difference isbest explained by considering how the helicopters compensate from gyroscopictorques. Traditional helicopters basically compensate from the torque generated bythe main rotor through the tail rotor. However the tail rotor compensation conductsa sideways displacement of the helicopter, thus counter steering by tilting the mainrotor blades is necessary. In this way hover is an ongoing and complex process.
  • 9. -2- 1. Introduction The quadrotor has four propellers driven by four motors in a cross configuration.While the front and the rear motor rotate counter-clockwise, the left and the rightmotor rotate clockwise, as long as the rotors rotate at the same speed the gyroscopiceffects are nearly eliminated and the quadrotor essentially hovers. One additionaladvantage of the quadrotor compared to a traditional helicopter is the simplifiedrotor mechanics. By varying the speed of the single motors, the lift force can bechanged and vertical and/or lateral motion can be created, see 4.1 QuadrotorKinematics.1.1 Motivation Although the quadrotor has the advantages in easy mechanical constructionagainst the traditional helicopter, but there are still issues that prevent it from beingwidely used in many of the suggested fields and application. First, the stabilizingcontrol and guidance of the quadrotor is a difficult task because of the nonlineardynamic behavior. Second, the small payload and the reduced processing power ofthe onboard electronics are further limitations for any control systemimplementation. This means, in order to implement more complex control task suchas landing and target tracking, more adequate sensors might be equipped on thequadrotor which needs a fixed ground station for processing of all sensors related tocontrol of the micro-UAV. Since the attitude stabilization could be considered the single most importantcomponent of flight control for the quadrotor and this is also a precondition forfurther implementation of other functionalities in the vehicle, the main goal of thispaper is to realize the attitude stabilization by using the Inertia Measurement Unit
  • 10. 1. Introduction -3-(IMU) sensor equipped on quadrotor. There are some contributions in the literaturethat are concerned with control system design for quadrotor vehicles. Many of theproposed control systems are based on a linearized model and conventional PID- orstate space control [5], [11], [15]while the other approaches apply SDRE or NonlinearFeedback control [1] , [18]. In this paper the Nonlinear Feedback control [18] is studiedand chosen to implement on the real quadrotor. In order to compare NonlinearFeedback control with the conventional PID control technique, a PID controller isdesigned and implemented on the quadrotor. Finally according to the simulation andtest results, the features of these two kinds of control techniques are summarized.1.2 Course of events This section will briefly give insight into the intermediate goals and objectives onthe way towards achieving autonomous hovering flight. Figure 1.1 provides anoverview of the course of events during the whole thesis period. At the beginning of September work started from reading the correspondingliteratures to provide a basic understanding of how the quadrotor operates, whatkind of physics are involved and essentially how to combine this knowledge into auseful model for control purpose. The bold goal at that time was to be able to hoverat the end of the thesis. After that, a lot of time and efforts were put on get relatedelectronic unit ready to work, including the IMU configuration, motor controllerdesign, USART interrupt routine design and so on. At the end, two controllers wereimplemented on the quadrotor and could control the attitude with small tolerances.
  • 11. -4- 1. Introduction Sep. 08 Oct. 08 Nov. 08 Dec. 08 Jan. 09 Feb. 09 Mar. 09 Apr. 09 Understanding the quadrotor project Hardware architecture design Get familiar with microcontroller programming Oder the test platform Work on LCD Oder motor controller IMU sensor configuration Derived test platform and assembling Motor controller design (PWM) Christmas Restructure the quardrotor USART interrupt routine design Control algorithm design & implementation Documentation Prepare for presentation Figure 1.1 Timeline illustrating Course of Events
  • 12. 1. Introduction -5-1.3 Outline of Thesis Chapter 2 deals with the hardware design for the quadrotor and hardwarespecifications, which includes the following aspects, such as: mechanical structuredesign of the quadrotor, test platform, electronic units, sensors and actuators. Chapter 3 gives the information about software preparation and specification inorder to make the electronic board and IMU sensor ready to be used for later on thecontrol algorithm implementation. This chapter is mainly about the microcontrollerprogramming. Chapter 4 provides the overall quadrotor model of kinematics and dynamics. Chapter 5 focuses on the control algorithms design which are needed tostabilize the quadrotor. The nonlinear control using feedback-linearization and PIDtechniques are adopted in this work. Besides the design of the control algorithm, theimplementation of the different controller in C language is also explained in thischapter. Chapter 6 presents the simulation and experimental test results of thecontrollers designed in chapter 5. Chapter 7 summarizes the control effect of the controllers based on the testresults and also proposes solutions to improve performance of the attitude control.
  • 13. Chapter 2Hardware Design and SpecificationIntroduction This chapter is mainly about hardware design for the quadrotor and hardwarespecifications, which includes the following aspects, such as: mechanical structuredesign of the quadrotor, test platform, electronic units, sensors and actuators. At thefirst beginning, the hardware architecture should be decided. Then according to theselected hardware architecture, the necessary components should be selected andprepared so the hardware architecture can be built. In order to make all thecomponents are ready to work, the specification must be done for all thecomponents which includes both the hardware and software sides.2.1 Hardware Architecture The hardware architecture shows the develop concept and describes the wholeproject. Many different hardware architectures have been used for developing theautonomous quadrotor, like real-time implementation includes hardware in the loopor microcontroller-on-board solution which is not real time. The first task of theproject is that, based on the available electronic units and components and also thedevelop software, one proper develop concept should be chosen which is possible tobe realized and implemented under the condition of the university lab.
  • 14. -8- 2. Hardware Design and Specification2.1.1 Real-Time Implementation A system is a real-time system when it can support the execution of applicationswith time constraints on that execution. Real-time control is a popular term for acertain class of digital controllers. For effective digital control, it is critical that sampletime be constant. Real-time control achieves nearly constant sample time. The mostused real time application tools are Matlab Real-Time Workshop™ or xPC Target™. Byusing these tools you can create a real-time application to let the system run whilesynchronized to a real-time clock. This allows the system to control or interact withan external system. Figure 2.1 shows the hardware architecture for the real-timecontrol concept which is developed by student group from AALBORG University astheir master thesis.[5] As the Figure 2.1 shows it has been chosen to equip the quadrotor with sensorsas GPS for absolute position estimate, Magnetometer for information about headingrange finder to aid the GPS in getting an altitude estimate, IMU for the possibility topropagate position and attitude. Besides all these sensors there are a number ofcomponents related to manual flight and other safety feature. All together thesetransducers are connected to the main CPU, some via a slave processor, the Robostixboard, which is built up around a 16 MHz Atemega128 processor. The Gumstixfeatures a 400 MHz Intel XScale processor of the type PXA255. It has 16 MB flashmemory and 64 MB of SDRAM. The embedded Linux system is running on thisGumstix. Wifistix is a fully configurable wireless board, following the 802.11(g)standard, which means that the bandwidth can be up to 54 Mb/s.
  • 15. 2. Hardware Design and Specification -9- Figure 2.1 Hardware Architecture for real-time application [5]Figure 2.2 Robostix Board Figure 2.3 Gumstix Figure 2.4 Wifistix
  • 16. - 10 - 2. Hardware Design and Specification First the Robostix is treated which has the main task of forwarding sensor datato the Gumstix. The low level code is written in C and cross compiled to generate ahex file which is loaded onto the Atmega128. Second the Gumstix software is treatedwhich is written in high level C code. This software is also cross compiled to fit thesystem specific architecture of the Gumstix, namely the Intel Xscale PXA255processor. Next the Development Host Machine software is described which isbasically defined by a Linux Soft Real Time Target application in Matlab™/Simlink™. Itis in this environment the controller will be derived and also implemented.[5] Theinteraction between the components and the main process is illustrated in Figure2.5. Figure 2.5 The main process interacting with peripheral components [5]
  • 17. 2. Hardware Design and Specification - 11 -2.1.2 Microcontroller-on-Board Implementation Microcontroller-on-Board implementation means that, th
  • Similar documents
    View more...
    Search Related
    We Need Your Support
    Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

    Thanks to everyone for your continued support.

    No, Thanks
    SAVE OUR EARTH

    We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

    More details...

    Sign Now!

    We are very appreciated for your Prompt Action!

    x