Optimal Management of a Grid-Connected Hybrid Energy System Using FLC-ANN Hybrid Technique

ABSTRACT


INTRODUCTION
Currently, renewable energies are characterized by their intermittent and unpredictable nature, which causes problems in the quality factor and the balance factor between energy production and consumption [1].We also find that individual energy sources cannot solve these problems, so two or more energy sources (renewable or non-renewable) can be combined to form a hybrid system [2].In addition, to increase the efficiency of the systems of these energies and establish a balance between consumption and energy production, energy storage is controlled by charge and discharge [3], as there are different types of energy storage systems integrated into RESs, for example: PV/Wind/Battery [4], Wind/Flywheel [5], Wind/SC [6].Nevertheless, these types do not meet consumption and energy density at the same time, so it is proposed to combine two or more heterogeneous and complementary storage systems (ESS) to form a hybrid system (HESS), such as Battery/SMES [7], Battery/H2 [8], Battery/SC [9].In this regard, the HESS component of a battery pack and flywheel has been applied to a PV system to supply a residential load [10], and further applied to a wind system [11].and to power a micro-grid, HESS applied a battery/supercapacitor component to a standalone PV system [12].Garcia et al. [13] applied HESS (battery/hydrogen) to a wind/PV system.And when designing a control unit for HESS, we face some challenges; for example, we must take into account the controls of each storage element and how the power is distributed between them [7] and the unbalanced load that leads to poor power quality.In order to get rid of the limitations of these challenges, the researchers proposed control strategies to achieve balance between demand and power generation by relying on the PI controller to share power between HESS elements (battery and supercapacitor) [14], as well as controlling the battery and the supercapacitor based on a low-pass filter-PI [9].The researchers proposed a coordination control to regulate the energy on the one hand and absorb the unbalanced energy in MG on the other hand [15].I also propose a predictive technique that maintains the SOC and the voltage of the HESS (battery and supercapacitor respectively) elements within the allowable ranges [16], and to improve the management of hybrid systems in terms of efficiency and durability, an FLC-based EMS system was provided to optimally control the output power of FC system [17].As it was done, a multi-mode logical power distributor strategy was also proposed to solve the problem of a mismatch between demand and generation for a hybrid power system based on an integrated photovoltaic system with HESS [18].In addition, another energy management strategy based on an artificial neural network (ANN) was proposed for the reverse osmosis desalination unit for the smooth transition of the generated energy [19].Moreover, an artificial neural network based on Hybrid Bat Search algorithm (HBSANN) and Combined Cuckoo algorithm (CCSNN) was used for energy management in order to enhance the power sharing between HESS elements [1,20].Recently, to improve the power management of HESS, the FOPI-PSO controller was implemented [21], and to make wireless charging highly efficient for electric vehicles, the circle search algorithm (CSA) and quantum neural networks (QNN) were combined [22].
In this study, the supercapacitor was integrated with the battery to assist it during charging and discharging processes by alternating, forming a highly efficient hybrid energy storage system (HESS), knowing that it is difficult to control the energy balance effectively between the sources, the capacitor, the battery, and the load in hybrid energy systems by applying conventional control strategies, which represents a challenge due to the variable and non-linear nature of these systems.
To address this challenge, we propose a new intelligent hybrid energy management strategy based on the combination of the Fuzzy Logic Control (FLC) unit and Artificial Neural Network (ANN) unit, which has the ability to deal with complex and nonlinear systems, which is the main contribution of this paper.The goal of this strategy is to improve the management of energy flow between the elements of the hybrid energy system, ensuring efficiency and optimal performance.
The control systems proposed in this study are implemented on the proposed hybrid energy system (PV/wind/FC/DG/battery/SC) to enhance energy production according to three main aspects, as follows: 1) The first aspect is that the generators are controlled to achieve maximum power point tracking (MPPT) by applying TSR technology for wind power generators and fuzzy logic technology for photovoltaic generators.2) The second aspect is the energy management of the proposed system.To achieve optimal management, an intelligent hybrid strategy was implemented consisting of an FLC unit and an ANN unit working as a unified system with the addition of two PI controllers to achieve the reference tracking required for HESS where the fuel cell is controlled by the PI controller in order to track the reference value of the DC bus. 3) The third aspect, the active and reactive power flowing into the grid, is controlled by implementing Direct Power Control based on the Fuzzy Logic Controller (DPC-FLC).
This paper is organized as follows: Section 2 describe the modeling and control of its different parts of the studied hybrid energy system.In Section 3, the HES management strategy proposed is described.In Section 4, grid-side converter DC/AC is control.In Section 5, are presented the results simulations-MATLAB/Simulink and discussed.Finally in Section 6 a conclusion for this work.

DESCRIBE THE MODELING AND CONTROL OF THE STUDIED HYBRID ENERGY SYSTEM
Figure 1 shows the studied hybrid energy system, where the latter is composed of a conventional energy source (diesel generator), three renewable energy sources wind /PV/FC/DG and a hybrid energy storage system (battery / supercapacitor).All of the above elements are connected with control/non-control converter in parallel with the network to provide the necessary power.

PV system model
The solar cell and the mathematical expression for the current produced through it can be represented according to Eq. ( 1) [23].
where:  and  represent the PV cell output current and voltage respectively;  0 is the diode saturation current and   is actual light-generated current;   and   are the PV cell's parallel and series resistances respectively;   is the thermal junction voltage; α is the diode constant.

Control MPPT based FLC
In this work, an MPPT technique based on fuzzy logic control (FLC) of a photovoltaic system has been implemented.Despite the challenges it faces of the MPPT-fuzzy logic control technique, it has the ability to easily select the maximum power point for PV panels [24].The fuzzy rules of this technique are designed according to Table 1, which basically contains the inputs, usually E and ΔE, which are determined according to the Eqs.( 2) and (3) (such that dP/dV disappears at MPP) in order to determine the ΔD that is the output, for example, if E is PB it means that the operating point is far to the left from the MPP consequently, ΔD will be PB for increasing duty ratio if ΔE is ZE [25].
where, E: Error, ΔE: Change in error, ΔD: Change in duty ratio, NB: Negative Big, NS: Negative Small, ZE: Zero, PS: Positive Small, and PB: Positive Big.

Wind turbine model
The following equation expresses the amount of aerodynamic force applied to the plane of the turbine rotor [26]: where,  is the wind speed (/);  is the circular surface swept by the turbine ( 2 );  is the density of air (/ 3 ); is the speed ratio;  is the pitch angle of the blade.  is the power coefficient and  is the speed ratio.

PMSG model
The PMSG model is represented as follows on the d-q axis [27]: where,   ,   ,   ,   : stator voltage and current on the d-q axis respectively;   ,  : generator inductance and resistance respectively; : magnet flux; : generator speed.

MPPT control
In order to extract the optimal power from wind power, a DC-DC boost converter is used because it is an important part of this study, and a PI controller is used to correct the difference between the required speed (extracted by MPPT) and the actual speed to control the current of the latter [28].This is done according to Eq. ( 6) and Figure 2 [29], thus obtaining the optimal power according to Eq. ( 7) [30].
where,   is the voltage of the fuel cell (V);   is open circuit voltage (V);  0 is exchange current (A);   is the current of the fuel cell (A);  ℎ internal resistance (Ω);  is tafel slope (V); the number of cells is ;   is the response time.

Diesel generator model
The electrical power output of a diesel generator is expressed according to the following equation [32]: where,   : electrical power output;   : mechanical power input;  : diesel generator's inertia constant;  : factor of damping;   : speed of electrical;   : speed of rotor.

Hybrid energy storage system (HESS) model
To improve the proposed system's efficiency and address energy quality issues caused by changes in energy demand and climate, a hybrid energy storage system consisting of a battery (lead acid) and a supercapacitor was integrated, in which the battery is given priority during charging and discharging operations.The latter is integrated with DC-Link by means of bidirectional DC-DC buck-boost converters.

Battery model
The battery voltage is expressed according to the following relationships [33]: where, Ebat is the no-load voltage; Ri: is the internal resistance of the battery; i is the current of the battery; Ubat is the voltage of the battery.

Supercapacitor model
The output voltage for SC can be expressed according to Eq. ( 12) [34]: where,   and   represent the SC's module current (A) and resistance (U), respectively; The electric charge of the cell is denoted by   (C).
In this work, we use SOC limits (minimum (SOCmin) and maximum (SOCmax)) to evaluate the range of battery power and SC power allowable according to the following two relationships [35,36]:

ENERGY MANAGEMENT SYSTEM
The system in the absence of proper energy management may become unstable, so a new intelligent hybrid energy management strategy was designed and used in order to manage the energy of the proposed system and control the energy flow according to Figure 3 to meet the energy demand of the grid in spite of the changes (changing energy demand and climate change) that occur in our system.This new strategy is based on two basic units, the first is the FLC and the second is the ANN so that both units work together as one system in order to achieve the following objectives: • Ensuring continuous power supply to the load and keeping constant DC voltage despite changes in the system.

•
Improving the SOC% of the HESS.We design the proposed new hybrid energy management strategy according to Figure 4 that relies on artificial intelligence by merging two units of the family of artificial intelligence units to obtain a hybrid unit that operates as one system, where the first unit is FLC and the second unit is ANN.This hybrid unit determines the HESS reference power and status (ON/OFF) of the K_wind, K_pv and K_DG switches to turn on or off the wind system, PV system, and diesel generator respectively, depending on the SOC of the HESS and net power.Two PI controllers have been added to the proposed management unit to achieve tracking of the required energy references for the HESS.In addition, we use a third PI controller to control the fuel cell in order to maintain DC bus stability in the hybrid system.The fuzzy logic control (FLC)-based controller is the first essential power management part of the proposed hybrid unit, as mentioned and shown in Figure 3 and Figure 4, respectively.It has an intuitive pattern, experience-based of representing action through rules [37].A unit FLC is determines operating modes (M1, M2, M3, M4, M5, M6 and M7), depending on the SOC of the HESS and the net power by the sample rules proposed in Figure 5 and Table 2.

ANN unit control
The controller based on an artificial neural network (ANN) is the second essential power management part of the proposed system in this work, as shown in the Figure 3 and Figure 4.The latter (ANN) has been shown to be efficient, robust, and rapid [1].An artificial neural network (ANN) is a design that simulates the operation of a biological neuron so that it can be created according to Figure 6, which can be summarized as follows [38]:  In our study, according to the Figure 7, architecture the neural network consists of 7 inputs (  1,2,3,4,5,6,7 ) and five outputs ( − ,  −   ,   and   ), this neural network is trained (e.g. Figure 8) to determine the reference battery power, the SC power, and the K_pv state, And K_wind, and K_DG.

ANN training results
Results for training, validation, and target testing are displayed in Figure 9 for the network outputs.Thus, the NN controller was trained using 70% of the training data, 15% of the validation data, and 15% of the target testing.In this respect, based on the regression curves displayed, we conclude that the NN unit has been trained effectively, so all datasets have ideal R-values (R = 1 in all case), as well as the mean square error (MSE) during training is shown in Figure 10 which shows the best performance in validation, with its value of 6.7508e-25 at epoch7.

GRID-SIDE CONVERTER DC/AC CONTROL
To provide and regulate the required power to the consumers, the active and reactive power between the grid and the hybrid energy system is controlled through the converter control (DC/AC).In this part, to control the active and reactive power flowing in the grid, we propose Direct Power Control (DPC) based on FLC, as shown in Figure 11.

Model of the grid
We define a frame of reference that rotates synchronously with the grid voltage selected to express the dynamic model of grid connection according to Eq. ( 15) and Eq. ( 16) [27]: where,   ,   are voltage elements of the grid on the axis of d-q;   ,   are voltage elements of the inverter on the axis of d-q;   is the resistance of the grid;   ,   are inductance elements of the grid on the axis of d-q;   ,   are current elements of the grid on the axis of d-q.

Design of a FLC controller
In this study, we use the fuzzy controller to control the active and reactive power.This unit is designed by proposing 9 rules as shown in Table 3.These rules (output variables) are determined depending on the input variables    ,  (error of active and reactive power) and ∆   ,  (change in error of active and reactive power), which are specified through Eqs. ( 17)-(20) respectively.For example, if    ,  is NB and ∆   ,  is PB, then the result is ZE.The linguistic variables used in this unit are as follows: ZE is equal zero, PB is positive big, and NB is negative big. ( ) ( )

RESULT AND DISCUSSION
We study the dynamic performance of the studied system by conducting a simulation test on the MATLAB Simulink platform under changing conditions in terms of energy demand and climate: energy demand change, wind speed change, solar radiation change with constant temperature, and HESS state of charge (battery and SC) shown in Figures 12-15, respectively.This is to verify the effectiveness and performance of the proposed controllers that optimize, balance, and share energy between the studied hybrid system elements (PV, wind, etc.) and grid requirements.
We obtained the results by following the following steps: • The photovoltaic system power is optimized based on the FLC controller.• Optimizing the power of the wind system that depends on the TRS microcontroller.• HESS is charged/discharged and the diesel generator is running in order to adapt to changes in energy demand and climate.• Control the flow of energy and its balance between the generated energy and the HESS and the energy required by the grid in light of the scenarios that may arise due to the above-mentioned factors that constitute multiple operating modes of the HES, based on an intelligent energy management strategy to achieve optimal management of the proposed system.• Verifying the performance of the proposed energy management unit by subjecting the studied system to seven different operating modes according to Figure 3 by changing the power of the photovoltaic generator and the wind power generator according to environmental changes, and power demand so we get a simulation of all patterns.Figure 16 and Figure 17 indicated the tracking power of the references needed for the battery and the supercapacitor, respectively, while Figure 18 illustrates the results of tracking the reference value of the DC bus by controlling the fuel cell, which was shared with other sources and were approximately 200 watts in all modes.The findings shown in Figure 18 and Figure 19 demonstrate attaining energy balance and optimal management of HES, respectively.As a consequence, we discover the source powers for the examined hybrid system are most compatible, as shown by the various patterns observed.Therefore, we interpret each pattern as follows: Mode 1: Power sources and demand power equal to 6500 W (Pnet = 0), so that 2500 W is generated from the wind generator, 3800 W from the PV source, and 200 W from the FC source.This causes the HESS elements to become inactive (0W) and the diesel generator to stop.
Mode 2: The wind generator outputs 5000 W, the PV generator outputs 3500 W, and the FC source outputs 200 W while the diesel generator is inactive and the demand power is 3000 W less than the source power (Pnet > 0).This indicates that the battery is in charge mode (5700W charge), and the supercapacitor is in rest mode (0W charge/discharge).
Mode 3: In this mode, the rated request power is 5200 W lower than the sources power (Pnet > 0).So that the photovoltaic generator produces 3200 watts, the wind generator produces 5600 watts, the FC source outputs 200 watts, and the diesel generator output is 0 watts (at idle).On the other hand, the SOCbat has reached its maximum charge, shown in Figure 20, so the battery is in sleep mode (0 W charging), and the supercapacitor is in charging mode to charge the excess power (3800 W charging) in order to support in case of complete discharge of the battery.
Mode 4: The state of HESS charge reaches its maximum (SOCb > SOCmax and SOCsc > SOCmax) as shown in Figure 20 and Figure 21, so the wind generator is disconnected and the SC stops charging to protect it from overcharging, while the battery and diesel generator will be in their previous states and the photovoltaic generator and the FC supply will remain in operation in order to provide the required power of 3400 W.
Mode 5: In this mode, the power of the sources (6200W) is less than the power required (11700W) (Pnet < 0); in this case, the HESS is discharged, the battery has priority during the discharging process (5500W discharge) in order to support the sources and meet the power needed for the grid , while the SC remains in sleep mode (0 watt discharge) to support the battery when fully discharged, and the diesel generator remains inactive even when needed.
Mode 6: HESS remains discharging to support the sources power (5700 W) and provide the necessary power (9200 W) so that 3500 W of the supercapacitor is discharged while the battery is at rest (0 W discharge) because the SOCbat has reached its minimum (SOCbat < SOCmin), as shown in Figure 20.As for the diesel generator, it remains inactive until the HESS is completely discharged to the minimum discharge (SOCbat < SOCmin and SOCsc < SOCmin).
Mode 7: In this mode, the diesel generator is switched on to replace it with HESS, and this is for two reasons: the first is that the latter has reached its minimum discharge (SOCmin > SOCbat and SOCmin > SOCsc) as shown in Figure 20 and Figure 21, and the second is related to the sources' inability to provide the energy needed for the grid.
The results shown in Figure 22 were achieved by managing the energy between the elements of the hybrid energy storage system as follows: In the case of (P_net = 0), it indicates that the generation power is equal to the demand power and therefore the supercapacitor and battery are inactive.
In the case of (P_net > 0), it indicates the presence of excess energy, and therefore the battery and the supercapacitor alternately charge this energy, and the battery takes priority in charging until it reaches (SOCmax < SOCbat; Figure 20), and after that the supercapacitor intervenes until it reaches (SOCmax < SOCsc; Figure 21).
In the case of (P_net < 0), this indicates a lack of energy, and therefore the battery and the supercapacitor alternately discharge the necessary energy, and the battery takes priority in discharging until it reaches (SOCbat < SOCmin; Figure 20), after which the supercapacitor intervenes until it reaches (SOCsc < SOCmin; Figure 21).Finally, thanks to the optimal management of the power required for the grid by hybrid energy system, a high quality of power has been achieved by applying a control approach based on Direct Power Control-Fuzzy Logic Control (DPC-FLC) applied to the flow of active and reactive energy in the grid, as shown in Figure 23 and Figure 24.The results of Figure 25 and Figure 26 show the quality of the electrical power output that is injected into the grid, as we note that the THD of the grid current (phase A) was reduced to the lowest distortion (it was 0.34%) by applying the proposed control, and from it we conclude that the technique The proposed control is more robust and effective in terms of reducing distortion and THD.

