TARIK VELI MUMCU.

Size: px
Start display at page:

Download "TARIK VELI MUMCU."

Transcription

1 DEVELOPMENT OF THE CONTROL SYSTEM AND AUTOPILOT OF A HEXAROTOR AERIAL VEHICLE TARIK VELI MUMCU 1 Department of Control and Automation Engineering, Yildiz Technical University, Istanbul, Turkey tmumcu@yildiz.edu.tr Abstract Multi-rotor aerial vehicles are used for various military and non-military tasks due to their distinct advantages such as vertical take-off and landing, high payload, simple mechanics and reduced gyroscopic effects. Though remote control systems are the common way to control mini/micro sized multi-rotor aerial vehicles, autonomous flying offer several advantages over the remote control systems. In this study, we investigate the design and development of an autopilot system and its control systems for multi-rotor aerial vehicles, and implement the proposed systems on a prototype hexarotor aerial vehicle. The design of the proposed autopilot system, hexapilot, is explained in two aspects: hardware components and software components. The system has been tested in lab environment and field tests at the university campus are in progress. Index Terms Hexarotor, Control system, Autopilot, Performance evaluations. I. INTRODUCTION Multi-rotor mini/micro unmanned aerial vehicles (UAVs) are used for civilian and military tasks. Their advantages are simple mechanics, reduced gyroscopic effects compared to helicopters, high payload and vertical take-off and landing [1]. On the other hand, they consume more energy than single rotor vehicles and their sizes are larger. Generally, multi-rotor UAVs are remotely controlled during tasks. But remotely control may not be possible in some cases due to limited communication range and controllability issues such as line of sight of the operator. Therefore, full autonomous or semiautonomous operation is desirable for almost all unmanned vehicle applications. The ability to follow a specifiedtrajectory is an important part of many autonomous UAV navigation systems [2], [3]. An autonomousvehicle trajectory tracking algorithm for a quadrotor helicopter is proposed in [2]. The algorithm was demonstrated to track a path indoors with 10 cm accuracy and outdoors with 50 cm accuracy [2].A trajectory tracking system for UAVs is proposed in [3]. This system is proposed for an UAV which is equipped with longitudinal and lateral autopilots and accounts for heading rate and velocity input constraints [3]. In order to enable UAVs to follow a predetermined trajectory, a path planning system is required. A complete path planning system for micro UAVs for reconnaissance operations in wind is proposed in [4]. An autopilot is amicro electromechanicalsystem (MEMS) used to guide an UAV without assistancefrom operators. Typical off-the-shelf autopilot systems for micro/mini UAVs are given in [5]. An autopilot system for a micro UAV is proposed in [6]. The proposed system consists of fuzzy logic controllers,low-level feedbackcontrollers, a speed controller and a wind disturbance attenuation block. During its experimental tests, though the UAV did not follow its desired trajectory perfectly, it traversed the waypoints by utilizing a fail-safe waypoint updating rule [6]. A lightweight navigation, guidance and control system to make advancedautonomous behaviors found in the autopilot systems of airplanes available to mini/micro UAVs is proposed in [7]. In this study, a model-based nonlinear controller was developed to deal with the drawbacks of the low-cost equipments of the prototype quadrotor aerial vehicle. Different from the studies in the literature which handle theoretical aspects of autopilot systems, in this study, we specifically address the hardware and software components of an autopilot system and the relation between these components in order to help researchers to develop low-cost autopilot systems. In this study, we explain the design of an autopilot system for multi-rotor UAVs. The autopilot system we propose consists of several hardware and software components which carry out low level and high level control of the proposed system. The system has already been tested in our lab environment with highly satisfactory results and field tests at our university campus are in progress. The remainder of this paper is organized as follows. Section II introduces the control system of the prototype hexarotor system. Section III describes the details of the proposed autopilot system called hexapilot. Finally, the paper is concluded in Section IV. II. HEXAROTOR CONTROL SYSTEM In the proposed system, two different subsystems exist in order to perform real time tasks and non-real time tasks. A. High Level Control All systems which perform complex tasks require a high level control mechanism to do high level and non-real time tasks and to run algorithms. A mini PC with a 1.6 GHz ATOM processor is used for high level critical algorithms. The mini PC has no hard 117

