Effects of objective function in PID controller design for an AVR system

Regulation capability of an automatic voltage regulator (AVR) system still needs to be improved to keep the output voltage of the generator within the AVR system at the desired level. Researchers have been developing new control structures and designing controllers to improve the performance of the AVR system. Designing of PID controller, which is commonly preferred controller due to its simple structure and robustness against to system parameter changes, has an important place among these studies. Especially with the development of metaheuristic algorithms, more successful PID controller designs are emerging by using these algorithms than traditional design methods. Undoubtedly, the objective function utilized also has a significant effect on this success. Therefore, effects of the objective function in PID controller design process for an AVR system are examined in this study. Two different PID controllers are designed using two different metaheuristic algorithms, namely, crow search algorithm (CSA) and ant colony optimization (ACO) algorithm. The parameters of the PID controllers are optimally tuned by using five different objective functions in both algorithms. These objective functions are: Integral of absolute error (IAE), integral of squared error (ISE), integral of time-weighted absolute error (ITAE), integral of time-weighted squared error (ITSE), and a commonly used user-defined objective function. The performance of the designed PID controllers are compared in terms of transient response characteristics and performance metrics. In addition, in order to evaluate the stability of the AVR system with the designed controllers, bode analysis, pole-zero map analysis and robustness analysis are performed.


Introduction
Terminal voltage of a synchronous generator is affected by reactive power load changes [1]. Automatic voltage regulators (AVRs) eliminate irregularities in terminal voltage, such as voltage rise and voltage drop. In this way, an AVR keeps the voltage magnitude in the power line at a specified level. The inductive properties of the field windings and the reactive power load on the generator make it difficult to get a fast and stable voltage response from the system [2], [3]. Therefore, controllers are employed within the AVR systems to obtain satisfactory terminal voltage. Although there are different controllers in the AVR system control, the PID controller is the most preferred controller. Obtaining optimum values of the PID controller parameters has been a difficult problem [4]. In order to solve this problem, methods such as Ziegler-Nichols [5] and Cohen-Coon [6] were presented. However, such methods are difficult to find the desired optimum parameters [7]. Moreover, in most studies trial and error approach is utilized to tune the parameters of the PID controller. Therefore, in recent years, several optimization algorithms have been employed to determine the PID controller parameters in the AVR system. Ant colony optimization (ACO) algorithm is a metaheuristic optimization technique developed by Durigo [8][9]. ACO algorithm was mostly used for the solution of traveling salesmen and quadratic assignment problems. Later, it was used in controller design problems considering defined objective functions.
Ruchita et al. [10] studied on AVR system using the ACO algorithm. They compared performance of the ACO algorithm with other optimization algorithms via transient response of the system. Babu et al. [11] also worked on ACO algorithm and included transient response and robustness analysis in their studies. Blondin et al. [12] combined ACO algorithm and Nelder -Mead method to investigate transient response, robustness analysis and close loop characteristics of the system. In study of Anantwar et al. [13], they examined transient response of the AVR system and compared it with genetic algorithm (GA).
Crow search algorithm (CSA) is a population-based algorithm developed by Askarzadeh in 2016 [14]. In the literature, there are studies using the CSA algorithm in the control of AVR system. Ballgobin et al. [15] studied transient response of the system by comparing the performance of CSA and several optimization algorithms. Bhullar et al. [16] compared the performance of CSA and enhanced CSA (ECSA) utilized in controller design process for an AVR system. Transient response and robustness analysis of the AVR system were considered in the study. In addition, they examined ECSA-PID and CSA-PID for load disturbance rejection capability and noise suppression ability.
The objective function selection is an important issue to improve transient response of an AVR system. In order to obtain optimal PID controller parameters, several performance metrics have been proposed in the literature. The commonly used ones are integral of absolute error (IAE), integral of squared error (ISE), integral of timeweighted absolute error (ITAE), integral of time-weighted squared error (ITSE) [17]. In addition, user-defined objective functions are also proposed in the literature. An example of user-defined objective function was proposed by Gaing [4].
It is expected from both ACO and CSA algorithms that they evaluate the values returned by the mentioned performance metrics and reach optimal PID parameters within their capabilities. In this study, the behavior of the AVR system with the change of PID parameters is examined in terms of performance metrics. Transient response analysis, bode analysis, pole-zero map analysis and robustness analysis are performed to compare performance metrics.

AVR System Model
An AVR system consists essentially of four units: amplifier, exciter, generator and measuring (Sensor) units. Each of these units is represented by first-order transfer functions as shown in Figure 1. The input signal generated by the controller is applied to the amplifier unit. In this unit, the signal is strong enough to excite windings of the generator on the rotor. The exciter unit represents the excitation circuit of the generator. The voltage applied to the exciter unit generates voltage at the generator terminal. The generator output is measured by the voltage sensor to generate the signal. The signal is compared to the reference value , and the resulting error signal is applied to the controller as input. Thus, the terminal voltage of a synchronous generator is kept constant at the desired reference value by means of closed loop structure. There are three parameters required to be set in the transfer function of a PID controller: proportional gain ( ), integral gain ( ), and derivative gain ( ). These parameters can be decided by using some techniques such as trial-error, Ziegler-Nichols, Cohen-Coon and heuristic optimization.

Interval of Parameters
In this report The transfer function of the closed loop AVR system with PID controller is given in Equation 1.
Transient response of the AVR system without controller is given in Figure 2. As can be seen from the (1) figure, the overshoot value is very high. Moreover, settling time value is very long and there is a steady state error at the output of the system. Hence, it is necessary to improve the system's transient responses [18].

PID Controller Design for an AVR System
In this study, optimization algorithms are used to obtain optimum values of PID controller parameters, i.e. , and . Both CSA and ACO algorithms are employed to minimize error signal, which is calculated as the difference of reference and measured output signal, in the system depending on the defined objective function. Figure 3 shows block diagram of the PID controller optimization process.  In this study, IAE, ITAE, ISE and ITSE are used as the objective function. In addition, a user-defined objective function W(k) proposed by Gaing [4] is also utilized to make comparison. Description of these performance metrics is given in Section 3.1.

Performance Metrics
Increasing the performance of a controller is about how much it improves transient response as well. Transient response characteristics such as settling time ( ), rise time ( ), steady state error ( ) and maximum overshoot ( ) are required to be improved by minimizing the error [19]. An error signal e(t) can be defined as the difference between the reference signal r(t) and the output signal y(t): Mathematical expressions of performance metrics based on error are as follows: A performance metric can be determined to emphasize the important specifications of a system [20]. Therefore, the performance metric can be calculated depending on the error directly or it can be calculated with the parameters (i.e. , , , ) determining the transient response. In this regard, the equation of the performance metric proposed by Gaing [4] is given as: where k is [ , , ], and β is the weighting factor. β is set to 1 in the paper [4].

Heuristic Optimization Algorithms
The heuristic optimization algorithms are the method of finding the optimum solution in the possible solutions that are desired to be obtained for a specific problem. Heuristic algorithms are problem solving methods inspired by nature, behavior of animals and herd intelligence. These algorithms may not always provide the optimal solution, but good results can be achieved in a reasonable time. In this study, Ant Colony Optimization and Crow Search Algorithm were used.

Ant Colony Optimization
Ant Colony Optimization is a metaheuristic algorithm that is inspired by the cooperation of ants. It was included in the literature as a Phd thesis by Marco Durigo in 1990 [8], [9]. Ants have a communication ability that exists amongst themselves to meet the food needs of their colonies. This communication ability is between ants looking for food and ants who find food. According to this relationship, ants that detect the food source leave a chemical called pheromone on their road back to home. In this way, the pheromone concentration increases on the road from the nest to the food and ants coming out of the nest can identify the path with the food more easily.
An ant moves from node i to j with the probability of: where k is the tour, indicates the amount of pheromone in the road (i, j), α is a parameter that controls the effect of τ, indicating the desirability of the road and β is a parameter that controls the effect of η.
The value is calculated as follows: The amount of pheromone on the road is calculated as: where is evaporation rate of pheromone and is the number of pheromones on the kth tour.
The value is calculated as follows: where is the cost value ( (. ) ) on th tour. A pseudocode describing the Ant Colony Optimization algorithm is given in Figure 4.

Ant Colony Optimization Algorithm
Put all possible solutions in n nodes Create the initial pheromone of n nodes Calculate the value of n nodes. while ≤ for = 1 ∶ for = 1 ∶ Calculate the probability with (8).
Choose node j based on probability.

