Frequency control scheme based on the CDM-PID controller for the hybrid microgrid system with stochastic renewable generators

In this paper, we introduce a Coefficient Diagram Method (CDM) to design a conventional PID controller. This controller is used to decrease the frequency fluctuations of a microgrid system composed of two renewable energy sources (WTG and STPG) and four controlled elements (UC, FESS, BESS and DEG). The method compares two characteristic polynomials of the same order:, the coefficients of the first polynomial are a function of microgrid parameters and the unknown gains of the PID controller. The second is called the target polynomial; its coefficients are calculated by choosing the stability indices and the equivalent time constant to satisfy the desired performances of the closed-loop system. Mathematically, the order of the polynomial controller determines the type of linear system of equations to solve: undetermined or overdetermined. In our application, the least squares method is used to find an approximate solution to the overdetermined system resulting from this comparison. Digital simulation is performed to test the performance of the microgrid controlled by the CDM-PID controller. The obtained results are compared with two recently published works where the parameters of the PID controllers are tuned by DE and chaotic PSO algorithms. The results show that the CDM-PID controller gives better performance.


Introduction
Nowadays, specialists attribute the increase in electrical energy demand to the economic and demographic growth that the world witnessed after the Second World War. This development has prompted specialists to use natural resources to produce electrical energy to reduce the consumption of combustible energy which pollutes the environment due to gas emissions. To satisfy the need for electrical energy in isolated sites, numerous microgrids have been installed around the world. These small-scale systems are designed to produce electrical energy to supply local buildings, islands and military bases during normal and emergency operating conditions. They are made up of 3 main units: production, storage and management. Generally, microgrids consist of hybrid renewable energy sources (solar panels, isolated or non-isolated wind turbines), energy storage systems or even generators. The storage devices (batteries, ultracapacitor, etc.) are coupled to microgrid systems to improve efficiency and reduce frequency fluctuations. The renewable nature of PVs and wind turbines depends on climatic conditions; this dependence can affect the quality of the produced energy and especially the frequency stability of the overall system. In the literature, much theoretical research recently published has implemented conventional PID controllers [1][2][3][4][5][6][7][8][9], fractional PID controllers [1], [3][4][5], [10], fuzzy logic controllers [11,12], neural networks [13,14] to decrease the frequency fluctuations of microgrid systems. Other researchers have proposed new structures of combined controllers (fractional order-multistage PD/(1+PI) controller [15], robust fuzzy cascade PD-PI controller [16], fuzzy-aided PID controller [17] type-II fuzzy PID controller [18], tilt fuzzy cascade (TDF(1+TI)) controller [19], fractional order-based type-II fuzzy controller [20]) to regulate the frequency of the microgrid under different uncertainties.
In practice, the PID controller has emerged in more than 90% of industrial applications especially in the control of output power and frequency in microgrid systems due to its extreme simplicity and the performances it can offer to the closed loop satisfying the desired specifications. In these systems, the most used methods to compute the PID gains are based on Genetic Algorithm GA, Differential Evolution DE, particle swarm optimization PSO, Bacteria foraging BF or Krill Herd KH algorithms [1], [3,4], [9], [21,22]. These methods require formulating the optimization problem by defining the objective function and choosing the parameters of the algorithm to be applied, which limits their use.
The Coefficient Diagram Method (CDM) is systematic that combines classical and modern control theories. Generally, it's used to design polynomial controllers where the degrees depend on the type of disturbance (steps, ramp, etc.) and the transfer function degree of the plant to define the Diophantine equation. Theoretically, the solution of this equation is difficult when the number of equations is great or less than that of unknowns. Compared to a pole placement method, the most important property of the CDM technique is that the calculation of the coefficients of the characteristic polynomial requires the system parameters, the controller parameters and the desired level of performance (stability index, settling time, etc.) [23]. In practice, the effectiveness of this approach has been demonstrated by much research recently published [17][18][19]. In microgrid systems, the CDM technique was applied by [24] and [25]. In [24], the authors present a distributed load frequency control method based on both the linear quadratic Gaussian (LQG) method and the CDM technique. In [25], a new application of robust virtual inertia control-based Coefficient Diagram Method controller is proposed. In this paper, PID controller gains are calculated according to the CDM technique to reduce the impact of frequency fluctuations of the microgrid system caused by a load demand and the connection of hybrid renewable energy sources. The basic idea of this method is to use the stability index and the equivalent time constant to compute the closed-loop characteristic polynomial of the overall system. The behaviour of the microgrid system based on the CDM-PID controller under different disturbances is investigated and compared with those of DE-PID and Chaotic PSO-PID control methods. This paper is organized as follows: The theoretical background of the proposed method is presented in Section 1. A small signal model of the chosen configuration is given in Section 2. Section 3 resumes the steps to follow the design of the PID controller. The analysis of the obtained results is given in section 4. The paper ends with conclusions in Section 5.