2 disk drive for storage and uses a flash disk to store the operating system (OS) and application codes it runs. Ubuntu, a free open source Linux based OS, is the OS of the mini PC. In order to develop the applications executed by the hexarotor shown in Fig. 1, Robot Operating System (ROS) has been preferred. ROS runs on Linux distributions and provides tools and libraries used by robotic software developers to create applications [8]. Besides its several advantages such as libraries, device drivers, hardware abstraction layers, visualization tools, message passing interfaces and package management over similar development platforms, it allows using several components as a single platform without the need for a specific communication interface. In this way, several robots and a control application can work together over a single TCP/IP based wireless network and data provided by the robots can be used by the control application at the same time. and angles to obstacles and has a measuring range of 20 to 5600mm with a scanning range of240. Measurements provided by this scanner are the base information for enabling the hexarotor to work autonomously. ROS libraries are utilized to read and process laser scanner measurements. In order to monitor control and flight data during flights, a cockpit software shown in Fig. 1 has been developed. The cockpit software has been programmed in C++ using well-known Qt cross platform application development framework [12]. By integration Qt and ROS, information exchange between ROS kernel and the cockpit software has been done. Thissoftware also allows swapping between autopilot and manual control during flights. Saitek X-65F joystick [13] is used to remotely control the hexarotor. Fig. 2. Cockpit software developed to control the hexarotor. Fig. 1.Prototype hexarotor aerial vehicle. In the proposed system, sensor data is provided through the serial communication between the mini PC and real time system. On the other hand, laser scanner measurements and camera images taken by a research grade PointGrey brand 1.3 Mega Pixels (MP)camera [9] are received directly by the mini PC. Processing of the camera images is done by using the existing device drivers of ROS. A ROS library is utilized to transfer and manage camera images. To convert black white images taken by the camera to colour images, Bayer filter is used [10]. A Hokuyo URG-04LX-UG01 laser scanner [11] mounted on the prototype hexarotor calculates horizontal distances B. Low Level Control Low level control of the hexarotor is carried out by the autopilot. The hardware of the autopilot is comprised of astmicroelectronics STM32F4 Discovery microcontroller unit (MCU) [14], a SparkFunnine degrees of freedom (9DOF) Razor inertial measurement unit (IMU) [15], a Devantech SRF08 ultrasonic range finder (URF) [16] and a XBee Pro communication module [17]. The hexarotor is controlled by electronic speed controller units (ESCUs) which are communicated through I2C protocol [18]. In the prototype system, ESCUs drive brushless motors. Fig. 3 shows the details of the low level control system. Fig. 3. Low level control system of the hexarotor. 118

3 III. THE DETAILS OF HEXAPILOT Hexapilot consists of a group of hardware and software components. In this section, these components are briefly explained. A. Hardware Components The core of the hardware is a STM32F4 MCU shown in Fig. 4. The MCU manages the overall coordination of low level control operations of the hexarotor with its real time OS and receives data from the following sensors and modules: Mini PC IMU Receiver of the remote controller URF The communication module of the hexarotor is an XBee Pro communication module developed by Digi [17]. This 2.4GHz XBee module has an output power of 60mW with 250kbps Max data rate and takes the IEEE stack and wraps it into a simple to use serial command set.using this module, 2-way communication at bps in a 1500m range between the hexarotor and the control was enabled. Fig. 6.XBee Pro communication module [17]. The URF of the hexarotor shown in Fig. 7 can measure obstacles at distances from 3 cm to 6 m and is communicated using I2C protocol. Fig. 4.STM32F4 MCU [14]. The MCU has a STM32F MHz microcontroller which is based on ARM Cortex - M4 architecture and includes a programming unit in addition to a floating point unit (FPU). The microcontroller performs low level control operations of the hexarotor by using a controller application developed for this project. On the other hand, high level control operations and algorithmic operations are performed at the mini PC and related commands are sent to the MCU. Data related to low level control operations are sent to both the mini PC module and the PC acting as the control center through wireless links. The IMU incorporates a single-axis gyro, a dual-axis gyro, a triple-axis accelerometer and a triple-axis magnetometer and gives 9-DOF measurement. The outputs of its sensors are processed by an onboard ATmega328 and output over a serial interface [15]. These features make it become a powerful control mechanism for unmanned aerial and road vehicle. It communicates with the autopilot module through universal asynchronous receiver/transmitter (UART) units using a new communication protocol developed for this project. Fig. 7.SRF08 URF [16]. The converter module, FT232R, shown in Fig. 8 is a USB to serial UART interface. A virtual communication port is created by an interface driver. In this way, communication with PCs which do not have serial interfaces through USB ports is enabled. Fig. 8.FT232R converter [19]. For manual control of the hexarotor, a Futaba 7- Channel 2.4GHz remote controller (RC) [20] and a Futaba Robbe 2.4 GHz receiver [21] is used. Received Pulse Position Modulated (PPM) controller signals are converted to digital values and are used at the autopilot unit. Fig. 9.Futaba Robbe 2.4 GHz receiver. Fig. 5.SparkFun 9DOF IMU [15]. Fig. 10.Futaba 7-Channel 2.4GHz remote controller system [20]. 119

4 Mikrokopter ESCUs [22] shown in Fig. 11, one for each DC motor, drive six brushless DC motors of the hexarotor. Commands sent to the ESCUs are transmitted using I2C protocol and all the ESCUs share the same I2C bus. Fig. 11.MikrokopterESCU [22]. B. Software Components Hexapilot, its architecture is shown in Fig. 12, was developed in C++. It is responsible for the following functions: Managing communication, Receiving commands from the control center and carrying out the required operations, Gathering data from sensors and making them ready for use, Operating control cycles, Stabilizing the hexarotor. To carry out these functions, FreeRTOS [23] realtime OS is used. Communication flow between hexapilot and the control center is shown in Fig. 13. Interpreting communication packets and updating related information, and sending data packets from hexapilot to the control center are the main functions of the communication module of hexapilot. Communication between hexapilot and the control center occurs at every 100ms. Fig. 12.The architecture of hexapilot. and are read from these buffers to update data structures after being interpreted. Fig. 14 shows the details of the communication system. Fig. 13.Communication flow between the control center and hexapilot. A proprietary communication protocol designed for this study handles communication between the autopilot and cockpit software. Its packet structure, shown in Table I, is used for all data transmissions. The communication protocol is used for the following communication channels: Mini PC - hexapilot IMU - hexapilot Hexapilot Cockpit software Hexapilot communication drivers consist of two components: processor level serial communication unit-uart drivers and specific functions which interpret high level communication packets. Low level drivers are composed of the interrupt routines of serial communication and circular buffer. They define the parameters of the UART module and set communication speed. Data coming through serial communication line are stored in the circular buffers TABLE I. THE STRUCTURE OF COMMUNICATION PACKETS. Position Byte 0 Byte 1 Byte 2 Byte 3 Description Header 1-0x55 Header 2 0xAA Size Packet Type Byte 4 Data 0 Byte Byte... Data n-1 Byte... Byte n -1 Byte n Data n CRC 1st Byte CRC 2nd Byte 120

5 Fig. 14.Hexapilot communication system. A timer module of the MCU is run at the input capture mode to measure the length of signal pulses of the RC receiver. PB0 pin is used for this function. In this way, pulse durations for six channels are calculated and stored in associated data structures. Fig. 15.PPM signal read from the RC receiver.fig. 16.GUI interface which shows signals received from the RC. Hexapilot stabilizes the hexarotor in x, y and z-axis by using the data provided by the sensors and Proportional Integral Derivative (PID) control cycles shown in Fig. 17. Roll, pitch and yaw angles, and attitude commands sent from the mini PC or the control center are applied to the PID control functions in order to obtain speed commands to be delivered to the motors. Finally, speed commands obtained for each motor are sent to the ESCUs. 121

