**AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BASIS FUNCTION**

SherifKamel Hussein1 and Mahmoud Hanafy Saleh2

1Department of Communications and Electronics, October University for Modern Sciences and Arts- Giza – Egypt 2Electrical Communication and Electronics Systems Engineering Department, Canadian International College-CIC-Egypt

**ABSTRACT**

The impetus for this paper is the development of Fuzzy Basis Function “FBF” that assigns in an optimal fashion, a function approximation for a nonlinear dynamic system. A fuzzy basis function is applied to find the best location of the characteristic points by specifying the set of fuzzy rules. The advantage of this technique is that, it may produce a simple and well-performing system because it selects the most significant fuzzy basis functions to minimize an objective function in the output error for the fuzzy rules. The fuzzy basis function is a linguistic fuzzy IF_THEN rule. It provides a combination of the numerical information and the linguistic information in the form input-output pairs and in the form of fuzzy rules. The proposed control scheme is applied to a magnetic ball suspension system.

**KEYWORDS**

Fuzzy Logic Control “FLC”,Fuzzy Basis Function “FBF”,Orthogonal Least Squares ”OLS”.

**1. INTRODUCTION**

The fuzzy logic controller comprises three stages namely fuzzifier, rule-based assignment tables and the defuzzifier. In this system, theinput signals are converted to fuzzy representations, the rule base will produce a consequent fuzzy region foreach solutionvariable, and the consequent fuzzy region are defuzzified to find the expected solution variable [1-7].

In this paper, an optimal approach to function approximation is presented using fuzzy systems. The proposed approach does not optimize the function approximation, but also gives some insight to the role of different parts of fuzzy systems employing the new concepts of characteristic point.

A fuzzy basis function is then applied to find the best location of the characteristic points specifying the optimal rule-set [8-12].This paper is organized as follows, the second section describes the fuzzy logic system. The third section is devoted to discuss the optimal fuzzy system. The fourth section is concerned with the fuzzy control procedures. In fifth section, a propose design for magnetic ball system is introduced.the magnetic ball system is designed.Finally the last section is dedicated to the computer simulation, and the conclusions.

**2. FUZZY LOGIC SYSTEMS**

The fuzzy logic system with fuzzifier and defuzzifier has many attractive features. First , it is suitable for engineering systems because its input and output are real-valued variables. Second , it provides a natural framework to incorporate fuzzy IF-THEN rules from human experts. Finally , there is much freedom in the choices of fuzzifier, fuzzy rules, assembled in which as the fuzzy inference engine and defuzzifier. Fig. 1 shows the Fuzzy Logic System “FLs” [13,14].

The Fuzzy-Logic Control ” FLC” comprises three stages namely Fuzzifier, Rule-base and Defuzzifier. Fig. 2 shows the configuration of a fuzzy logic controller.The Fuzzy Control Theory uses the fuzzy knowledge to describe the characteristics of the system, because the nonlinear system is difficult to establish for traditional methods [12].

The signal e(k) is the error signal and it is the difference between the reference signal and the actual signal, the signal ∆e(k) is defined as the rate of change of the error signal.

The workable range is divided into intervals, these intervals are named for example , Positive ” P” , Zero ” Z” , and Negative ” N”. These names for the intervals are called labels [14,20].The rules relate the input variables to the output of the fuzzy controller. These rules can be expressed in a table with the inputs in the horizontal Cartesianand the output in the vertical cartesian. However, the output would be inside each cell as shown in table 1.

The rules base are expressed as IF-THEN as follows:

**3. OPTIMAL FUZZY LOGIC SYSTEMS**

We develop an optimal fuzzy logic system, that is, it is optimal in the sense of matching all inputs-outputs pairs in the training set to any given accuracy [15,17-21]. For an arbitrary Ɛ ˃ 0 , there exists, the difference between a real continuous function g(x) and a fuzzy system F(x) is in the form of : ǁ

Where xi are the N-input variables to the fuzzy system, y is the M-output variable of the fuzzy system, and µFi k (x) is the isosceles triangle membership function.

