landing of a quadcopter on a mobile base using fuzzy logic · 2.export fuzzy logic controller c++...

8
Landing of a Quadcopter on a Mobile Base using Fuzzy Logic Patrick Benavidez, Josue Lambert, Aldo Jaimes and Mo Jamshidi, Ph.D., Lutcher Brown Endowed Chair Department of Electrical and Computer Engineering University of Texas at San Antonio San Antonio, USA [email protected], [email protected], [email protected], [email protected] Abstract. In this paper, we present control systems for an unmanned aerial vehicle (UAV) which provides aerial support for an unmanned ground vehicle (UGV). The UGV acts as a mobile launching pad for the UAV. The UAV provides additional environmental image feedback to the UGV. Our UAV of choice is a Parrot ArDrone 2.0 quadcopter, a small four rotored aerial vehicle, picked for its agile flight and video feedback capabilities. This paper presents design and simulation of fuzzy logic controllers for performing landing, hovering, and altitude control. Image processing and Mamdani-type inference are used for converting sensor input into control signals used to control the UAV. 1 Introduction 1.1 Background on Quadrotors Quadcopters are a class of four-rotored aerial vehicles. They have been shown to provide stable acrobatic flight as demonstrated in many hobbyist, research and commercial grade products. To provide the flight characteristics that quad- copters are prized for, large quantities of energy must be consumed for each of the four high-speed motors. For many small quadcopters, the battery life is typically limited to minutes of flight time due to the weight of the batteries and power draw of the motors. Limited time of use for quadrotors creates a problem for researchers to solve. 1.2 Targeted Landing and Landing on a Mobile Base Researchers are trying to find ways to improve the effectiveness of quadcopter given current battery systems and motors. One method many researchers are trying is limiting the flight time of quadrotors and providing a base station to act as either a landing pad for battery conservation [1], hot swapping [2,3] or battery recharging purposes [4]. In [2], researchers created a fixed mechanical

Upload: others

Post on 21-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Landing of a Quadcopter on a Mobile Base using Fuzzy Logic · 2.Export fuzzy logic controller C++ code using FuzzyLite GUI 3.Insert generated code into simulated controller in ROS

Landing of a Quadcopter on a Mobile Base usingFuzzy Logic

Patrick Benavidez, Josue Lambert, Aldo Jaimes and Mo Jamshidi, Ph.D.,Lutcher Brown Endowed Chair

Department of Electrical and Computer EngineeringUniversity of Texas at San Antonio

San Antonio, [email protected], [email protected],

[email protected], [email protected]

Abstract. In this paper, we present control systems for an unmannedaerial vehicle (UAV) which provides aerial support for an unmannedground vehicle (UGV). The UGV acts as a mobile launching pad forthe UAV. The UAV provides additional environmental image feedbackto the UGV. Our UAV of choice is a Parrot ArDrone 2.0 quadcopter,a small four rotored aerial vehicle, picked for its agile flight and videofeedback capabilities. This paper presents design and simulation of fuzzylogic controllers for performing landing, hovering, and altitude control.Image processing and Mamdani-type inference are used for convertingsensor input into control signals used to control the UAV.

1 Introduction

1.1 Background on Quadrotors

Quadcopters are a class of four-rotored aerial vehicles. They have been shownto provide stable acrobatic flight as demonstrated in many hobbyist, researchand commercial grade products. To provide the flight characteristics that quad-copters are prized for, large quantities of energy must be consumed for eachof the four high-speed motors. For many small quadcopters, the battery life istypically limited to minutes of flight time due to the weight of the batteries andpower draw of the motors. Limited time of use for quadrotors creates a problemfor researchers to solve.

1.2 Targeted Landing and Landing on a Mobile Base

Researchers are trying to find ways to improve the effectiveness of quadcoptergiven current battery systems and motors. One method many researchers aretrying is limiting the flight time of quadrotors and providing a base station toact as either a landing pad for battery conservation [1], hot swapping [2,3] orbattery recharging purposes [4]. In [2], researchers created a fixed mechanical

Page 2: Landing of a Quadcopter on a Mobile Base using Fuzzy Logic · 2.Export fuzzy logic controller C++ code using FuzzyLite GUI 3.Insert generated code into simulated controller in ROS

