1 Introduction

The voltage stability is one of the main control problems in the power system [1, 2]. The performance of apparatuses which are connected with electrical power network decreases when the voltage value is outside the permissible limit. The equipment is damaged due to the increase in the voltage from the setting value. Furthermore, the reactive power is affected by the change of voltage. The automatic voltage regulator (AVR) is used to adjust the voltage of the generator through the permissible limit and overcomes the previous problems. The variation in the loads and the high inductance of the generator field windings are obstacles to achieve a stable and fast response by the voltage regulator [3]. Thus, the AVR system requires a proper controlling technique to get a good performance. In the literature, many control strategies are used to control the voltage such as proportional–integral–derivative (PID) controller [3,4,5,6,7,8,9,10,11] and adaptive control [12,13,14,15,16,17]. In [3], the parameters of the PID controller are optimized by using the teaching–learning algorithm. In [4], a new optimization algorithm is built based on the Taguchi and genetic algorithm (GA) to get the optimal parameters of the PID controller for the AVR. A combination of the GA with the fuzzy logic is introduced in [5] for the tuning of the PID controller in an AVR system. The optimal parameters of the PID controller are founded by cooperation between particle swarm optimization (PSO) and gravitational search algorithm (GSA) in [6]. In [7, 8], A PSO algorithm is used to tune the PID controller parameters for the AVR. A new improved PSO is introduced for the tuning of the PID controller in an AVR system [9]. Other optimization algorithms are introduced in [10, 11]. The designed parameters of the PID controller by these techniques are constant and do not adaptive to the system parameter change which is considered the main problem of these techniques. In [12], a new adaptive control method based on a fractional reference adaptive controller is applied to an AVR. The fractional adaptive controller is more proper to the systems with fractional order. An adaptive control approach utilizing policy iteration technique for the AVR is introduced in [13]. In [14], a new fuzzy logic control strategy is used to adjust the weights of the AVR. In this paper, the rules of the fuzzy logic controller are built by the trial-and-error technique. Other adaptive controllers for AVR are introduced in [15,16,17]. These previous papers take high time for the online operation. Predictive control has an effective control strategy in a lot of control problems in the industry to stabilize the simple and the complex dynamical systems [18]. A model predictive control (MPC) is introduced to improve the voltage of distributed generators of medium voltage network in [19]. Another application of the MPC to overcome voltage instability is listed in this paper [20]. A linear MPC controller for voltage control of a hybrid generation power system is presented in [21]. In these papers, the parameters of the MPC controller are adjusted by the trial-and-error technique which may lead to unacceptable performance. The predictive control predicts the system behavior and the control signal over a prediction time horizon and control time horizon. Furthermore, it uses the feed-back and feed-forward control concepts to reject the measured and unmeasured disturbance. Thus, the predictive control requires a linear time invariant (LTI) system to build its control action at each sample. The getting of LTI system of the model is difficult in the most of the complex power systems. Neural networks are an alternative to overcome this problem. The NN has a growing interest to solve more power system problems [22,23,24,25]. The main reasons are the ability of NN to identify the complex linear and nonlinear relationships between variables and the availability of multiple training [26, 27]. This paper proposes the NN predictive controller that combines the advantages of NN and predictive control for AVR. However, the prediction horizon, control horizon, sample time, control weight factor, and search factor of the NN predictive controller need a proper tuning to get a good performance by the controller. There are many AI techniques used in the field of power system such as GA, PSO, artificial bee colony (ABC), imperialist competitive algorithm (ICA), gravitation search algorithm (GSA), bat inspired algorithm (BIA) [28,29,30,31,32,33,34,35]. All these AI techniques give acceptable results in the optimization of controller parameters compared to conventional methods such as Ziegler–Nichols (ZN) technique [36]. This paper uses the ICA as a new artificial intelligence (AI) technique for the optimization of NN predictive controller parameters. The results of the proposed ICA-based NN predictive controller design are compared with GA-based NN predictive controller and the conventional PID controller-based ZN technique. The system parameter changes are taken into the consideration to emphasize the robustness of the proposed controller.

