Renewable Energy Sources and Battery Forecasting Effects in Smart Power System Performance

In this study, the influence of using acid batteries as part of green energy sources, such as wind and solar electric power generators, is investigated. First, the power system is simulated in the presence of a lead–acid battery, with an independent solar system and wind power generator. In the next step, in order to estimate the output power of the solar and wind resources, a novel forecast model is proposed. Then, the forecasting task is carried out considering the conditions related to the state of charge (SOC) of the batteries. The optimization algorithm used in this model is honey bee mating optimization (HBMO), which operates based on selecting the best candidates and optimization of the prediction problem. Using this algorithm, the SOC of the batteries will be in an appropriate range, and the number of on-or-off switching’s of the wind turbines and photovoltaic (PV) modules will be reduced. In the proposed method, the appropriate capacity for the SOC of the batteries is chosen, and the number of battery on/off switches connected to the renewable energy sources is reduced. Finally, in order to validate the proposed method, the results are compared with several other methods.


Introduction
One of the main problems with the use of renewable energy sources is the high forecast error percentage.Hence, due to increased solar and wind energy utilization, researchers are today looking for new methods of prediction with the highest possible accuracy.The above-mentioned problem affects the dispatching, sustainability, and quality guarantee of the power systems [1].One of the common solutions to deal with this problem is the use of energy storage systems in power systems containing solar and wind resources.In many developed countries, these storage systems have been used for years.With the emerging advanced batteries used in the power systems, the output power quality of the systems is increasing.In addition to the above challenges, the battery's treatment forecast is the main challenge in synthetic power systems composed of wind-solar and storage devices [2][3][4][5].
Energies 2019, 12, 373 2 of 18 Despite the high penetration of various battery technologies in power systems, the electrochemical reactions conceal an unforeseen intricacy.In different research works, the behavior of the utilized battery is simulated in various ways.According to the complexity and quality of battery behavior simulation, various methods are classified in different categories.On the other hand, there are various methods for predicting battery performance.Lead-acid batteries are used in renewable energy sources (wind-solar) to meet any circumstance [6][7][8][9].
Regarding the mentioned literature, different models have been proposed by researchers for considering the economic and environmental features of renewable energy generation [10].This point indicates the application of the active power placement model through wind and PV by active power control of wind, solar, and battery hybrid power systems.There has been sufficient deliberation in the literature regarding the particular operation situation of production parts which will vary considerably thanks to the intermittent and instable nature of the wind, the subsequent giant active energy tracking error, and the redundant on-or-off shift of wind as well as PV, which in turn harmfully increases the operation price, and adds additional unsought fluctuations to the power output [11].Additionally, classical power placement strategies tend to be rather conformist in order to be safe and responsible, and to dispatch the power reference averagely through the output power and rated power of the power generation unit [12].In this work, a new hybrid method for simulating battery behavior is proposed.The parameters which are predicted in this model are the output power of wind and solar power generators.Since wind and solar resources have oscillating and complex behavior, different methods are suggested to increase the forecasting accuracy.This paper presents a new model based on a combination of solar and wind, as well as a battery storage system.Additionally, the proposed solution method is framed to adjust the output power of the proposed system to obtain the reference power ordered by the grid, in which the amount of on/off and off/on switching of the renewable energy sources is minimized, and the application of the regulation ability of wind turbines is maximized.Specifically, the forecasted power of these signals is taken as the production aptitude of wind turbines and PV.In order to evaluate the performance of the prediction method, an artificial power system in the presence of wind and solar sources along with a battery is simulated using the proposed method.After the proposed hybrid system is simulated, a stochastic search-based method is proposed to minimize the amount of on/off and off/on switching of the wind turbine and solar system.This approach also minimizes the usage of the regulation ability of wind turbines, especially the anticipated output power of the wind and solar systems.The proposed method is a combination of the mutual information (MI), interaction gain (IG) of features, and neural network (NN) approaches [13].In order to optimize the predictive engine parameters, a neural network-based stochastic seeking technique is used in feature selection.Analyzing the numerical results and comparison with actual values proves the high accuracy of the proposed prediction method.It is also seen that the amount of switching in wind turbines is reduced significantly.The main contributions of this research work are categorized as follows: a.
In order to simulate battery behavior, a new method is proposed that is used in energy production systems in the presence of wind and solar sources.b.
A new optimization algorithm is proposed by combining the honey bee mating optimization (HBMO) algorithm and a new stochastic search technique.This algorithm is applied on a three stage forecast engine to set the optimal weight values in the prediction process.
The structure of this article is composed of 5 sections, which are as follows.In the second section, a simulated system in the presence of wind-solar sources and batteries is introduced.A new proposed method for predicting battery behavior is defined in the third section.In Section 4, simulation results are presented, and finally the conclusion is presented in Section 5.

