Keywords

1 Introduction

In the last decades, the increase of the depletion and environment impacts of the fossil fuel cell to using new renewable green energy in order to limit the power demand and avoid the greenhouse caused by the emission of gas from fossil fuel sources [1]. However, the energy from renewable energy sources such as wind and photovoltaic is not constant and varies according to the weather conditions. The stochastic and intermittent nature results in some fluctuations in power and frequency system that must be controlled using an adequate control strategy [2, 3]. One of the most existing solutions is to combine more than one of this sources with a storage system and conventional sources called hybrid energy system which is largely used to overcome the need to energy and decrease the effect of the greenhouse. The reason for using the energy storage system is to absorb the fluctuations from wind and photovoltaic systems and supply this stored power to load later. This hybrid energy system can operate in connected mode or in island mode in rural areas [1]. The main challenges that face the use of hybrid energy system are to promise the electricity supply to customers and providing for the long term energy security [4]. Control system based PID controller is comely used in industry due to its simplicity and clear functionality amongst all others control scheme [8]. Several works are done using the PID controller for control of a hybrid energy system such reported in [5,6,7].

Frequency and power fluctuation present a big challenge in the operation of such a hybrid energy system. Many researchers investigate the optimal design of PID controller parameters using various optimizations techniques such as Genetic Algorithm, Particle Swarm Optimization, and Mine Blast Algorithm for frequency and power control in a hybrid energy system. In [9] the authors discuss the frequency control of stand-alone microgrid with a battery energy storage system using particle swarm optimization (PSO). In [10, 11] the authors studied the frequency control of the hybrid energy system using PID/PI based GA. Another optimization method called MBA is reported in [12] in order to optimize the PID controller parameters for hybrid microgrid system.

For tuning the optimal values for the PID controller parameters, we propose to use the PSO technique proposed to be applied. This technique developed by Kennedy and Eberhart in 1995 [13], is a stochastic search, robust and flexible in solving of optimization problem due to its high-quality of solution within shorter calculation time and stable convergence characteristic than other stochastic methods [14].

The rest of the paper is summarized as fellow: the configuration of the proposed system is presented in Sect. 2. In Sect. 3 the controller strategy and optimization method are addressed. The simulation results and discussions are reported in Sect. 4. This paper is ended by a conclusion in the last section followed by a reference.

2 Configurations of Microgrid Power System

The various microgrid energy system components are presented by first-order transfer function as shown in Fig. 1. In this study, power is generated by a WTG, a PV, a FC, and a DEG generator. The integration of different energy storage system devices can facilitate the reliable power supply to the connected load. The storage systems along with, PV and FC are to be connected through suitable converters but have not been considered here in order to avoid the complexities in the modeling. The energy storage systems BESS and FESS store energy during the surplus generation and release efficiently during the peak-load demand. The DEG is to be taken as the standby generator which starts automatically to make up the deficit power demand. The parameters of different components of the proposed system are given in the Table 1 [11, 15,16,17].

Fig. 1.
figure 1

Hybrid energy generations with the storage energy system

Table 1. Microgrid parameters

Microgrid system conists of various distributed generation connected together for forming independent units which can operate in two modes; isolated mode in remote areas or in conneted mode to support and enhance the microgrid security and reability. The microgrid can increase the reliability and efficiency of the power system.

3 Controller Design and Optimization Technique

In this, the proposed controller and optimization method are discussed.

3.1 PID Controller

The conventional Proportional Integral Derivative Controller (PID) is considered the most popular controller used in almost all the industries processes. It can provide excellent control performances due to its quite structure and robustness. PID is the most simple and easy understood controller despite the varied dynamic characteristics of process plant [6].

A proportional controller has the effect of reducing the rise time, but cannot eliminate the steady-state error. An integral mode has the ability to eliminate the steady-state error [7].

PID controller is a control scheme generally used in an industrial process system. A standard PID controller structure is also known as the ‘‘three terms” controller, whose can be presented by a transfer function in the ideal form in (1) or in the parallel form in (2) [8].

$$ G\left( s \right) = K_{P} \left( {1 + \frac{1}{{T_{I} s}} + T_{D} s} \right) $$
(1)
$$ G\left( s \right) = K_{P} + \frac{{K_{I} }}{s} + K_{D} s $$
(2)

Where \( K_{P} \), \( K_{I} \) and \( K_{D} \) are the proportional, integral and derivative gain respectively, \( T_{I} \) and \( T_{D} \) are integral, and the derivative time constant respectively (Fig. 2).

Fig. 2.
figure 2

Block of PID controller model

PID controller composed of three types of control actions, Proportional, Integral, and Derivative control action.

The ‘‘three-term” functionalities are highlighted below [5, 6].

  • The proportional term – gives a control action proportional to the error signal through the all-pass gain factor.

  • The integral term – mismatches’ steady state errors through low-frequency compensation by an integrator.

  • The derivative term – enhancing the transient response through high-frequency compensation by a differentiator.

