1 Introduction

A specified voltage level is required to ensure power quality and grid security in power systems. However, oscillations occur at the output voltage, due to load variation, turbine oscillation and high inductance in generator. Since the equipments used in power systems are designed taking into account the rated voltage, this oscillations lead to reduction in durability and life of the equipments. Another significance of maintaining constant voltage level is that it regulates reactive power flow and thus reduces the real line losses. It is therefore significant to control the voltage level to keep it at the desired level [9, 25].

In power systems, one of the primary control system utilized for voltage control is Automatic Voltage Regulator (AVR) system. An AVR system is a system which closed loop control and is used with a controller to improve its dynamic performance. Proportional-integral-derivative (PID) controller, which is one of the traditional controller, is widely employed in AVR systems thanks to robust performance and its ease of use [8, 16]. The optimal tuning of a PID controller parameters is important in developing the stability and transient response of the AVR system. Design of a PID controller can be done using different methods. This methods are artificial intelligence methods, meta-heuristic optimization algorithms and traditional methods. Traditional methods such as gain-phase margin method and Ziegler–Nichols method have disadvantages due to difficulty in applying in nonlinear systems and poor closed loop responses [32]. In studies [1, 7], neural network and hybrid neural genetic and fuzzy logic approaches have been used to tune PID controller parameters in AVR system, respectively. In neural network, which is one of the artificial intelligence methods, training process is slow and convergence time is long. Another widely used method is fuzzy logic. In the literature, in studies [3, 14, 24], fuzzy logic controller has been used to tune PID controller parameters in AVR system. Since the formation of its membership functions depends on skill of designer, it may not be efficient. Therefore, for the AVR system, researchers have tuned parameters of PID controller using optimization algorithms that are widespread during the recent years. In the literature, improved kidney-inspired algorithm (IKA) [12], bio-geography-based optimization (BBO) [18], bees algorithm and firefly algorithm [19], cuckoo search (CS) [8], world cup optimization (WCO) [29], grasshopper optimization algorithm (GOA) [21], gravitational search algorithm (GSA) [11], salp swarm algorithm (SSA) [13], continuous firefly algorithm (CFA) [6], differential evolution (DE) [16], pattern search algorithm (PSA) [31], teaching–learning-based optimization (TLBO) [28], local unimodal sampling (LUS) algorithm [23], many optimizing liaisons (MOL) algorithm [26], sine cosine algorithm (SCA) [20], bacterial foraging optimization algorithm (BFOA) [4], ant lion optimizer (ALO) [27], artificial bee colony (ABC) [16], anarchic society optimization (ASO) [33], symbiotic organism search (SOS) algorithm [9] and particle swarm optimization (PSO) [30] have been used for optimal tuning of PID controller parameters in an AVR system. In addition, fractional-order PID controller [22], fractional high-order differential feedback controller [5], fuzzy logic controller [17] and fuzzy-PID controller [2] have been utilized in AVR systems. However, the number of these studies is quite limited compared to studies with PID controller.

The common goal in the aforementioned studies is to enhance the AVR system performance in terms of transient response characteristics such as settling time, overshoot and rise time. For this purpose, they used different evolutionary algorithms in their PID controller design process. However, in these designs, the derivative kick effect of the PID controller was not considered. The derivative kick effect occurs with sudden jumps in reference signal. In such a case, a sudden leap of the error signal is caused, in which case the derivative of the error arrives a very large value, causing the controller to become saturate, albeit for a short time. Low pass filter is added to the derivative part of the PID controller to prevent the derivative kick effect.

Another important issue is determination of objective function used in optimization algorithms during controller design. The commonly used objective functions in controller design process in AVR systems are integral of square error (ISE), integral of absolute value of error (IAE), integral of time-multiplied square error (ITSE) and integral of time-multiplied absolute error (ITAE). Even though obtained overshoot is small with IAE and ISE objective functions, the settling time is long. ITSE and ITAE functions do not have this disadvantage, but they may not obtain the desired level of stability [8] . For this reason, the objective function proposed by [15] is utilized in this study. In this objective function, beside the steady state error, there are also settling time, overshoot and rise time values and all of them are desired to be obtained at minimum values for better control performance.