base station for a quadcopter to proceed with a hot-swap of a battery. In [1] re-searchers performed landing maneuvers on a mobile base using a low-cost camerasensor to sense infrared Light Emitting Diodes (LEDs) acting as beacons on themobile base. Researchers from the University of Waterloo, Canada simulated co-ordinated landing of a quadcopter using nonlinear control methods. With theirmethods, they designed a joint decentralized controller that attracts the twolinearized systems together via coupled state information [3]. In [4] researchersdeveloped a system where an Adept Mobile Robotics P3AT unmanned groundvehicle (UGV) provided services for mobile landing and target identification forvisual inspection by an ArDrone quadcopter [4]. For control of the quadcopter,the researchers utilized classical controllers for controlling the altitude, pitch, rolland yaw. Vision input was used by the researchers on both platforms for naviga-tion and landing control. Actuators onboard the UGV platform performed errorcorrection post-landing by shifting the ArDrone to the optimal landing position.

1.3 Paper Topic and Structure

In this paper we utilize fuzzy logic controllers to control heading, altitude, ap-proach, and hovering for a ArDrone 2.0 using visual and distance feedback. Wedraw inspiration from the automated UGV/UAV inspection system in [4] fortesting our system. Visual feedback is provided by identification of visual tags,similar to the ones used in [4], using open source software to calculate the tagidentication match and orientation. The rest of the paper is organized as follows:Section 2 details the control problems handled by the fuzzy controllers. Section3 details the software and hardware experimentation with the controllers. Sec-tion 5 provides results from hardware and software tests. Section 6 providesconclusions on the system and future work with the UAV/UGV system.

2 Control System

2.1 Control Problems

Figure 1 shows a depiction of the system controller. Figure 2 shows a depictionof the control problems.

2.2 Altitude Control

The altitude control problem is to control the quadcopter to reach and maintaina set altitude with minimal deviation from the setpoint. To do so with a quad-copter, one needs to vary the power provided to all four rotors to produce thenecessary lift to rise to the setpoint or downward force to reduce altitude.

2.3 Heading and Landing Control

The heading control problem is to control the quadcopter to reach a desiredorientation angle with the mobile landing base. To do this, the quadcopter needs

Page 3: Landing of a Quadcopter on a Mobile Base using Fuzzy Logic · 2.Export fuzzy logic controller C++ code using FuzzyLite GUI 3.Insert generated code into simulated controller in ROS

Fig. 1. Depiction of UAV System Controller

(a) Heading Control (b) Hovering Control (c) Landing Control

Fig. 2. Depiction of UAV/UGV Landing Control Problems

to translational velocity along its local y-axis, while rotating along its local z-axisto reduce the orientation angle. Overall, the goal is to have the same orientationon both the UAV and UGV. With the same orientation, the UAV can thenapproach the UGV for landing operations. To approach the UGV once oriented,the quadcopter must translate along its x-axis to get close enough to use itsbottom cameras to detect the landing pad. Once detected, the landing control isused to lower the craft. The landing control problem is to control the quadcopterto maintain a mininum orientation angle and positional error on descent towardsa visual marker. To do this, the quadcopter needs to translate across both the xand y axes to reduce positional error, rotate along the z-axis to reduce orientationerror and while descending along the z-axis to land.

2.4 Controller Variables

We define the following variables for the controllers:

– hMB,LP - height of the landing pad– hMB,COG - height of the landing pad– hS - sensed height– h - flying height of quadcopter– (xq, yq, zq) - pose relative to the quadcopter local frame– (xMB , yMB , zMB) - pose relative to the mobile landing pad local frame– PL - Landing position as a 3D point

Figure 3 shows the usage of the control variables in the system.

Page 4: Landing of a Quadcopter on a Mobile Base using Fuzzy Logic · 2.Export fuzzy logic controller C++ code using FuzzyLite GUI 3.Insert generated code into simulated controller in ROS

(a) Altitude control (b) Landing control

Fig. 3. Control variable usage

3 Simulation and Hardware Experimentation

3.1 Software Packages

To develop the fuzzy controllers, we used a combination of Robot OperatingSystem (ROS) [5], ROS Gazebo [6] with the TUM ArDrone Simulator [7], ROSpackage ar track alvar [8], and tools from FuzzyLite [9]. ROS is a software pack-age that allows for the transport of sensor and control data via ”topics” usingthe publisher/subscriber message passing model. The TUM ArDrone Simulatoris a package for ROS Gazebo that allows for simulation of the ArDrone in 3Denvironments. FuzzyLite is an open source Fuzzy Logic Controller library, writ-ten in C++, which has a Graphical User Interface (GUI), called QtFuzzyLite,for designing fuzzy logic controllers. The ROS package al track alvar is used forunique tag identification.

3.2 Detailed Controller Design Workflow

Listed below is the workflow of the design of the fuzzy logic controller using bothsoftware and hardware:

1. Modify membership functions and/or rules in FuzzyLite GUI2. Export fuzzy logic controller C++ code using FuzzyLite GUI3. Insert generated code into simulated controller in ROS and compile4. Run controller ROS node with TUM simulator5. Repeat 1-4 if controller is not ready for hardware test, or go to step 56. Run controller ROS node with ArDrone autonomy drivers and ArDrone

hardware7. Repeat 1-6 if hardware test of controller exhibits unwanted behavior

3.3 ArDrone Controller and Driver ROS Nodes

The following ROS topics are inputs to ’ardrone autonomy’ which are used tocontrol both the simulated and hardware ArDrone:

– /ardrone/navdata/altd – estimated altitude in millimeters

Page 5: Landing of a Quadcopter on a Mobile Base using Fuzzy Logic · 2.Export fuzzy logic controller C++ code using FuzzyLite GUI 3.Insert generated code into simulated controller in ROS

– /cmd vel/twist/linear/x – controls movement along local x-axis– /cmd vel/twist/linear/y – controls movement along local y-axis– /cmd vel/twist/linear/z – controls movement along local z-axis– /cmd vel/twist/angular/z – controls movement along local z-axis

The following ROS topics are tag recognition inputs to the fuzzy controllers fromthe package ’al track alvar’:

– /visualization marker/id - unique marker id linked to known tag– /visualization marker/pose/position/x - position of tag along x-axis rela-

tive to center– /visualization marker/pose/position/y - Position of tag along y-axis rela-

tive to center– /visualization marker/pose/position/z - Position of tag along z-axis rela-

tive to center of reference tag image. This is also h − hMB,COG when posi-tioned above the tag

– /visualization marker/pose/orientation/z - Quaternion angle around z-axis used for orientation

The following fuzzy system state controller actions are performed by the ROSpackage ’ace ardrone fuzzy’:

1. If not directed to search for landing vehicle, perform mission2. If tag not found, search for tag3. If tag found, apply fuzzy alignment of quadcopter with mobile base4. If tag found, quadcopter aligned and landing directed, apply fuzzy landing

controller

4 Simulation Results

4.1 Fuzzy Inference Systems

For altitude control, we used the altitude input variable hS as input to the con-troller. Figure 4 shows the fuzzy controller designed for altitude control duringevaluation in FuzzyLite. The three input fuzzy controller designed for landingcontrol is shown below in Figure 5 during evaluation in FuzzyLite. Rules for thealtitude controller are as follows:

– if sonar reading is too low then cmd vel gaz is large increase velocity– if sonar reading is a little low then cmd vel gaz is small increase velocity– if sonar reading is On Target then cmd vel gaz is no change– if sonar reading is a little high then cmd vel gaz is small decrease velocity– if sonar reading is too high then cmd vel gaz is large decrease velocity

Rules for the landing controller are as follows:

– if orientation x is way left then cmd vel z rot is large turn right– if orientation x is a little left then cmd vel z rot is small turn right

Page 6: Landing of a Quadcopter on a Mobile Base using Fuzzy Logic · 2.Export fuzzy logic controller C++ code using FuzzyLite GUI 3.Insert generated code into simulated controller in ROS

Fig. 4. Altitude controller fuzzy inference system