The contributions of the paper are represented in the following points:

  • This paper introduces the NN predictive controller that combines the advantages of NN and predictive control rather than the conventional controllers for the AVR as the first application of the NN predictive controller for AVR.

  • The ICA is utilized as a new artificial intelligence technique to get the optimal parameters of the NN predictive controller instead of the trial-and-error or the designer’s expertise methods.

  • A comparison between the suggested NN predictive controller based on the ICA, the NN predictive controller based on GA, and the conventional PID controller based on ZN technique is carried out. The comparison emphasizes the superiority of the suggested NN predictive controller based on the ICA.

2 Neural network predictive controller

The predictive control is an advanced control method instead of the PID control. In recent decades, predictive control has great achievements in practical applications. It can be applied on constrained single-input–single-output systems and constrained multi-input–multi-output systems [25]. Most of the recent applied predictive controllers use linear models, but most of the practical systems are nonlinear. Furthermore, the linear predictive control has poor performance in the case of complex nonlinear models. Some researchers combine predictive control with nonlinear techniques to overcome the previous problem and daily work nonlinear systems. This solution lies in another optimization problem which may be nonconvex, and the optimal solution will take large time in online optimization. Moreover, the successes of nonlinear predictive controllers require a reliable mathematical model to represent the behavior of the nonlinear system [26]. From this point, it became a necessity to search for an easily usable model that describes the behavior of the system effectively in the design of predictive controller algorithm. The combination of NN predictive control is represented a new control method to solve these problems and can identify complex models and overcome the parameter uncertainties. In NN predictive control, the unknown process is modeled by NN. The controlling procedure of NN predictive control is carried out in the following two steps [27]:

Step 1 System identification by NN

The first step of NN predictive control is by using NN to identify the system offline. As shown in Fig. 1, the neural network training signal is represented by the NN output and the predicted error between the plant output and NN output. The structure of the NN model is described in Fig. 2. The NN model predicts the future plant output by knowing the previous input and output signals of the plant. The collected data from the plant operation are used to train the NN in batch mode offline. Any training algorithms can be used to train the NN.

Fig. 1
figure 1

Identification of the plant by NN

Fig. 2
figure 2

Structure of the NN plant model

Step 2 Predictive control actions

The predictive control is carried out based on receding horizon method. The NN predicts the plant output over a prediction time horizon. A numerical optimization technique is used to adjust the predicted control signal that minimizes the following objective function over the prediction time horizon.

$$J = \sum\limits_{{j = N_{1} }}^{{N_{2} }} {(y_{\text{r}} (t + j) - y_{\text{m}} (t + j))^{2} } + \rho \sum\limits_{j = 1}^{{N_{\text{u}} }} {(u^{{\prime }} (t + j - 1) - u^{{\prime }} (t + j - 2))^{2} }$$
(1)

where N1 is the minimal prediction horizon of the output, N2 the maximal prediction horizon of the output, Nu the control horizon, u′ tentative control signal, yr the target response, ym the network model response, ρ the weight of the control signal.

The processes of the NN predictive control are illustrated in Fig. 3. The model of NN predictive controller depends on the NN model and the optimization block. The optimization block adjusts the values of u′ that minimizes the objective function J and then transmits the optimal control signal u to the plant.

Fig. 3
figure 3

Process of NN predictive controller block

The main advantages and limitations of NN predictive controller in comparison with existing methods are summarized in the following points:

  • Main advantages

    • The combination of NN predictive control can identify complex models and overcome the parameters uncertainties.

    • The NN predictive control does not require a linear time invariant (LTI) system as the model predictive controller.

    • The NN predictive controller depends on the formula (1) only rather than the model predictive controller which required the mathematical model of the system as mentioned in the introduction section.

  • Main limitations

    • The NN predictive controller needs a proper tuning for its parameters. This problem is overcome in this manuscript by utilizing the ICA.

In this paper, the NN predictive control toolbox in MATLAB has been used to design a NN predictive controller. The controller requires a proper tuning of its parameters which effects on the system performance. The most effective parameters are the maximal prediction horizon of the output N2, control horizon Nu, and the weight of the control signal ρ. Furthermore, the sample interval is Ts and the search factor α. The minimal prediction horizon of the output N1 is fixed at 1 as the default of the toolbox. The ICA is applied in this paper to adjust the NN predictive controller parameters.

3 Genetic algorithm

The genetic calculation is motivated from the Darwinian Hypothesis of advancement. In this calculation, the space of arrangements has named a population of individuals. The new arrangement is made by intersection a portion of the strings of the present generation. This activity is called crossover. The crossover is conveyed at every generation, and new qualities are acquainted which include decent variety. Besides, there is another task called mutation. The mutation is conveyed by adjusting a portion of the strings arbitrarily. The GA is clarified with more points of interest in [37,38,39,40]. Figure 4 demonstrates the flowchart of GA.

