Keywords

1 Introduction

In the automatic voltage control system, the automatic voltage regulation (AVR) system is composed of the equipments involved in regulating terminal voltage of power systems, especially the excitation system [1, 2]. The AVR system consists of amplifiers, exciter, generator and sensor. According to the stability requirement of the power system, a controller for improving the response speed need to be added, and the common PID controller used in industry is often adopted to solve this problem [3,4,5,6].

Control performance of PID controller is determined by the PID parameter. Therefore, the improvement of the PID controller’s performance is to find the effective settings of PID parameters [7, 8]. At present, commonly used method of adjusting PID parameters are Z-N method, critical proportion method, inverse curve method and so on [9,10,11]. The application of these methods of setting PID controller often cause larger amount of overshoot, longer oscillation and so on [12].

Therefore, this paper discussed the affect of PID controller parameters on the performance of the AVR system. Meanwhile the particle swarm optimization (PSO) algorithm was proposed for optimizing the parameters of the PID controller, and the effect of the proposed method was compared with that of the genetic algorithm optimized PID controller.

2 The Automatic Voltage Regulation System

AVR system is used to guarantee the stability of the final voltage at the power plant machine in the same specific level under system fault, the voltage fluctuation. A simple AVR system includes four main parts—amplifier, exciter, generator and sensor. In order to meet the requirements of power system stability, we added a PID controller. This four parts continuous run under the condition of normal operation, you can ignore the amount of saturated or nonlinear characteristics, the four parts can be as linear elements. These parts reasonable transfer function can be respectively performance is as follows:

  • Amplifier Model

Amplifier model uses an amplification coefficient and a time constant.

$$ \frac{{V_{R} (s)}}{Ve(s)} = \frac{{K_{A} }}{{1 + \tau_{A} s}} $$
(1)

The typical values of \( K_{A} \) is from 10 to 400. The range of time constant \( \tau_{A} \) is very small, range 0.02 to 0.1 s.

  • Exciter Model

Exciter of transfer function is shown as an amplification coefficient and a time constant.

$$ \frac{{V_{F} (s)}}{{V_{R} (s)}} = \frac{{K_{E} }}{{1 + \tau_{E} s}} $$
(2)

The typical values of \( K_{E} \) is from 0.5 to 1. The range of time constant \( \tau_{E} \) is very small, from 0.4 to 1.0 s.

  • The Generator Model

In linearized model, the transfer function of the generator reflects the relationship between voltage of the generator and voltage of magnetic field. It can be characterized by a amplification coefficient and a time constant.

$$ \frac{{V_{t} (s)}}{{V_{F} (s)}} = \frac{{K_{G} }}{{1 + \tau_{G} s}} $$
(3)

These constant size is determined with load, the range of \( K_{G} \) is from 0.7 to 1, and the range of \( \tau_{G} \) is from 1.0 to 2.0.

  • The Model of Sensor

The model of sensor is expressed as a simple linear transfer function:

$$ \frac{{V_{S} (s)}}{{V_{t} (s)}} = \frac{{K_{R} }}{{1 + \tau_{R} s}} $$
(4)

The range of \( \tau_{R} \) is from 0.001 to 0.06 s.

  • PID Controller Model:

PID controller transfer function is as follows:

$$ \frac{{V_{in} (s)}}{{V_{out} (s)}} = k_{p} + k_{i} /s + k_{d} s $$
(5)

3 Particle Swarm Optimization

The particle swarm optimization algorithm is originated from artificial life and predatory birds’ behavior research, which is a global search strategy, and a competitive neural network learning algorithm. The search space dimension is \( D \), particle population scale is \( S \), the \( i \)-th particle’s position vector \( X_{i} \) and velocity \( V_{i} \) is expressed \( X_{i} = \left( {x_{i1} ,x_{i2} , \ldots ,x_{iD} } \right)^{T} \) and \( V_{i} = \left( {v_{i1} ,v_{i2} , \ldots ,v_{iD} } \right)^{T} \), \( i = 1,2, \ldots ,S \). The \( i \)-th particle’s optimal position vector is \( P_{i} \), and optimal position vector of all particles is \( P_{g} \), and both are \( D \) vector. The evolution rules are as follows [5]:

