The linear quadratic regular algorithm-based control system of the direct current motor

Received Oct 10, 2018 Revised Jan 26, 2019 Accepted Mar 2, 2019 This research aims to propose an optimal controller for controlling the speed of the Direct Current (DC) motor. Based on the mathematical equations of DC Motor, the author builds the equations of the state space model and builds the linear quadratic regulator (LQR) controller to minimize the error between the set speed and the response speed of DC motor. The results of the proposed controller are compared with the traditional controllers as the PID, the feed-forward controller. The simulation results show that the quality of the control system in the case of LQR controller is much higher than the traditional controllers. The response speed always follows the set speed with the short conversion time, there isn't overshoot. The response speed is almost unaffected when the torque impact on the shaft is changed.


INTRODUCTION
The DC motor is a traditional electric motor. In comparison to the other electric motor such as brushless DC motors [1][2][3], induction machine [4][5][6], the DC motor has the intrinsic advantages such as the ease of maintenance, the large electromagnetic torque, the simple control structure and the adjust ability of the speed in a wide range. Thus, the DC motor is still very popular in the application of industrial areas required the high-quality motion, such as mining, transportation, steel rolling, etc. So, it is very important to enhance the performance of the DC motor control system. There are many studies on the DC motor control such as [7][8][9][10]. Most of these studies use a simple controller such as Proportional-Integral-Derivative (PID) controllers. The advantage of the PID control is a simple structure, but the drawback is that the quality of the control system is not high. The research [11] have proposed a solution to control the DC motor that has achieved high-quality, it is the control method based on the flatness principle, but the limitation of this method is that the control algorithm is complex.
To overcome all the limitations of the previous method, in this study, the author proposes a solution to build a control system based on the linear quadratic regulator controller. The control algorithm is simple and the quality is optimized. By using LQR controller, the deviation of the DC Motor speed can be minimized, and the response speed is not changed when the disturbance such as shaft torque is changed.
The LQR control method is used to control a lot of objects in practice as two-wheels self-balancing mobile robot [12][13][14], converter [15][16][17], quad-rotor [18][19][20], wind power generator [21,22]. The Linear Quadratic Regulator method is setting the controller by using a mathematical algorithm to minimize the cost function with weighting factors defined by the designer. The cost-function is often defined as a sum of the deviations of response output and their desired values [23,24].
The requirement of the control system is to find the control signal ) (t u in order for the control object from the initial state and satisfy the following condition (cost functional): Where Q and M are the symmetric, positive semi-definite weight matrix. R is the symmetric, positive definite weight matrix.
To solve the problem, we establish the Hamilton function: The optimal experiment is the solution of the following equations: -The state equation: -The equilibrium equation: -The optimal condition: From equation (6), we have: Combining (8) and (5) we have: Solving the above equations, we have the optimal control signal: is the positive semi-definite solution of the Riccati equation: In the case of the infinite time ∞, the cost function is as follows: The optimal control signal: (14) (K and P do not depend on the time)

THE DIAGRAM AND THE EQUTIONS OF THE DC MOTOR
The diagram of a separately excited DC Motor is presented as Figure 1 [25] it includes: -The field windings are in the stator, they are used to excite the field flux.
-The armature coils are on the rotor, they are supplied current via brush and the commutator.
Where a V is the armature voltage, which is fed into the armature coil; a a L R , is the armature resistance and inductance, E is the electromotive.

771
Where ω is the speed of the rotor, KE is the coefficient of voltage, f i is the winding field current, af L is the field armature mutual inductance.
-The motion equation: Where J is the inertia, e T is the electromechanical torque, L T is the torque which impact to the shaft, m B is the coefficient of the viscous friction, f T is the coulomb friction torque.
-The electromechanical torque equation: Where T K is the coefficient of the torque.
Based on the equations of the DC Motor, we build the model diagram of DC Motor as shown in Figure 2. The parameters of the DC Motor in this study are shown in Table 1.   The mission of the system is to control the speed of the DC motor following the desired value. It also minimizes the change in speed when changing the torque impacted on the shaft of the DC Motor. In this study, the author proposes an optimal controller LQR to control the response speed following the set speed with the shortest conversion time.

BUILDING THE CONTROL SYSTEM FOR THE DC MOTOR 4.1. The PI controller and feed-forward controller
Based on the dependence of the Motor speed on the armature voltage and the shaft torque, the author built and tested the traditional controllers for DC motors as a basis for comparison with LQR controllers. The first controller is a Feed-forward controller with the gain coefficient K=2.14. The second controller is the PI controller, the control system model shown in Figure 4. The parameters of the PI controller are determined experimentally. We define the appropriate parameters in order that the quality of the control system is good. Finally, the PI controller parameters are defined as follows: Kp=1, Kp=5 Running the system in two cases of the controller (PI and Feed-forward), the simulation result is shown as Figure 5. The simulation results show that the Feed-forward controller has met the control requirement. The response speed of the DC motor has been following the set speed. However, the quality of control system is low. In particular, the response speed of the DC Motor is not maintained when changing the torque impacted on the shaft. This will have a very negative effect when applying in the electric motion of the production process. In the case of the PI controller, the control quality has been improved a lot. The response speed has been followed the set speed with the short transition time, and it is maintained when changing the torque impacted on the shaft. However, the limitations are that there is the overshot, and there is oscillation before the response speed is stable.
Thus, the author proposes an optimal controller (LQR) to address these limitations and improve the quality of the control system.

The optimal LQR controller
From the equations of DC Motors, changing into the state equations with the state variables that are the armature current and the rotor speed: To increase the efficiency of the control process, we add the state variable ) / ( s  to the state equations: In the above state equations, the state variables are We design the control signal Named e x is the error between response x and set x . The state equation (20) is rewritten as follows: In order for the response speed following the set speed with the short transition time, we define the optimal control signal LQR to minimize the goal function: The optimal control signal: The control system diagram is shown in Figure 6.

RESULTS AND ANALYSIS
We run the simulation model in the following cases: the Feed-forward controller, PI Controller, optimal LQR controller. The simulation results are shown in Figure 7.
The simulation results show that the quality of the control system in the case of using the optimal controller LQR is extremely better than that of the Feed-forward controller and the PI controller. In the case of the system with LQR controller, the response speed always follows to the set speed with a very short transition time, there is not overshot.
When changing the disturbance (shaft torque), the speed in case the Feed-forward controller is changed and is unrecoverable, the speed in the case of PI controller is changed and oscillated, after a time of about 4 s, the response speed is restored. Especially in the case of the LQR controller, the response speed is almost unaffected by the change of the shaft torque. To more clearly show the different qualities in the different cases, the simulation results are zoom and shown in Figure 8.

CONCLUSION
In this study, the author has succeeded in building the optimal controller LQR for the DC Motor. The control quality of the proposed controller LQR is compared with the traditional controllers. The simulation results show that the system with LQR controller offers superior quality compared to traditional controllers. The response speed always follows to the set speed with a very short transition time. The response speed is almost unaffected when changing the shaft torque. Finally, the proposed controller has very simple control algorithms, but the quality is optimal. This is a good basis for applying control algorithm to electric motion using the DC Motor.