PID optimal control to reduce energy consumption in DC-drive system

Received May 9, 2020 Revised Jun 10, 2020 Accepted Jul 9, 2020 The control system that is widely used in industry is PID (Proportional Integral Derivative). Almost 90% of industries still use PID control systems because of its simplicity, applicability, and reliability. However, the weakness of PID is that it takes a long time to tune. PID control with good performance and low energy consumption can be achieved using GA tuning with the appropriate objective function. The contribution of this paper is to propose the implementation of LQR control in the form of PID using GA tuning with LQR objective function. The proposed algorithm was implemented both in the simulation and hardware which is a mini conveyor with a DC motor. The result shows that the proposed algorithm is better in both IAE and energy consumption compared with other PID tuning, Ziegler–Nichols (ZN), and GA with IAE objective function. Compared with PID ZN, it has IAE and energy reduction by 2.76% and 16.07% respectively. Although its performance is lower than the LQR, it has other advantages that use fewer sensors. The other advantage of the proposed method is, PID is more familiar using. Therefore, it easy to be implemented in the existing system without a lot of changes.


INTRODUCTION
One technology to support production speed is electric motors with high performance, efficiency, speed dynamics, and good load response. There are two kinds of electric motor which are AC and DC motor. DC motor has some advantages such as easy to control the speed or position and wide adjustable range [1][2]. However, it also has some drawbacks, one of them is, it uses mechanical commutator (brush) which cause high maintenance cost [3]. DC motors are widely used as in steel rolling mills, electric trains, electric vehicles, and robotics actuators [4]. Since energy is an important issue today, and according to [5], the electric motor is one of the appliances that consume considerable energy, the control method which can reduce energy consumption with better performance is needed.
The speed control of the DC motor is generally obtained by changing its terminal voltage [6]. PID control is one of the well-known algorithms for speed control. Based on [7,8], almost 90% of industries use PID control because of its simplicity, applicability, and reliability. However, the weakness of PID is that it takes a long time to tune [9,10]. Several methods of tuning PID controls have been proposed. This tuning method can be categorized into i) empirical methods such as Ziegler-Nichols (ZN) and Cohen-Coon (CC), ii) Int J Pow Elec & Dri Syst ISSN: 2088-8694  PID optimal control to reduce energy consumption in DC-drive system (Hari Maghfiroh) 2165 analytical methods such as root locus (RL) and frequency response (FR), and iii) optimization methods such as using Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Ant Colony Optimization (ACO) [8,10,11]. The empiric method is easy to apply, but the results are not very good. Analytical methods can be used to improve some specific parameters of the system such as stability, rising time and steady-state errors. While the optimization method is now widely used because of its ability in terms of optimization as in [12] and [13]. Comparative studies on the use of optimization methods for PID tuning have been carried out by [14]. ArtificiaI Intelligent (AI) methods used are GA, PSO, ACO and Evolutionary Programming (EP), while the parameters compared are settling time, rise time, and overshoot. Based on the three models used, GA excels in all parts except at the settling time in one model. The use of GA for PID tuning has been done as in [15,16], and [17]. However, all these studies use cost functions related to performance such as IAE (Integral of Absolute Magnitude of Error) and ITAE (Integral of Time multiplied by the Absolute Error). In [18] some performance objective functions are compared which is MSE (Mean of the Square Error), ITAE, IAE, ISE (Integral of the Square Error) and ITSE (Integral of Time multiplied by the Square Error). The comparison results from overshoot and settling time are shown that the IAE objective function gives the lowest overshoot (OS), while ITAE gives the smallest settling time. In [19], IAE, ISE, and MSE objective function also compared. The result shows that IAE has lower over-shoot and ISE has the lowest settling time.
Some researchers also propose the combination of some objective function to improve the result of GA optimizing PID control. Arturo [10] combines ISE, OS, and MSE as an objective function with the weighting value to enhance corresponding performance criteria. While [20] proposes the objective functions, which are the combination of IAE, rise time and controller output. However, they did not explain the effect of controller output in the objective function affect the energy used by the controller. It only compares the performance between GA and simplex method in PID tuning. Zahir et al. [21] proposed the modified objective function which adding overshoot, steady-state error, settling time, and rise time into ITAE, IAE, ISE, and ITSE. They conclude that the modified objective function gives improvement to the controller performance.
PID control with good performance and low energy consumption can be achieved using GA tuning with the appropriate objective function. In [22] LQR objective function as GA objective function to tune the PID controller is proposed. LQR is one of the optimal controls which can be used to reduce energy consumption by adjusting a cost function [23]. However, [22], did not give a clear analysis of the energy. Therefore, in this research, the LQR objective function to tune the PID via GA will be performed in real hardware to prove its ability to control both performance and energy. The proposed algorithm will be tested in a mini conveyor driven by a DC motor. The contribution of this paper is to propose the implementation of LQR control in the form of PID with GA tuning using LQR objective function. The advantages of this method are it uses fewer sensors compared with the original LQR method which uses sensors as many as the state in the system model. Furthermore, the proposed algorithm is simpler compared with Linear Quadratic Gaussian (LQG) which can eliminate some or all sensors in LQR and replace them by an observer.