In this study, the aim is to ruminate a PID controller with filter (PID-F) to develop the dynamic performance of the closed loop AVR system. In this context, SOS algorithm is utilized to optimally tune the parameters of the controller and gain of the filter. The SOS algorithm inspired from relationships established for the survival of different species in nature is preferred in this study. Because it is showed that the algorithm is more successful than the PSO and the CS algorithms [10]. Moreover, SOS algorithm-based PID controller [9] utilized in the AVR system has better percentage overshoot and settling time values than different PID controllers designed by using IKA [12], SCA [20], GOA [21], LUS [23] and PSO [30] algorithms. In order to demonstrate the efficiency of the filtered structure in the proposed SOS algorithm-based PID-F controller, comparison is made with the traditional PID controller optimally tuned by using the SOS algorithm [9]. In addition, other existing PID controllers whose parameters were optimally tuned by employing current evolutionary algorithms are also compared with the proposed PID-F controller for the AVR system. These existing PID controllers were tuned by IKA [12], GOA [21], LUS [23], SCA [20], and PSO [30] algorithms. AVR systems with both PID-F and PID controllers are simulated, and their performances are compared. In the comparison, first of all, the transient response characteristics attained from the unit step response of the closed loop AVR system are taken into consideration. Besides the settling time, rise time and percentage overshoot, the objective function value is also taken into account. In addition, stability analysis (both bode diagram analysis and pole/zero map analysis) and robustness analysis of the AVR system are also performed. The obtained results demonstrate the significant superiority in the proposed SOS algorithm-based PID-F controller in terms of transient response characteristics, stability and robustness of the AVR system.

The main contributions of this study are:

  1. 1.

    Derivative kick effect is considered in PID controller design process for the AVR system, and therefore, a PID-F controller is proposed for the AVR system.

  2. 2.

    In the proposed PID-F controller, a low pass filter is used to prevent derivative kick effect.

  3. 3.

    Using SOS optimization algorithm in PID-F controller design is performed for the first time.

  4. 4.

    The results attained by the proposed SOS-based PID-F controller and the optimally tuned PID controllers [2, 6, 10, 13, 16, 22] are compared and effectiveness of the proposed controller is demonstrated.

The rest of the article is as follows: In Sect. 2, modelling of the AVR system, SOS optimization algorithm used in the article and ruminate of the proposed PID-F controller using the SOS algorithm are given. The simulation results attained for the AVR system and the aforementioned analysis are given in Sect. 3. Finally, conclusions are drawn.

2 Basic concepts, materials and methods

2.1 Modelling of an AVR system

A commonly used AVR system comprises of exciter, sensor, amplifier and generator components. These components can be designed with a first-order transfer functions each of which has a gain constant K and a time constant \( \tau \). Block diagram of AVR system is shown in Fig. 1. The ranges of time constant and gain constant parameters and values utilized in this study are given Table 1. The values of the gain constant and time constant parameters used in this study are set to the same values as in the studies of [9, 12, 20, 21, 23, 30] to make a fair comparison.

Fig. 1
figure 1

Block diagram of AVR system without controller

Table 1 Parameters of the AVR system [5, 8, 15, 16]

For unit step response analysis, the AVR system without any controller is shown in Fig. 2. It is concluded from Fig. 2 that the system has poor performance due to long settling time, important steady state error and close to 50% overshoot. For this reason, a well-designed controller is needed to reach less settling time, little overshoot and zero steady state error.

Fig. 2
figure 2

Unit step response of AVR system without controller

2.2 Symbiotic organism search algorithm

It is symbiotic relationship that different species establish to survive in nature. The most widespread symbiotic relationships are commensalism, mutualism and parasitism . With the symbiotic relationship established, it is easier for the species to adapt to changing environmental conditions and their chances of survival increase. The purpose of SOS optimization algorithm is to discover the best organism which gives best fitness value using aforementioned relationships. The SOS algorithm is an iterative optimization algorithm. A random solution point is initially generated and predefined objective function calculated at each iteration is contrasted with the former value, and the best organism and corresponding best fitness value are found. Mathematical equations of the mutualism phase are given below [10].

$$\begin{aligned}&X_{inew}=X_\mathrm{i}+rand (0,1)(X_{best}-Mutual_v BF_1) \end{aligned}$$
(1)
$$\begin{aligned}&X_{Jnew}=X_J+rand (0,1)(X_{best}-Mutual_v BF_2) \end{aligned}$$
(2)
$$\begin{aligned}&Mutual_v=(X_\mathrm{i}+X_j)/2 \end{aligned}$$
(3)
$$\begin{aligned}&X_{inew}=X_\mathrm{i}+rand (-1,1)(X_{best}-X_J) \end{aligned}$$
(4)

In (1), (2), (3) and (4), \( X_\mathrm{i} \) is organism corresponding ith ecosystem, \( X_j \) is random organism selected in \(X_\mathrm{i} \), \( X_{inew} \) is new solution for the \( X_\mathrm{i} \), \( X_{jnew} \) is new solution for the \( X_j \), \( X_{best} \) is best solution, rand(0, 1) is a function generating random value between 0 and 1, \( Mutual_v \) is relationship characteristic between the organisms, \(BF_1\) and \( BF_2 \) are benefit factors for each organism, and \(rand(-1,1)\) is a function generating random value between -1 and 1.

Considering (1), (2) and (3), it can be inferred that the population size, the relationship characteristic \( Mutual_v \), and the benefit factors \(BF_1\) and \( BF_2 \) effect the result of the optimization process. In general, \(BF_1\) and \( BF_2 \) are set to 1 or 2 [10].

The application of the SOS algorithm is defined as follows:

Step 1. Define parameters and initialize ecosystem randomly.

Step 2. Identify best organism (\( X_{best} \)).

Step 3. (Mutualism Phase) Determine mutual vector by using (3), modify organisms by utilizing (1), (2), calculate fitness value for the modified organisms and compare with previous value.

Step 4. (Commensalism Phase) Modify organism \( X_\mathrm{i} \) by (4), calculate fitness value for the modified organism and compare with the previous value.

Step 5. (Parasitism Phase) Constitute a parasite from organism \( X_\mathrm{i} \), calculate objective function for the new organism and compare with the objective function of the \( X_j \) organism.

Step 6. If stopping criteria are not met, increase iteration number and go to step 2.

2.3 Proposed PID-F controller for AVR system

To develop dynamic performance of the AVR system, design of PID-F controller has been carried out in simulation environment with the help of SOS optimization algorithm. The block diagram of the closed loop AVR system with PID-F controller is given in Fig. 3.

Fig. 3
figure 3

Block diagram of closed loop AVR system with PID-F controller

The transfer function of the proposed PID-F controller is given

$$\begin{aligned} G_\mathrm{PID-F}(s)=Kp+\frac{K_\mathrm{i}}{s}+K_\mathrm{d}s\frac{K_f}{s+K_f} \end{aligned}$$
(5)

where \( K_\mathrm{i} \), \( K_\mathrm{p} \) and \( K_\mathrm{d} \) are gains of integral, proportional, derivative part of the controller, respectively, and \( K_f \) is the gain of low pass filter added to derivative part to overcome its kick effect. These four independent parameters are required to optimally tune to develop the dynamic performance of the AVR system. The optimally tuning process is performed employing the SOS optimization algorithm with a commonly used objective function identified in [15]. The objective function which is based on steady state error and transient response characteristics is calculated by using (6)

$$\begin{aligned} \mathrm{OF}=(1-e^{-1})(OS/100+\mathrm{ess})+e^{-1}(t_\mathrm{s}-t_\mathrm{r}) \end{aligned}$$
(6)