Synthetic Wind-Solar and Battery Based Power System
In this section, the power system modeling consists of a wind turbine, solar panel, and battery combined system.In this section, each of the system components is modeled and then the general Energies 2019, 12, 373 3 of 18 framework of battery behavior is examined [1].In the following, the simulation details of each section are described.

Wind Power System Model
Formulation of the blade tip speed ratio and blade pitch angle, as the most principal parts of a wind power system, is as follows: In this formula, the mechanical elicited power related to the rotor of the wind turbine, and the swept area of the rotor, are denoted by P wt and A, respectively [14,15].C p indicates the power factor.This factor defines the aerodynamics of the rotor in the form of a function in terms of tip speed ratio and pitch angle.Finally, the pitch angle and the tip speed ratio are denoted by β and λ, respectively.The tip speed ratio is based on the ratio between the blade tip speed and the wind speed, which is calculated by In this equation, the rotor speed and radius of the rotor are denoted by ω r and R, respectively.With wind turbines, the output power is proportional to the speed of the blades and the pitch angle, which is regulated based on the turbine blades.By examining Equation (1), the output power from the wind turbine is maximized.By optimizing the power curve, the generated power from wind turbines is maximized for a wide range of wind speeds [2].

Solar System Model
This section presents modeling of the photovoltaic panel, which is one of the most important issues in solar power production [16].
The output terminals of the circuit in this system are coupled to the load.The voltage current formulations of this panel are as below: In this formulation, the PV output current, photo current, and diode reverse saturation current are denoted by I pv , I ph , and I 0 , respectively.V pv denotes the PV panel output voltage.In Equation (3), R s , R p , and n s are the series resistance, shunt resistance, and cell numbers in series, respectively.m and q are the diode ideality factor and electron charge, respectively.k and T c are the Boltzmann constant and panel temperature, respectively, and m is the diode ideality factor.Finally, V t is the thermal voltage [17].
The presented photo current I ph is appraised by solar irradiance G c , panel temperature T c , and the temperature coefficient α, and is computed by In the above equation, the criteria solar radiance, criteria temperature, and short circuit current to criteria radiance and temperature, are represented by G r , T r and I cc , respectively.I 0 denotes the Energies 2019, 12, 373 4 of 18 diode reverse saturation current, which is a function in terms of the diode ideality factor m, criteria temperature T r , panel temperature T c , and thermal voltage V t , and is calculated by where the reverse saturated current is denoted by I 0r for the criteria temperature, and the energy gap is represented by V g .The output power for a photovoltaic panel is computed by In this relation, I PV and V PV indicate output current and operational voltage for the photovoltaic panel, respectively, and as mentioned, P PV is the output power of the PV panel.

Forecast Model for Battery Treatment
In the simulated system, the lead-acid battery is exploited as a storage system.The main specifications of the lead-acid battery are the state-of-charge (SOC), and the floating charge voltage or terminal voltage.In this work, using the hour counting technique, the SOC behavior of the lead-acid battery is modeled [18].Additionally, the NN approach is used to map battery parameters, namely the terminal voltage in volts and current in amperes across and through the battery, respectively, to the SOC of the battery.However, since the degree of error in the measurement of the mentioned method is high, the variable charge voltage method is used to simulate this part.

Battery State-of-Charge Model
Although the SOC method is one of the most suitable methods for simulating battery behavior, this method also has some disadvantages, such as not being entirely charged, excessive discharge, being overcharged, etc. [14].In this section, the ampere-hour counting technique is used to compute SOC.The relationship between the time of charge or discharge and current values is calculated using Equation ( 8): In this formula, SOC 0 is the initial value for the battery SOC, and interest time and initial point time are represented by t and t 0 , respectively.I bat and C bat indicate the current and capacity of the battery, respectively.Moreover, regarding the losses during battery charging and discharging and storing times, the SOC is appraised by In this equation, σ denotes the rate of the self-discharge, and the competence of battery charging and discharging is denoted by η bat .The battery capacity C bat , similar to all chemical processes, is dependent on temperature, and is appraised by [19][20][21] C bat = C bat (1 + δ C (T bat − 298.15)) (10) where C bat and C bat are the accessible or useful size of the battery considering the battery temperature T bat and the nominal capacity of the battery, respectively [21].In the studied synthetic power system, three main components, the photovoltaic panel, wind turbine, and storage device, are regarded as supplying the load.The cable casualties are disregarded in this work.Thus, the battery current I bat can be written as [20] I bat = P solar + P Wind η rectifier − P Load /η inverter V bat (11) In this equation, P Solar , P Wind , and P Load denote the energy of the PV set, wind turbine, and load, respectively.The voltage of the battery is defined by V bat .In order to exchange the obtained AC power from the wind turbine to DC power, a rectifier is employed.In this work, the battery has a rated capacity of 4.5 Ah and a nominal voltage of 6 V. Furthermore, its charge and discharge is measured based on a controlled current source.All the data, i.e., terminal voltage (V), current (A), as well as SOC, are measured by the scope block.The developed data is saved in a structured format into a MATLAB workspace, where NNs can be applied.

