Dr. Shereen F. Abd-Alkarim /Al-khwarizmi Engineering Journal, Vol.3, No.2, PP 8 -16(2007) ٨ Application of Fuzzy Logic in Servo Motor Dr. Shereen F. Abd-Alkarim Dept. of Education Technology University of Technology (Received 31 Julay 2006; accepted 24 April 2007) Abstract: In this work the design and application of a fuzzy logic controller to DC-servomotor is investigated. The proposed strategy is intended to improve the performance of the original control system by use of a fuzzy logic controller (FLC) as the motor load changes. Computer simulation demonstrates that FLC is effective in position control of a DC-servomotor comparing with conventional one. Keywords: Fuzzy logic, Servomotor, Controller Introduction: When attempting to carry out the control of a system applying the classical control theory, we need the mathematical model of the process and information about the evolution of the system variables to close the control loops. Normally both conditions are difficult to resolve: sometimes because of the complexity of the process or lack of knowledge we have about it, and other times because of the insufficient technological level reached at the moment in the sensor field. New process control techniques now combine advances in computer hardware and sensors with new programming techniques. In this way they attempt to solve difficult control problems [1]. Fuzzy set theory, first formulated by Zadeh nearly 30 years ago, constitutes the fundamentals of fuzzy logic which has emerged as an outgrowth of fuzzy set theory and a generalization of the infinite-value logic can be considered as a mathematical theory combing multivalued logic, probability theory, and artificial intelligence. It simulates the human approach in the solution of various problems by using an approximate reasoning to relate different data sets and to make decisions. Since its introduction, fuzzy logic has gone through an important theoretical development and there has been a florescence of applications of this mathematical framework to a variety of fields [2]. In control systems, fuzzy logic is considered as an alternative for conventional control theory in the control of complex nonlinear plants where precise mathematical modeling is difficult or impossible [3]. The DC-servomotor is one the most widely used prime movers in industry today. Generally speaking, DC-servomotor systems can be regarded as a simple low-order (second or third order) system without particular design or implementation difficulties. However, load effects have an obstructive influence on system response. As the load is Al-khwarizmi Engineering Journal Al-Khwarizmi Engineering Journal, Vol.3, No.2, pp8 -16 (2007) This page was created using Nitro PDF trial software. To purchase, go to http://www.nitropdf.com/ http://www.nitropdf.com/ Dr. Shereen F. Abd-Alkarim /Al-khwarizmi Engineering Journal, Vol.3, No.2, PP 8 -16(2007) ٩ changed, the original controller generally cannot maintain the design performance and thus should be redesigned for the new system conditions. Many types of control schemes, such as PI, PID, optimal, adaptive and robust controllers have been developed to reduce load effects. Although each approach has its advantages and disadvantages in practical realization, most controllers still have to be designed on the basis of the parameters and the detailed structure of the plant. Failing this, better control performance will not be obtained as load effects occur. Therefore, this work develops a control structure to eliminate heavy and / or unbalanced load effects. The main advantage of fuzzy logic as compared to conventional control approach resides in the fact that no mathematical modeling is required for the design of the controller. The control rules are based essentially on the knowledge of the system behavior and the experience of the control engineer. Since the fuzzy logic controller requires less complex mathematical operations than classical controllers, its implementation does not require very high- speed processors [4]. DC-servomotor control is a suitable application area for fuzzy control [5-9], primarily since the nonlinearities of the motor have a significant influence on process dynamics as the motor load changes. Successful applications have been reported in a number of papers using fuzzy control as such or in conjunction with classical controllers [6-11] and that fuzzy controller is more robust to plant parameter value changes than a classical control algorithm and has better noise rejection capabilities . FLC is especially suitable for compensating statical, non- varying nonlinearities. This work first presents the fuzzy logic principles, basic concepts and design procedures of FLC. Next, following these design procedures, we evaluate the proposed fuzzy logic control system by simulation in order to check whether the responses of the designed systems acquire the desired performance. Fuzzy Logic Principles: Fuzzy logic (FL) has the following general observation [12]:  FL conceptually easy to understand.  The mathematical concepts behind fuzzy reasoning are simple and flexible.  With any given system, it's easy to message it or layer more functionality on top of it without starting again from scratch.  FL is tolerant of imprecise data. Everything is imprecise if you look closely enough, but more than that, most things are imprecise even on careful inspection. Fuzzy reasoning builds this understanding into the process rather than tacking it onto the end.  FL can be built on top of the experience of experts. In direct contrast to neural networks, which take training data and generate opaque, impenetrable modeis, FL lets you rely on the experience of people who already understand your system.  FL is based on natural language. The basis for fuzzy logic is the basis for human communication. Fuzzy Logic Controller: The basic FLC structure is shown in fig (1), where FLC is used a supplementary role to enchance the existing control system when the control conditions change. It consists of four principle units [13]. These are the fuzzifacation, knowledge base, decision- making (computation) and defuzzification units. Since data manipulation in an FLC is based on fuzzy set theory, a fuzzification process is required to convert the measured "crisp" inputs to "fuzzy" values. The fuzzification unit first maps the measured values of input variables into corresponding universes of discourse U. The U is quantified and normalized to [ -1, +1 ]. It then converts the mapped input data into fuzzy sets based This page was created using Nitro PDF trial software. To purchase, go to http://www.nitropdf.com/ http://www.nitropdf.com/ Dr. Shereen F. Abd-Alkarim /Al-khwarizmi Engineering Journal, Vol.3, No.2, PP 8 -16(2007) ١٠ upon fuzzy values, such as Positive Large (PL), Negative Small (NS) etc. We utilize the triangle-shaped membership function with seven term as shown in fig (2). The knowledge base contains a set of rules which construct the decision-making logic rule table tabulated in table (1) where 49 rules are used. The rule in column 1 ( E=NL ) and row 1 ( DE=NL ) marked NL presents: If (E) is negative large (NL) and (DE) is negative large (NL) then control input (CI) is negative large (NL) . Where "And" operation is realized by "min" operation, i.e., uci = min {ue , ude }. Other rules can be interpreted in the same way. The output of the decision –making logic is a fuzzy set. However, a deterministic value is generally required as the input to the process. That is, an interface unit between the process and the decision- making unit is necessary. Several procedures have been proposed for the defuzzification task. However, in this work we use a centre of area method. It generally gives a better steady state performance than with other methods [14]. The crisp output is obtained using the following formula: ))(()))((( 11    n i i n i iicrisp VVVCI  Where n : is the number of support values of the fuzzy set. iV : is a support value.  : is the membership degree of iV Mathematical Model of the DC- Servomotor: For armature- controlled servomotors (220V, 3KW), the closed loop transfer function can be written as [5]: ))(()( 2 tatba t KSBRKKJSR K sH  Where: Ra : resistance of armature of motor. Kt : torque constant of motor. Kb : back e.m.f. constant of motor. Jm : inertia of motor rotor. JL : inertia of additional inertia disc. Bm : viscous friction coefficient of motor shaft. BL : viscous friction coefficient of load shaft. J=JmJL B=BmBL In order to calculate the discrete transfer function Gp(z), the sampling period T is chosen as 10 ms. Then, the discrete time process is given by:     9491.08432.1 001932.0001941.0 9026.4 1531.20 )( 22                ZZ Z S zzG s e Ts p PI Controller Design: The PI controller is the most widely used controller in industry today. The analog version of a PI controller is:  t IPPI deKteKtU 0 )()()(  Where: )()()( tytrte  , )(tU PI is the PI controller output. The discrete-time implementation of the integrator is:     )1()1()( 2 )( kekeke T ke Hence the associated discrete controller is :  )()()( keKkeKkU IPPI This page was created using Nitro PDF trial software. To purchase, go to http://www.nitropdf.com/ http://www.nitropdf.com/ Dr. Shereen F. Abd-Alkarim /Al-khwarizmi Engineering Journal, Vol.3, No.2, PP 8 -16(2007) ١١ and its transfer function is:        1 1 2 )( z zT KKzD IP From the previous equations, the final values for the PI controller gains can determined as follows: 110  IP KK for T = 0.01s Simulation Results: The fuzzy logic based control system has been studied by simulation in order to validate the design and to evaluate the performance. The parameters of the DC servo-motor used are: Servo-motor : 220V , 3KW , Ra=1.2Ω , Kt=2.1*10 -3Nm/A Kb=85*10 - 3V/rad/S, Jm=15*10 -6 Kgm2, JL=124*10 -6 Kgm2 , Bm=12*10 -6 NmS , BL=45*10 -6 NmS . The response of the system using fuzzy logic controller obtained by simulation is shown in figs (3,4) for different cases for step input (with and without load). In this simulation, we compare results gotten by a fuzzy logic and PI controller which give good performance in a no load case as shown in fig (3). However, from fig (4) , as loading is connected to the servomotor, the FLC results are obviously superior to the original PI control system. When the frictional load and/or the inertia disc load are included, the performance of the PI controller is not within the desired range and the PI controller must be adjusted. However, the redesign of the PI controller is very complex and troublesome. One need only design the FLC to provide control command rather than redesign the PI. It is seen that FLC provides faster response and less overshoot than PI controller. Conclusion: A fuzzy logic based controller for a DC- servomotor has been studied. The results have been compared to the conventional controller. The design of the fuzzy logic controller has been explained and the performance was evaluated by simulation. The simulation results indicate that FLC provides the best performance in comparison with PI controller, and the shape of the FLC surface is smoother than that of PI controller. This page was created using Nitro PDF trial software. To purchase, go to http://www.nitropdf.com/ http://www.nitropdf.com/ Dr. Shereen F. Abd-Alkarim /Al-khwarizmi Engineering Journal, Vol.3, No.2, PP 8 -16(2007) ١٢ Fig.(1) Basic Structure of fuzzy logic controller. Fig.(2) The membership function of E, DE and CI in normalized scale. -1 -0.6 -0.3 -0.1 0 0.1 0.3 0.6 1 NL NM NS ZR PS PM PL 1 (b) CI FLC Knowledge Base Fuzzification Computation (decision – making rule) Defuzzification Servo - motor Fuzzy output Fuzzy input Reference signal r + e y - Angular position y -1 -0.5 -0.2 0 0.2 0.5 1 NL NM NS ZR PS PM PL 1 (a) E and DE This page was created using Nitro PDF trial software. To purchase, go to http://www.nitropdf.com/ http://www.nitropdf.com/ Dr. Shereen F. Abd-Alkarim /Al-khwarizmi Engineering Journal, Vol.3, No.2, PP 8 -16(2007) ١٣ Table (1) The control rules table of the FLC. Fig(3)The system response under no load case PLPMPSZRNSNMNLE DE ZRNSNSNMNL NL NLNL PSZRNSNSNMNLNLNM PMPSZRNSNSNMNLNS PMPMPSZRNSNMNMZR PLPMPSPSZRNSNMPS PLPLPMPSPSZRNSPM PLPLPLPM PS PSZR PL This page was created using Nitro PDF trial software. To purchase, go to http://www.nitropdf.com/ http://www.nitropdf.com/ Dr. Shereen F. Abd-Alkarim /Al-khwarizmi Engineering Journal, Vol.3, No.2, PP 8 -16(2007) ١٤ Fig (4) the system response under fractional load case This page was created using Nitro PDF trial software. To purchase, go to http://www.nitropdf.com/ http://www.nitropdf.com/ Dr. Shereen F. Abd-Alkarim /Al-khwarizmi Engineering Journal, Vol.3, No.2, PP 8 -16(2007) ١٥ References: 1. Warwick K. "Control System", Prentice-Hall, 1989. 2. Maiers J. and Sherif Y.S. "Applications of fuzzy set theory", Computer design, March 1991. 3. Williams T. "Fuzzy Logic Simplifies Complex Control Problems", Computer design, March 1991. 4. Nasser T. and others "Design and Applications of Fuzzy Logic for The Speed Control of a Direct-Drive DC Motor", 4th International Conference, Cattaee, Amman-Jordan 2002. 5.Lim C. Hzyama T. "Experimental Implentation of a Fuzzy Logic Control Scheme for a Servomotor" , Mechatronics 1993. 6.Kung Y. Liaw C. "A Fuzzy Controller Improving a linear model following Controller for Motor Drives",IEEE Transaction on Fuzzy Systems 1994. 7.Sclarence W.Shimsjon B. "Experiments with an intelligent Servomotor System Intelligent Control Systems" ASME 1992. 8.Shieh MY. Li T-HS."Integrated Fuzzy Logic Controller Design",Proceedings of IEEE IECON 93. Maui, HW 1993. 9.Shieh MY. Li T-HS."Implementation of Integrated Fuzzy Logic Controller".Proceedings of Fuzz- IEEE/IFES 95.Yokohama,Japan 1995. 10. Tan S. He SZ.Xu FL."Fuzzy Self- Tuning of DID Controllers", Fuzzy Sets and Systems 1993. 11. Zhao ZY, Tomizuka M.Isaka S."Fuzzy Gain Scheduling of PID Controllers"Proceedings of the IEEE. Conference on Control Applications. Dayton,Ohio 1992. 12. Jamshidi M. and others "Application of Fuzzy Logic Towards high Machine Intelligence guotient System" ,prentice Hall PTR ,1997. 13. Lee C. "Fuzzy Logic in Control Systems",Fuzzy logic controller, part II . IEEE Trans. On Systems, Man. And cybernetics 1990. 14. Pham D.T. and Liu X."Neural Network for Identification Prediction and Control", Springer-Verlag Berlin Heidelberg New York, 1997. This page was created using Nitro PDF trial software. To purchase, go to http://www.nitropdf.com/ http://www.nitropdf.com/ Dr. Shereen F. Abd-Alkarim /Al-khwarizmi Engineering Journal, Vol.3, No.2, PP 8 -16(2007) ١٦ للمحرك المؤازر تطبیقات المنطق الغامض شیرین فائق عبد الكریم. د فرع الكھرباء/ قسم التعلیم التكنولوجي الجامعة التكنولوجیة :الخالصة حیث درست خصائص اداء المحرك تصمیم المسیطرالغامض للمحرك الـمؤازر تم في ھذا البحث وقد اثبتت نتائج المحاكاة بان المسیطر الغامض للمحرك ذو فعالیة جیدة للسیطرة . باستخدام المحاكاة .الموقعیة للمحرك عند احمال متغیرة مقارنة بالمسیطر التقلیدي This page was created using Nitro PDF trial software. To purchase, go to http://www.nitropdf.com/ http://www.nitropdf.com/