Landing of a Quadcopter on a Mobile Base using Fuzzy Logic

Size: px
Start display at page:

Download "Landing of a Quadcopter on a Mobile Base using Fuzzy Logic"

Transcription

1 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 patrick.benavidez@gmail.com, josueilambert@yahoo.com, aldo.jaimes@gmail.com, moj@wacong.org 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 quadcopters 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

2 base station for a quadcopter to proceed with a hot-swap of a battery. In [1] researchers performed landing maneuvers on a mobile base using a low-cost camera sensor to sense infrared Light Emitting Diodes (LEDs) acting as beacons on the mobile base. Researchers from the University of Waterloo, Canada simulated coordinated landing of a quadcopter using nonlinear control methods. With their methods, they designed a joint decentralized controller that attracts the two linearized systems together via coupled state information [3]. In [4] researchers developed a system where an Adept Mobile Robotics P3AT unmanned ground vehicle (UGV) provided services for mobile landing and target identification for visual inspection by an ArDrone quadcopter [4]. For control of the quadcopter, the researchers utilized classical controllers for controlling the altitude, pitch, roll and yaw. Vision input was used by the researchers on both platforms for navigation and landing control. Actuators onboard the UGV platform performed error correction 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, approach, and hovering for a ArDrone 2.0 using visual and distance feedback. We draw inspiration from the automated UGV/UAV inspection system in [4] for testing 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 tag identication match and orientation. The rest of the paper is organized as follows: Section 2 details the control problems handled by the fuzzy controllers. Section 3 details the software and hardware experimentation with the controllers. Section 5 provides results from hardware and software tests. Section 6 provides conclusions 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 depiction of the control problems. 2.2 Altitude Control The altitude control problem is to control the quadcopter to reach and maintain a set altitude with minimal deviation from the setpoint. To do so with a quadcopter, one needs to vary the power provided to all four rotors to produce the necessary 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 desired orientation angle with the mobile landing base. To do this, the quadcopter needs

3 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-axis to reduce the orientation angle. Overall, the goal is to have the same orientation on both the UAV and UGV. With the same orientation, the UAV can then approach 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 its bottom cameras to detect the landing pad. Once detected, the landing control is used to lower the craft. The landing control problem is to control the quadcopter to maintain a mininum orientation angle and positional error on descent towards a visual marker. To do this, the quadcopter needs to translate across both the x and y axes to reduce positional error, rotate along the z-axis to reduce orientation error and while descending along the z-axis to land. 2.4 Controller Variables We define the following variables for the controllers: hm B,LP - height of the landing pad hm B,COG - height of the landing pad hs - sensed height h - flying height of quadcopter (xq, yq, zq ) - pose relative to the quadcopter local frame (xm B, ym B, zm B ) - 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.

4 (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 Operating System (ROS) [5], ROS Gazebo [6] with the TUM ArDrone Simulator [7], ROS package ar track alvar [8], and tools from FuzzyLite [9]. ROS is a software package that allows for the transport of sensor and control data via topics using the publisher/subscriber message passing model. The TUM ArDrone Simulator is a package for ROS Gazebo that allows for simulation of the ArDrone in 3D environments. FuzzyLite is an open source Fuzzy Logic Controller library, written in C++, which has a Graphical User Interface (GUI), called QtFuzzyLite, for designing fuzzy logic controllers. The ROS package al track alvar is used for unique tag identification. 3.2 Detailed Controller Design Workflow Listed below is the workflow of the design of the fuzzy logic controller using both software and hardware: 1. Modify membership functions and/or rules in FuzzyLite GUI 2. Export fuzzy logic controller C++ code using FuzzyLite GUI 3. Insert generated code into simulated controller in ROS and compile 4. Run controller ROS node with TUM simulator 5. Repeat 1-4 if controller is not ready for hardware test, or go to step 5 6. Run controller ROS node with ArDrone autonomy drivers and ArDrone hardware 7. 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 to control both the simulated and hardware ArDrone: /ardrone/navdata/altd estimated altitude in millimeters

5 /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 from the 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 relative to center /visualization marker/pose/position/y - Position of tag along y-axis relative to center /visualization marker/pose/position/z - Position of tag along z-axis relative to center of reference tag image. This is also h h MB,COG when positioned 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 ROS package ace ardrone fuzzy : 1. If not directed to search for landing vehicle, perform mission 2. If tag not found, search for tag 3. If tag found, apply fuzzy alignment of quadcopter with mobile base 4. 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 h S as input to the controller. Figure 4 shows the fuzzy controller designed for altitude control during evaluation in FuzzyLite. The three input fuzzy controller designed for landing control is shown below in Figure 5 during evaluation in FuzzyLite. Rules for the altitude 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

6 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 shown below in Figure Simulated Descent A series of images covering descent of the simulated quadcopter is shown below in Figure 7. 5 Hardware Results Hardware testing of the drone controllers demonstrated acceptable performance given that the environment was not too complex. Environmental complexity

7 Fig. 5. Landing controller fuzzy inference system became an issue when the ArDrone exhibited unwanted behavior in its sensed altitude sensor during altitude control due to a suspected firmware issue. When the sonar passes too close to an object, the onboard firmware appears to recalibrate the altitude, then re-obtains a valid sonar reading and proceeds to fly erratically using poorly calibrated altitude data. A video with the hardware results will be uploaded to Youtube. 6 Conclusion In our work we designed fuzzy controllers for controlling altitude and hovering in place above a target. We demonstrated simulation of the controllers performed using the combination of open source tools FuzzyLite, ROS Gazebo with TUM ArDrone Simulator. Simulation results showed acceptable performance from the altitude control and also landing controller. Future work toward the open source community will include providing a solution to the corrupted altitude readings. Future work on development of the system is to integrate the controllers together via a fuzzy state machine.

8 (a) Hovering over mobile base (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 landing of a miniature UAV on a moving carrier vehicle, Journal of intelligent & robotic systems, vol. 61, pp , T. Toksoz, J. Redding, M. Michini, B. Michini, J. P. How, M. Vavrina, et al., Automated Battery Swap and Recharge to Enable Persistent UAV Missions, in AIAA Infotech@ Aerospace Conference, J. M. Daly, M. Yan, and S. L. Waslander, Coordinated landing of a quadrotor on a skid-steered ground vehicle in the presence of time delays, in Intelligent Robots and Systems (IROS), 2011 IEEE/RSJ International Conference on, 2011, pp M. Saska, T. Krajnik, and L. Pfeucil, Cooperative microuav-ugv autonomous indoor surveillance, in Systems, Signals and Devices (SSD), th International Multi-Conference on, 2012, pp WillowGarage. (2012, October). Documentation - Robot Operating System. Available: 6. A. H. N. Koenig. (2013). gazebo - ROS Wiki. Available: 7. J. Engel. (2013). tum ardrone - ROS Wiki. Available: ardrone 8. S. Niekum. (2013). ar track alvar - ROS Wiki. Available: track alvar 9. J. Rada-Vilela. (2013). fuzzylite - A Fuzzy Logic Control Library and Application in C++ Available: