Abstract—This paper presents implementation of attitude controller for a small UAV using field programmable gate array (FPGA). Due to the small size constrain a miniature more compact and computationally extensive; autopilot platform is needed for such systems. More over UAV autopilot has to deal with extremely adverse situations in the shortest possible time, while accomplishing its mission. FPGAs in the recent past have rendered themselves as fast, parallel, real time, processing devices in a compact size. This work utilizes this fact and implements different attitude controllers for a small UAV in FPGA, using its parallel processing capabilities. Attitude controller is designed in MATLAB/Simulink environment. The discrete version of this controller is implemented using pipelining followed by retiming, to reduce the critical path and thereby clock period of the controller datapath. Pipelined, retimed, parallel PID controller implementation is done using rapid- prototyping and testing efficient development tool of “system generator”, which has been developed by Xilinx for FPGA implementation. The improved timing performance enables the controller to react abruptly to any changes made to the attitudes of UAV. Keywords—Field Programmable gate array (FPGA), Hardware descriptive Language (HDL), PID, Pipelining, Retiming, Xilinx System Generator. I. INTRODUCTION NMANNED Air vehicles (UAV) have been using for various applications in the recent past. These include military as well as civil applications. Due to the absence of pilot onboard, UAV flight control system (FCS) has to deal with all situations of taxing,take-off, landing, obstacle avoidance, path following etc. UAV flight control system (FCS) needs a processing unit which is capable of carrying out, all these tasks quickly and efficiently and at the same time occupying less volume and weight as these are the main constrains for such small size systems. Over the past decades both the advantage of parallel processing and the increased number of gates have lead to a rapid increase in the popularity of Field programmable Gate Array (FPGA) implementation. FPGA also offers the ability of reconfigurability both, compilation time and run-time as compare to ASIC which is H.Asad has done his Masters in Aerospace engineering from University of Belgrade Serbia; e-mail:lucid.vivi@ gmail.com). Dragan V.Lazic is with Department of Automatic Control University of Belgrade Serbia.(e-mail: dragan.lazic@gmail.com). Waqar Shahid is with Department of Electrical Engineering , Air University Islamabad Pakistan. (e-mail: waqar.shahid@mail.au.edu.pk). configured only once. Furthermore FPGAs such as virtex-II pro, have embedded microprocessor units (MPU) , making it possible to build a whole system on a single chip. It is due to these reasons that currently FPGA are replacing DSP and microcontroller based embedded system as these implement different algorithms in software which is executed sequentially. For a rapid prototyping of FPGA based autopilot design a simulation software is needed that can represent exactly the hardware being used. Xilinx system generator tool box for simulink has made it possible to simulate the hardware within the graphical environment of simulink, and also generate Hardware Description Language (HDL) code needed for the implementation in FPGA. FPGA based designs have been widely applied in digital system applications by many researchers. Shashikala Narasimha Murthy et al. presented a methodology for implementation of RC-truck control on FPGA using system generator [1]. W.alvis et al. Proposed FPGA based flexible autopilot platform for unmanned systems [2]. Amol A.kalage et al. presented modelling and simulation of FPGA based direct torque control of induction motor drive using Xilinx system generator tool box [3]. Angkul Kongmunvattana and Prabhas Chongstitvatana reported a FPGA based behavioural control system for a mobile robot [4]. Wei Zhao et al. implemented a digital PID controller based system in FPGA [5].Parallel and serial implementation schemes both for single channel and multichannel control, have been presented, taking in to consideration the tradeoffs of speed, area and power consumption. Though parallel PID controller is faster than the serial one, but at the cost of increased critical path ,thereby reducing the throughput of the controller. This work implements a pipelined parallel PID attitude controller for a small UAV in FPGA. Matlab/Simulink having aerosim toolbox for aircraft modeling implements UAV dynamic model [9]. After identifying the potential problems in controlling this dynamic model, controller is designed in longitudinal and lateral planes separately. These controllers are then discretized so as to implement them in FPGA. Critical paths of these controllers are broken down, using cutest pipelining and retiming techniques to improve throughput of the controller [6]. Finally these controllers are augmented with the dynamic model of UAV using Xilinx system generator tool box. FPGA Based Longitudinal and Lateral Controller Implementation for a Small UAV Dragan V.Lazic ,Waqar Shahid U World Academy of Science, Engineering and Technology 46 2010 809