Theoretical background: the coffecient diagram method
The block diagram of the CDM control system proposed by Manabe [24][25][26][27][28][29][30][31] is shown in Figure 1: R(s) is the input signal reference, Y(s) is the output signal, u(s) is the controller signal and d(s) is the external disturbance. N(s) and D(s) are the numerator and denominator polynomials of the controlled system, respectively, F(s), A(s) and B(s) represent the polynomial controllers.
The closed-loop transfer function of the system is given by where P(s) is the polynomial characteristic of the system. Its coefficients are calculated by CDM is an indirect pole-placement method that aims to determine the convenient location for the closedloop system's poles depending on the degree of the plant and the desired control performance: stability, settling time, etc [25][26][27][28]. In this case, the polynomials A(s) and B(s) of the CDM control structures are given as where the condition p ≥ q must be satisfied for practical realization. The coefficients of P(s) are expressed in terms of k i and l i . According to Manabe [23], the target characteristic polynomial is represented as in (5): The stability index γ i , the equivalent time constant τ and the stability limit γ * i are defined as After defining the value of γ i and τ , the target characteristic polynomial is derived in terms of a 0 , τ and γ i as [25][26][27][28] P t (s) = a 0 .
By comparing each coefficient of characteristic equations between (2) and (10), the parameters of A(s) and B(s) polynomial controller are obtained. Generally, the recommended standard Manabe values of τ and γ i are chosen as follows [32,33]: where t s is the user-specified settling time.
The above values of γ i can be changed to satisfy the desired performance. F(s) is obtained using the following expression [24][25][26]: The sufficient condition of stability is given as [25] a i > 1.12.

Description of the hybrid power system with renewable generations
Microgrids are considered as a small-scale energy system with the integration of renewable sources and storage devices to supply a connected load demand which can be a critical load and commercial or industrial area that can be connected to the main grid or isolated in a remote area. These renewable energy generations have random characteristics due to the environment and weather conditions change. The randomness in renewable energy sources and in load demands should be taken into account and requires the addition of storage devices such as battery energy storage systems (BESS), flywheel energy storage systems (FESS) and ultracapacitor (UC) to improve the unbalance between load and generation. The diesel engine, microturbine and fuel cell are always integrated with the microgrid as supplementary sources to overcome the issues in the operation and stability of the microgrid. The different parts of a microgrid are connected through power converters. The proposed microgrid configuration is illustrated in Figure 2 [1], [3], [4], [7], [34]: To study the stability of the system against external disturbances, we must present briefly the principle and the mathematical model of each element of the microgrid:

Photovoltaic system model
The photovoltaic solar module can capture the energy from the sun and convert it into a direct current. This phenomenon is based on the behaviour of semiconductor materials when they receive solar radiation. The generated power is changed according to solar radiation and environmental temperature. To analyze the frequency deviation behaviour in the frequency domain, it can be modelled by the first-order transfer function lag [1], [3], [4], [7]:

Model of the wind turbine generator
Wind turbines are mechanical devices which transform the wind force into electrical energy. These systems produce about 3% of the world's electricity. The performances of wind turbines depend on three parameters: the shape and length of the blades, the wind speed and finally the temperature. In this study for frequency analysis, the transfer function of wind turbine generator is given by first-order lag neglecting nonlinearities [1], [3], [4], [7]:

Fuel cell model
Fuel cells are static electrochemical devices that convert chemical energy into electrical energy through an electrochemical reaction. These generators utilize hydrogen as fuel and oxygen as the oxidant in the reaction to produce electricity, water and heat. In practice, the temperature released from this chemical reaction varies between 50°C and 1000°C. The simultaneous production of electricity and heat provides excellent energy efficiency. To analyze the frequency of the microgrid system, the fuel cell can be modelled by a transfer function in first-order [1], [3], [4], [7]:

Diesel generator modelling
Diesel generators are electricity production systems consisting of a thermal generator and an alternator. This type of installation is often used as an emergency energy source in the event of the absence or failure of the public network. Sometimes, they use to supply isolated sites in the mountains or on the islands. They require speed regulation on the engine and voltage regulation on the alternator. In addition, they must be equipped with a set of sensors and safety devices. The diesel engine generator can be presented by a first-order transfer function [1], [3], [4], [7]:

