1 Abstract--This work presents an accurate and precise Genetic Algorithm (GA) for frequency estimation of Electrical Power System (EPS) signals. The problem of estimating the frequency of a distorted electrical signal is modeled as an optimization problem. The advantages of GAs in this approach include the use of coding for a number of solutions which facilitates computer implementation, as well as the search for an appropriate solution from a population of possible solutions. The GA is programmed in a FPGA (Field-Programmable Gate Array) device and the estimation procedure is performed in real-time. This is made possible due to (a) the implicit parallelism of FPGAs in computing their instructions, (b) the suitable choice of steps of GAs to explore this parallelism and (c) the appropriate choice of FPGA for good performance. To evaluate the performance of the proposed method, an EPS was simulated having typical operation conditions. The resulting signals were analyzed by the proposed GA-FPGA approach and promising results were compared to a commercial relay. Index Terms--Frequency estimation, Genetic algorithms, Field-programmable gate arrays, Digital relaying, Power system protection. I. INTRODUCTION EAL-TIME estimation of Electrical Power System (EPS) frequency is an important task in many fields of Electrical Engineering. Digital frequency relays use the frequency estimation to make decisions and protect the EPS components against loss of synchronism, under- and over-frequency. Accurate frequency estimation is also essential for stability of the EPS, since the dynamic balance between generation and load, a prerequisite for stable operation, has become more difficult to maintain considering the large expansion of electrical systems. The increasing interest in Power Quality (PQ) has also stimulated researchers to find new tools and methods to estimate the instantaneous frequency accurately. Several researchers have proposed different techniques to solve the problem of frequency estimation. Two algorithms based on phase errors using Discrete-Fourier Transform (DFT) This work was supported by CNPq from Brazil. D. V. Coury, M. Oleskovicz, J. Carvalho and D. Barbosa are with Department of Electrical Engineering, Engineering School of São Carlos, from University of São Paulo (USP), São Carlos – SP, Brazil, CEP 13.566-590. Phone: +55 (16) 3373-8133, (emails: coury@sc.usp.br, olesk@sc.usp.br, janison@sc.usp.br, dbarbosa@ usp.br). A.Delbem, E.Simoes and T.Silva are with Institute of Mathematical and Computer Sciences, from University of São Paulo (USP) (email: acbd@icmc.usp.br, simoes@icmc.usp.br, tiagovs@grad.icmc.usp.br). are presented in [1] and [2]. References [3] and [4] present complex frequency estimation methods based on the Kalman filtering approach. In [5], [6] and [7] the authors present methods obtained by modeling the estimation task as optimization problems. The Newton algorithm is used to solve the problem in [5]. The steepest descent method is used in [6] and [7] and the resulting sets of non-linear equations are called EPLL (Enhanced Phase-Locked Loop). An algorithm based on the Least Error Squares (LES) is derived in [8] taking into account some coefficients of the Taylor’s expansion series for the model of the input signal. An adaptive filtering technique, the Least Mean Square (LMS) algorithm, is presented in [9]. Intelligent techniques have also been used for frequency estimation of EPS signals [10]-[13]. Reference [10] presents an Artificial Neural Network (ANNs) based approach. In [11]- [13], Genetic Algorithms (GAs) are the tools used to solve the optimization problem considered. This paper presents an efficient method based on GAs for frequency estimation in an electrical signal. A sliding window with the samples from an input signal is used to adjust to a pure sinusoid wave. The main contribution of this paper, compared to previous work [12]-[13], is the development of the prototype relay working in real-time. This experience was possible by optimizing the GA operations for hardware implementation, as described later. The paper presents the following structure. The proposed GA-FPGA approach is presented in Section II. The simulated EPS to obtain the waveforms for analysis is described in Section III. Section IV. presents the simulated cases and results of frequency estimation compared to results of a commercial frequency relay (function 81). Finally, Section V. presents the concluding notes. II. THE PROPOSED GA–FPGA APPROACH A. Genetics Algorithms Genetic algorithms are adaptive search algorithms for optimization problems. Their mechanism of searching for the optimum solution is heuristic, inspired by natural selection and population genetics [14]. These algorithms operate in a population of possible solutions (the individuals) for the problem, with random initialization in most cases. As the population evolves, its characteristics change using genetic operators and the improvement of possible solutions can be reached. The individuals are encoded as strings (the chromosomes), normally as sequences of the binary digits “0” and “1”. Frequency Relaying based on Genetic Algorithm using FPGAs D. V. Coury, M. Oleskovicz, A. C. B. Delbem, E. V. Simões, T. V. Silva, J. R. de Carvalho, D. Barbosa University of São Paulo- Av. Trabalhador Sancarlense, 400, São Carlos, São Paulo, Brazil R