where \( t_\mathrm{s} \), OS,ess and \( t_\mathrm{r} \) represent settling time, maximum percentage overshoot, steady state error and rise time, respectively.

While the lower limits of the four-dimensional search spaces of the algorithm have been set to zero for all parameters, the upper limits have been taken as 2, 1, 1 and 500 for \( K_\mathrm{p} \), \( K_\mathrm{i} \), \( K_\mathrm{d} \) and \( K_f \), respectively. In the SOS algorithm employed in this study, the number of population and iteration has been set to 50. Since the algorithm starts from random initial positions in the search space, it has been run ten times. The results of these ten trials are analyzed in terms of standard deviation (std), mean and maximum value of the objective function OF and corresponding iteration number. Table 2 provides the mentioned results in addition to the OF values of the best five trials. That the SOS algorithm converges to almost the same solution, i.e., OF value, indicates its repeatability even starting from random initial solutions in four-dimensional search space. Furthermore, the change of the objective function obtained by the SOS algorithm for the PID-F controller is shown in Fig. 4, indicating that iteration number set to 50 is sufficient to reach the minimum objective function value OF.

In addition, Kolmogorov–Smirnov test which is a nonparametric statistical test is performed. The result P value of Kolmogorov–Smirnov test, which should be larger than \(\alpha \) value which is significance level of Kolmogorov–Smirnov test, is obtained as 0.126. The fact that the P value is greater than the \(\alpha \) value, which is mostly 0.05, indicates a normal distribution of data. Since none of the AVR studies contains such a nonparametric statistical test result, we could not perform a comparison with other AVR system studies in terms of a nonparametric statistical test result.

Among these ten trials, the parameters of the proposed PID-F controller are obtained by considering minimum objective function value. The parameters of optimally tuned PID-F controller are given in Table 3 which also contains parameters of different PID controllers tuned by current optimization algorithms. One of these PID controller is SOS-based PID controller [9] which is utilized to show the effect of the filter in the proposed PID-F controller. The other PID controllers are tuned by using IKA [12], GOA [21], LUS [23], SCA [20], and PSO [30] optimization algorithms.

Table 2 Results of the optimization trials in the proposed PID-F controller design
Fig. 4
figure 4

Change of the objective function OF in the optimization process

Table 3 Optimized parameter values for different controllers

3 Simulation results

In order to demonstrate the superiority and effectiveness of the proposed SOS algorithm-based PID-F controller, called as SOS-PID-F, in the AVR system, step response comparison is made with other optimally tuned PID controllers in the literature. In the same AVR system, the other PID controllers designed by employing IKA [12], GOA [21], LUS [23], SCA [20], SOS [9], and PSO [30] algorithms. These PID controllers are called as IKA-PID [12], GOA-PID [21], LUS-PID [23], SCA-PID [20], SOS-PID [9], and PSO-PID [30] in this study. The transient response characteristics attained from the unit step response of the closed loop AVR system with different controllers are analyzed to make a comparison. Besides the rise time, percentage overshoot and settling time, the objective function value which is the performance metric used in the optimization process is also taken into consideration. The parameters of the optimally tuned controllers are given in Table 3. In addition, both bode diagram analysis and pole/zero map analysis are carried out to make stability analysis of the aforementioned different controllers. Finally, robustness analysis of the proposed SOS-PID-F controller is performed. All analyzes and results are given in subsections below.

3.1 Transient response analysis

The unit step response of the system has been attained by using the proposed SOS-PID-F controller and various PID controllers whose parameters were optimally tuned by utilizing different evolutionary algorithms. The unit step responses of the system controlled by various controllers are shown in Fig. 5. Transient response characteristics of the responses are given in Table 4 where the bold represents the best performance. In addition, objective function values for each controller are also provided in the table. The results openly indicate that the proposed SOS algorithm-based filtered PID controller (SOS-PID-F) is more successful in AVR system control than the other conventional PID controllers even optimally tuned. Because minimum objective function value, smaller overshoot, and less settling time are obtained with SOS-PID-F, which ultimately shows the positive effect of the filter in the controller.