Energy storage device models
In microgrid applications, energy storage batteries, ultra-capacitors and Flywheels are widely used to store the surplus of power from renewable sources to release it later when there is an imbalance between the demand and the generation. Generally, to study the stability of microgrid systems, these devices are modelled by first-order transfer functions [1], [3], [4], [7]:

Aqua electrolyzer
Aqua electrolyzer helps to decrease the rapid fluctuations in the microgrid system. It receives a part of the surplus power generated by wind and solar thermal systems to generate hydrogen based on the oxide reduction by the electrolyte. The generated hydrogen is used by the fuel cell as a foil. The aqua electrolyzer can be represented by a first-order transfer function as below [1] [3]: The Aqua Electrolyzer uses the (1 − K n ) fraction of the total power produced by WTG and STPG to produce hydrogen. In our application, K n is 0.6.

Frequency deviation model
Microgrid systems must balance production and demand for power to ensure frequency and voltage stability. The integration of renewable energy sources affects the stability of microgrids, leads to an imbalance in the produced powers, and deviates the frequency from its nominal value. To maintain the system stable and less sensible to external disturbances, the frequency deviation ( f ) must be controlled. The power system model can be represented as follows [1], [3]: where M and D are the equivalent inertia constant and damping constant, respectively. All the components of the microgrid are modelled by the first transfer function with the associated parameters presented in Table 1 [1], [3]. The small signal model given in Figure 3 is considered to study the frequency stability of the microgrid against the climatic conditions and parametric variations [1], [3]: The controller is inserted into the loop to control the frequency of the microgrid. It sends the control signal to   the storage systems to absorb/release additional/deficit power from/into the grid, respectively. From the mathematical model we can write:

