Power Management of Hybrid Grid System With Battery Deprivation Cost Using Artificial Neural Network

Continuous power supply in an integrated electric system supplied by solar energy and battery storage can be optimally maintained with the use of diesel generators. This article discusses the optimum setting-point for isolated wind, photo-voltaic, diesel, and battery storage electric grid systems. Optimal energy supply for hybrid grid systems means that the load is sufficient for 24 h. This study aims to integrate the battery deprivation costs and the fuel price feature in the optimization model for the hybrid grid. In order to count charge–discharge cycles and measure battery deprivation, the genetic algorithm concept is utilized. To solve the target function, an ANN-based algorithm with genetic coefficients can also be used to optimize the power management system. In the objective function, a weight factor is proposed. Specific weight factor values are considered for simulation studies. On the algorithm actions, charging status, and its implications for the optimized expense of the hybrid grid, the weight factor effect is measured.


INTRODUCTION
A hybrid grid (HG) is an electrical distribution network that allows the penetration of various locally produced sources with or without storage equipment (Navigant Research, 2016). Reliability and cost savings can be achieved by the use of renewable energy sources (RESs), traditional turbines, storage plants, and electricity charges, as well as the use of an HG. A hybrid grid can work in both connected and isolated modes. The HG can be linked to the main grid in the grid-connected mode via a common interconnector point and participate in energy trading as either a customer or a provider via grid receipt or power transmission. A power management system (PMS) is also used for the most efficient use of hybrid grid units. The PMS techniques can maximize the transmission of power generation outputs from HG units and ensure economic load demand (LD), as well as monitor the frequency and voltage of HG systems. Rauf et al. (2016) outlined the latest HG-PMS architecture and the different power and heat generation systems and electric cars, as well as the core functionality and limitations of HG-PMS and the use of optimization technology. Photovoltaic (PV) and wind power are the most commonly used sources of renewable energy in HGs. However, because of the intermittent nature of renewable energy sources, it is recommended that it be assisted by appropriate storage units and optimally integrated into the HG scheme. In terms of the maximum use of the battery storage (BS) in the HG, several studies were carried out for optimal delivery of HG generation and storage devices. For this reason, many advanced methods of optimization were published. A combined hybrid supply of energy and a battery source multimedia problem is solved with multi-target integral linear programming (Mathieu et al., 2013). Fuzzy logic control (FLC) determines the charging and discharge of the battery. Capital and maintenance expenditures, fuel prices, electricity costs, and carbon sanctions are the target functions to be minimized. The PMS solution for GC-HG is combined with the energy storage system (ESS) and local generation (PS) in a genetic algorithm (Rauf et al., 2016). The proposed PMS would determine how much HG electricity will be added to the ESS and how much will be replaced on the main grid. The primary aim is to maximize profits from power grid trade. Kasis et al. (2017a) investigated the planning of battery and HG generation plants. The system is modeled on a stochastic framework, and the PMS is solved using a deep Q-learning algorithm. In the study by Kasis et al. (2017b), we examined a dynamic dispatch in the HG of BS. The objective function of the problem is designed to maximize the battery operational benefit. To solve the battery management issue, a reinforcement study is proposed in combination with a search of Monte-Carlo trees. In the study by Schuitema et al. (2017), FLC was proposed to control the BS level of the state of charge (SOC) limited to the minimum and maximum limits. Moreover, a backtracking search algorithm is introduced to determine an optimum battery SOC control to allow for smooth BS operation throughout the time and to minimize the overloading and unchanging capacity. In the study by Books and Barooah (2019), an optimum power send for the GCHG was introduced with PV units and battery deactivators in the programming algorithm. The proposed goal is to maximize the amount of PV, minimize operating costs, and trade electricity costs with the grid. In the study by Kim et al. (2016), for a day-long plan, an optimal PMS solution was tested. The problem of optimization is modeling so that the operating costs for HG generation units are minimized and the consumption of renewable sources maximized. The optimization problem is fixed by convection programming, and a rolling horizon-predictive controller in combination with a predictive model determines the best environment for a BS. In the study by Aduda et al. (2018), the PMS of an isolated HG was targeted using a cuckoo-search algorithm with RES, DG, and BS. The target problem feature is to decrease overall costs and reduce gas emissions. Applying a GA achieves an economic advantage by using RES (Lin et al., 2015). The device studied is an isolated HG, BS, and DG with renewable sources. The goal feature proposed is to minimize capital and to maintain HG units, fuel costs, and pollution costs. In the GC-HG floral pollination algorithm (Chen et al., 2017), integrated RES, micro turbines, fuel cells, and BS are examined for the solution of PMS. The aim is to minimize BS operating costs, energy produced costs, the energy expenses of the grid exchanged, and costs for the demand response. In the study by Vrettos et al. (2016), an amended algorithm to check the ideal operating condition of BS in a population HG was proposed in a particle swarm optimization (PSO). An effective battery charging and discharge feature is added. Most of these research works do not take into account the objective purpose of reducing battery life. As shown, the loading and unloading processes have a major influence on BS lifetime. This article includes one of the objective functions that should be reduced, which is lifecycle deprivation costs. The genetic algorithm is used for charging and discharging cycles and quantifying the cost of battery deprivation (BDC). In order to resolve the unit engagement of a grid-connected HG, the effectiveness of the artificial neural network with genetic algorithms has been demonstrated. This study uses the ANN-GA algorithm for solving a problem of 48-h programming for isolated rural HG units. The following is an overview of the article. HG Modeling discusses modeling of HG devices; PMS Problem Formulation deals with proposed PMS, including potential objective functions and devices; ANN With Genetic Application deals with application of the ANN and genetic algorithms in the PMS; Discussion on Simulation Outcomes deals with the simulation and discussion; and Conclusion ends the article.

HG MODELING
The hybrid grid (HG) includes RES, wind turbine (WT), BS, and DGs with PV panels.

Photovoltaic Panels
In a simplified model, the solar irradiation is proportional to the photovoltaic module's performance, which can be calculated as follows (Chen et al., 2017): where I PV is the irradiation developed by solar (kWh/m 2 ) on the photovoltaic modules, A PV shows the area of the PV panels (m 2 ), and η PV presents the overall efficiency of PV panels. The total energy output can be defined as given for a number of PV modules: where N PV is the number of PV modules.

Wind Generator
Wind speed (WS) at the hub height is proportional to the WG's energy output, which can be expressed mathematically as follows (Chen et al., 2017): where η WT is the WG's efficiency, ρ air is the air density (Kg/m 3 ), C P is the coefficient of power for the wind generator, A is the swept area of the rotor, and V is the per hour speed of the generator. The per hour wind speed can be expressed mathematically as follows (Silva and Santiago, 2018): For a certain number of WGs, the total energy output can be expressed below: where N WT is the number of wind turbines.

Battery Energy Storage System
A diagram of the BS is shown in Figure 1. The power of the battery can be described as follows in the battery mode: The grid power delivered to the PBS is denoted by PG, and the load is denoted by PL. The battery power PB and the power consumed by the BS controller PC are covered by PBS. As a result, the grid power may be expressed as follows: The BS controller provides power conversion and control. It is reasonable to presume that it is proportionate to the power flow.

Cost of Diesel Energy
The energy produced by photovoltaic (PV) and wind turbines (WTs), among the energy sources in the studied hybrid grid (HG), is dependent on environmental conditions and has no cost to produce, in contrast to DG, which needs fuel to generate electricity. The FC of the DGs is therefore defined in the following: where T is prospect time, N DG is the number of DGs, and C i (P DG i (t)) shows the cost of diesel energy. A quadratic function of the DG output power is used to model fuel costs for each DG in a timely manner, expressed as follows [182]: where a i and b i are cost coefficients of DG i , and P DGi (t) is the DG i 's power delivered.

Battery Control
Battery power control is primarily used in this study to implement load-side power factor control (PFC). At the same time, we would like to retain the battery's state of charge (SOC) around a given level, say 80 percent. As a result, the battery power P B is divided into two components, the line frequency-dependent component P Bf (Δf) and the offset component P Bs (SOC), for battery SOC compensation as follows: The grid power in Eq. 2 becomes the following: The BS control will satisfy the criterion P G ≥ 0. The linear and step response droop are the two droop control systems recognized by the North American Electric Reliability Corporation (NERC) (Zhao et al., 2014). The battery power is regulated in the following way: where G b is the battery power increase that is computed as follows in (W/Hz): where R is the droop setting in (p.u. Hz/p.u. W), and P B,ref is the battery PFC operation's reference power. According to the dead-band, Δf th is the frequency deviation threshold. f o is the frequency scheduled value, and Δf (f − f o ) is the frequency deviation. The offset power P Bs (SOC) compensates for the battery energy wasted in regulation.
where SOC set is the set value of SOC. P b is the battery rated power and B is the gain used to change the offset power compensation's speed. As a result, the battery power equation is as follows: (16) Figure 1 depicts the relationship between regular battery life loss and DOD, with cycle loss increasing with cycle depth.
Here, we propose a method to evaluate the battery energy lost in the PFC operation. The energy exchange, ΔE B , can be as follows: where ΔE Bf and ΔE Bs are the energy exchanges for primary frequency control and SOC compensation, respectively.
where N R is the set of the total number of samples.
where v bi and i bi are the battery voltage and current at sample i, respectively. A model of the battery energy efficiency presented in the study by Ohmori et al. (2016) is used as follows:   November 2021 | Volume 9 | Article 774408 where R e , R p0 , and α are the model parameters identified experimentally.
E loss,sim i∈NR i 2 bi R bi .

Restrictions of Power Flow
The power flow limit that all HG energy sources, considering PV and WTs, BS, and DGs, fulfil the demanded power by load side of HG naturally for each hour is expressed as follows: n i 1 P DGi (t) + P WT (t) + P PV (t) + P BS (t) P LD (t), where P DGi (t) presents the power generated by the diesel generator, P WT (t) shows the power produced by the wind turbine, P BS (t) presents the power developed by the battery, P PV (t) presents the power produced by PV panels, and P LD (t) presents the power demand by the load side.

Restrictions of Renewable Generation
The PV and WG output must be kept at the t′ time interval within the following minimum and highest power restrictions because the RES power generated depends on the setting (Zhao et al., 2014): where P PV,min and P PV,max are the lowest and highest power restrictions created by each PV module. P WG,min and P WG,max are the lowest and highest power restrictions created by each WG.

Restrictions of Diesel Generator
Under the lowest and highest power restrictions, the output power can be expressed as follows (Chen et al., 2017): where P DG i ,min and P DG i ,max are the lowest and highest power restrictions developed by each DG i .
The power delivered by the DGs is also constrained by physical limitations for starting and closing, as expressed by ramp rate limits and expressed by Chen et al. (2017) as follows: where DR i and UR i are the shutting-down and the starting-up restrictions of DG i , correspondingly.

Restrictions of Battery Source
The battery voltage should be within the specified power limit and can be expressed as follows: where P BSch,top and P Bdch,bottom are the battery's maximum charging and discharging powers, correspondingly. At all times, the battery's energy storage level must be kept between the minimum and maximum limits: where E BS,bottom and E BS,top are the bottom and top of battery energy restrictions, correspondingly. The SOC heights have a significant impact on battery life; as a result, battery SOC levels should be kept within the predefined limits:

ANN WITH GENETIC APPLICATION
The forward propagation in each ANN-layer is expressed as follows (Kang et al., 2012), (Lu et al., 2010) and (Eftekhari, 2017): where X l j is the input, b l j is the bias of the j th neuron in layer l, S l−1 i is the output of the neuron in layer l-1, w l−1 ij is the kernel from the i th neuron in layer (l-1) to the j th neuron in layer l, and conv1D (. . ..) is used for performing 1D convolution without zeropadding. The dimension of the input array, X l j , is less than the output array's dimension, S l−1 i . The output, Y l j , in layer l may be expressed by passing input X l j through activation function f (.), as follows: where S l j represents the output of the j th neuron in layer l and ↓ ss stands for the down-sampling operation with a factor, ss.
The GA algorithm propagates the error from the output of the MLP-layer. Let l 1 for the input layer and l L for the output layer. Assume that Q L is the number of classes in the output, for a given input vector; let its target be [t 1 ,. . ..., t Q L ] and output vectors, [y L 1 , . . ..., y L QL ]. In the output layer, the mean-squared error (MSE), E, is expressed as follows: The delta error, Δ l j zE zX l j , should be computed to calculate the derivative of E with respect to each parameter in the network. For updating all weights of neurons and the bias of that neuron in the preceding layer, the chain-rule of the derivative is used as follows: Therefore, the regular back propagation from the first MLP layer to the last ANN layer is performed as follows: After performing the first back propagation from layer (l+1) to current layer l, the GA may carry to the input delta of ANN layer l, Δ l j . Assume that the zero-order upsampled map is us l j up(s 1 j ); then the delta error is expressed as follows: where β (ss) − 1. The GA of delta error (ΔS l j Σ ← Δ l+1 i ) is expressed as follows: where rev (.) is used for array reversing and conv1Dz (. . .) is used for full 1D convolution performing with zero-padding. The derivative of the error with respect to weight and bias may be expressed as follows: The weights and biases can be updated with learning rate ∝ using the following equations:

Implementation of ANN With the Genetic Algorithm
This study considers the costs of battery deprivation and the cost of fuel for traditional generators. A combination of two ANNs and genetic algorithms is used to solve PMS problems. The objective function is optimized using the ANN, while the genetic algorithm for the search is used to establish the BDC. Figure 2 and Figure 3 show the flood map of the overall implementation of the ANN and the genetic algorithm for the PMS issue.

DISCUSSION ON SIMULATION OUTCOMES Methodology
An isolated HG with PV panels, a WT, a charger, and two DGs was used to test the suggested objective feature using the ANN. The judgement variables in this study are as follows: P DG1 (t), P DG2 (t), P Bat (t), P PV (t), and P WT (t) The simulation runs in a   1-h time period and has a 24-h horizon as a scheduling program. Figure 4 shows the hourly LD over a 24-h loop. Throughout the day, the average LD is 7.2 kW. The load side demanded more power in between 19 and 22 h. The mounted WT has a maximum power of 10 kW at a wind speed of 25 m/s. The WT parameters 19.6, 1.225, and 0.4 are used to quantify the swept area, air density, and coefficient efficiency, respectively. Under the rated conditions of the environment, the solar photovoltaic used is rated at 10 kW. Table 1 presumes that the original SOC battery is already known and taken as 50 percent for the battery constraints used in this study. As seen in Table 2, in [19,31], the values of these parameters are defined in parameters of both DGs, including cost of fuel variables, maximum and minimum power limits, and range limit. The ANN-GA solves the energy dispatching (ED) dilemma where 50 is the population size and 100 is the cumulative number of iterations. The better costs, using different weighting criteria, the worse cost, and the mean cost of the proposed goal feature are used to evaluate its efficacy.

Results and Discussion
In the objective role of simulation research, various WF importances are taken into account to assess the effect of a given WF goal and to see its impact on the HG approach. The impact of the WF on the algorithm behavior, battery SOC status, and optimized cost-activity functions is thus analyzed. The ED problem is solved by the ANN. To examine the accuracy and effectiveness of the proposed ANN protective algorithm, two other conventional methods are used for comparisons which are neural networks (ANNs) and fuzzy neural networks (FNNs); the structure of these methods is shown in Table 2. The accuracy of testing results is computed for the proposed method and for the two other methods. The test results are used to check the accuracy by measuring the F1 score, which is the harmonic mean between precision and recall (Fleer and Stenzel, 2016). Table 2 shows that the accuracy of the proposed method has high identification accuracy from the other two methods and with the same total MSE of 0.001, the proposed method is convergent with less than 2,550 epochs, as compared with the convergence epoch numbers of the ANN and the FNN. This proves that the performances of the proposed ANN algorithm are effective and perform higher classification accuracy. The learning of the total MSE with the number of epochs for the proposed ANN algorithm and the other two methods is shown in Figures 5-7.
To avoid overcharging and over-discharging, the battery's state of charge (SOC) is used as a restriction on the ED issue. The effect of WF on battery SOC activity is depicted in Figure 8. A range of WF values are assessed with the objective feature (0, 250, and 1,000). If the battery does not get drained, numerous charge and discharge cycles are clearly shown, which indicate that the battery provides considerable energy in the HG. If further charging loops, however, are prevented and a battery life extension is possible, then the goal intersects with the relationship among the two goals. This graph demonstrates that the SOC condition is sustained more consistently and load times are shortened. The number of mutual batteries with HGs is also smaller, and the cost function is higher than in Table 3.
In order to maintain the trade-offs among the two goals, the next ED problem simulation result of HG units is conducted for e 250. Using the ANN algorithm, the maximum power of both installed DGs can be calculated. The results of high performance at night and low morning output of both DGs during the simulation stage are seen in Table 4. The optimum power exchange between the HG and the battery is shown in Table 5 using the ANN-GA algorithm. The best power generation RGs of the ANN-GA algorithm also appear in Table 6. As PV and WT generators begin electricity production, they generate renewable energy that helps sustain DG generation. For charging the tank, most RE industries are used. Figure 9 shows the optimum ED solution for HG devices over a period of 24 h as seen in Tables 4-6. Both HG units are specifically participating in the satisfaction of the LD. The battery charges due to the lower LD and DGs are reduced to minimal until the panel and the WT generator start generating electricity. As described in the article, the HG charges the pile while the battery delivers power to the HG, if positively. The surplus power can be supplied to the battery where the energy given by the RE or by the DGs is lower. Then the DGs and the battery should cooperate in order for the LD to fulfill the need when the RE supply is limited and LD energy demands more in the night.

CONCLUSION
This article expresses a 24-h horizon energy transmission cycle of an isolated HG with battery storage. In addition to the fuel cost, the objective feature proposes battery depletion costs. The question of energy transmission was to reduce the FC of DG and BDC to a minimum. In the proposed target function, a WF is implemented. The ANN-GA addresses the energy supply issue in order to ensure the best supply of isolated HGs such as the WT engine, PV, two DGs, and batteries. The results show that it is necessary to select the appropriate value of WF for the best cost function. WF also affects the state of the SOC battery. The results show that the SOC battery with WF equal to 250 remains more robust and the charging cycles decreased. The ED problem of HG generating units is performed on e 250 in order to resolve the trade-off between the BDC and FC. The ANN-GA adds all HG units together to satisfy the LD WS wind speedwind speed P Bdch battery discharge power η Bch battery charge efficiency C i (P DG i (t)) cost of diesel energy S cyc (DOD) period of depth stress value C Bat cost of purchasing the batteries P DG i (t) power generated by diesel generator P PV (t) power generated by PV panels C SD self-degradation cost Frontiers in Energy Research | www.frontiersin.org