The first step in the approximation of such a function is to define the membership function for the input-output spaces, the membership function is expressed by a triangle whose center and width defined by ai and bi respectively [14,15,17-21]

The function F(.) is the fuzzy logic system output.The number of rules in the optimal logic system equal to the number of input-output pairs in the training set with one rule responsible for matching one input-output pair (x1,y1).

Many types of membership function exists [2,3,14-20]. In this paper, the triangular-shaped function µ(e) is the membership function of the error signal, with positive lable”P” and zero Lable “Z” and negative labe “N”. The triangular shaped function, µ(∆e) is the membership function of the rate of change of the error signal with positive label “P”, zero label”ZE” and negative label “N” as shown in Fig.3 ,

**3.1 Fuzzy Basis Function**

Fuzzy Logic control technique has represented an alternative method to solve the problems in control engineering in recent years. One of the most useful properties of fuzzy logic systems in control is their ability to approximate a certain desired behavior function up to a desired level of accuracy.

The Fuzzy Basis Function “FBF” is proposed for control multi-input-single output nonlinear function [9-13]. The fuzzy basis function (FBF) is defined as a series of algebraic superposition of fuzzy membership functions [12].

Where d(.) is the system output, θj are real parameters, Pj(t) are fixed function of system inputs x(.). Suppose that ,we are given N-input-output pairs [x(t0, d(t)], t=1,2,…,N. The algorithm is to design an FBF expansion F(x) , such that the error function between the F(x(t)) and d(t) is minimized.The Fuzzy Basis Function” FBF” can be determined as follows:

• Calculate the product of all membership functions for the linguistic terms in the IF part of rule

• Generate these product on a numerical input-output pair

It is an intuitive idea that FBF’s play an important role in the determining structure and property of fuzzy systems. We gave a systematic analysis of FBF’s and presented the following properties of fuzzitlity, and composition. The fuzzy logic system can be analyzed from two view points; First, if the parameters in the FBF are free design parameters. Second, the FBF expansion is nonlinear in the parameters.

In order to specify, such FBF expansion, it must use nonlinear optimization techniques [9-12]. The objective is to design an FBF expansion F(x), such that the error between F(x) and g(x) is minimized.In order to describethat , consider the Orthogonal Least Squares “OLS” learning algorithm works. In matrix form :

The orthogonal algorithm transforms the set of pi into a set of orthogonal basis vectors and uses the significant basis vectors to form the final FBF expansion.

**4. FUZZY CONTROL ALGORITHM**

In this section, a systematic method is given to help designer get the best of reasoning algorithm that works well with the application required. The proposed approach to develop a fuzzy logic system consists of five stages. For the given pairs

(X1, X2, Y) Where F(X1,X2) Y

Step 1 Assume that , the range of each variable is known [ x1, x – 1 ],[ x2, x – 2 ] and [y1, y – 1] Normalize each and find the corresponding scaling factors Kx1, Kx2 , and Ky.

Step 2 Generate the fuzzy rules from the data pairs Determine the degree of each xi 1 , x i 2 , and yi

Step 3 Assign a degree of each rules The degree of this rule D(rule) is defined as D(rule) = µA (x1) * µB (x2)

Step 4 Create a combined fuzzy basis function by making a look-up table as shown in table 1

Step 5 Determine the following defuzzification strategy to determine the output y for given inputs (x1, x2)

**5. MAGNETIC BALL SYSTEM**

The magnetic ball suspension system is proposed as a nonlinear system is shown in fig.4.In this system, the electro- mechanical nonlinear model of magnetic ball system can be described in terms of the following set of differential equations[11-13, 21-22].

The system may be expressed as follows:

**6.COMPUTER SIMULATION**

The Magnetic Suspension or magnetic ball is a type of suspension system where the shock absorbers reacts to the road and adjusts much faster than regular absorbers. In this system, a steal ball of mass can counteract the effect of gravity at any point. This relationship is a nonlinear function as shown in Fig. 5.

To illustrate the design process of a fuzzy system, consider the nonlinear function in Eq.(15). We compute the performance of each membership function used the same information. The results clearly show the applicability of the proposed scheme to the representation of a nonlinear function. From this result, the following points can be concluded: The fuzzy logic has the advantage of being able to handle the behavior of a nonlinear function. The fuzzy logic is simpler than the conventional system. It is clear that, the function performance with fuzzy logic is acceptable, and the result is faster response during transient compared to the conventional technique. On contrary to that, the fuzzy logic result in a smaller steady state error. The two opposing forces applied to the ball (magnetic force f(x) and the fuzzy basis function ) almost identical are shown in Fig. 6.The difference between the two forces are almost negligible which shows the good fuzzy basis function followed the trajectory desire.

**7. CONCLUSION**

The paper presents a fuzzy logic strategy to ensure excellent study and gurantees the operation of the magnetic ball suspension. Simulation results show that the response shows a significant improvement in the approximator performance.

It is clear that the responses show a close correspondence between the real function and the estimated one throughout the operation periods which demonstrates the validity of the proposed algorithm. The fuzzy basis function expansion provides a natural framework to combine both numerical information in the form of input-output pairs and linguistic information in the form of fuzzy IF-THEN rules.

An example of how to combine the fuzzy basis functions generated from a numerical statecontrol and the fuzzy basis function generated form the common-sense linguistic fuzzy control rules is shown and represented in this paper.

**REFERENCES**

[1] L.A.Zadah, (1980)“Fuzzy Sets Versus Probability”Proc.of the IEEE, Vol.68, No.3.

[2] C.C. Lee , (1990)” Fuzzy Logic in Control Systems-Part-II” IEEE Trans. On Systems, Man and Cybernetics, Vol.20, No.2.

[3] L.A.Zadah,(1996)”Fuzzy Logic = Computing with Words” IEEE Trans. On Fuzzy Systems Vol.4, No.2.

[4] A. Ike, A. Kulkam, and Dr. Veeresh, (2012)” Load Frequency Control Using Fuzzy Logic Controller of Two Area Thermal- Power System” International Journal ofEngineering Technology and Advanced Engineering, Vol.2.

[5] K. Des, P.Des, and S. Sharma , (2012)” Load Frequency Control Using Classical Controller in an Isolated Single Area and Two Area Reheat Thermal Power Systems” International Journal of Engineering Technology and Advanced Engineering, Vol.2.

[6] K.Yamashita, M.Hirayasu, K. OkafujiandH.Miyagi, (1995)“ A Design Method of Adaptive Load Frequency Control With Dual-Rate Sampling” Int. Journal of Adaptive Control and Signal Processing, Vol.9,No.2.

[7] M.H.Saleh&T.A.Moniem, (2012).” Fuzzy Logic Membership Implementation Using Optical Hardware Component” Optics Communication, SciVerse, Science Direct.

[8] Li-Xin Wang and Jerry M. Mendel , (1992)” Fuzzy Basis Functions, Universal Approximation and Orthogonal Least-Squares Learning” IEEE Transactions on Neural Networks, Vol.3,No.5.

[9] Zhang Huaguang, LilongGai, and ZeungnamBien , (2000) ” A Fuzzy Basis Function Vector-Based Multivariable Adaptive Controller For Nonlinear Systems” IEEE Transactions on Systems, Man , and Cybernetics, Part B,, Vol.30, No.1.

[10] Man Zhihong, and X. H. Yu , (1998)” An adaptive Control Using Fuzzy Basis Function Expansions For a Class ofd Nonlinear Systems ” Journal of Intelligent and Robotics Systems 21, Kluwer Academic Publishers.

[11] Hyun Mun Kim, and Mendel, J.M, (2002). ” Fuzzy Basis Functions : Comparisons with Other Basis Functions” IEEE Transactions on Computational Intelligence SocietyVol.3, No.1, Issue,2.

[12] HuannKeng Chiang, Chao Ting Chu, and Yong Tang Jhou, (2012)” Fuzzy Control With Fuzzy Basis Function Neural Network in Magnetic Bearing Systems ” IEEE Transactions on Neural Network.

[13] M.H.Saleh, A.H.Elassal, and I.H.Khalifa, (1996)“Fuzzy Logic Controller for Multi-Area Load Frequency Control of Electric Power Systems”, The 6th. Conference on Computer and Applications, IEEE Alex.Chapter, Alexandria, Egypt.

[14] M.H.Saleh, A.H.Elassal, and I.H.Khalifa,, (1997)”An Adaptive Fuzzy Controller to Improve System Performance” The 7th.Conference on Computer and Applications, IEEE Alex.Chapter, Alexandria, Egypt.

[15] RadaKushawa and SulochanaWadhawani, (2013)“Speed Control of Separately Excited DC Motor Using Fuzzy Logic Controller” International Journal of Engineering Trends and Technology (IJETT), Volume 4, Issue 6.

[16] M.H.Saleh, A.H.Elassal, and I.H.Khalifa, (1998)“An Adaptive Fuzzy Control for Dynamically Interconnected Large-Scale Systems” The 6th International Middle East Power System Conference ”MEPCON’98” Al-Mansoura University, Al-Mansoura, Egypt.

[17] M.H.Saleh, A.H.Elassal, and I.H.Khalifa, (1997)”An Adaptive Fuzzy Controller to Improve System Performance” The 7th.Conference on Computer and Applications, IEEE Alex. Chapter, Alexandria, Egypt.

[18] M.H.Saleh& T.A. Moniem, (2013)” A knowledge-based adaptive fuzzy controller for a twoareapower system” International Journal of Knowledge-based and Intelligent Engineering ,219–222 219 DOI 10.3233/KES-130260 IOS Press.

[19] SherifKamelHusien, Mahmoud HanafySaleh, (2014)“ A Fuzzy Logic Controller For A Two-Link Functional Manipulator” International Journal of Computer Networks & Communications (IJCNC), Vol.6,No.6.

[20] Benjamin C.Kuo (1990), Automatic Control Systems, Prentice Hall Inc.

[21] YousfiKhemisi, (2010)“ Control Using Sliding Mode Of the Magnetic Suspension System”, International Journals of Electrical & Computer Science IJECS-IJENS, Vol:10, N0: 03.

[22] P.Venkatesh& S. Balamurgan , (2014)” Real Time Control Of Magnetic Ball Suspension System UsingdSPACE DS1104”dSPACE User Conference 2014, India.

[21] YousfiKhemisi, (2010)“ Control Using Sliding Mode Of the Magnetic Suspension System”,

[22] P.Venkatesh& S. Balamurgan , (2014)” Real Time Control Of Magnetic Ball Suspension System UsingdSPACE DS1104”dSPACE User Conference 2014, India.

**AUTHORS**

Sherifkamel Hussein Hassan Ratib has Graduated from the faculty of engineering in 1989 Communications and Electronics Department ,Helwan University. He received his Diploma,MSc,and Doctorate in Computer Science **– Major Information Technology and Networking from Cairo University in Egypt in 2007. He is currently Associate Professor in Electrical and Communication Engineering department at October University for Modern Sciences and Arts, He has worked internationally in the area of Networking , Control and automation. He joined many private and governmental universities inside and outside Egypt for almost 15 years .He shared in the development of many industrial courses .His research interest is GSM Based Control and Macro mobility based on Mobile IP.**

Mahmoud HanafySaleh has received the M.Sc. degree in Automatic Control – Electrical Engineering and PhD degree in Automatic Control from Faculty of Engineering, Helwan University (Egypt). He is currently an Assistant Professor in Electrical Communication and Electronics Systems Engineering Department,Canadian International College-CIC. Dr Mahmoud Hanafy has worked in the areas of Fuzzy **logic, Neural Network, System Dynamics, Intelligent Control Logic Control, Physics of Electrical Materials, Electronic Circuit-Analog-Digital, Electric Circuit Analysis DC-AC, Power electronic, Analysis of Electric Energy Conversion Solar energy-Photovoltaic, and Electric Power System analysis Interconnected Power System. His research interests include: Control System Analysis, Systems Engineering, System Dynamics, Process Control, Neural network and fuzzy logic controllers, Neuro-Fuzzy systems, Mathematical Modeling and Computer Simulation, Statistical Analysis.**

%d bloggers like this: