JORIND 9(2) December, 2011. ISSN 1596 – 8308. www.transcampus.org., www.ajol.info/journals/jorind IMPLEMENTATION OF A FUZZY LOGIC SPEED CONTROLLER FOR A PERMANENT MAGNET BRUSHLESS DC MOTOR DRIVE SYSTEM. J. A. Oyedepo and A. Folaponmile Department of Computer Engineering, Kaduna Polytechnic, Kaduna Abstract In this paper DC motor control models were mathematically extracted and implemented using fuzzy logic speed controller. All control systems suffer from problems related to undesirable overshoot, longer settling times and vibrations while going from one state to another. To overcome the maximum overshoot, fuzzy logic control technique has been used in the controller architecture. Fuzzy logic controlled model of the DC motor was implemented. The purpose is to achieve accurate trajectory control of the speed of permanent magnet brushless DC Motor, especially when the motor and load parameters are unknown. Based on the mathematic model of BLDCM, a fuzzy logic controller is designed, and the membership function is composed by Gauss function. This fuzzy logic speed control of BLDC motor was simulated using MATLAB/SIMULINK and the result obtained showed that excellent flexibility and adaptability as well as high precision and good robustness are obtained by the proposed strategy. Key words: Brushless DC motor, fuzzy logic control, speed controller Introduction There are mainly two types of dc motors used in the industry. The first one is the conventional dc motor where the flux is produced by the current through the field coil of the stationary pole structure. The second type is the brushless dc motor (BLDC MOTOR) where permanent magnet provides the necessary air gap flux instead of the wire wound field poles (Tipsuwanporn et al 2002). tools, industrial automation equipment and many other recent ones as studied by researchers like Lee and Ehsani 2003, Hong eta l, 2007 and Akkaya et al 2007. Many machine design and control schemes have been developed for the purpose of improving the performance of BLDC motor drives. In order to implement an effective control in simulation, the model of the motor has to be known. Various researchers (i.e. Safi et al 1995; Figueroa et al, 2003 and Hung et al, 2007) have proposed some simulation models based on state – space equations, Fourier series, d – q axis model and variable sampling for the analysis of this type of motor drives. From control point of view, DC motors exhibit excellent control characteristics because of the decoupled, nature of the field and armature mmf’s. Recently, many modern control methodologies such as non linear control (Hemati et al, 1990), optimal control (Pelezewski and Kunz, 1990), variable structure control ( Lin et al, 1999) adaptive control (Cerruto et al; 1995) and particle swarm optimization strategy (Nasri et al, 2007) have been widely proposed for linear brushless permanent magnet DC motor. With the rapid development of microelectronics and power switches, most adjustable – speed drives are now realized with ac machines. Permanent Magnet Synchronous Motor (PMSM) with sinusoidal shape back – EMF and BLDC motor with trapezoidal shape back – EMF have been extensively used in many applications, ranging from servo to traction drives due to several distinct advantages. In short BLDC motors have some advantages over conventional brushed DC motors and induction motor. Some of these advantages are: better speed versus torque characteristics, high dynamic response, high efficiency high power density, large torque/ inertia ratio, long operating life, noiseless operations, higher speed ranges. In addition, BLDC motors are reliable, easy to control and inexpensive (Yedamale, 2009). BLDC motors have favourable electrical and mechanical properties, thus they are widely used in servo applications such as automotive, aerospace, medical instrumentation, actuation, robotics, machine There are two methods of controlling BLDC motors namely sensor control and sensor less control. The latter has advantages like cost reduction, reliability, 65 JORIND 9(2) December, 2011. ISSN 1596 – 8308. www.transcampus.org., www.ajol.info/journals/jorind elimination of difficulty in maintaining the sensor etc. it is also highly advantageous when the motor is operated industry or oily environment, where cleaning and maintaining of Hall sensors is required for proper sensing of rotor position, and they are preferred when the motor is in less accessible location. Classical control methods can be implemented in well – defined systems to achieve good performance of the systems. This paper deals with the implementation of fuzzy logic speed controller for BLDC motors. The fuzzy logic control has adaptive characteristics that can Ref. Current Generator achieve robust response to a system with uncertainty, parameter variations and external load disturbance. Modeling of BLDC motor drive system Fig, 1 shows the Block diagram of the proposed control system, which contain two loops. The first loop is the current control loop that accomplishes torque of BLDC motor while the second loop is the speed control loop, which adjusts the speed of the BLDC motor. PWM Current Control 3 - ph VSI BLDC Motor Current Control loop - Rotor Position Fig 1 Block diagram of BLDC motor Position and Speed Detector Actual speed In the analysis of the BLDC motor the following assumptions have been made for simplification and accuracy; BLDC motor saturated, state resistances are equal, self and mutual inductances are constant, semi conductor devices of inverter are ideal, iron losses are negligible, Back – EMF waveforms of all phases are equal. For the purpose of analysis, equivalent circuit of BLDC motor and VSI of fig. 2 will be used BLDC motor Three Phase VSI o Fig 2 Configuration of BLDC motor and VSI System From fig.2, the dynamic equations can be derived as follows: 66 JORIND 9(2) December, 2011. ISSN 1596 – 8308. www.transcampus.org., www.ajol.info/journals/jorind (1) Where: and are phase voltages R is resistance, L is inductance M is mutual inductance, , and The motion equation is then expressed as and are trapezoidal back – EMFs. (2) By substituting eqn. (3) and (4) into (5), defined as; Where: is the electromagnetic Torque, is the load torque in , J is the moment of inertia in , B is the frictional coefficient in is rotor speed in mechanical in . is rotor speed in electrical in . (6) By making the damping factor negligible the relationship between speed and torque of BLDC motor can be rewritten as; = (7) Modelling of trapezoidal back EMF Voltage source inverter (VSI) The trapezoidal back – EMF wave forms are modeled as a function of rotor position so that rotor position can be correctly calculated according to the operation speed. The back emf are expressed as As shown in fig 2, only the two phases are excited through the conduction operating modes. According to Lee and Ehsani, (2003), voltage and current equations can be obtained as follows: , and Where + (3) + is back emf constant is function of rotor position The named as trapezoidal shape functions with limit values between +1 and -1 is defined as; and (5) can be (8) + Where are the loop currents , are the line – to – line back emfs from fig 2 = , and = the phase currents are; and and and By using the switching function S. a,b, c which is obtained from hysteresis block, and in reference to midpoint of DC supply voltage can be calculated as (Cunkas and Aydogdu, 2010); = = (4) can be obtained in a similar way. The electromagnetic torque is redefined using the back emfs as follows; = 67 = JORIND 9(2) December, 2011. ISSN 1596 – 8308. www.transcampus.org., www.ajol.info/journals/jorind Design of fuzzy logic controller = = (9) Then the inverter line – to – line voltages can be derived as; and The complete block diagram of the fuzzy logic controlled BLDC motor drive system is as shown in fig 3 and that of the fuzzy logic controller with two inputs and one output is shown in fig 4. (10) Fuzzy Controlle r PWM Current Control Reference Current Generator 3 - ph VSI Position and Speed Detector - Rotor Position speed BLDC Motor Rotor Speed Fig 3 Block diagram of fuzzy logic controlled BLDC motor drive system Knowledge Base Normalization Fuzzifier Inference Mechanism Defuzzifier Denormalization U Fig 4 Block diagram showing structure of fuzzy logic controller From fig 3, the error, e is calculated by taking the difference between the reference speed and actual rotor speed as follows; (11) And the change in error, ce is obtained as, parameter for the output. In normalization process, the input values are scale between and in denormalization process, the output values of fuzzy controller are converted to a value depending on the terminal control element. The fuzzy values obtained from fuzzy inference mechanism have to be converted to crisp output value, , by defizzifier process. Initial rule base that can be used in drive systems for a fuzzy logic controller consist of 49 linguistic rules as shown in table 1, and gives the change of the output of fuzzy logic (12) Where is the previous error value. In fig 4, there are two normalization parameters for input and one denormalization 68 JORIND 9(2) December, 2011. ISSN 1596 – 8308. www.transcampus.org., www.ajol.info/journals/jorind controller in terms of the two inputs. The membership functions used to fuzzify the two inputs values and defuzzify output are given in fig. 5. Table 1: Rule base of fuzzy controller Ce NB NM NS Z PS PM PB NB PB PB PM PM PS PS Z NM PB PM PM PS PS Z NS NS PM PM PS PS Z NS NS Z PM PS PS Z NS NS NM PS PS PS Z NS NS NM NM PM PS Z NS NS NM NM NB PB Z NS NS NM NM NB NB Rule Matrix for Fuzzy Speed Control Membership functions: Fig. 5 : Membership function for e 69 of the fuzzy logic controller JORIND 9(2) December, 2011. ISSN 1596 – 8308. www.transcampus.org., www.ajol.info/journals/jorind Fig. 6 : Membership function for ce Fig.7: Simulink Model for the Fuzzy Logic Controller Table 1. Specification of the Permanent Brushless DC Motor PARAMETERS VALUE Armature resistance(Ra) 0.6Ω Armature inductance (La) 0.012 H Armature voltage (Va) 400 V Mechanical inertia(jm) 0.15 Kg.m2 Friction coefficient (bf) 0.008 N.m/rad/sec Back emf constant (k) 1.8 V/rad/sec Rated speed 2100 r.p.m 70 JORIND 9(2) December, 2011. ISSN 1596 – 8308. www.transcampus.org., www.ajol.info/journals/jorind Simulation results FIG. 8 OUTPUT SPEED RESPONSE WITHOUT FLC FOR DC MOTOR Fig.8. OUTPUT RESPONSE OF FLC COMPARED WITH PID FOR BLDC MOTOR In this paper, the Characteristics of permanent brushless DC motor, its steady state operation and its Conclusion 71 JORIND 9(2) December, 2011. ISSN 1596 – 8308. www.transcampus.org., www.ajol.info/journals/jorind various torque-speeds/torque-current characteristics are studied. Fuzzy logic basic definition and terminology was studied with the help of MATLAB. Due to simple formulas and computational efficiency, both triangular MFs have been used to design fuzzy Logic controllers especially in real-time implementation. The speed of a BLDC Motor has been successfully controlled by using fuzzy logic controller technique. A comprehensive analysis of brushless DC drive system has been performed by using fuzzy logic controller. Furthermore, the control algorithms, FLC and PID have been compared by using the developed model. It can be seen that the desired real speed and torque values could be reached in a short time by FLC controller, though it has slower rise time when compared with PID, its settling time is better than PID. Hong W, Lee W and Lee B.K (2007), “Dynamic Simulation of Brushless DC Motor Drives Considering Phase Commutation for Automotive Applications", Electric Machines & Drives Conference. Lee B.K and Ehsani M (2003), “Advanced Simulation Model for Brushless DC Motor Drives”, Electric Power Components and Systems Vol. 31, pp. 841–868. Lin F.J, Shyu K. K and Lin Y.S (1999), “Variable structure adaptive control for PM synchronous servo motor drive,” IEE Proc. IEE B: Elect. Power Applications, Vol. 146, pp. 173–185. Nasri M, Neezamabadi-Pour H and Malihemaghfoori (2007), “A PSO – Based Optimization of PID Controller for a linear BLDC Motor”, Proc. Of World academy of Science, Engineering and Technology Vol. 20. References Akkaya R, Kulaksız A.A and Aydogdu O (2007), “DSP implementation of a PV system with GA-MLP-NN based MPPT controller supplying BLDC motor drive”, Energy Conv. and Management Vol. 48, pp. 210-218. Pelezewski P. M and Kunz U. H (1990), “The Optimal Control of a Constrained drive System with brushless dc motor”, IEEE Trans. Ind. Electronics Vol. 37 pp 342 – 348. Cerruto E, Consoli A, Raciti A and Testa A (1995), “A Robust Adaptive Controller for PM motors drives in a Robotic Applications”, IEEE. Trans. Power Electronics Vol. 10 pp62 – 71. Safi S.K, Acarnley P.P and Jack A.G (1995), “Analysis and simulation of the high-speed torque performance of brushless DC motor drives”, Proc. of the IEE Vol. 142, pp.191–200. Cunkas M and Aydogdu O (2010), “Realization of Fuzzy Logic Controlled Brushless dc motor drives using Matlab/Simulink”, Mathematics and Computational Applications Vol. 15 No. 2 pp 218 – 229. Tipsuwanporn V, Piyarat W and Tarasantisuk C (2002), “Identification and control of brushless DC motors using on-line trained artificial neural networks,” in Proc. Power Conversion Conf., pp. 1290-1294. Figueroa J, Brocart C, Cros J and Viarouge P (2003), “Simplified simulation methods for polyphase brushless DC motors”, Mathematics and Computers in Simulation Vol.63, pp.209–224. Yedamale P (2009), “Brushless DC (BLDC) Motor Fundamentals”, Chandler, AZ: Microchip Technology, Inc.,. [Online]. Available: http://ww1.microchip.com/downloads/en/Market_Co mmunication/SOLUTIONS.pdf Hemati, N, Thorp J. S and Leu M.C (1990), “Robust nonlinear control of Brushless dc motors for directdrive robotic applications,” IEEE Trans.Ind. Electron., vol. 37, pp. 460–468. 72