Fig. 4
figure 4

Flowchart of genetic algorithm

4 Imperialist competitive algorithm overview

The imperialist competitive algorithm is propelled by the imperialistic rivalry. Like other algorithms, the proposed calculation begins with an initial population. Population individuals are named countries. It is in two kinds: colonies and imperialists that all together frame a few empires. Imperialistic rivalry among these empires shapes the premise of the algorithm. During the competition, the weak empire crumples and effective ones claim their colonies. Imperialistic competition ideally joins to a state in which there exists just a single empire and its colonies are similarly situated and have an equal cost as the imperialist. In recent, the AI techniques are used in the most of the power system problems such as planning, operation, and control. The growing of power system in size and complication make the researchers look for new AI techniques to find the proper values of the adjustable parameters [41]. The designed controller’s parameters by AI techniques have proved sufficient performance [41,42,43]. This paper proposes the ICA for the proper tuning of NN predictive controller parameters. The aim of ICA is to get the NN predictive controller parameters that improve the response of the considered system by minimizing the integral time absolute error (ITAE) performance index. The ITAE is defined as follows:

$${\text{ITAE}} = \int {t \cdot \left| e \right|} \cdot {\text{d}}t$$
(2)

The ICA initiates with a random population of world countries. The individual in the population is represented by each country. The imperialist states are the best countries, and the colonies of each empire represent the rest of countries. In each iteration, the colonies are divided and moved to their relevant empires according to their fitness [43, 44]. Figure 5 shows how each colony shifts to its relevant imperialist. The movement is specified by a distance x and angle θ which are defined in (3) and (4) by a uniform distribution function. The procedure of ICA is shown in a summarized flowchart in Fig. 6.

$$x = u(0,\beta \times d)$$
(3)
$$\theta = u( - \gamma ,\gamma )$$
(4)

where β is a number > 1, d the distance between colony and imperialist, γ a limit angle.

Fig. 5
figure 5

Movement of colonies to their imperialist

Fig. 6
figure 6

Flowchart of the ICA

5 Generator voltage control system

Voltage control represents a vital role in the electrical power system for proper operation of electrical power apparatuses. The main objects of voltage control are concluded in the protection of electrical power apparatuses from damage due to overheating of generators and motors. Furthermore, the voltage control is required to reduce the losses in the transmission system. In addition, the voltage control can serve the ability of the system to overcome and prevent voltage collapse. This voltage collapse takes place when the system attempts to serve much more load than the voltage which can bolster. When the reactive power supply brings down voltage, current must increment to keep up control provided, making system devours more reactive power, and the voltage drops. In the event that the current increases excessively, transmission lines go disconnected, overloading different lines. When the voltage drops too low, a few generators will disconnect consequently to ensure themselves. Voltage collapse happens when there is an expansion in load or less generation. It causes a voltage drop which causes a further lessening of reactive power from the capacitor and line charging, and still voltage decreases. In the event that there is continuous decrease in voltage, these will make extra components trip, driving further diminishment in voltage and loss of the heap. The outcome in these whole dynamics and wild decreases in voltage refers to that the system unfits to give the reactive power required to provide the reactive power requests. The excitation flux is the main factor which effects on the output voltage of the generator. So, the controlling of the output voltage of the generator is carried out through the controlling of excitation flux. Thus, the generator voltage control system is named excitation control system or AVR. The AVR consists of an amplifier, exciter, generator, and sensor [2]. Figure 7 shows a practice component of an AVR system.

Fig. 7
figure 7

A practice component of AVR system

From Fig. 7 which contains each component of the AVR system, the transfer functions of each block in AVR without the controller are shown in Fig. 8 [2].

Fig. 8
figure 8

Block diagram of the system without the controller

where Vref is the reference voltage, Vt the output terminal voltage, e the error signal, u the control signal, KA the amplifier gain, TA the amplifier time constant, KE the exciter gain, TE the exciter time constant, KG the generator gain, TG the generator time constant, KS the sensor gain, TS the sensor time constant.

This paper proposes the NN predictive controller for the AVR, and the block diagram of the AVR with NN predictive controller is shown in Fig. 9.