RESEARCH METHOD 2.1. System Design
The system used in this study is a mini conveyor with a DC motor. The DC motor used has a 12V 5.5A specification with a maximum speed of 250 rpm and a maximum torque of 10.6 kg/cm. Figure 1 shows the mini conveyor used. The system model is obtained by taking motor input and output data in the form of voltage and speed using a data logger. Using this data, the transfer function of the system is derived using MATLAB System Identification. The transfer function of the system is shown in (1). The control algorithm is tested in MATLAB/ Simulink before implemented in the real hardware system.

PID Tuning and Optimal Control 2.2.1. Ziegler Nichols Method
Ziegler Nichols's method is divided into two ways: curve reaction that done in open loop and ultimate cycle which done in close loop. The first method, parameters are rather difficult to estimate in noisy environments, while the second one, can be quite detrimental to the system because not all of the systems can tolerate sustaining oscillation conditions [24]. In this research, the second method is used which done in simulation. PID formula is shown in (2). The ultimate cycle is based on increase Kp from 0 to critical gain value (Kcr) in which the output exhibits sustained oscillation when Ti = ∞ and Td = 0. The Kcr and the corresponding period (Pcr) then used to calculate PID gain using the formula in Table 1.

Genetic Algorithm Method
The genetic algorithm (GA) is a robust optimization technique base on Darwin's principle of natural selection [26]. The basic goal of GA is to optimize the fitness function. This method is introduced by John Holland at the University of Michigan in 1970. According to [27] GA has the following advantages: a. It is a simple algorithm that is easily understood and implemented b. The algorithm is robust c. GA is a non-linear process that could be applied to most industrial processes with good results d. GA search a population of points instead of a single solution e. GA does not need information about the system except for the fitness function. Figure 2 shows the flow chart to implementing GA. Starting from initializing population which is a set of solutions represented by chromosome. In this step, the population is generated randomly. The second step is evaluating the fitness base on the objective function. In a control system, there are many objective functions used as shown in Table 2 [18]. The third step is evaluating the termination criteria. If the termination criteria are satisfied the output is the optimal solution. On the other hand, the genetic operation will be performed which is reproduction, crossover, and mutation [28]. Reproduction is simply retaining a fit string in the following generation, crossover involves swapping partial string of random length between twoparent strings, and mutation involves flipping a random bit in the string. Repeat to the second step until termination criteria are satisfied.

Optimal Control
LQR is one of the optimal control techniques which consider the states of the system and control input to make optimal control decisions. According to [29], this method is simple and robust. Suppose the state equation of the system is: The state feedback control is U(t) = -KLQR X(t), where KLQR is derived from the minimization of cost function as shown in (4).
The matrices Q and R determine the relative importance of the error and the expenditure of energy [30]. Therefore, the trade-off between performance and energy used can be set by choosing an appropriate element of matrices Q and R. The block diagram of LQR control is shown in Figure 3.

PID Optimal Control
The proposed method is PID tuned by GA using the LQR cost function. This algorithm is combining the advantage of PID, GA, and LQR to eliminate the disadvantage of each of them and to increase the performance with low energy consumption. PID is simple and easy to be implemented, GA has the powerful searching capability to optimize the objective function, while LQR is the optimal control method which well performed with controlled energy consumption. In [22] LQR objective function as GA objective function to tune the PID controller is used. However, the analysis of performance and energy is not explained. Figure 4 is the diagram of the proposed method which using LQR objective function in the GA to offline tune the PID. Offline tuning is chosen because it is simpler and can be implemented in low-cost hardware compare with online tuning. The tuning process can be done in a powerful computer to get fast results, then the PID parameter value implemented in real hardware. proposed algorithm is PID tuned by GA with LQR objective function named as PID GA LQR. Both performance and energy consumption are compared by using IAE and total energy consumption, respectively. Before implemented in real hardware, the algorithm is simulated using MATLAB Simulink. After a good result is founded in the simulation stage, the algorithms are tested in real hardware. Two condition testing is carried out which are step responses and speed variation. The controller parameters value shown in Table 3. The value of Q and R matrix is the same for PID GA LQR and LQR. In this test, the tolerance of ± 2% is used.

Step responses
Step responses are the basic testing to know the performance of the controller including settling time and overshoot. Two other parameters which are IAE and total energy consumption also included for comparison. Figure 5 shows the step response of the system with a different controller. Figure 5 (a) is the speed profile which shown that PID ZN, PID GA LQR, and PID GA IAE have nearly the same rise time but the second method has lower overshoot without undershooting. From the settling time parameter, the proposed method has the lowest settling time. While PID GA IAE is faster than PID ZN.
Step responses of the PID method with three different tuning methods shown that the GA LQR tuning method has the best performance in terms of settling time and overshoot. The last method, optimal control using LQR, has the best performance compared with three other methods. In terms of IAE, it has the same result as settling time and overshoot parameter which is LQR has the lowest IAE. While the proposed algorithm is in second place after LQR which better among two other PID tuning methods, as shown in Figure 5  2169 the lowest energy consumption. In the beginning, LQR has the lowest energy consumption. However, when time increase, its energy consumption also increases. This is due to integral control which added in the LQR method to eliminate the steady-state error. Table 4 shows the detailed result which resumes of step response parameters. There also%IAE and%Energy which are the comparative between four methods with PID ZN as the base. Therefore, the value of%IAE and%Energy is 100% for PID ZN. It is clearly seen that the proposed method is in the second place of%IAE with lower by 17. 54% compared with PID ZN. In terms of energy, it stands in the lowest energy consumption with 4.71% and 1.12% lower compared with PID ZN and LQR respectively.
After the simulation test, the algorithm is implemented in real hardware. The controller parameter is the same as the simulation test without fine-tuning. Figure 6 shows the hardware step responses. Figure 6 (a) is the speed profile. It shows that all the algorithm performs well except PID GA IAE which oscillate around the set point. This is due to the higher value of PID parameters and fine-tuning did not apply. The other method can perform well and track the setpoint with the same settling time which is 8 s. However, the PID ZN method has a 4% overshoot. Whilst, the proposed method has the same performance as LQR.
In terms of IAE, LQR has the lowest IAE, the same result as the simulation test. While the proposed method has IAE higher by 6.43% and lower by 1.76% compared with LQR and PID ZN respectively. In terms of energy consumption, LQR is in the first place. The integral control added in LQR has a small effect on the hardware. PID GA LQR is in second place in both IAE and energy parameters. It has lower IAE and energy compared with PID ZN by 1.76% and 15.65% respectively. PID GA IAE has the higher IAE because its speeds response has oscillated while its energy is lower than PID ZN since when its speed below the set point it consumes lower energy. Table 5 resumes the results of the hardware implementation of step responses.

Speed Variation Responses
Finally, the last test is the speed variation. In this test, the speed reference is varied from 100 rpm to 120 rpm then to 80 rpm. Figure 7 is showing the system response which is speed profile, IAE profile, and energy profile. Speed profile shows nearly the same result with step response which PID GA IAE oscillates around speed reference. The other three methods can track the speed variation well. In terms of IAE, Figure 7 (b), PID GA IAE has a higher IAE because the speed response is oscillating. LQR has the lowest IAE, then followed by PID GA LQR, and PID ZN. In energy consumption, Figure 7 (c), it is seen that LQR has the lowest energy consumption, while the proposed method is in second place better than PID GA IAE and PID ZN. The quantitative result of IAE and energy is in Table 6. PID ZN as the base comparison. LQR is superior which has the lowest both IAE and energy consumption. The proposed method is in second place after LQR both in IAE and energy consumption. Comparing LQR and PID GA LQR, the second one has advantages which are only used one sensor in this case, while LQR using two sensors for every state which is speed sensor and current sensor. The other advantages of the proposed method are, PID is more familiar using. Therefore, it easy to be implemented in the existing system without a lot of changes. The trade-off between performance and energy can be adjusted by setting weighted value in objective function corresponding with matrix Q dan R in the LQR method.  Table 7. Resume of IAE and energy reduction of PID GA LQR compare with PID ZN Data source % IAE reduction % Energy reduction Table 5 1.76 15.65 Table 6 3.75 16.49 Average 2.76 16.07

CONCLUSION
The proposed algorithm is simple and easy to be implemented since it bases on a well-known algorithm, PID. It was successfully implemented both in the simulation and hardware systems. The test was carried out with two schemes which are step responses and speed variation responses. The result shows that the proposed algorithm is better in both IAE and energy consumption compared with other PID tuning methods which are Ziegler -Nichols, and GA with IAE objective function. Compared with PID ZN, it has IAE and energy reduction by 2.76% and 16.07% respectively. Although its performance is lower than the LQR, it has other advantages that use fewer sensors, while LQR uses sensors for every state. The other advantage of the proposed method is, PID is more familiar using. Therefore, it easy to be implemented in the existing system without a lot of changes.