Crow Search Algorithm
The Crow search algorithm is a metaheuristic algorithm discovered by Askarzadeh and was developed based on the clever behavior of Crows [14]. Crows keep their food and do not forget where they have stored, even after a long time. When they want to access these foods, they try to trick them because they are followed by other crows. For this reason, crow search algorithm is based on protecting the hiding places and locating another crow's hiding place [16]. In the crow search algorithm, crows correspond to seekers (i.e. slaves), their positions correspond to a feasible solution and the quality of privacy where the crow hides food also corresponds to the objective function [14]. A pseudocode describing the Crow search algorithm is given in Figure 5. The mathematical expressions of this algorithm are also included in Figure 5. In Table 2, the indexes used in the CSA algorithm given in Figure 5 are explained. In order to apply this algorithm to a optimization problem, it is necessary to determine the initial values (i.e. crow's starting position and memory) of the and m matrices which are × ⅆ size (d = number of decision variables). In this way, a solution can be found according to the algorithm and this solution will be applied to the objective functions mentioned in section 3. If the cost value calculated in each iteration is also kept in memory, the best solution to be applied to the AVR system is found.

Index Description
The

Simulation Results
In this section, according to the results of the optimization algorithms, various analyzes were carried out to examine the responses of the AVR system. The transient responses of the AVR system according to various algorithms are in section 5.1, Bode and Pole-Zero Map analysis that provides the analysis of the stability of the system are in section 5.2 and section 5.3 respectively. Robustness analysis is in section 5.4.
Simulation study is performed by using the block diagram of the AVR given in Figure 1. The PID controller given in Figure 2 is designed in Simulink and the objective functions required for the operation of the algorithm is calculated in the Simulink. The computed values of the objective functions are transferred from the Simulink to the MATLAB workspace to run the algorithm. The parameters of ACO and CSA algorithms used in this study are shown in Table 3. Both CSA and ACO algorithms are run for all objective functions. The best objective functions values that the algorithms found in each iteration is kept in memory. The convergence curves in Figure 6 -10 show the values of the best objective function from the past to the current iteration as a result of the iterations of 1 to 100 or 50. As can be seen from these graphs, the CSA algorithm converged better than the ACO algorithm. The performance of each objective function among themselves is examined in Section 5.1.

Transient Response Analysis
The values of PID parameters are obtained by running optimization algorithms are categorized according to objective functions. In addition to PID parameters, Table  4 is created to compare settling time ( ), maximum percent overshoot (% ), rise time ( ) and best cost values. Iteration, node (ACO only) and slave values of these algorithms are also attached in Table 4. As can be seen from the table, the best converging objective function is W(k). If it is compared based on optimization algorithms, the best converging algorithm is CSA -W(k).
According to the obtained PID parameters, the transient responses of AVR system are shown in Figure 11 respectively for CSA and ACO.

Bode Analysis
The stability analysis of the AVR system which is controlled according to the results obtained from the ACO and CSA algorithms, is examined under this section. In order to examine system stability and frequency response of AVR, bode diagrams are obtained. These diagrams are shown in Figure 12 and 13 respectively for ACO and CSA algorithms.

Pole -Zero Map Analysis
Pole -zero map graphics for the AVR system controlled by CSA and ACO tuned controllers are given in Figure 14 and 15, respectively. They show the close loop poles and zeros. From the figure, that the poles are in the open left half of the complex plane are concluded. Therefore, the AVR system controlled by different controllers is stable.
The numerical values and damping ratios of these poles are shown in Table 5.

Robustness Analysis
As with any system, uncertainties and disturbances may occur in the model of the AVR system. In addition, noise may occur in the measurements of the sensor unit. For this reason, robustness analysis can be performed by changing the time constants in the units of the AVR system to a certain deviation value and the performance of the designed controllers is observed.
For the CSA-W(k) tuned controller which provides the best system response robustness analysis is performed in this section. The voltage response given by the AVR system in the deviation intervals of -50%, -25%, + 25%, + 50% for time constants , , and is given in Figure 16. Then, , , and % values are given in Table 6 to examine transient response of the system.

Conclusions
In this study, various controllers were designed by using CSA and ACO algorithms inspired by nature. If we consider these controllers in general, we can evaluate the results as follows: • CSA and ACO algorithms were found to converge the result with similar performance. Despite this similarity, the CSA algorithm converged slightly better than ACO.
On the other hand, based on the main purpose of this study, we can say the followings:

•
Convergence performance is not sufficient as a result of algorithms created using error-based performance metrics. If these algorithms are evaluated among themselves; ITAE was the best converging cost function, while ISE was the worst converging cost function.

•
The main problem is to improve the transient response of the system. For this reason, the W(k) cost function created with the parameters whose transient response is determined was converged better than the errorbased cost functions.
The responses of the designed controllers in the system can be examined as follows, through bode, pole-zero map and robustness analysis: