Implementation of Fuzzy Tuned PID Controller Using PIC18F2520 for Speed Control of BLDC Motor

Angeti Jival Iliya Tizhe Thuku Allo Iliya Alhassan 1. Department of Electrical and Electronic Engineering, Modibbo Adama University of Technology Yola, Nigeria 2. Department of Electrical and Electronic Engineering, Modibbo Adama University of Technology Yola, Nigeria 3. Department of Electrical and Electronic Engineering, Federal Polytechnic Mubi, Adamawa state, Nigeria * E-mail of the corresponding author : angetijival@rocketmail.com Abstract


Introduction
Brushless Direct Current Motors (BLDC) are gradually taken over the usage of DC Motors [1]. Brushless, as the name implies, they have neither brushes nor commutators. These motors find application in Medical Equipment, Electric Vehicles, Air craft, Home appliances, computers, Robotics, and so on [2]. One unique feature that make BLDC motors robust over the conventional DC motors is that switching of current in the armature coil is done with the help of electronic circuit, which reduces mechanical losses and improves efficiency [3]. Whereas conventional DC motors uses brushes and commutators to performed commutation. In fact, these motors have several advantages over conventional DC motors which include: better torque versus speed characteristic, higher efficiency, better dynamic response due to low rotor inertia, lesser maintenance requirement, low electric noise and high speed range (up to 10,000 rpm) [4]. Additionally, the ratio of torque delivered to the size of the motor is higher, making it suitable in application where space and weight are critical factors.

Hardware System Description
The system shown in figure1: comprises of keyboard, Display unit, Microcontroller unit, driver's unit and BLDC motor. The candidate controller was design and implemented around PIC18F2520 microcontroller using fuzzy rule specified in the Mamdani type of fuzzy inference system. Desired speed is inputted through the keyboard, and the microcontroller displays both the desired and the actual speed on Liquid Crystal Display (LDC). Fuzzy logic block shown in Figure 1: Simply takes in the error "e" and rate of change-in-error "ec" as the input variable and makes use of the fuzzy set to modify PID parameters on-line. To get the actual speed of the motor, one of the Hall Effect Sensor embedded inside the Motor is used as a feedback to the microcontroller. With the designed fuzzy rules, the PID controller is tune online and the pulse width modulated (PWM) signals are generated based on the Hall sensor 80 inputs. The microcontroller provides the necessary gate signals for the switching of the driver unit, which in turn energies the respective windings of the three phase BLDC motor. In this case the speed regulation is achieved by varying the duty cycles. When the duty cycle of PWM reduces within the sequences, the average voltage supplied to the stator winding reduces, thus reducing the speed of the motor and when the duty cycle increases the average voltage supply increases thereby increasing the speed of the motor hence, the speed of the motor is controlled as desired.

Fuzzification
This performs the conversion of the point-wise (Crip) value of the process variable into fuzzy set in order to make it compatible with the fuzzy set representation of the process variable in the rule antecedent [6]. This conversion is based on the membership function so assigned and shown in figure 4   84

Defuzzification
This process involves the conversion of all the aggregated fuzzy set into a single Crip value corresponding to the require control action.    The driver unit is responsible for providing proper commutation sequence for the BLDC motor to run. Figure 9 show the complete driver units The candidate controller was implemented around PIC18F2520 microcontroller as shown in Figure 9. Desired speed is input through the keyboard, and the microcontroller displays both the desired and the actual speed on Liquid Crystal Display (LCD). The controller measured the actual speed and compare it against the desired value to obtain the error signal. Next, this error is processed as per the control algorithms resulting in an output signal to the driver interface. The microcontroller ports are utilized as follows: Port C connects the LCD display, while the PWM needed for speed control of the BLDC motor is generated through pin 13 (RC2/CCP1). The actual speed of the motor is sensed through port A (RA4). This serves as the feedback to the controller. The whole control unit runs on a 32MHZ internal oscillator for the execution of every instruction.

Fuzzy Tuned PID Software Flowchart
The flowchart in figure10 above present the programming algorithm of fuzzy tuned PID controller. If the desired input is captured through the keyboard, microcontroller will read both the desired and the actual speed and display it on the Liquid Crystal Display (LCD display). At the same time the controller computes the error and change in error, if the error is equal to zero and change of error is equal to zero, the controller Maintain duty cycle and return to initial condition. But if the error is not equal to zero, the controller will determine the change in PID gains using fuzzy logic and update the duty cycle, then return to the initial condition.   The implementation of this research work was carried out using hardware components, the results are presented in tables 1and 2. The shaft speed which is displayed on an LCD, is also determined separately using a tachometer.
The measured speed ranging from 500rpm to 3000rpm is compared with the desired speed on no-load. The steady state error for Fuzzy-tuned PID controller is comparatively less than that observed for conventional PID controller as can be seen clearly in table 1 and table 2.

Conclusion
In this research work fuzzy-tuned PID controller for the control of the BLDC Motor Speed was developed and implemented on a PIC18F2520 microcontroller. Experimental evaluations using different speed ranges (500rpm-3000rpm) reveals that the fuzzy-tuned PID controller offers a significantly better steady state response than that of conventional PID controller.