Control of Single Axis Magnetic Levitation System Using Fuzzy Logic Control

This paper presents a fuzzy logic controller design for the stabilization of magnetic levitation system (Maglev 's).Additionally, the investigation on Linear Quadratic Regulator Controller (LQRC) also mentioned here. This paper presents the difference between the performance of fuzzy logic control (FLC) and LQRC for the same linear model of magnetic levitation system .A magnetic levitation is a nonlinear unstable system and the fuzzy logic controller brings the magnetic levitation system to a stable region by keeping a magnetic ball suspended in the air. The modeling of the system is simulated using Matlab Simulink and connected to Hilink platform and the maglev model of Zeltom company. This paper presents a comparison for both LQRC and FLC to control a ball suspended on the air. The performance results of simulation shows that the fuzzy logic controller had better performance than the LQR control.


INTRODUCTION
Maglevsystems are getting huge interest from the designers over the world because of their different applications such as high-speed Maglev passenger trains, frictionless bearing, spacecraft etc.The controller design for any system is based on good understanding of the plant.This make the classical controller not satisfy the required control performance for a complex system like electromagnetic suspension system (EMS) because it is typically unstable, nonlinear and time-varying system.However there are a great number of plants already controlled by conventional PID controllers (or its derivatives) or optimal controlling LQRC with acceptable results [1].In recent years fuzzy controller is successfully applied to solve complex engineering problems without exact mathematical plant model [2].Fuzzy logic control is very flexible controller with any system [3].No controller design change will be required if any change acquire within the system only adding some new function to the controller design will be sufficient [4].This makes the fuzzy logic controller to be a good choice for controlling nonlinear systems such as electromagnetic levitation systems.In recent years many design approaches introduced by researcher to solve problems of maglev system.These researchers have adopted some different measures to solve the problems of overshoot, system oscillation and the stability.They obtained reasonable results using fuzzy neural network or adaptive fuzzy control to the controlled plant [4][5][6].Several comparisons between fuzzy logic control and other types of controller done by many researcher over the past several years, a lots of them compared between the performance of FLC and PID, PD controller, some combined the modern with classical method using fuzzy-PD control [1,7].Kashif Ishaque1, Yasir Saleem2, S.S Abdullah1, M. Amjad1, Munaf Rashid1 and Suhail Kazi1 they apply a new approach for fuzzy logic control using single input -single out put which can be easy implemented comparing to the multi input single out put [8].
In this work Linear Quadratic Regulator control method selected for comparison to Fuzzy Logic control.LQRC is part of optimal control strategy which has been widely developed and used in various applications [9].The system must be described by state space model so this type of controller related directly to linear model of the system reverse FL controller.

II. MAGLEV DYNAMIC MODEL
The Maglev model consists of an electromagnet, a levitating magnet ball and a hall effect sensor for measuring the position of the levitated ball Fig1 shows the system model: The electromagnetic force of the magnetic levitation system is described by the following nonlinear equation: (1) The electromagnetic force on the levitated object is found using the concept of co-energy, the co-energy (w') is defined as: (2) Where dWe is change of electrical input and dWfl is change of stored energy, assuming dWe equals zero for linear system.assumedWe=0 (5) (6) where: L(x) is the total inductance of the electromagnetic coil X:is the position of the ball L0: is additional inductance contributed by the presents of the object(magnet ball) L1:is the inductance contributed without object presents (magnet ball) X0:is equilibrium position (7) (8) (9) (10) (11) where C=(L0*X0)/2 (12) Taylor series expansion which was used to create a linear the equation: (13) i0 equals the current of the coil when the ball is at x0 (x0 equilibrium position).When the magnetic force balances the gravitational force on the ball, the acceleration of the ball is zero Control force, f1 for keeping the ball balanced is given by the following equations: The voltage-current relationship for the coil is given by: (18) The hall effect sensor equations used to measure the ball position is: is the sensor gain.
The transfer function of the system is a ratio of the output to input in the Laplace domain.Laplace transformation of sensor and electrical and mechanical equations are shown below: equation ( 18) is transformed to (20) (21) equation ( 13) is transformed to: III.FUZZY CONTROL Fuzzy logic is an computing method, comparing to the traditional Boolean sets where variables take only two value true or false.Fuzzy logic have two limits, completely true limit take (1) value, and completely false limit take (0) value.The term "fuzzy logic" was introduced at 1965 by LotfiAZadeh.Fuzzy logic has been applied to many fields, from control theory to artificial intelligence, generally "error" and "change of error", for the process state and applying rules to decide a level of output.
There are a lot of models of FLC, but the most famous ones are the Mamdani model, Takagi-Sugeno-Kang (TSK) model andKosko's additive model (SAM) [10].This paper uses Mamdani's model as given in Fig. 2. The operational features of the FLC is explained in following: The rule can represent using these forms: IF error is zero AND change of error is zero THEN change of voltage is zero or by using Table 1: The Hilink platform board is used as interface between physical plants and MatLab /Simulink for achievement of hardware in the loop of real time control systems, and is shown in Fig. 3.This platform enables MATLAB/Simulink real time windows target to communicate with the control board in real time [11].FUZZY LOGIC CONTROLLER DESIGN Fuzzy logic controller is applied to single-axis levitation system.The best choice to get robust, flexible, faster and real time speed control was to use Mamdani model for fuzzy controller.In that two input error and change of error (e, ce) and one output change of voltage (cv), seven membership (triangular, Z membership) functions were used for fuzzification step with selected range [-1,1] for the inputs and output.The Fig. 4 shows membership function of the fuzzy controller using GUI fuzzy toolbox of MATLAB software.Rule base of the system is given in Table 2.  Fig. 5 shows the output of the system drown using transfer function of the system without applying any controller.When no controller applied to the system the ball will fall down or attract to the coil.After applying the designed fuzzy controller it will be connected to a magnetic levitation MatLab / Simulink model.The model will built inside the Hilink /MatLab toolbox connected to maglev model then operates the system in real time target using T=1/2048 and S the stop time equals to inf.

Connect to Hilink board
Hall effect sensor send data to PC Fig. 6.Block diagram of physical system Fig. 6.shows the system that we used for testing FLC which consist from the Hilinkpaltform used as interface for connecting Matlab design with electromagnet.The position data measured using hall effect sensor then position will send to PC where the slider gain we use in our Matlabdesign is adjust slightly to bring the system to stable region .Step response of the system using FLC The LQRC interacts with the linearized model.The performance results of the system obtained from MATLAB are depicted in Figures 11,12   These results shows that all of the variables x1, x2 and x3 will go to zero when time became infinity.So we can consider that the system is controllable, after two seconds the system will be stable from initial condition operation point which is about two centimeter of the ball position.But with the presence of surrounded disturbance makes the stabilizing system based on LQRC is not robust.LQRC not achieved the performance of Robust control strategies which need to reject the disturbance and work properly where the system dynamic model has uncertainty.From the step response for the FLC and LQRC we can see that the smallest amount of error is coming from FLC. VII.CONCLUSION Magnetic levitation system model mathematically presented, the Maglev system is experimentally analyzed using HILINK platform.Two type of controller were applied, FLC and LQRC.This paper presents a comparison between simulation results of both applied controllers.The system is controlled with FLC and LQRC but only with FLC control the system achieves robust control, fuzzy controller hasslower responsecomparing to LQRC.However, fuzzy controller shows the better performance because of its lowest overshoot among LQRC also steady state error not acquires in case of FLC.If the working conditions exceed the initial linear area, FLC presents robustness against model uncertainties and permits very precise positioning of the levitated object.While LQRC technique is not stable with the presence of a disturbance and cannot reject the perturbation.So it can be concluded that FLC has superiority over LQRC.
Comparing to pervious researches that mention in this paper LQRC is used instead of classical control like PID,both controllers control the magnetic levitation system but as we present in this paper they depends on the system parametersR,L, etc which may be change due to temperature or any type of disturbance,which is not happened with FLC.This paper applies control method to actual plant (ZELTOM/HILINK) to study the response of real system.In the future it can be implemented to connect FLC and LQRC output and apply to the system to solve the problem of the two controllers and get better results, also apply FLC to actual plant designed by our self.

Fig. 1 .
Fig. 1.Electromagnetic levitation system model R: coil resistance L: coil inductance v: voltage across the coil g: gravity constant m: magnetic ball mass d: distance measured from the coil bottom to the ball center f : present the force on the levitating magnetic ball introduce by the electromagnet e : is the voltage across the hall effect sensor number (19) becomes: (23) www.ijacsa.thesai.orgFinally, transfer function can be found using above equations.It is the ratio of sensor output voltage to input voltage

Fig. 2 .
Fig. 2. Mamdani Model operation is the reverse of the fuzzification operation which means the conversion of the fuzzy output values into crisp values [10].There are many type of defuzzification:  Mean of Maximum method (MoM)  Center of Area (CoA)  Center of Maximum (CoM) IV.HILINK BOARD

Fig. 4 .
Fig. 4. Memberships of Inputs and Output Fuzzy Controller

Fig. 5 .
Fig. 5. Step response of the system without controller.

Fig. 7 .
Fig. 7. .Matlab simulation of fuzzy Controller Fig.7shows the Matlab design for fuzzy logic control where the blocks A0 and H0 is taken from the Hilinksimulink library which present the analogue input and plus output respectively Fig.8shows the sensor output voltage which present A0 the system input .

Fig. 8 .
Fig. 8. Sensor output voltage Fig.9shows the output of the system after Appling FLC and Fig.10shows the step response of the system after applying FLC

Fig. 9 .
Fig. 9. Output of the system after connecting FLC and 13.

TABLE II .
VI. SIMULATION AND DISCUSSION