A Novel Bacterial Foraging Algorithm for Automated tuning of PID controllers of UAVs John Oyekan and Huosheng Hu School of Computer Science and Electronic Engineering University of Essex, Wivenhoe Park, Colchester CO3 4SQ, United Kingdom Email: jooyek@essex.ac.uk; hhu@essex.ac.uk Abstract—Up to now, PID controllers have been widely deployed in Unmanned Aerial Vehicles (UAVs) and other auto- matical control systems, and have the benefit of simple tuning performed by trial and error. Their applications avoid some complicated modeling efforts however tuning these controllers do need experienced operators and may sometimes be time consuming. This paper presents a novel approach that could be used for the automatic tuningof a PID controller for a UAV. This approach relies on the bacteria foraging technique to guide the search for the optimal parameters of a PID controller in the parameters search space. Experimental results show that the proposed approach is able to improve the parameters chosen by the classical Ziegler Nicholas method. Index Terms—Bacterium Inspired Algorithm, Environmental Monitoring, Flocking, PID control. I. I NTRODUCTION Up to now, tuning a PID (Proportional-Integration- Derivative) controller for UAVs and other automatic control systems is often performed by trial and error, including using classical methods such as Ziegler Nicholas, IFT methods, and among others. As we know, the Ziegler Nicholas classical method provides parameter values obtained from the critical gain K c of the system. The critical gain of a system is obtained by increasing the proportional gain until the sys- tem starts oscillating [1]. From this critical gain, the other parameters of the PID controller are obtained according to the Table I in the Appendix. However, these parameter values sometimes need to be further tuned by a human operator to obtain an optimal control of the system especially if the system is non-linear. This tuning sometimes takes a long time and requires the knowledge of the system being tuned. In addition, optimal parameters for the system at the beginning might not be the optimal later due to various factors such as wear and tear taking place in the system, temperature changes and even hardware changes after system maintenance. As these changes take place, the system might need to be re-tuned to maintain an optimal operation and as a result, an adaptive controller is required. Approaches such as evolutionary and genetic approaches have also been used to tune the PID controller to obtain an optimal system operation[2][3]. These approaches often eliminate the need for human trial and error and present many optimal and efficient solutions because of their stochastic search features. However, genetic approaches often require that a multiple of solutions are running in parallel and the best solution chosen from them to run the system. This is often not possible on a single physical system. Other approaches to PID tuning include the Extremum Seeking algorithm [4], the particle swarm optimization [5][6], and the bacterial foraging algorithm [7]. Passino used a bacteria inspired algorithm to develop a model based adaptive controller for a system [8], which is based on biological concepts such as swarming, reproduction, dispersal, elimi- nation with the chemotactic behaviour of the bacteria. In his work, the best model to use for the present condition of the system is chosen from a database of system models by using a swarm of bacteria agents. In our work, however, we do not use this biological concepts rather rely solely on the bacteria foraging model discovered by Berg and Brown [9][10]. Dong and Jae used a hybrid combination of Passino’s algorithm with genetic algorithm for tuning the PID controller for an AVR [13]. Other researchers have used Passino’s bacteria Algorithm in many ways, including improving SLAM [14][15]. The rest of the paper is organized as follows. Section II briefly introduces the motivation of this research. In Section III, the implementation of this proposed approach is described, including the introduction of bacterial algorithm, modifications to the Berg and Brown model, using a simple simulated DC motor, and the plan implemented on a UAV. Some simulation results are presented in Section IV to demonstrate the feasibility and performance of the proposed approach. Finally, a brief conclusion and future work are given in Section V. II. MOTIVATION In this paper, we present how we plan to use a novel bacteria inspired algorithm to tune the PID feedback loop of an Unmanned Aerial Vehicle. Our platform for consideration in this paper is the DraganFlyer V5 shown in Figure 1. This model uses Brushed Motors. As a result, the electrical properties of each motor changes as it is used due to wear 693 978-1-4244-5702-1/10/$26.00 ©2010 IEEE Proceedings of the 2010 IEEE International Conference on Information and Automation June 20 - 23, Harbin, China