Fig. 9
figure 9

Block diagram of AVR system with NN predictive controller

6 Simulation results

In this paper, the system is identified by NN based on the block diagram of AVR system without a controller which is shown in Fig. 8. In the electrical power plant, it is required to make the generator work at a constant reference voltage and all components of the power system are designed at this reference and the main purpose of the AVR is to maintain the output voltage of the generator to this reference as mentioned in the Introduction section of this paper. In this paper, the controller is designed at reference voltage equal 1 p.u and this does not prevent that the value of the voltage equals 10 V or 20 V or any value, but the reference voltage will equal 1 p.u at any value of the voltage in general.

In the NN predictive controller, one input and one output are used to train the NN. The input is represented by the error signal of the plant, and the output is represented by the control signal as shown in the model in Fig. 8 which is used to train the NN. The signals are sampled with sample time (Ts) so there are previous input and output signals and the NN predictive controller is utilizing the previous signals to predict the future signals in order to minimize the function in Eq. (1).

In the NN predictive controller, the model of AVR without the controller is loaded and the training data of the NN predictive controller are generated by pressing on generate train data button as cleared in the plant identification graphical user interface in Fig. 10. After this step, the ICA and GA are applied on the block diagram of the AVR system with NN predictive controller which is shown in Fig. 9. The ICA and GA work on the minimizing of the performance index ITAE of (2) to find the proper values of N2, Nu, ρ, Ts, and α. The minimal prediction horizon of the output N1 is fixed at 1 as the default of the toolbox. The convergence profile of GA and ICA for ITAE is shown in Fig. 11. The control signal of ICA-based NN predictive controller during the process of the obtaining predictive controller parameters is shown in Fig. 12. The obtained NN predictive controller parameters by the ICA, GA, and PID controller parameters based on ZN with the corresponding performance index values are listed in Table 1.

Fig. 10
figure 10

Plant identification graphical user interface of the NN predictive controller

Fig. 11
figure 11

Convergence profile of GA and ICA for ITAE

Fig. 12
figure 12

Control signal of ICA-based NN predictive controller for ITAE

Table 1 Controller parameters and the performance index

Figure 11 and Table 1 clear that the value of ITAE in the case of ICA-based NN predictive controller has the minimum performance index value. The performance of the system with nominal system parameters is presented in Fig. 13. The maximum overshoot and the settling time of the output voltage in the case of nominal system parameters are listed in Table 2.

Fig. 13
figure 13

Output voltage of AVR in the case of nominal system parameters

Table 2 Maximum overshoot and the settling time of the output voltage in the case of nominal system parameters

From Fig. 13 and Table 2, the simulation with nominal parameters test emphasizes that the system performance with ICA-based NN predictive controller has better damping characteristic compared with GA-based NN predictive controller and ZN-based PID.

To study the robustness of the ICA-based NN predictive controller, the system parameter uncertainties test is applied by change TA, TE, and TS with ± 10% around its nominal value. The results of this test confirm that there is a nonsignificant change in the system response based on the NN predictive controller optimized by ICA as shown in Fig. 14.

Fig. 14
figure 14

Response of the system according to a test of parameter uncertainties: a in case of TA change, b in case of TE change, c in case of TS change

The previous results confirm that

  • The NN predictive controller that combines the advantages of NN and predictive control based on ICA is able to reduce the voltage deviation compared with the GA-based NN predictive controller and the conventional PID controller based on ZN.

  • The ICA-based NN predictive controller has the minimum performance index value compared with the GA-based NN predictive controller and the ZN-based PID controller.

  • The ICA-based NN predictive controller has better damping characteristic than the GA-based NN predictive controller and the ZN-based PID controller.

  • The NN predictive controller is robust to the system parameter variations compared with the GA-based NN predictive controller and the ZN-based PID controller.

7 Conclusions

In this paper, the ICA and GA have been applied to tune the NN predictive controller for AVR. The simulation results confirm that the ICA-based NN predictive controller is able to reduce the voltage deviation and robust to the system parameter variations over GA-based NN predictive controller and ZN-based PID. Furthermore, the robustness tests of the ICA-based NN predictive controller are additionally completed. In addition, the proposed technique has given attractive outcomes about the parameter changes. In addition, the tuned estimations of the controller parameters got with the nominal parameters which do not require to be reset for a wide change in the system parameters.