Model of Battery Floating Charge Voltage
The simulation of the battery floating charge voltage is done through the equation-fit approach as follows: The voltage of the battery floating charge is represented by V bat in this formula.This voltage depends on the influence of temperature on the battery voltage forecast d T , which can be represented by where V bat and δ V are the calibrated voltage of the battery based on temperature influx and the temperature factor, respectively.Moreover, the computation of the parameters introduced in Equation ( 12) can be presented as follows: The calculation of a1, . . ., a3, . . ., d1, . . ., d3 in this equation is completed by the least squares fitting approach.The battery charging and discharging was tested with various currents, and the obtained results are plotted in Figure 1 [20].
Energies 2018, 11, x FOR PEER REVIEW 5 of 18 capacity of 4.5 Ah and a nominal voltage of 6 V. Furthermore, its charge and discharge is measured based on a controlled current source.All the data, i.e., terminal voltage (V), current (A), as well as SOC, are measured by the scope block.The developed data is saved in a structured format into a MATLAB workspace, where NNs can be applied.

Model of Battery Floating Charge Voltage
The simulation of the battery floating charge voltage is done through the equation-fit approach as follows: The voltage of the battery floating charge is represented by V′bat in this formula.This voltage depends on the influence of temperature on the battery voltage forecast dT, which can be represented by where Vbat and δV are the calibrated voltage of the battery based on temperature influx and the temperature factor, respectively.Moreover, the computation of the parameters introduced in Equation ( 12) can be presented as follows:  (14) The calculation of a1, …, a3, …, d1, …, d3 in this equation is completed by the least squares fitting approach.The battery charging and discharging was tested with various currents, and the obtained results are plotted in Figure 1 [20].In this work, we have to solve an optimization problem minimizing the following general risk function to get the best hyper parameter value: subject to In this work, we have to solve an optimization problem minimizing the following general risk function to get the best hyper parameter value: The first term of Equation ( 15) ) is applied as a measurement of function flatness.The second term is the empirical error insensitive loss function, that shows no penalty errors below ε.All the mentioned parameters are determined by the proposed optimization algorithm, while these parameters are considered as decision variables in the optimization process to find the best optimization objective function.After the final iteration, the proposed parameters are finalized as optimal parameter values.

Short-Term Energy Forecasting for the Wind and PV System
The real energy control structure is depicted in Figure 2. The control structure is composed of total energy generated by wind, PV, and battery resources [18][19][20][21][22][23].Related specifications of dispatching power, the sought oscillation of output power, and also the restriction of power rate in the simulated system, have been investigated.With regards to operating conditions and the available active power, the output power from wind turbines, solar panels, and batteries is predicted in the short term.Figure 2 shows the structure of the prediction equipment.In the next section, the structure of the prediction equipment will be described in detail.
Energies 2018, 11, x FOR PEER REVIEW 6 of 18 The first term of Equation ( 15) ) is applied as a measurement of function flatness.The second term is the empirical error insensitive loss function, that shows no penalty errors below  .
All the mentioned parameters are determined by the proposed optimization algorithm, while these parameters are considered as decision variables in the optimization process to find the best optimization objective function.After the final iteration, the proposed parameters are finalized as optimal parameter values.

Short-Term Energy Forecasting for the Wind and PV System
The real energy control structure is depicted in Figure 2. The control structure is composed of total energy generated by wind, PV, and battery resources [18][19][20][21][22][23].Related specifications of dispatching power, the sought oscillation of output power, and also the restriction of power rate in the simulated system, have been investigated.With regards to operating conditions and the available active power, the output power from wind turbines, solar panels, and batteries is predicted in the short term.Figure 2 shows the structure of the prediction equipment.In the next section, the structure of the prediction equipment will be described in detail.