The objective function (J) used for optimizing the controller parameter’s has been considered an integral performance index over the simulation period using the weighted sum of squared frequency deviation \( (\Delta {\text{f}}) \) and the deviation of the control signal \( (\Delta {\text{u}}) \) as given by (3).

$$ = {\text{J}}_{\text{opt}} = \int_{{{\text{T}}_{ \hbox{min} } }}^{{{\text{T}}_{ \hbox{max} } }} { [{\text{w}}(\Delta {\text{f}})^{2} + \left( {\frac{{1 - {\text{w}}}}{\text{Kn}}} \right)\left( {\Delta {\text{u}}} \right)^{2} ]{\text{dt}}} $$
(3)

Where w dictates the relative importance of the two objectives (i.e., Integral of Squared Error—ISE and Integral of squared Deviation of Control Output—ISDCO), and its value is taken as 0.7. Kn = \( 10^{4} \) is the normalizing constant to scale ISE and ISDCO in uniform scale. The model of the objective function is presented using Matlab/Simulink.

3.2 Interview on PSO algorithm

Many problems have not an exact solution that gives the results in a reasonable time. For overcoming these problems some metaheuristics methods which offer an approached solution after many iterations are recently proposed. Among these methods Particle Swarm Optimization algorithm that has generic principle to be applied in many fields of optimization problems. PSO is a stochastic optimization algorithm developed by Eberhart and Kennedy, inspired by the social behavior and fish schooling of bird flocking. Each particle in the swarm is a different possible set of the unknown parameters of the objective function to be optimized. The swarm consists of N particles moving around in a D-dimensional search space. Each particle is initialized with a random position and a random velocity [9]. The new velocity can be calculated by the fellow formula.

$$ V_{i + 1} = w.V_{i} + C_{1} .r_{1} \left( {P_{best} - Xi_{k} } \right) + C_{2} .r_{2.} \left( {G_{best} - X_{i} } \right) $$
(4)
$$ X_{i + 1} = X_{i} + V_{i + 1} $$
(5)

Where \( V_{i} \) is the component in the dimension of the particle velocity in iteration, \( X_{i} \) is the component in the dimension of the particle position in iteration, \( C_{1} and C_{2} \) are constant weight factors, Pbest is the best position achieved so far by particle, Gbest is the best position found by the neighbors of particle, and are random factors in between 0 and 1 interval, and w is inertia weight which is started from a positive initial value (w0) and decreases during the iterations by \( W_{k + 1} = \beta .W_{k} \).

The algorithms of PSO can be described as follows:

Step1: Initialize a population of particles with random positions and velocities on D-dimensions in the problem space.

Step2. Evaluation of desired optimization fitness function in D variables for each particle,

Step3. Comparison of particle’s fitness evaluated with its best previous position. If the current value is better, then set the best previous position equal to the current value, and pi equals to the current location xi in D dimensional space.

Step4. Identifying the particle in the neighborhood with the best fitness so far, and assign its index to the variable g,

Step5. Change velocity and position of the particle according to Eqs. (4) and (5).

Step6. Return to step 2 until a criterion is met or end of iterations.

The flowchart of this algorithm is presented by Fig. 3 as follow:

Fig. 3.
figure 3

Flowchart of PSO algorithm

4 Results and Discussion

The proposed configuration of the microgrid is simulated under nominal condition during 120 s using Matlab/Simulink interface. A PID controller is introduced in order to eliminate the frequency and power fluctuations provoked by the integration of renewable power generation such as PV and wind which have intermittent nature and stochastic changing during the simulation time. The simulation results are showed in followed figures (Figs. 4, 5, 6 and 7).

Fig. 4.
figure 4

PSO convergence characteristic

Fig. 5.
figure 5

Frequency and power deviation with signal control

Fig. 6.
figure 6

Generated power by each component of a microgrid

Fig. 7.
figure 7

Power and frequency deviations with control signal using the best PID based GA and PSO.

The change in power demand and generation causes fluctuations in frequency and power deviations which are settled down after few second due to the coordination with generation sources and storage devices through the controller. With a thorough analysis of results, it can be observed that small deviation of frequency and power is achieved by using of PID controller based PSO compared to the results given using GA based PID controller. The proposed controller based PSO appeared better than the controller based GA in performances and stability of the system.

5 Conclusion

The proposed hybrid system consisting of PV, WTG, FC, DEG, BESS, and FESS is presented, controlled using PID and simulated autonomously. The system components are modeled using the first order transfer function considering reasonable approximation. Different types of energy storage such as BESS and FESS have been used to absorb the fluctuation in output power of photovoltaic and wind systems. However, a control scheme based on the PID controller is used to provide power and, frequency deviations. The PID parameters are optimized using the Particle Swarm Optimization algorithm. The obtained results are compared with the Genetic Algorithm based PID controller. This proposed method is a good choice for application in control of the hybrid energy system based on the renewable energy system in comparison with Genetic Algorithm.