يةوم الهندسعل ال FES Journal of Engineering Sciences http://fes.oiu.edu.sd/ 1 Optimizing the PID Controller by Using the Genetic Algorithm Muhammad A. H. Abdurrahman 1 , Moamer A. O. Nourain 1, Mohammed O. A 1, Omer H. Alnour 1 , and Manareldeen Ahmed 1 * . 1 Electrical and Electronic Engineering Department, Omdurman Islamic University, Omdurman, Sudan * Corresponding author: Manareldeen Ahmed (manareldeen@oiu.edu.sd). Article history: Received 03 February 2022, Received in revised form 26 February 2022, Accepted 02 March 2022 Digital Object Identifier (doi): https://doi.org/10.52981/fjes.v%vi%i.1929 ABSTRACT This paper aims to develop a Proportional Integral Derivative (PID) controller for the Automatic Voltage Regulator (AVR) of the Synchronous Generator, Automatic Voltage Regulator is responsible for keeping the output voltage of the Generator constant and stable. The Automatic Voltage Regulator system can be represented by a fourth order Transfer Function. The parameters of the controller are evaluated by using the Genetic Algorithm tuning method, for this method the Genetic Algorithm Optimization toolbox in MATLAB is used. A PID controller and a PID Filter controller are developed in order to come up with the optimum controller design for the system. The performance of the Genetic Algorithm based controller has been compared with the classical Ziegler-Nichols based controller. The results show that the Genetic Algorithm based controller outperforms the Ziegler-Nichols based controller, the optimum controller design is achieved by the GA based PID filter controller. Keywords: AVR system, Genetic Algorithm, PID controller, PID Optimization. 1. INTRODUCTION Synchronous Generators require control systems in order to deliver a quality electrical current, these control systems are the Automatic Voltage Regulator (AVR), and the Automatic Load Frequency Control (LFC). The main role of an AVR is to maintain the terminal voltage of the synchronous generator at a precise value by controlling the Exciter using a proper controller [1-3]. this controller can be, for example, a PID controller. Since the stability of the generator output voltage would affect the stability of the power system, the designed voltage controller should be robust to disturbance. In this paper we will design the PID controller of the AVR by using a stochastic search optimization technique called Genetic Algorithm (GA), GA uses the concept of evolution, which is based on the rule, “survival for fittest”. The new classes of living things come into existence through the processes of Reproduction, Crossover, and Mutation among the previous class [4]. GA optimization toolbox in MATLAB will be used for finding the optimum tuning parameters of the PID controller [5]. Several publications have adopted the same approach to solve similar problems. [6] presents a new approach in PID tuning methodology for a processing plant using GA, was a good reference. [7] proposed a FPIDF controller for the AVR, it was a helpful resource; it introduced a new point of view in designing a controller for a system, by creating initial solution using the TLBO and blogging them into the FPIDF controller. [8] Introduced a Genetic Algorithm based PID controller for a speed control system of a DC motor, gave a taste of what GAs can do to a control system. [9] Introduces a GA based PID for a turbine speed control system. It used a