Research on brushless DC motor control system based on Fuzzy Adaptive PID control

Conventional PID control is often difficult to achieve ideal control effect when the actual object is nonlinear, time-varying uncertainty and strong interference. In order to make brushless DC motor have faster response speed and higher anti-interference performance, a fuzzy adaptive PID control speed and current double closed-loop system is proposed. The simulation model of BLDCM is built in Simulink and the dynamic simulation is carried out. The simulation results show that the fuzzy adaptive PID control of Brushless DC motor has better robustness, response speed and anti-interference ability than the conventional PID control.


Introduction
For the last several years brushless DC motor is widely used in UAV, household robot, industrial robot industry, especially small brushless DC motor, which needs different adaptability for different application environment [3,4]. High tolerance error performance, high reliability and high safety have become the research hotspot of BLDC motor [1].
Because of its simple algorithm and high reliability, conventional PID control is often applied in situations where linear or nonlinear controlled objects are less severe [1].Conventional PID control can be competent for brushless DC motor whose control accuracy is not high, but with the development of society, the control accuracy of Brushless DC motor is more and more high in various industries. Fuzzy adaptive PID control has improved the control accuracy, anti-interference and robustness of brushless DC motor [6].

Mathematical model of brushless DC motor
This article adopts the stator winding of three-phase symmetric Y connection in series with inductance, resistance, and power supply; The back-EMF waveform is a 120° trapezoidal wave; The armature effect and cogging effect of the motor are ignored; Then an ideal brushless DC motor model can be obtained [7].
In the above formulas, , , are the phase voltages of the stator winding; is the stator resistance; , , are the opposite electromotive forces; , , are the currents of each phase of the stator winding; is the stator self-inductance of each phase winding; is the stator mutual inductance of every two-phase winding [2].

Torque equation
The electromagnetic torque equation of the brushless DC motor is: In the formula, , , are the opposite electromotive forces; , , are the currents of each phase of the stator winding; is the electromagnetic torque of the motor; is the angular velocity of the motor rotor [2].

Mechanical motion equation
The mechanical motion equation of the brushless DC motor is: In the formula, is the electromagnetic torque of the motor; is the load torque; is the moment of inertia; is the damping coefficient; is the angular velocity of the motor rotor [2].

Design of fuzzy adaptive PID controller
Fuzzy PID control has significant advantages for time-varying and nonlinear systems. Once the three parameters , and of conventional PID control are determined, they cannot be changed. In contrast, fuzzy adaptive PID control can continuously adjust the PID parameters according to the error e and the error rate of change ec, thus achieving time-varying purposes. The control principle is shown in Figure 2.
Position and speed detection Figure 2. Fuzzy adaptive PID control system block diagram

Determination of variable universe and membership function
In this paper, M-function is used to construct the field of fuzzy control, which is more efficient than fuzzy logic designer. Gauss membership function is selected as membership function of fuzzy variable. Input fuzzy language variables of fuzzy reasoning system are and . The domain of in Δ and , and that of output variable is {-1, 1}. Since all the input variables of Δ and Δ choose the same universe and Gaussian membership function, only the membership function diagrams of input variables e of Δ and Δ are listed for reference. As shown in Figure 3 and Figure 4.

Establishing fuzzy control rule table
The correctness and accuracy of the fuzzy controller depends on the choice of fuzzy control rules [1]. The quantities in the fundamental domain are exact quantities, so the inputs and outputs of the fuzzy controller are exact quantities, but the fuzzy control algorithm requires fuzzy quantities. Therefore, the input exact quantities need to be converted to fuzzy quantities, a process called "fuzzification". To achieve fuzzification, a relationship is established between the discretized exact quantities and the fuzzy quantities that represent the fuzzy language.  The fuzzy rule table established by M function can adjust the corresponding relationship of input and output fuzzy subsets more efficiently, so that the controller can continuously output reasonable correction values according to error and error change rate in real time, so as to complete the adjustment of three PID parameters.

Establish the simulation model
The control system of BLDCM adopts double closed loop control, the speed loop adopts fuzzy adaptive PID control, and the current loop adopts current hysteresis control. The control block diagram is shown in Figure 8. The fuzzy adaptive PID controller of BLDCM is built in Simulink environment. The discretized PID algorithm equation is as follows: In this fuzzy controller, the output surface of the three parameters is adjusted by gain, and the modified parameters are output. Then the active component of the current is obtained by adding the three parameters according to formula 6. The system block diagram of fuzzy adaptive PID controller is shown in Figure 9.
The built fuzzy adaptive PID controller is encapsulated and added to the speed loop to obtain the fuzzy adaptive PID simulation control model of Brushless DC motor. As shown in Figure 10.

Analysis of simulation results
The speed loop controller of brushless DC motor is designed to regulate the speed response of the motor using PI and fuzzy adaptive PID controller respectively. The deviation of the speed and the rate of change of the deviation are used as the input of the fuzzy system, and the active component of the current is used as the output of the fuzzy system. The DC supply voltage is set to 300 V, the pulse width modulation frequency is 20 kHz, and the simulation parameters of the selected motor are shown in Table  1. The simulation time is 3S, the given speed is 200rpm in 0s-1.5s and 300rpm in 1.5s-3s. A 5N load was applied in 0s-1s and a 10N load was applied in 2s-3s. The parameter correction curve is shown in Figure 11.   From the comparison of speed response curve and torque response curve in Fig. 12-13, the overshoot of traditional PID is relatively large, and the regulation time required for stability is longer, while the overshoot of fuzzy adaptive PID control is obviously smaller, and the robustness of the whole system is better, the control precision is higher, and the regulation time is greatly shortened.
From the comparison of phase current curve and back EMF curve in Fig. 14-15, the phase current in the conventional PID control system has obvious overshoot, large fluctuation, easy to be affected by the environment, and poor robustness, while the fuzzy adaptive PID control is adopted, the current regulation speed is faster, the response curve fluctuation is smaller, and the anti-interference ability is enhanced. Therefore, fuzzy adaptive PID control has more superior control performance.

Conclusion
This paper presents a fuzzy adaptive PID control algorithm for brushless DC motor speed control system. And a more efficient method is used to construct M function to adjust the corresponding relationship of input and output fuzzy subsets. Through real-time self-adjusting control parameters, it effectively deals with the non-linearities and instabilities of its control system, improves the control performance of the system, and makes it better anti-jamming ability and robustness.