6 Fig. 17. PID cycles in the system Hexapilot gathers data from the URF, the IMU and the remote controller unit and makes the data ready for the use of different tasks after limit checking and filtering. If a sensor fails, hexapilot implements emergency case procedures defined by the operator. By default, if the IMU fails, the hexarotor immediately makes an emergency landing. Hexapilot constantly checks the irregularities of its internal tasks. If an irregularity is detected in a task, it restarts the task. Hexapilot and its graphical user interface, cockpit software, were developed in C++. Cockpit software enables the interaction between hexapilot and a user. Using this software, the user can see several parameters related to the state of the hexarotor. This software shows IMU data, remote controller values, PID parameters and PWM values sent to the motors as shown in Fig. 18 and Fig. 19. In addition, it shows attitude angles, sensor outputs, altitude, commands sent to the motors. Fig. 18. GUI interface motor test section. Fig. 19. GUI interface parameters section. IV. CONCLUSIONS AND FUTURE RESEARCH DIRECTIONS This paper presents the design considerations of the control system and autopilot system of a prototype hexarotor aerial vehicle. The design of these systems has been completed and field tests with the hexarotor are in progress. The main drawback of the overall system is the use of the processors with different specifications for low and high level control operations. Though this is not a major problem for overall success of the hexarotor, it constitutes some specific issues which need to be handled. Target platforms for the autopilot system we developed are micro/mini unmanned aerial vehicles such as the one used in this study. Source codes of the designed autopilot software will be publicly available at after the completion of the field tests. REFERENCES [1] S. Bouabdallah, Design and Control of Quadrotors with Application to Autonomous Flying, Ph.D. dissertation, EcolePolytechniqueFederale De Lausanne, Lausanne, Switzerland, [2] G. M. Hoffmann, S. L. Waslander, C. J. Tomlin, Quadrotor Helicopter Trajectory Tracking Control, In Proceedings of the AIAA Guidance, Navigation, and Control Conference, Honolulu, HI, pp , August [3] W. Ren, R. W. Beard, Trajectory Tracking for Unmanned Air Vehicles With Velocity and Heading Rate Constraints, IEEE Transactions on Control Systems Technology, vol. 12, no. 5,pp , [4] N. Ceccarelli, J. J. Enright, E. Frazzoli, S. J. Rasmussen, C. J. Schumacher, Micro UAV Path Planning for Reconnaissance in Wind, In Proceedings of the 2007 American Control Conference, New York, USA, July 11-13, 2007, pp [5] H. Chao, Y. Cao, Y. Chen, Autopilots for Small Unmanned Air Vehicles: A Survey, International Journal of Control, Automation, and Systems, vol. 8, no. 1, pp , [6] M. Kumon, Y. Udo, H. Michihira, M. Nagata, I. Mizumoto, Z. Iwai, Autopilot System for Kiteplane, IEEE/ASME 122

7 Transactions on Mechatronics, vol. 11, no. 5, pp , [15] 9 Degrees of Freedom Razor IMU SparkFun Electronics [Online]. [7] F.Kendoul, Y.Zhenyu, K. Nonami, Embedded Autopilot for Accurate Waypoint Navigation and Trajectory: Application to Miniature Rotorcraft UAVs, In Proceedings of the 2009 IEEE International Conference on Robotics and Automation, Kobe, Japan, May 12-17, 2009, pp [8] Documentation ROS Wiki [Online]. [9] Point Grey Research [Online]. [10] Bayer filter [Online]. [11] Scanning range finder URG-O4LX-UG01 [Online]. [12] Qt (framework) [Online]. [13] X-65F Combat Control System [Online]. [14] STM32F4DISCOVERY STMicroelectronics [Online]. [16] Ultrasonic Rangers [Online]. [17] XBee Pro 60mW Wire Antenna Series 1 ( ) SparkFun Electronics [Online]. [18] I2C-Bus [Online]. [19] FT232R [Online]. [20] Futaba 7C 7-Channel 2.4GHz System [Online]. [21] Futaba Air System Receivers [Online]. [22] En/BrushlessCtrl Wiki: MikroKopter.de [Online]. [23] FreeRTOS Market leading RTOS [Online]