$$ V_{id}^{t + 1} = \omega V_{id}^{t} + c_{1} r_{1} \left( {P_{id} - X_{id}^{t} } \right) + c_{2} r_{2} \left( {P_{gd} - X_{id}^{t} } \right) $$
(6)
$$ X_{id}^{t + 1} = X_{id}^{t} + V_{id}^{t + 1} $$
(7)

Here \( d = 1,2, \ldots ,D \). \( c_{1} \) is cognitive learning factor, it is acceleration term weight of the \( i \)-th particle’s optimal position vector \( P_{i} \). \( c_{2} \) is social learning factor, and it is acceleration term weight of the optimal position vector of all particles \( P_{g} \). Their values are between 0 and 2. \( r_{1} \) and \( r_{2} \) are uniformly distributed random numbers in \( \left[ {0,1} \right] \). \( \omega \) is the momentum factor and it is non-negative. While large value is easier to search the global optimal solution, the partial convergence is poorer. Generally \( \omega_{\hbox{max} } = 0.9 \) , \( \omega_{\hbox{min} } = 0.4 \). In the evolutionary process, to ensure the algorithm’s convergence, particles’ speed limit \( V_{\hbox{max} } \) should be set. Before using formula (6) to update particle velocity value, whether \( V_{id} \in \left[ { - V_{\hbox{max} } ,V_{\hbox{max} } } \right] \) holds should be judged, if it holds, value could be updated using formula (6), otherwise using

$$ V_{id} = \text{sgn} \left( {V_{id} } \right)V_{\hbox{max} } $$
(8)

In formula (8), \( \text{sgn} \left( {} \right) \) is sign function. The iterative termination conditions are chosen as maximum iterating times or satisfying specified standard error.

Penalty factor in formula (3) is important for sample classification penalty and calculation accuracy. Kernel function width in formula (6) is important for recognizing ability of the Kernel function and generalization ability. The traditional way such as cross validation test method are very complex, since they need certain experience through repeated try to determine the right parameter value. The proposed way using PSO algorithm is shown as follows:

  1. 1.

    Extract feature vector by Wavelet packet analysis of colonic contractions measured in colon end. Define training sample as \( T = \left\{ {\left( {x_{i} ,y_{i} } \right)|i = 1,2, \ldots ,n} \right\} \), and test sample as \( T^{\prime} = \left\{ {\left( {x^{\prime}_{i} ,y^{\prime}_{i} } \right)|i = 1,2, \ldots ,m} \right\} \). Initialize penalty factor and kernel function width and particle’s velocity vector \( V \). According to physiological characteristics of rectal pressure signal, rectal pressure signal category and number of wavelet packet layer, SVM structure can be determined;

  2. 2.

    After initialization, input the training sample set into the network, assess each particle’s fitness according to formula (9)

$$ J = \frac{1}{N}\sum\limits_{i = 1}^{N} {\left( {h\left( x \right)^{d} - h\left( x \right)} \right)}^{2} $$
(9)

Here \( h\left( x \right) \) is chosen from the SVM classification function \( f\left( x \right) = \text{sgn} \left\{ {h\left( x \right)} \right\} \). In PSO algorithm, if the current particle’ fitness is better than its parents, the current particle value is \( P_{best} \), if in the whole group, the fitness of another particle in rest particles is better, that particle value is \( G_{best} \);

  1. 3.

    Calculate velocity vector and position vector of the new generation by substituting the updated \( P_{best} \) and \( G_{best} \) into formula (6) and (7);

  2. 4.

    If the current iteration times reached the predefined maximum number or the minimum target error, output the final value according to the SVM decision function, otherwise turn to step 1.

After taking in a particle, it is necessary to evaluate the advantages and disadvantages of the whole control system. Under the condition of the step, a control system can reflect the response characteristics of time domain evaluation index including overshoot \( M_{p} \), rise time \( t_{\tau } \), stability time \( t_{s} \), and steady-state error \( E_{ss} \). In order to reflect the four characteristics in a data, four data will be compounded for a \( W\left( K \right) \), as shown in formula (8).