CDM-PID controller design for the proposed microgrid
To identify the parameters of the proposed controller used in this application by the CDM technique, the open-loop transfer function G 0 (s) of the system must be calculated. The microgrid system given in Figure  7 consists of four parallel blocks of controlled sources G BESS (s), G FESS (s), G UC (s) and G DEG (s) in series with the block G sys (s) of the power system. All other inputs change in the wind P W , solar power P S and the change in load demand P L are acting as a disturbance input to the plant model.
This function has five poles: two of these are complexes. Theoretically, the location of poles in a complex plan can help us to understand the characteristics of the time response.
It's considered that there is a step disturbance affecting the system. According to Table 1 given in [23], the order of the polynomial controller must be4. In this work, we have chosen a second-order polynomial controller given by the following structure: where {k 2 , k 1 , k 0 , l 1 } are the parameters to be set. Compared to the conventional PID controller given by (28) K p , K i and K d can be identified as CDM is an algebraic approach combining classic and modern control theories and uses polynomial representation in a mathematical expression. According to the MG parameters given in Table 1, the characteristic polynomial of the closed-loop system can be expressed as follows: This relationship highlights the stability of the closed-loop that depends on k 2 , k 1 , k 0 and l 1 .
The design of the proposed controller by the CDM method requires knowledge of the values of the following parameters: the equivalent time constant τ and the stability indices, γ 1 ,γ 2 , γ 3 ,γ 4 , γ 5 . In this case, the target characteristic polynomial in terms of τ and γ i can be written as where at 6 = a 0 .τ 6 . 1 γ 5 .γ In the CDM technique, the Diophantine equation is obtained by equating the closed-loop system characteristic polynomial of (30) to the target polynomial characteristic given in (31). In Sylvester form, it's given by where n is the degree of the characteristic polynomial and [C] is a square matrix of known values. In our case, choosing a second-order polynomial controller brings us to a linear system (33) in which the number of equations 7 is greater than the number of unknowns 4. In mathematics, this system is overdetermined: [C] 7.4 .
The matrix [C] has 7 rows (corresponding to equations) and 4 columns (corresponding to unknowns) and the vector [at i ] has 7 rows. In general, there is no exact solution to this system. Then, the problem becomes how to identify a satisfactory solution to minimize a cost function. In practice, we can define a cost function as the square sum of errors to find the unknown vector. In this case, the solution given by the least squares method minimizes the square sum of error given by the following equation: Expanding e(k 2 , k 1 , k 0 , l 1 ) gives: Taking the derivative gives: The minimum value for (34) is obtained when (k 2 , k 1 , k 0 , l 1 ) satisfies: The least-square solution is obtained by solving the linear system given by (33): The matrix The CDM design procedure is summarized by the following flowchart ( Figure 4

Simulation results and discussion
To demonstrate the effectiveness of the proposed tuning rule, the PID controller based on CDM algebraic technique is now tested by digital simulation using the microgrid model presented in Figure 2. By setting the simulation time to 120 s, the third-order Bogacki-Shampine method is used to integrate the studied closed-loop hybrid power system numerically.
In this explicit method, the integration step is variable to guarantee that the error remains below a relative tolerance of 0.001. The mathematical model (40) is used to simulate the random fluctuations in the production of renewable energy sources (wind turbines, photovoltaic panels) and the energy demand of the connected loads [1]: where P represents the power output of the solar, wind or load model, ∅ is the stochastic component of the power, β contributes to the mean value of the power, G(s) is a low-pass transfer function, {η, δ} are constants to normalize the generated or demand powers. For wind power generation, the parameters of (41) are [1] ∅ ∼ U (−1, 1), η = 0.8, β = 10, G(s) = 1 (1 + 10 4 .s) ,  Figure 6 represents the profiles of the powers of renewable energy sources and the power required by the load with the stochastic components: The following two functions are used to evaluate the performances of the proposed design method [1]:   for the present simulation study, T max = 120s and The simulation is organized into three different scenarios. Scenario 1: Performance of the hybrid power system under nominal operating conditions To justify the use of the CDM technique, the performance properties of the designed PID controller are verified under nominal operating conditions of the hybrid power system. The variation in generated powers (P WTG , P Solar ) and the demand power P L given in Figure 6 are considered. The obtained results are compared with those of articles [1] and [3] where the parameters gains of the PID controller are optimized using the chaotic PSO algorithm and Differential Evolution Algorithm, respectively. The results of this comparison are given in Figure 7: According to the simulation results, at t = 80, when the load power demand P L increases from 1pu to 1.8pu, the frequency fluctuations are well damped with an overshoot of 22.2% for the system whose PID gains are calculated by the CDM approach, 42.4% for the DE algorithm and 76.3% the Chaotic PSO technique. Table  2 resumes the simulation results: The PID controller, whose parameters are calculated by the CDM algorithm, gives better performance in terms of reduction in frequency fluctuations by 22.2% than the other algorithms. However, this reduction requires a relatively large control signal 6.874, which possibly presents a shock/stress on the mechanical parts of the controlled sources. Scenario 2: The effects of stability indexes on system performance To study the impact of the stability indices on the overall behaviour of the system and especially the frequency fluctuations under nominal operating conditions, a numerical simulation was carried out. In this case, the stability index γ 3 varied from 1.4 to 2.2; the results of the simulation performed with the profile of Figure 6 are represented in Figure 8 and Table 3.  From these results, we note that the decrease in γ 3 leads to an increase in frequency fluctuations, which confirms that the judicious choice of stability indices plays a crucial role in the stability of the microgrid system. Scenario 3: Robustness against ±10, ±30% and ±50% ultracapacitor parameter variations Internal or external disturbances are undesirable events that can affect systems at any time. In microgrid applications, disturbances can be parametric or climatic variations. They can affect the stability of the overall system, which reduces energy efficiency or causes production discontinuity. To test the robustness of the closed-loop hybrid microgrid with the CDM-PID controller, a parametric variation of ±10, ±30% and ±50% was introduced in the ultracapacitor. The results of these tests are recorded in Figure 9 and tabulated in Table 4.
These results show that the CDM-based PID controller provides a good dynamic response against ±10, ±30% and ±50% parametric variations of ultracapacitor elements in comparison with the other controllers. The decrease in frequency fluctuations increases the stability of the microgrid system.

Conclusion
In this paper, an analytical approach is proposed to design a conventional PID controller to suppress the frequency fluctuations of a microgrid system under normal operating conditions and in the presence of disturbances. This technique known by the Coefficient Diagram Method is considered by the researchers as an indirect pole placement; its principle is based on the comparison of two characteristic polynomials of the same order; the coefficients of the first polynomial are calculated using the four unknown gains of the polynomial controller and the open-loop small signal model of the microgrid system. The coefficients of the desired closed-loop characteristic polynomial require the choice of the stability indices and the equivalent time constant. The resolution of the equation system resulting from this comparison gives the parameters of the PID controller. To test the advantage of the proposed technique by digital simulation, the designed PID controller is installed in the direct chain of the system and large parametric variations ±50% have been introduced in the ultracapacitor-controlled source to disturb the function of the microgrid. The obtained results are analyzed and compared to two previous works recently published where the PID controller is designed by DE and chaotic PSO algorithms, respectively. The reduced frequency oscillations in the presence of large parametric disturbances confirm the effectiveness of the proposed technique to design the PID controller.

Disclosure statement
No potential conflict of interest was reported by the author(s).