Construction of the Forecast Engine
One of the proper ways to simplify complex learning processes is to combine different neural networks [18,[22][23][24].In the mentioned algorithm, the input data is contributed within the building blocks; in other words, the mature distribution between these blocks.In this study, a hybrid model of predictive tools is presented to solve this problem.This model consists of three main stages.Each of these steps contains several layers of a multilayer perceptron (MLP) NN as a prediction tool.It should be noted that all layers of the NN have the same features, hence the weight factor is used directly for the next step, and it can then improve the obtained knowledge of the previous one.In the hybrid neural network (HNN) method, using the multiple methods of MLP for the NNs increases the learning ability.The three main layers of HNN consisting of a NN are: The LM (Levenberg-Marquardt), SCG (scaled conjugate gradient backpropagation), and CGP (conjugate gradient backpropagation with Polak-Ribiére updates) training approaches.Details of each layer are described in Reference [25].In the proposed model, the accuracy and power of prediction are increased to obtain

Construction of the Forecast Engine
One of the proper ways to simplify complex learning processes is to combine different neural networks [18,[22][23][24].In the mentioned algorithm, the input data is contributed within the building blocks; in other words, the mature distribution between these blocks.In this study, a hybrid model of predictive tools is presented to solve this problem.This model consists of three main stages.Each of these steps contains several layers of a multilayer perceptron (MLP) NN as a prediction tool.It should be noted that all layers of the NN have the same features, hence the weight factor is used directly for the next step, and it can then improve the obtained knowledge of the previous one.In the hybrid neural network (HNN) method, using the multiple methods of MLP for the NNs increases the learning ability.The three main layers of HNN consisting of a NN are: The LM (Levenberg-Marquardt), SCG (scaled conjugate gradient backpropagation), and CGP (conjugate gradient backpropagation with Polak-Ribiére updates) training approaches.Details of each layer are described in Reference [25].In the proposed model, the accuracy and power of prediction are increased to obtain better results for predicting the load signal by this method.In case of choosing unsuitable values for the weight factor of NNs, there are over-fitting or under-fitting problems created with the proposed prediction tool [26,27].In this study, a new and upgraded HNN-based prediction tool for predicting load signals is presented to solve the problem.The proposed tool consists of combining the proposed HNN method with the new stochastic seeking approach called HBMO.Using the new hybrid method, the predictive tools training capabilities increase, and the input and output of the mapping function in a complex signal are extracted with more precision.If one of the NN members in the prediction tool falls to the lowest local area during the training, both this member and the next member is unable to escape from the trap.In order to solve this problem, the HBMO element is combined with each member of the NN of the proposed model.Therefore, in the case of the above-mentioned circumstances, the NN member has the ability to exit from these conditions.
In the next step, HBMO compares the value of the target function of the current state to the previous state and selects the best value of the target function [13].If the stop criterion is met, the next step is executed; otherwise, it returns to the previous step, the target function is calculated, and this process continues until the stop criterion is met.In the end, among the obtained values from target functions, the lowest objective function value of the HBMO algorithm is chosen as the best solution.The weight factor of the selected solution is replaced in NN1 and then the next step of the prediction tool is implemented.Once the best NN values are achieved, all members of the prediction tool are trained and selected to predict future values of the load signal.In Figure 3, the prediction model is depicted.More details are given in References [28][29][30].
Energies 2018, 11, x FOR PEER REVIEW 7 of 18 prediction tool [26,27].In this study, a new and upgraded HNN-based prediction tool for predicting load signals is presented to solve the problem.The proposed tool consists of combining the proposed HNN method with the new stochastic seeking approach called HBMO.Using the new hybrid method, the predictive tools training capabilities increase, and the input and output of the mapping function in a complex signal are extracted with more precision.If one of the NN members in the prediction tool falls to the lowest local area during the training, both this member and the next member is unable to escape from the trap.In order to solve this problem, the HBMO element is combined with each member of the NN of the proposed model.Therefore, in the case of the abovementioned circumstances, the NN member has the ability to exit from these conditions.In the next step, HBMO compares the value of the target function of the current state to the previous state and selects the best value of the target function [13].If the stop criterion is met, the next step is executed; otherwise, it returns to the previous step, the target function is calculated, and this process continues until the stop criterion is met.In the end, among the obtained values from target functions, the lowest objective function value of the HBMO algorithm is chosen as the best solution.The weight factor of the selected solution is replaced in NN1 and then the next step of the prediction tool is implemented.Once the best NN values are achieved, all members of the prediction tool are trained and selected to predict future values of the load signal.In Figure 3, the prediction model is depicted.More details are given in References [28][29][30].In this model, the NN output constitutes the signal forecast of the proposed model.Furthermore, in the training of this block, 50 days of historical data consisting of 50 × 24 = 1200 hourly training samples have been considered.Therefore, the main engine needs 3 × 50 = 150 days of historical data.At the beginning, the first block is trained by the historical data of 150 days ago to 101 days ago, then the second NN is trained by data from 100 days ago to 51 days ago, and finally the third block is trained by data from 50 days ago to 1 day ago.The mentioned process is frequent until the first block of the NN forecasts the signal of days −100 to −51.These signals with the selected candidates are included in sliding window 2, therefore the second NN is trained and forecasts the signal of day −50.This process will be continue to get the final output of the wind and PV signal as the predicted value.In this model, the NN output constitutes the signal forecast of the proposed model.Furthermore, in the training of this block, 50 days of historical data consisting of 50 × 24 = 1200 hourly training samples have been considered.Therefore, the main engine needs 3 × 50 = 150 days of historical data.At the beginning, the first block is trained by the historical data of 150 days ago to 101 days ago, then the second NN is trained by data from 100 days ago to 51 days ago, and finally the third block is trained by data from 50 days ago to 1 day ago.The mentioned process is frequent until the first block of the NN forecasts the signal of days −100 to −51.These signals with the selected candidates are included in sliding window 2, therefore the second NN is trained and forecasts the signal of day −50.This process will be continue to get the final output of the wind and PV signal as the predicted value.

Training and Model Analysis
In this section, the proposed prediction tool is tested on actual information in order to investigate the effectiveness of the proposed prediction tools performance in the training phase.A usual curve based on its trial and error is shown in Figure 4.In this figure, the error function is defined by mean absolute error (MAE).
In this section, the proposed prediction tool is tested on actual information in order to investigate the effectiveness of the proposed prediction tools performance in the training phase.A usual curve based on its trial and error is shown in Figure 4.In this figure, the error function is defined by mean absolute error (MAE).
In fact, this analysis is conducted to validate the planned approach around overfitting and anachronistic convergence.It can be understood from Figure 4 that the increment of the error function for every phase of the suggested forecast engine based on NNs leads to a stop in the learning procedure through exchanging the last weights, which will be done based on the proposed optimization algorithm.Therefore, the learning epochs of the learning algorithm half period for the first three repetitions are 28, 86 -56 = 30, and 142 -99 = 43, which are determined by the initial stopping model.Accordingly, production of the suggested HBMO half period in the first three repetitions are 55 − 29 = 26, 99 -86 = 13, and 162 − 142 = 20, which are assigned by the HBMO stopping standards.
Additionally, to get the best effects of the proposed forecast engine structure, an additional analysis is presented to show the optimal number of selected blocks.Accordingly, one to six blocks of NNs have been considered here to select the best number of blocks.In fact, this analysis is conducted to validate the planned approach around overfitting and anachronistic convergence.It can be understood from Figure 4 that the increment of the error function for every phase of the suggested forecast engine based on NNs leads to a stop in the learning procedure through exchanging the last weights, which will be done based on the proposed optimization algorithm.Therefore, the learning epochs of the learning algorithm half period for the first three repetitions are 28, 86 -56 = 30, and 142 -99 = 43, which are determined by the initial stopping model.Accordingly, production of the suggested HBMO half period in the first three repetitions are 55 − 29 = 26, 99 -86 = 13, and 162 − 142 = 20, which are assigned by the HBMO stopping standards.
Additionally, to get the best effects of the proposed forecast engine structure, an additional analysis is presented to show the optimal number of selected blocks.Accordingly, one to six blocks of NNs have been considered here to select the best number of blocks.
In this model, we assumed that the training mechanisms of all the blocks are same.The gained validation errors, measured in terms of mean squared error (MSE), as well as the training times, are shown in Figure 5a,b, respectively.In this figure, we can see that the minimum error is in NN block number 3. Additionally, the training time is increased step by step as more NN blocks are added.From this figure, it can be seen that an overfitting issue based on NN blocks occurs, leading to the minimum validation error, while additional NNs cannot learn more from the input/output mapping function of the wind and PV signal.Accordingly, three NNs are assumed for the proposed structure with different training mechanisms to improve the performance of total training with minimum error.Additionally, to present a proper vision of the presentation of the proposed model of the training mechanism, the first LM half cycle is continued after the early stopping point and represented by a dashed-dotted line.The overfitting problem is solved via this procedure.As noted earlier, if a premature convergence occurs in the local minimum in this phase, LM does not have the ability to quit these conditions and causes an overfitting.Using the proposed method based on the hybrid model presented in this paper, the mentioned problem is resolved.The proposed prediction method has been applied to the obtained data from wind speed and solar radiation related to Inner Mongolia.The obtained data is used as real data to model wind speed and solar radiation.This data is plotted in Figure 6.
To validate the authenticity of the suggested method, diverse error standards, such as MAE, root mean square error (RMSE), and normalized mean absolute percentage error (NMAPE), are considered in this case study.The pertaining formulas of these error standards are as follows: The amount of data is represented by N in this formula.The predicted data of PV energy and the actual data of PV energy are determined by f i PV and a i PV , respectively.Bar notation represents the mean of these values.Additionally, to present a proper vision of the presentation of the proposed model of the training mechanism, the first LM half cycle is continued after the early stopping point and represented by a dashed-dotted line.The overfitting problem is solved via this procedure.As noted earlier, if a premature convergence occurs in the local minimum in this phase, LM does not have the ability to quit these conditions and causes an overfitting.Using the proposed method based on the hybrid model presented in this paper, the mentioned problem is resolved.The proposed prediction method has been applied to the obtained data from wind speed and solar radiation related to Inner Mongolia.The obtained data is used as real data to model wind speed and solar radiation.This data is plotted in Figure 6.
To validate the authenticity of the suggested method, diverse error standards, such as MAE, root mean square error (RMSE), and normalized mean absolute percentage error (NMAPE), are considered in this case study.The pertaining formulas of these error standards are as follows: The amount of data is represented by N in this formula.The predicted data of PV energy and the actual data of PV energy are determined by PV f i and PV a i , respectively.Bar notation represents the mean of these values.

Obtained Results for the Forecast Engine
In order to compare the performance of the proposed method with other methods under equivalent circumstances, the modeling results were compared with the results presented in Reference [6].The obtained results from the proposed method in comparison with the other four methods presented in Reference [6] are listed in Table 1.By examining the obtained results from Table 1, it can be stated that the performance of the proposed method is better than the other four methods in terms of all the error criteria.In order to demonstrate the superiority of the active power distribution method in comparison with the classical mean method, the effect of the proposed active power method for controlling the active power of the network and supplying the network power in two modes was investigated.The two cases are: (a) The energy storing batteries were not complicated in active power control, and (b) the energy storing batteries were complex in active power control.

Test Cases in the Power System
Case one: In this case, the forecasted output power of the proposed strategy through the highlevel network is a stationary signal, as shown in Figure 7.The minimum and maximum power is

Obtained Results for the Forecast Engine
In order to compare the performance of the proposed method with other methods under equivalent circumstances, the modeling results were compared with the results presented in Reference [6].The obtained results from the proposed method in comparison with the other four methods presented in Reference [6] are listed in Table 1.By examining the obtained results from Table 1, it can be stated that the performance of the proposed method is better than the other four methods in terms of all the error criteria.In order to demonstrate the superiority of the active power distribution method in comparison with the classical mean method, the effect of the proposed active power method for controlling the active power of the network and supplying the network power in two modes was investigated.The two cases are: (a) The energy storing batteries were not complicated in active power control, and (b) the energy storing batteries were complex in active power control.

Test Cases in the Power System
Case one: In this case, the forecasted output power of the proposed strategy through the high-level network is a stationary signal, as shown in Figure 7.The minimum and maximum power is equal to 2000 and 1000 kW, respectively, and shifts occur at 3, 5, 10, 13, 15, and 20 h.In this test case, the outputs of the wind-solar battery power system generated through the average model and the suggested power placement method were compared by the anticipated output power.Regarding this mode, the error of the output power was lower and the output power curve was flatter than that of the average method.In this test case, the max tracking error as well as the mean square of the tracking error provided by the suggested method are 889.7 and 339.6 kW, respectively.Moreover, the suggested model outperformed the conventional model.Additionally, regarding this system (considering wind and PV), the PV modules were not permitted to launch until the modifiable ability of the wind turbines was insufficient to meet the desired output power.In Figure 8, the simulation results of the network connected to the wind turbine and the photovoltaic panels are shown.It is assumed that the maximum capacity of the wind turbine for power extraction is used; that is, when the wind turbine does not have the required power to provide the maximum capacity, the solar system is operational.It can be stated that when the number of solar modules in a connected network is greater than zero, the number of wind turbines is equal to 8. By analyzing Figure 9, the number of on/off switches in the proposed method is lower than the mean model in all stages of the modulation test.
In the second test case, the predicted output power of the proposed strategy through the high-level network is a stationary signal, as shown in Figure 7.The minimum power and maximum power is equal to 4000 and 11,000 kW, respectively, and shifts occur at 3, 5, 11, 16, and 19 h.During daily performance of the complex method, the demand path of the output power has been determined.In Figure 9, the output power of the proposed complex method assessed via the power allocation method is related to the predicted output power.
Energies 2018, 11, x FOR PEER REVIEW 11 of 18 equal to 2000 and 1000 kW, respectively, and shifts occur at 3, 5, 10, 13, 15, and 20 h.In this test case, the outputs of the wind-solar battery power system generated through the average model and the suggested power placement method were compared by the anticipated output power.Regarding this mode, the error of the output power was lower and the output power curve was flatter than that of the average method.In this test case, the max tracking error as well as the mean square of the tracking error provided by the suggested method are 889.7 and 339.6 kW, respectively.Moreover, the suggested model outperformed the conventional model.Additionally, regarding this system (considering wind and PV), the PV modules were not permitted to launch until the modifiable ability of the wind turbines was insufficient to meet the desired output power.In Figure 8, the simulation results of the network connected to the wind turbine and the photovoltaic panels are shown.It is assumed that the maximum capacity of the wind turbine for power extraction is used; that is, when the wind turbine does not have the required power to provide the maximum capacity, the solar system is operational.It can be stated that when the number of solar modules in a connected network is greater than zero, the number of wind turbines is equal to 8. By analyzing Figure 9, the number of on/off switches in the proposed method is lower than the mean model in all stages of the modulation test.
In the second test case, the predicted output power of the proposed strategy through the highlevel network is a stationary signal, as shown in Figure 7.The minimum power and maximum power is equal to 4000 and 11,000 kW, respectively, and shifts occur at 3, 5, 11, 16, and 19 h.During daily performance of the complex method, the demand path of the output power has been determined.In Figure 9, the output power of the proposed complex method assessed via the power allocation method is related to the predicted output power.As illustrated in Figure 9, if the sum of the forecast energy obtained from wind turbines and photovoltaic panels is more than the predicted output energy, then the output of the whole system is controlled using the suggested appropriation method and can track the sought energy.It is remarkable that the output energy curve is flat and without oscillation.Earlier, when the whole predicted power was lower than the predicted output power, the batteries were allowed to unload.As shown in Figure 9, this procedure was continued until the battery's SOC reached SOCmin.Therefore, the desired power can be tracked using the suggested approach, until the battery SOC is higher than SOCmin.Subsequently, to improve the usage of the wind and solar power generators for the equipment, when SOC is lower than SOCmin, the wind power and photovoltaic panels have the highest power output of the predicted power.As illustrated in Figure 9, if the sum of the forecast energy obtained from wind turbines and photovoltaic panels is more than the predicted output energy, then the output of the whole system is controlled using the suggested appropriation method and can track the sought energy.It is remarkable that the output energy curve is flat and without oscillation.Earlier, when the whole predicted power was lower than the predicted output power, the batteries were allowed to unload.As shown in Figure 9, this procedure was continued until the battery's SOC reached SOC min .Therefore, the desired power can be tracked using the suggested approach, until the battery SOC is higher than SOC min .Subsequently, to improve the usage of the wind and solar power generators for the equipment, when SOC is lower than SOC min , the wind power and photovoltaic panels have the highest power output of the predicted power.

Optimization Analysis
In this section, an additional analysis is provided to show the effectiveness of the proposed optimization algorithm.In order to find out why HBMO is used to solve this problem instead of many other optimization algorithms, an optimization analysis is presented to prove the advantages and ability of HBMO [31].
The Ackley benchmark function, which is the reference of the data, is considered to show the effectiveness of the proposed optimization method [32].This function is formulated as follows: In this function, the target is getting the minimum value, and as can be seen in Table 2, the best results are yielded by HBMO compared to the other optimization algorithms, namely the evolutionary algorithm [33], genetic algorithm (GA) [34], differential evolutionary (DE) algorithm [35], ant colony (ACO) algorithm [36], and particle swarm optimization (PSO) [37].In Table 2, minimum, maximum, and mean values for all optimization algorithms are presented through an equal number of trial runs-10 trials.As shown in this table, the proposed optimization algorithm could provide better results.

Optimization Analysis
In this section, an additional analysis is provided to show the effectiveness of the proposed optimization algorithm.In order to find out why HBMO is used to solve this problem instead of many other optimization algorithms, an optimization analysis is presented to prove the advantages and ability of HBMO [31].
The Ackley benchmark function, which is the reference of the data, is considered to show the effectiveness of the proposed optimization method [32].This function is formulated as follows: In this function, the target is getting the minimum value, and as can be seen in Table 2, the best results are yielded by HBMO compared to the other optimization algorithms, namely the evolutionary algorithm [33], genetic algorithm (GA) [34], differential evolutionary (DE) algorithm [35], ant colony (ACO) algorithm [36], and particle swarm optimization (PSO) [37].In Table 2, minimum, maximum, and mean values for all optimization algorithms are presented through an equal number of trial runs-10 trials.As shown in this table, the proposed optimization algorithm could provide better results.

Optimization Analysis
In this section, an additional analysis is provided to show the effectiveness of the proposed optimization algorithm.In order to find out why HBMO is used to solve this problem instead of many other optimization algorithms, an optimization analysis is presented to prove the advantages and ability of HBMO [31].
The Ackley benchmark function, which is the reference of the data, is considered to show the effectiveness of the proposed optimization method [32].This function is formulated as follows: In this function, the target is getting the minimum value, and as can be seen in Table 2, the best results are yielded by HBMO compared to the other optimization algorithms, namely the evolutionary algorithm [33], genetic algorithm (GA) [34], differential evolutionary (DE) algorithm [35], ant colony (ACO) algorithm [36], and particle swarm optimization (PSO) [37].In Table 2, minimum, maximum, and mean values for all optimization algorithms are presented through an equal number of trial runs-10 trials.As shown in this table, the proposed optimization algorithm could provide better results.To show the graphical representation of the proposed benchmark function, the Ackley function is presented in Figure 10.This figure is plotted in the feasible region of −20 to 20 for x 1 and x 2 .In Figure 11, the proposed optimization algorithm is compared with the five other algorithms in terms of iteration speed and final optimal values.As presented in this figure, the proposed method and the other five obtained results in the first iteration (section A) and the last iteration (section B) are presented.All figures demonstrate the validity and superiority of the proposed algorithm in comparison with others.In this problem, the number of iterations and the population were set to 50 and 10, respectively.To show the graphical representation of the proposed benchmark function, the Ackley function is presented in Figure 10.This figure is plotted in the feasible region of −20 to 20 for x1 and x2.In Figure 11, the proposed optimization algorithm is compared with the five other algorithms in terms of iteration speed and final optimal values.As presented in this figure, the proposed method and the other five obtained results in the first iteration (section A) and the last iteration (section B) are presented.All figures demonstrate the validity and superiority of the proposed algorithm in comparison with others.In this problem, the number of iterations and the population were set to 50 and 10, respectively.To show the graphical representation of the proposed benchmark function, the Ackley function is presented in Figure 10.This figure is plotted in the feasible region of −20 to 20 for x1 and x2.In Figure 11, the proposed optimization algorithm is compared with the five other algorithms in terms of iteration speed and final optimal values.As presented in this figure, the proposed method and the other five obtained results in the first iteration (section A) and the last iteration (section B) are presented.All figures demonstrate the validity and superiority of the proposed algorithm in comparison with others.In this problem, the number of iterations and the population were set to 50 and 10, respectively.Energies Furthermore, to show the abilities of the proposed method, different mathematical benchmarks of CEC2013 have been considered, including 28 problems.In this analysis, 10, 30, and 50 dimensions, as well as the complexity of the algorithm, were evaluated.The proposed benchmarks include F1 to F5 as unimodal functions, F6 to F20 as multimodal functions, and F21 to F28 as composite functions.The obtained results of the proposed algorithm over the mentioned benchmarks in 10-D, 30-D, and 50-D are presented in Tables 3-5, respectively.

Conclusions
In this work, a novel method for controlling the output power of renewable energy sources using an intelligent algorithm is presented.The parameters which are predicted in this model are the output power of wind and solar power generators.This paper presents a new model based on a combination of solar and wind, as well as a battery storage system.Additionally, the proposed solution method is framed to adjust the output power of the proposed system to obtain the reference power ordered by the grid, in which the amount of on/off and off/on switching of renewable energy sources is minimized and the application of the regulation ability of wind turbines is maximized.Specifically, the forecasted power of these signals is taken as the production aptitude of wind turbines and PV.Furthermore, a new forecasting tool based on the artificial prediction tool has been introduced to predict wind and solar signals.The prediction model is inspired by the performance of the HBMO algorithm.In this model, free parameters in the multi-stage forecasting tool in the learning mechanism are optimized.One of the optimization issues is the ability to locate active power.The proposed algorithm is looking for the best answer.The validity and advantages of the proposed method have been examined by considering factors such as output power performance, the reduction degree of change, and maintaining SOC at the same time.The superiority of the proposed method has been proven in comparison with other methods.Through this method, the maximum output power of the wind turbine, and a reduction in the number of on/off switches with respect to PV, are obtained.

Figure 1 .
Figure 1.Charging of the battery and discharging validation of the floating charge voltage model.

Figure 2 .
Figure 2. Schematic of active power control.

Figure 3 .
Figure 3.The proposed forecast engine structure: (a) Main model and (b) Training mechanism.

Figure 3 .
Figure 3.The proposed forecast engine structure: (a) Main model and (b) Training mechanism.

Figure 5 .
Figure 5. Analysis of optimal number for NN blocks: (a) Obtained validation error, and (b) training time.

Figure 5 .
Figure 5. Analysis of optimal number for NN blocks: (a) Obtained validation error, and (b) training time.

Figure 6 .
Figure 6.Wind speed trend and solar radiation curve.Red dotted line, PV; blue dashed line, wind.

Figure 7 .
Figure 7. Wind speed trend and solar radiation curve.Red dotted line, PV; blue dashed line, wind.

Figure 7 .
Figure 7. Wind speed trend and solar radiation curve.Red dotted line, PV; blue dashed line, wind.

Figure 8 .
Figure 8.The statistics of component numbers connected to the grid based on the suggested model.

Figure 9 .
Figure 9. SOC of the energy storage battery.

Figure 8 . 18 Figure 8 .
Figure 8.The statistics of component numbers connected to the grid based on the suggested model.

Figure 9 .
Figure 9. SOC of the energy storage battery.

Figure 9 .
Figure 9. SOC of the energy storage battery.

Battery Charging Battery Dis-charging Figure 1.
Charging of the battery and discharging validation of the floating charge voltage model.

Figure 2 .
Schematic of active power control.

Table 1 .
Generated numerical results of the suggested forecasting model in comparison with other strategies.

Table 1 .
Generated numerical results of the suggested forecasting model in comparison with other strategies.

Table 2 .
Obtained results for the Ackley benchmark function.

Table 2 .
Obtained results for the Ackley benchmark function.

Table 2 .
Obtained results for the Ackley benchmark function.