$$ W(K) = (1 - e^{ - \beta } ) \bullet (M_{P} + E_{ss} ) + e^{ - \beta } \bullet (t_{s} - t_{\tau } ) $$
(10)

\( W\left( K \right) \) represents the overall performance of the control system under step input, while a smaller value of \( W\left( K \right) \) indicates a better control.

\( \beta \) in Eq. (8) represents the weighting coefficient of which the change of value can be used to satisfy different requirements of performance. For instance, by setting the value of \( \beta \) greater than 0.7, the overshoot and static steady-state error can be reduced, while the effect is more distinguishable with high value of \( \beta \). On the other hand, setting the value of \( \beta \) smaller than 0.7 reduces the rising time and convergence time. According to the system properties of AVR and the need for steady voltage of power grid, \( \beta \) is set between 0.8 and 1.5, minimizing overshoot and \( E_{ss} \).

4 Simulation Experiment

In the simulation experiment, \( K_{A} \) is set to 100, \( K_{E} \) is set to \( 1,\tau_{E} \) is set to 0.4, \( K_{G} \) is set to \( 1,\tau_{G} \) is set to \( 1,K_{R} \) is set to 1, \( \tau_{R} \) is set to 0.1, \( k_{p} ,k_{i} ,k_{d} \) are the 3 dimensions used in the PSO. The block diagram of AVR system is shown in Fig. 1.

Fig. 1.
figure 1

Block diagram of an AVR system with a PSO-PID controller

The effect of the PSO based simulation was compared with the other simulations optimized by GA and manual setting approach in order to evaluate the performance. The step response of the AVR with no controller installed was shown in Fig. 2. The figure indicated that the AVR with no controller installed had existed more excessive overshoot, longer oscillation time and larger oscillation amplitude, thus the AVR system with no controller was unable to maintain in a stable voltage.

Fig. 2.
figure 2

Step response of the AVR with no controller installed

The step response of the AVR with PID parameters manually configured is shown in Fig. 3. The performance of it had been greatly improved compared to the one with no controller installed, though the problem of overshoot and stabilization period being too long were not eliminated.

Fig. 3.
figure 3

Step response of the AVR with PID parameters manually configured

The step response of the AVR with PID parameters of PSO approach configured is shown as the real line in Fig. 4. The step response of the AVR with PID parameters of GA approach configured is shown as the dotted line in Fig. 4. In order to facilitate the application of PSO algorithm and GA algorithm, we defined an evaluation function \( f = \frac{1}{W(k)} \), while a smaller value of wk indicates a better control. It can be observed from the figure that both algorithms are able to provide significant improvements to the response characteristics of AVR systems, and to satisfy the need of stable voltage in the power systems.

Fig. 4.
figure 4

Step response curve of PSO algorithm and GA algorithm

As shown in the Tables 1 and 2, during the 8 simulations, PSO algorithm kept evaluating value higher than that of GA algorithm with changing iteration time, group size and search region, therefore showed better optimization than GA algorithm.

Table 1. Step response test data
Table 2. Eight experimental data

The convergence speed of PSO algorithm and GA algorithm were also compared, comparing the evaluating value of best particle in every generation, as is shown in Fig. 5. Average evaluating value of all particles for each generation is defined as µ, as is shown in Fig. 6. In the Figs. 5 and 6, PSO algorithm is described as real line and GA algorithm is described as dotted line. The results showed in the Figs. 5 and 6 indicated that the convergence speed of PSO algorithm was greater than that of GA algorithm.

Fig. 5.
figure 5

Best particle evaluating value vary with generation

Fig. 6.
figure 6

Average evaluating value vary with generation

5 Conclusion

This paper discussed the importance of maintaining the voltage stability and the power balance by the AVR system in the AVC system, and used the PSO algorithm to set controller parameters of AVR system, in order to improve the corresponding features of AVR system, and further to improve voltage stability of the area. It was proved by experiments that the capability of maintaining the voltage stability for AVR system by using PSO algorithm had been improved greatly. Furthermore, compared with the GA commonly used in the parameter setting of PID controller, the proposed PSO optimized method had the greater effect on improving the maintenance of voltage stability and power balance the AVR system.