I.J. Intelligent Systems and Applications, 2012, 10, 72-81 Published Online September 2012 in MECS (http://www.mecs-press.org/) DOI: 10.5815/ijisa.2012.10.08 Copyright © 2012 MECS I.J. Intelligent Systems and Applications, 2012, 10, 72-81 FPGA Fuzzy Controller Design for Magnetic Ball Levitation Hosam Abu Elreesh Electrical Engineering Department, Islamic University of Gaza, Gaza, Palestine Email: m_hossam@hotmail.com Basil Hamed Electrical Engineering Department, Islamic University of Gaza, Gaza, Palestine Email: bhamed@iugaza.edu Abstractthis paper presents a fuzzy controller design for nonlinear system using FPGA. A magnetic levitation system is considered as a case study and the fuzzy controller is designed to keep a magnetic object suspended in the air counteracting the weight of the object. Fuzzy controller will be implemented using FPGA chip. The design will use a high-level programming language HDL for implementing the fuzzy logic controller using the Xfuzzy tools to implement the fuzzy logic controller into HDL code. This paper, advocates a novel approach to implement the fuzzy logic controller for magnetic ball levitation system by using FPGA. Index TermsFuzzy Control, PI, FPGA, Magnetic Levitation Ball, VHDL I. Introduction In the recent years Fuzzy controller is used to control complex engineering problems which are difficult to solve by classical methods. Finding many different hardware implementations of fuzzy logic systems (FLSs), general-purpose microprocessors and microcontrollers are mostly used for implementing FLS in hardware, but with the complex systems these devices cannot perform operations assigned to it as required. In recent years many studies emerged illustrate the different ways to implement fuzzy control using FPGA in different application. The advantage of using FPGA is suitable for fast implementation and quick hardware verification. FPGA based systems are flexible and can be reprogrammed unlimited number of times. J.E. Bonilla, V.H. Grisales and M.A. Melgarejo [1]; the fuzzy controller architecture in this paper focused on the treatment of errors and changes in errors with tuning gains. This paper presented the development of an FPGA-based proportional- differential (PD) fuzzy LUT controller. The fuzzy inference used a 256-value LUT. This method was used due to its reduced computation time cost. McKenna and Wilamowski [2] have investigated method to implement fuzzy logic controller (FLC) on a field FPGA and obtained very smooth control surfaces. Vuong et al [3]; described a methodology of implementing FLS using very high speed integrated circuit hardware description language (VHDL). The main advantages of using HDL are rapid prototyping and allowing usage of powerful synthesis tools such as Xilinx ISE, Synopsys, Mentor Graphic, or Cadence to be targeted easily and efficiently. Patyra and Grantner [4]; presented a paper investigating design issues for digital fuzzy logic system (FLS) circuits. In their study, comparisons between the current trends were conducted and they proposed a new methodology whereby a fully parallel architecture is employed to achieve high performance in hardware implementation of digital FLSs. They presented ways to translate an FLS into hardware, and discussed methods for testing the FLS hardware performance. Both SISO and MIMO FLC hardware implementations were presented. Their proposed methodology provides an improved solution for high-speed, real-time applications. II. Fuzzy Control Fuzzy logic is a superset of conventional (Boolean) logic that has been extended to handle the concept of partial truth. There are not two values (true or false) but there are two limits (1) completely true and (0) completely false and the result can have different degree between these limits [5]. Fuzzy Control applies fuzzy logic to the control of processes by utilizing different categories, usually „error‟ and „change of error‟, for the process state and applying rules to decide a level of output. There are many models of FLC, but the most famous are the Mamdani model, Takagi- Sugeno-Kang (TSK) model and Kosko's additive model (SAM) [5]. This paper uses Mamdani model.