Abstract
This paper proposes a linear quadratic regulator (LQR) optimized back propagation neural network (BPNN) PI controller called LN-PI for the speed control of brushless direct current (BLDC) motor. The controller adopts BPNN to adjust the gain
Introduction
Brushless direct current (BLDC) motor has been widely used in aerospace, robotics, electric vehicles and other fields because of its advantages such as simple structure, high efficiency, low maintenance, and high dynamic response.1–3 As is known to all, there are many aspects of motor control, such as sensorless control, 4 current control, 5 torque control 6 and speed control, 2 etc. In order to achieve accurate speed and position control applications, speed regulation is an important aspect in the driving field of BLDC motor.3,7,8 With the continuous rapid development of modern power electronic technology, sensor technology, automatic control technology and manufacturing technology, it is of great practical significance and application prospects to study speed controllers of BLDC motor with fast response, strong regulation ability and high control precision. However, the complex and strong coupling non-linear characteristics make it hard to achieve good performance for speed control by using traditional control methods. Therefore, many new controllers for speed control have been proposed to enhance the performance of BLDC motor in the last few decades.2,9–12
In order to improve the transient and steady-state characteristics of BLDC motor, proportional integral derivative (PID) controllers are often the best choice for BLDC motor speed regulation. Aiming at the speed control of BLDC motor, 13 a new PI controller variable speed pre-standard value control strategy is proposed. Experiments show that the controller can accurately adjust the speed in a wide range, with low cost and good stability. In Joice et al., 14 a PI-based controller has been developed for speed control of BLDC motor, and the speed controller increased sensitivity and reduced the speed overshooting by increasing the proportional gain. However, the dependence of traditional PID on gain selection seriously affects the performance of BLDC motor, and there are various uncertainties and nonlinearities.15,16 Therefore, a variety of PID tuning methods are proposed, such as fuzzy logic,2,15 sliding mode control,11,17 genetic algorithm, 10 particle swarm optimization,7,18 gray wolf optimization algorithm, 19 etc. However, the sliding mode PID controller inevitably has the chattering problem, which leads to the system performance degradation. The initial population of the genetic algorithm PID controller is not suitable. Particle swarm optimization and gray wolf optimization tend to lead to slow convergence rate and local optimization, while the fuzzy logic PID controller has poor coarseness. The reason for non-adaptation is to extract and adjust the fuzzy rules from the input/output data without providing an online adaptive learning method 12 In addition, the PID gain tuning process is a time consuming process, so many methods have been proposed to simplify or improve the PID gain tuning process. Neural network based algorithms have reported promising results.16,20–23
Neural network based PID gain update algorithms have been successfully implemented to control a servo motor, 24 computerized numerical control machine tools 21 and so on. In Xia et al., 25 a single neuron PI controller has been developed for the control of the BLDC motor. In Premkumar and Manikandan, 23 an adaptive neuro-fuzzy inference system tuned PID speed controller has been presented for BLDC motor. The proposed controller effectively tunes the gain of the PID controller. In Premkumar and Manikandan, 26 Online fuzzy logic supervised learning of radial basis function neural network based speed controller for BLDC motor was presented. This controller receives the supervised error by comparing the Fuzzy PID supervised algorithm output and output of the controller. Based on this supervised error, the parameter of RBFNN is updated in the network. Vikas et al. proposed a neural network-based PID-like controller composed of a mixed locally recurrent neural network and contains at most three hidden nodes which form a PID-like structure. 27 The presented controller is easy to implement. But the main drawback in such strategy is in the number of parameters to be determined prior to the training which requires a priori process knowledge. Moreover, the training algorithm based on gradient descent is a time consuming process. So some methods have been proposed to optimize the process. In Kang et al., 28 the particle swarm optimization algorithm is used to initialize the weight of the adaptive PID neural network controller, and the improved gradient descent algorithm is used to adjust the parameters of the PID neural network. The disadvantage of this method is that the particle swarm optimization algorithm initializes the PID neural network for a longer time. After decades of development, the classical optimal control theory has formed a well-known Linear Quadratic Regulators that minimizes the deviation of the system state trajectory and requires minimal controller effort. 29 This typical behavior of LQR has prompted control designers to use it to adjust PID controllers.30,31 Although LQR optimized PID controller has good tracking performance and stable performance, its robustness still needs to be improved.
In view of the difficulty of determining the parameters of the neural network and the poor robustness of LQR, a new LQR optimized BP neural network PI controller which is called LN-PI is designed to achieve the speed control of BLDC motor in this paper. The main contributions of this paper are listed as follows:
BPNN is used to constantly adjust the gains of the PI controller according to the motion state of the BLDCM control system, so as to achieve the optimization of performance indexes, make the output state of the output neurons correspond to the gain values of the PI controller, which improves the dynamic characteristics and robustness of the controller.
A new LQR optimized BP neural network PI controller is proposed, which takes into account the problems of slow convergence speed and local extremes of BP neural network. LQR is used to optimize the output of BPNN so as to make it faster and closer to the optimal target PI controller gains.
The performance of LN-PI controller is evaluated through simulation and compared with conventional PI(C-PI) controller, neural network PI(NN-PI) controller and LQR optimized PI(LQR-PI) controller at different working conditions. The results show that LN-PI controller is superior to those related controllers in aspects such as overshoot, undershoot, stability time, recovery time and steady-state error.
The sensitivity of the LN-PI controller is analyzed under the operating conditions of parameter change of the inertia and the permanent magnetic flux of the BLDC motor. The stability and feasibility of the LN-PI controller are verified.
The rest of this paper is organized as follows: section “The speed controller of the BLDC motor” introduces the speed controller of BLDC motor, section “The proposed controller for BLDC motor” designs the LQR optimized BP neural network PI controller in detail, and simulation results are shown in section “Simulation results,” conclusions are outlined in section “Conclusion.”
The speed controller of the BLDC motor
Three phase star connected BLDC motor can be transformed into the circuit diagram shown in Figure 1. And the mathematical model of BLDC motor can be described by the following equation in matrix form,
where