CONCLUSIONS
In this paper, a hybrid energy system based on PV / Wind / FC / DG and HESS was presented, with the latter connected to the grid to provide the necessary energy.To control the proposed system by improving the power of the sources and achieving energy balance, several control units have been proposed, and they are as follows: • Application of the MPPT-FLC unit to the photovoltaic system.• Application of the MPPT-TSR unit to the wind system.• Hybrid energy management application based on FLC-ANN to achieve power balance in the system by controlling the generated sources and sharing power between the HESS elements, taking into account the SOC during the times when the power production from the sources is sufficient and insufficient.• DPC-FLC control was applied to control the active and reactive power flowing in the grid.
To evaluate the robustness and efficiency of the proposed controllers mentioned previously, the system was subjected to different scenarios represented in climate changes (solar radiation and wind speed) and energy demand by conducting a simulation test of the proposed system using the MATLAB Simulink program.
The simulation results have proven the effectiveness and performance of the controllers applied to the system, especially the proposed hybrid power management unit, in adapting to the sudden changes to which the hybrid system is subject, which indicates the superiority and optimal performance of the system, and the DPC-FLC technique applied on the grid side has good tracking indices and a low THD (0.34%), which indicates good current quality, and therefore, the results obtained indicate the extent to which this paper contributes to encouraging the use of the proposed controllers in future applications for stand-alone hybrid energy systems and grid-connected hybrid energy systems, especially those containing a hybrid energy storage system.

Figure 1 .
Figure 1.Proposed hybrid energy system

Figure 2 .
Figure 2. A schematic diagram of the MPPT controller for a wind energy generator

Figure 3 .
Figure 3. Energy management system flowchart proposed 3.1 A power management strategy proposed (FLC-ANN)

Figure 4 .
Figure 4.The diagram of a power management strategy based on an FLC-ANN 3.1.1FLC unit controlThe fuzzy logic control (FLC)-based controller is the first essential power management part of the proposed hybrid unit, as mentioned and shown in Figure3and Figure4, respectively.It has an intuitive pattern, experience-based of representing action through rules[37].A unit FLC is determines operating modes (M1, M2, M3, M4, M5, M6 and M7), depending on the SOC of the HESS and the net power by the sample rules proposed in Figure5and Table2.
Multiplying the inputs (incoming signals) by the connection weights.• Pass weights the sum of the inputs through the activation function.• Producing output through the transfer function.

Figure 7 .Figure 8 .
Figure 7. Structure of the proposed neural network

Figure 9 .
Figure 9.The ANN controller's regression performance

Figure 10 .
Figure 10.Validation performance of the ANN

Figure 11 .
Figure 11.Schematic diagram of grid control

Figure 20 .Figure 21 .Figure 22 .
Figure 20.State of charge of the battery

Figure 23 .
Figure 23.Active power of the grid

Figure 24 .Figure 26 .
Figure 24.Reactive power of the grid

Table 1 .
FLC rules applicable to the MPPT-PV ZE NB NS ZE PS PB PS NS ZE PS PB PB PB ZE PS PB PB PB

Table 2 .
Rules applicable to the FLC unit

Table 3 .
FLC rules applicable to the DPC    ,     ,