– if orientation x is On Target then cmd vel z rot is hold direction– if orientation x is a little right then cmd vel z rot is small turn left– if orientation x is way right then cmd vel z rot is large turn left– if displacement x is way left then cmd vel y linear is large move right– if displacement x is too left then cmd vel y linear is small move right– if displacement x is centered then cmd vel y linear is do nothing– if displacement x is too right then cmd vel y linear is small move left– if displacement x is way right then cmd vel y linear is large move left– if displacement y is way low then cmd vel x linear is large move backward– if displacement y is too low then cmd vel x linear is small move backward– if displacement y is centered then cmd vel x linear is do nothing– if displacement y is too high then cmd vel x linear is small move forward– if displacement y is way high then cmd vel x linear is large move forward– if displacement z is way high then cmd vel z linear is large move down– if displacement z is too high then cmd vel z linear is small move down– if displacement z is centered then cmd vel z linear is do nothing– if displacement z is too low then cmd vel z linear is small move up

4.2 Simulated Hover

A series of images illustrating the altitude control for the quadcopter is shownbelow in Figure 6.

4.3 Simulated Descent

A series of images covering descent of the simulated quadcopter is shown belowin Figure 7.

5 Hardware Results

Hardware testing of the drone controllers demonstrated acceptable performancegiven that the environment was not too complex. Environmental complexity

Page 7: Landing of a Quadcopter on a Mobile Base using Fuzzy Logic · 2.Export fuzzy logic controller C++ code using FuzzyLite GUI 3.Insert generated code into simulated controller in ROS

Fig. 5. Landing controller fuzzy inference system

became an issue when the ArDrone exhibited unwanted behavior in its sensedaltitude sensor during altitude control due to a suspected firmware issue. Whenthe sonar passes too close to an object, the onboard firmware appears to re-calibrate the altitude, then re-obtains a valid sonar reading and proceeds tofly erratically using poorly calibrated altitude data. A video with the hardwareresults will be uploaded to Youtube.

6 Conclusion

In our work we designed fuzzy controllers for controlling altitude and hovering inplace above a target. We demonstrated simulation of the controllers performedusing the combination of open source tools FuzzyLite, ROS Gazebo with TUMArDrone Simulator. Simulation results showed acceptable performance from thealtitude control and also landing controller. Future work toward the open sourcecommunity will include providing a solution to the corrupted altitude readings.Future work on development of the system is to integrate the controllers togethervia a fuzzy state machine.

Page 8: Landing of a Quadcopter on a Mobile Base using Fuzzy Logic · 2.Export fuzzy logic controller C++ code using FuzzyLite GUI 3.Insert generated code into simulated controller in ROS

(a) Hovering over mobilebase

(b) Front camera view (c) Found large tag

Fig. 6. Hovering images from simulator before descent

(a) Tag not yet recognized (b) Found large tag (c) Found small tag

Fig. 7. Landing images from simulator during descent

References

1. K. E. Wenzel, A. Masselli, and A. Zell, ”Automatic take off, tracking and landingof a miniature UAV on a moving carrier vehicle,” Journal of intelligent & roboticsystems, vol. 61, pp. 221-238, 2011.

2. T. Toksoz, J. Redding, M. Michini, B. Michini, J. P. How, M. Vavrina, et al., ”Au-tomated Battery Swap and Recharge to Enable Persistent UAV Missions,” in AIAAInfotech@ Aerospace Conference, 2011.

3. J. M. Daly, M. Yan, and S. L. Waslander, ”Coordinated landing of a quadrotor on askid-steered ground vehicle in the presence of time delays,” in Intelligent Robots andSystems (IROS), 2011 IEEE/RSJ International Conference on, 2011, pp. 4961-4966.

4. M. Saska, T. Krajnik, and L. Pfeucil, ”Cooperative microUAV-UGV autonomousindoor surveillance,” in Systems, Signals and Devices (SSD), 2012 9th InternationalMulti-Conference on, 2012, pp. 1-6.

5. WillowGarage. (2012, October). Documentation - Robot Operating System. Avail-able: http://www.ros.org/wiki/

6. A. H. N. Koenig. (2013). gazebo - ROS Wiki. Available:http://www.ros.org/wiki/gazebo

7. J. Engel. (2013). tum ardrone - ROS Wiki. Available:http://www.ros.org/wiki/tum ardrone

8. S. Niekum. (2013). ar track alvar - ROS Wiki. Available:http://www.ros.org/wiki/ar track alvar

9. J. Rada-Vilela. (2013). fuzzylite - A Fuzzy Logic Control Library and Applicationin C++ Available: http://code.google.com/p/fuzzylite/