Equivalent circuit of BLDC motor.
Based on the model of BLDC motor described in Figure 1, the speed control system for BLDC motor is presented in Figure 2.

The proposed speed control system for BLDC motor.
The system consists of three phase voltage source PWM inverter, three phase BLDC motor, LQR optimized BP neural network, conventional PI controller, switching logic and motor measurement sensors. Furthermore, two closed loops namely inner loop and outer loop are established based on the above blocks. In particularly, the outer loop is used for controlling the speed of the BLDC motor, and based on error, the LQR optimized BP neural network PI controller provides the control signal to the switching logic circuit so as to control the dc bus voltage thus by controlling the speed of the motor. The PI controller consists of proportional and derivative terms, which can be expressed as follows:
where
Where,
The proposed controller for BLDC motor
Design of BP neural network
This paper adopts a three-layer BP neural network, in which the input layer consists of 3 neurons (The number of neurons corresponds to

The structure of BP neural network.
In Figure 3,
Then the optimized PI gain can obtained
where
The optimization process of LQR
The design goal of the optimal control system is to minimize the error when the system tracks a certain command signal. The solution to this problem is:
Suppose a discrete system, its discrete equation of state is
where
Assume that under a stable and appreciable command signal
where
Suppose the system has a steady state equilibrium, which satisfies the stability of equations (12) and (13).
That is,
If a new variable with a “*” is used to indicate that the system deviates from a steady state stationary state value (disturbance), then these new variables are defined as
Substitute equations (19), (20), and (21) into equations (12) and (13) to get:
Obviously, by subtracting the steady-state relations (16) and (18) from equations (22) and (23), a new difference equation can be obtained:
And there is
A new augmentation system can be formed by equations (24) and (27),
Where
Here
where
where
Design of LN-PI Controller
BP neural network has the advantages of strong parallel processing capability, strong nonlinear mapping ability and good fault tolerance. It has been used to adjust the gain of PID controller with different structures. However, BP neural network is difficult to achieve the global optimal solution, the convergence time is short, the parameters are difficult to determine, resulting in low precision and weak convergence. Therefore, introducing LQR into BPNN reduces the control error and obtains the optimal solution.
Let BPNN input be
where
Then, the final optimized PI gain can be expressed as
Defining the Error Function of Training BPNN Weights, then the dynamic response of the controlled object can be accurately expressed by (12), the output of the BPNN network is zero (
This paper defines BPNN’s performance indicators as
where
Connection weights
Where
Calculate
In the same way,
where
The specific steps of the BPNN type PID control algorithm based on LQR optimization are shown in Figure 4:
The structure of the BPNN is selected in advance, that is, the number of input layer nodes
Sampling to obtain
Normalize
Calculate the output
Calculation of control error
The weighting coefficients
Let
Input the final control output into the BLDC motor system to achieve speed control.

The flowchart of LN-PI control algorithm.
Simulation results
The LN-PI controller is designed to further verify its speed control performance in the BLDC motor control system. The Matlab/Simulink toolbox is used to build the system model, and the controller is simulated and compared under different industrial control conditions. The simulation model of the BLDC motor control system is shown in Figure 5(a), the LN-PI controller is shown in Figure 5(b), and the specifications of the BLDC motor used in this paper like those in Ramya et al., 2 Afrasiabi and Yazdi 11 and Hu et al. 32 are given in Table 1.

The MATLAB/Simulink model of speed control for BLDC motor: (a) the model of BLDC motor control system and (b) the model of LN-PI controller.
Specifications of BLDC motor drive.
The input speed of a given BLDC motor is 2500 rpm, the number of BP neural network nodes is 3–6–2, and the initial weight is [−0.5, 0.5]. The weight is dynamically adjusted online with the system, and the learning rate is
KP/KI experimental parameters.
Firstly, the tests are performed under the condition of no load. The comparison of speed response and current response is shown in Figures 6 and 7 respectively, and the performance indexes are given in Table 3.

Comparison of speed response with no load.

Comparison of current response with no load.
The performance indexes under the condition of no load.
As can be seen from Figure 6 and Table 3, the overshoot and undershoot of the C-PI controller are up to 314.46 and 90.86 rpm, while the LQR-PI undershoot is at least 3.07 rpm, The LN-PI controller has a minimum of 10.98 rpm. In the steady state process, the settling time of the C-PI controller is up to 0.081 s and the steady state error is the largest. The NN-PI and LQR-PI controllers are medium in terms of both stability time and steady state error. Horizontally, the LN-PI controller has a minimum convergence time of 0.015 s and a minimum steady state error. In addition, seen from Figure 7, the oscillation phenomena of C-PI and NN-PI are obvious and have a long duration, and LQR-PI and LN-PI have a fast stable speed. Overall, the performance of LN-PI controller is the best, which has the characteristics of fast response, small steady-state error and strong robustness.
Secondly, for the actual BLDC motor system, there will always be sudden external disturbances that are difficult to control. In the research of control algorithms, the robustness of the system is also an important indicator to judge the advantages and disadvantages of the control strategy, and has good anti-interference performance. The control strategy is what is needed in actual engineering control. In order to study the control effect of the anti-interference performance of these four control algorithms, 3 N external force interference is added to the system at 0.2 s. The comparison of speed response and current response is shown in Figures 8 and 9 respectively, and the performance indexes are given in Table 4.

Comparison of speed response under varying load condition.

Comparison of current response under varying load condition.
The performance indexes under the condition of varying load condition.
It can be seen from Figure 8 and Table 4 that when the system suddenly increases the external force interference in 0.2 s, the four controllers generate the volatility response, and overshoot/undershoot occurs in the C-PI, NN-PI and LQR-PI controllers. Obviously, the fluctuation of LN-PI is the smallest, the recovery time of the LN-PI controller is as short as 0.032 s, and the steady-state error is at least 0.41 rpm. It can be seen from Figure 9 that the oscillations of the C-PI, NN-PI, and LQR-PI controllers are obvious. Although the LN-PI controller has a higher oscillation amplitude, it can quickly restore the stability effect. Therefore, it is proved that the LN-PI controller has the best robustness and good anti-interference ability.
Thirdly, in the actual working process, BLDC often needs to set different speeds to meet the needs of actual work. In order to study the speed control transition process, the simulation study of follow-up control by setting different speeds mainly studies the control effect of the transition process in which the set value changes. The control effects of these four control algorithms are compared mainly from the aspects of transient response speed, stability control accuracy and transient oscillation. The simulated target speed changes from 2500 to 1500 rpm and then to 2500 rpm. The comparison of speed response and current response is shown in Figures 10 and 11 respectively, and the performance indexes are given in Table 5.

Comparison of speed response under varying set speed condition.

Comparison of current response under varying set speed condition.
The performance indexes for varying set speed condition.
It can be seen from Figure 10 and Table 5 that when the speed of 0.2 and 0.4 s changes, the response speed of the LN-PI controller is the fastest, taking 0.2 s as an example. The fluctuation of the C-PI controller is the largest. The overshooting and undershoot are 76.53 and 289.11 rpm, the LQR-PI controller has a minimum overshoot of 4.22 rpm, the LN-PI controller has a minimum undershoot of 18.63 rpm, and the LN-PI controller has the fastest recovery time. The value is 0.031 s and the steady state error is 0.40 rpm. Furthermore, it can also be seen from Figure 11 that when the speed changes, the current response oscillation time of the LN-PI controller is the shortest. Overall, the LN-PI controller has the best tracking performance when speed changes.
Under the above three operating conditions, the LN-PI controller is superior to other controllers. Next, the sensitivity of the LN-PI controller is analyzed under the operating conditions of parameter change of the inertia and the permanent magnetic flux of the BLDC motor. The inertia varies from 100%, 200%,300%, and 400% of the nominal inertia. The permanent magnetic flux varies from 50%, 100%, 150%, and 200% of the nominal. The sensitivity of the LN-PI controller is shown in Figure 12. It can be seen from the figure that, with the change of inertia, the speed response of BLDC motor is only affected by parameters such as overshoot and undershoot, but will not affect the final system output. When the permanent magnet flux changes, the speed response of BLDC motor is only affected by the steady state error, and the other parameters do not affect the system output. In addition, the variation of parameters such as overshoot and undershoot and steady-state error is not greater than 0.4% of nominal value. From the sensitivity analysis, the LN-PI controller is a suitable controller for wide operating conditions of the BLDC motor.

Sensitivity analysis of the LN-PI controller in high speed region with change in (a) inertia and (b) permanent magnet flux.
Conclusion
A LQR optimized BP neural network PI controller is proposed for speed control of brushless dc motor. BP neural network is adopted to adjust the gains of PID controller, and LQR is adopted to optimize the output of BPNN. The whole control system is established and simulated by MATLAB/Simulink, and the effectiveness of the controller is tested under the conditions of no load, with load and variable speed. The performance is compared with C-PI, NN-PI and LQR-PI controllers. Under no load conditions, LN-PI controller is proved to have the minimum overshoot, the shortest settling time and the minimum steady-state error of speed response whose values are 10.98 rpm, 0.015 s, 0.32 rpm, respectively. Compared with C-PI, NN-PI and LQR-PI, the settling time of LN-PI is increased by 81.48%, 73.68%, 64.29%, and the steady-state error is reduced by 68.93%, 63.22%, 31.91%. Under conditions with load, LN-PI controller has the minimum peak undershoot 24.81 rpm, the shortest recovery time 0.032 s, the minimum steady-state error 0.41 rpm. Compared with C-PI, NN-PI and LQR-PI, the recovery time of LN-PI is increased by 54.93%, 51.52%, 39.62%, and the steady-state error is reduced by 66.39%, 48.10%, 36.92%. Under different set speed conditions, LN-PI controller has the shortest recovery time and the minimum steady-state error compared with other controllers. Therefore, LN-PI controller is superior to other controllers under various working conditions of BLDC motor. Moreover, the sensitivity of LN-PI controller is analyzed under the condition of inertia and permanent magnetic flux parameters of BLDC motor, and the stability and feasibility of the control method are verified.
Footnotes
Handling Editor: James Baldwin
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work supported by Capital construction funds in the provincial budget of Jilin development and reform commission in 2019 (grant no 2019C054-4); National nature fund project (grant no 61803044); Science and technology development project of Jilin Province (grant no 20190802005ZG); Science and technology plan project of Jilin Province (20200201009JC).