Table 4 Obtained transient response characteristics for different controllers
Fig. 5
figure 5

Step responses of AVR system obtained from various PID controllers

3.2 Pole/Zero analysis

Pole/zero analysis has been performed to examine the AVR system stability controlled by the proposed SOS-PID-F controller and other PID controllers. In this context, the poles of the closed loop system and the corresponding damping ratios have been obtained for each controller given in Table 3. When the closed loop AVR system with the mentioned controllers considered, it is concluded from Table 5 that the system is stable, i.e., the roots of the characteristic equation are in the open left half-plane. Furthermore, when the damping ratios in Table 5 are examined, it is seen that the damping ratios of all poles of SOS-PID-F controller are more close to 1 than the other PID controllers.

Table 5 Closed loop poles and corresponding damping ratios of the closed loop AVR system with different controllers

3.3 Bode analysis

The bode diagram has been used for frequency domain analysis of the AVR system controlled by using different controllers. Figure 6 shows the bode diagrams obtained with different controllers. The comparison results of bandwidth (rad/s), peak gain (dB), delay margin (s) and phase margin (degree) attained using the related diagrams are given in Table 6. It can be inferred from Table 6 that the proposed SOS-PID-F controller improves phase and delay margin compared to IKA-PID[12], GOA-PID [21], LUS-PID [23], SCA-PID [20], and PSO-PID [30] controllers. In addition, it is concluded from Table 6 that the closed loop AVR system with various controllers is stable.

Fig. 6
figure 6

Bode diagrams obtained from different controllers

Table 6 Obtained results from bode analysis of the system with different controllers

3.4 Robustness analysis

Finally, robustness analysis has been performed in the AVR system for optimally tuned PID-F controller with SOS algorithm. The time constants of exciter, sensor, amplifier and generator components are varied between -50 % and +50 %, and transient response characteristics are examined for robustness analysis. The settling time, percentage overshoot and rise time results for each time constants are given in Table 7. At the same time, the unit step response of the system has been examined for each time constant. The response of output voltage obtained for each time constant is given in Figs. 7, 8, 9, 10. It seems that the proposed SOS-PID-F controller does not destabilize the AVR system and provides an acceptable system response even at the − 50 % and +50 % limits.

Fig. 7
figure 7

Step responses of AVR system designed with SOS-PID-F controller for \(\tau _a\)

Fig. 8
figure 8

Step responses of AVR system designed with SOS-PID-F controller for \(\tau _e\)

Fig. 9
figure 9

Step responses of AVR system designed with SOS-PID-F controller for \(\tau _g\)

Fig. 10
figure 10

Step responses of AVR system designed with SOS-PID-F controller for \(\tau _s\)

Table 7 Results of the robustness analysis of the closed loop AVR system with the proposed SOS-PID-F

4 Conclusion

In this study, proposed PID-F controller design with optimally tuned parameters is presented to improve the AVR system performance. SOS algorithm is utilized to tune parameters of the PID-F controller. In order to show the efficiency of the filtered structure in the proposed SOS algorithm-based PID-F controller, comparison is made with the traditional PID controller optimally tuned by using the SOS algorithm [9]. In addition, other existing PID controllers whose parameters were optimally tuned by employing current evolutionary algorithms are also compared with the proposed PID-F controller in the AVR system. These existing PID controllers were tuned by IKA [12], GOA [21], LUS [23], SCA [20], and PSO [30] algorithms. The comparison for different controllers covers transient response analysis, pole/zero analysis and bode analysis of the AVR system with these different controllers. Finally, robustness analysis of the proposed controller is carried out. According to the obtained results, the proposed SOS-PID-F controller is more efficient in AVR system control than conventional PID controllers (IKA-PID [12], GOA-PID [21], LUS-PID [23], SCA-PID [20], SOS-PID [9], and PSO-PID [30]) and is increase the stability of the closed loop system. In addition, it is concluded that the designed SOS-PID-F controller is robust to even high parameter changes and does not destabilize the AVR system and offers acceptable system response.