Hopfield Neural Network-based Security Constrained Economic Dispatch of Renewable Energy Systems

This paper presents Security Constrained Economic Dispatch (SCED) of Renewable Energy Systems (RES) using Hopfield Neural Networks (HNN) to address power mismatch problems of the Ethiopian power grid. The mathematical formulations of SCED for RES comprising biomass, hydro, solar PV, waste to energy plant, wind, and geothermal are presented. Each of these sources requires problem formulation and constraint handling mechanisms considering security limits and credible contingencies. This enables renewable energy systems to provide secure and reliable electric service. Modified IEEE 118 bus system and Ethiopian renewable energy systems were used as case studies. Modelling and simulation were conducted on MATLAB. According to the results obtained, it can be deduced that employing HNN based SCED is a promising step in connection to developments needed in the adoption and realization of smarter grids as it reduces execution time, production cost and the number of blackouts while increasing the security level of a power system of RES.


Introduction
The importance of electricity in our daily lives is noticed when sudden blackouts occur.Sudden and wide-scale power outages can result in a highly regarded threat to the socio-economic endeavours of the community.Considering the Ethiopian electric power network, which is a power system of renewable energy sources, entertains recursive blackouts and power supply frequently interrupts.An estimated 85% of customers participated in an interview say that these blackouts have devastating effect whenever it rains, during holidays and weekends.Consequently, these blackouts impose substantial damage to production plants, service centers, and home appliances [1] [2].
Blackout report of the Ethiopian electric power network from 2013 to 2016, reported 15 major blackouts.Production plants and service centers were down for an average of four months a year.Natural incidents, equipment failure, and power mismatch, collectively known as contingencies caused these sudden interruptions and blackouts [1] .
Tens of gigawatts of wind, hydropower, geothermal, biomass waste to energy and solar photovoltaic capacity are installed worldwide every year into the renewable energy market [3].Intensive studies are being conducted on alternative energy sources including the newly emerging Nanotube technologies [4], electric vehicles [5], smart roads [6] and sustainable road pavement based green energy source [7].
One of the main challenging aspects of power system operation is that electrical energy is difficult to economically store in significant amounts.This aspect requires a continuous balance between generation and demand that considers security constraints, contingencies [8].The other challenge is related to the integration of intermittent renewable energy sources [9] [10] [11].With increasing emphasis on utilizing more renewables to mitigate climate change, the power industry confronts many new challenges.For example, in the Ethiopian power grid, day-to-day operation decision is done manually without the employment of economic dispatch [10].
One of the daily power system operation tasks that coins these challenges is security-constrained economic dispatch (SCED) [12] [13].SCED is a process of allocating generation levels to generating units to entirely and economically supply the load while satisfying security constraints [14] [9].A comprehensive literature review reveals that SCED is an optimization problem that addresses more than three conflicting objectives, which make it a challenging computational problem [15].Some methods have been used to solve this problem since its introduction, such as the iterative method, gradient-based techniques, interior point method, linear programming, and dynamic programming [12] [13].A substantial number of articles used HNN to solve economic dispatch of conventional thermal generators [16] and in the perspective of Artificial intelligence [5] [10], renewable energy generation [17], and postdisturbance corrective actions [7].
Having predictive control features, accurate uncertainty forecasting abilities and feedback-consuming attributes HNN is the best solution method for SCED of RES [16] [18].This study utilized primary data such as forecasted load, interchange schedule, reserve requirements, transmission limits and parameters, generation cost offering, reserve limits, ramp rates and pre-scheduled generation output level collected from generation-station control rooms and Ethiopian electric utility for the physical power system and Modified IEEE 118 bus system as a test system.In this paper, it is put the choice on a firm basis on:  Formulating the SCED problem of RES with security constraints and credible contingencies as separate objective functions. Predictive control and anticipation of intermittent renewable generation using neural networks. Solving the SCED of RES using continuous Hopfield Neural Networks (HNN).Articulation of the challenging aspects of economic dispatch along with security constraints and intermittency of renewable energy generation is also the novelty of this study.

Problem formulation
Relations between the power generation cost and the operating cost rely on power flow output and forecasted values [19] [20] [21].Problem formulation thus starts from the optimization perspective of the SCED mathematical model.The general optimization problem form for SCED is: Hopfield Neural Network-based Security Constrained Economic Dispatch of Renewable Energy Systems 3 ( ) 0 1, 2...
Where ( ) k h x represents a set of equality constraints ( ) l g x , represents a set of inequality constraints, and ( ) f x is the objective function that optimizes x.
In a practical power system, the SCED problem is nonlinear and multi-objective due to operational and design constraints.Objective function should minimize the nondetailed formulation of the SCED problem due to unnecessary assumptions that can lead to a limitation in the modelling of large-scale power systems [22].In this regard, multi-objective optimization is favoured.The general form of multi-objective optimization is then: Where ( ) ( ) ) , , ( x are different objective functions denoting the involved RES and i x denotes the security level constraints of the power system.The multiobjective optimization approach in the SCED context refers to minimizing generation cost and maximizing the security level of the operating system while considering a variable and intermittent generation [14] [23] [24].This paper uses renewable resources such as biomass, hydro, solar, wind, and geothermal as inputs to RES.Each of these sources requires problem formulation and constraint handling mechanisms.
Hydro: At the design stage, the available power at the hydraulic turbine ( To formulate an economic dispatch problem, the first objective function f1(x) in equation ( 4) represents the objective function of hydropower generation plants [20] [25].
Where h C denotes hydropower generation cost, P hgj represents hydropower output at the i th unit, and hg N is the number of committed hydropower plants.Hydropower generation also depends on the average head   ( ) 0.00981 Wind: The behaviour of wind speed at a given area or location can be quantified as a probability distribution function F (v).The Weibull PDF method is a better quality probabilistic model for wind speed at any condition.It has two parameters, that is the dimensionless shape parameter and the scale parameter [26] [27].The average wind power ( wav P ) is determined by: 0 ( ) ( ) In compliance with the Weibull probability distribution function, the deviation of individual wind speed averages ( w v σ ) should be first calculated to determine the average wind speed.
( ) Accordingly, the average wind speed for first stage decision can thus be determined by: For a particular site, the power output of assumed wind speed is given by [9] Here, i v , out v , r v , wt v , and wr P represent cut-in wind speed, cut-out wind speed, rated wind speed, forecasted wind speed, and wind power output respectively.Dispatch wise, its corresponding objective function is f2(x).( ) ( ) Where w C , wgj P and WG N represent wind power generation cost, wind power output at the i th unit, and the number of committed wind generating units.CR and CP represent the reserve cost and penalty cost coefficients of wind power generation respectively.The reserve cost function helps to determine the debit that can be produced from the probability distribution function of variable wind speed [28] [29].The probability of extracting desired power output from variable wind in the range of (vi ≤ v ≤ vr) can be determined by: Where K and C are Weibull probability distribution factors Solar PV: the solar power output that can be extracted from a given solar irradiance G is [30]: Where for 0 <G< R ca: CR and CP represent the reserve cost function and penalty cost function of solar PV generation respectively.The reserve cost function determines the debit produced from the probability distribution function of variable solar radiation.The probability of producing power output from variable solar irradiance can also be determined using the Weibull probability distribution function [31] [23].
Renewable Thermal: Renewable thermal plants in this context refer to plants adopted from conventional thermal plants that are prime moved by renewable sources.Despite the difference in their constraints, renewable energy sources adapted from thermal plants have similar objective functions [19] [32].REs adapted from thermal plants considered in this study include geothermal power plants, solar thermal power plants, biomass, and waste to energy plants.
The economic dispatch objective function of thermal power generation cost ( F th ) is a quadratic function of a coefficient measure of losses ( i a ), coefficient representing fuel cost ( i b ), and coefficient representing operating and maintenance costs that include salary and wages ( i c ). Denoting solar thermal power generation cost, geothermal generation cost, and biomass generation cost by Sth F , Gth F and Bth F respectively; the total objective function for renewable thermal power generators with their corresponding power outputs, Sth P , Gth P , and Bth P is given by: Where NL denotes the total number of transmission lines

Constraint formulation
In power systems, continuously respected operation constraints and limits ensure the reliable and secure operation of the system.1.Demand and generation balance  (26)   Demand and generation balance clarifies that the total generation of hydro generating units (Phg), wind generating units(Pwg), solar units(Psg), and thermal units(Pth) should be equal to the sum of total demand(PD)and power loss(PL).The generation capacity of each generating unit should be within the upper and lower limits of rated output power.Pwr, Psr, Phr, and Pi denote the rated wind power output, rated solar power output, rated hydropower output, and power output of the i th generating unit respectively.

Prohibited operating
Modern generators have prohibited operating zones (Npoz) for determining feasible operating zones.Prohibited operating zones constraints are added to the SCED problem, when generating units prohibit operating zones due to the design restrictions or vibrations in a shaft bearing.For optimization purposes, these constraints can be understood as upper and lower bounds.

Transmission constraints:
For transmission constraints, Kron's loss equation is considered.
( ) The power transmission losses depend on the flows in the branches and thus on the net injections and Kron's loss equation better describes power injection parameters. 5. Security limits Security limits refer to the principle of secure operation power system, i.e. apparent power flow through the transmission line ( Increasing and decreasing the output of renewable generation is limited to the amount of dependable power due to the physical and mechanical restrictions of each generating unit.Generator ramp limits change the effective operating limit to extend the life span of generators.

Spinning reserve limits
To have a primary frequency response to variable demand, a minimum spinning reserve value must be set aside.
Where Ri S is the fraction of the total spinning reserve of the power system ( Sr S ) allocated to the generating unit i.

Water discharge and reservoir limits:
For hydrothermal generating units, bounds by the restrictions of their storage reservoirs must be considered.Hydropower plants can discharge a limited quantity of water in a pre-defined dispatch period.

SCED using Hopfield Neural Network
Hopfield Neural Network (HNN) is a recurrent artificial neural network popularized by John Hopfield in 1982, in which networks serve as associative memory systems with binary threshold nodes [34] [35].All neurons are both input and output, and each neuron is connected to all other neurons in both directions with equal weights.The output of each neuron is then supplied to all other neurons.The process continues until a stable state that represents the network output is reached.HNN is a widely used model for solving combinatorial optimization problems [19].
These networks have three major forms of parallel organization found in neural systems, namely, parallel input, parallel output channels, and a large amount of interconnectivity between the neural processing elements.Two types of Hopfield neural network models are widely used namely the binary (discrete) model and the analogue (continuous) model [16] [36] .
Economic dispatch using a Hopfield neural network requires a continuous neural model.A continuous Hopfield neural network has been used for the economic dispatch of a traditional generation with quadratic objective functions [19] [20] [21].

General Hopfield neural networks search mechanism formulation
The Initialization and running: Setting values of the units to the desired start pattern initializes the Hopfield neural networks.Repeated updates are then performed until the network converges to an attractor pattern as givin in equation (49).Convergence is guaranteed, as Hopfield networks proved that the attractors of the nonlinear dynamical system are stable, not periodic, or chaotic as in some other systems [19].
Training: Training Hopfield neural networks involves lowering the energy of states that the net should remember.This allows the net to serve as an associative memory system.This implies the network will converge to a remembered state if it is only part of the state.
The net can be used to recover from a distorted input to the trained state that is most similar to that input.Thus, the network is properly trained when the energy of states that the network should remember is local minima.These properties are desirable, since a learning rule, satisfying them is more biologically plausible [22].

Parameter Set-Up and Initialization
In Hopfield Networks, an attractor pattern is a final stable state, a pattern that cannot change any value within it under the updating limit.
The initial values of inputs for these neurons are calculated by the inverse sigmoid functions based on the initial outputs of the continuous neurons representing power outputs of generating units [16].
The inputs to the neuron come from two sources, one from the external inputs Ii and the other from the other neurons Vj.Where: U i is the total input to neuron i, Tij is the interconnection conductance from the output of neuron j to the input of neuron i, Ii denotes external input to neuron i, and Vj stands for the output of neuron j.The continuous model of the HNN is based on continuous variables [36].

Mapping Economic Dispatch to Hopfield Neural Network
The most important point in solving any optimization problem using HNN is the mapping of the problem objectives and constraints to the energy function of the network.
The Hopfield model of neural networks was employed to solve ED problems for units having continuous or piece-wise quadratic fuel cost function, and even for units having prohibited zones constraint.The objective function for the economic dispatch problem has two parts i) the operation and generation cost minimization part ii) the generation and computation error minimization part.To solve the economic dispatch problem the energy function is defined by combining the objective function with constraints as [36] [37]: (51) The synaptic strength and external input are obtained by mapping the energy function.By changing the output of unit i from PGio to PGi, and the transmission loss change from P Lo to PL the loss can be represented by [16] The energy function of HNN is defined by combining the objective function and the corresponding constraint function, utilizing weight coefficients, which determine the weightage of each factor.This starts with the energy function of HNN given by: The time derivative of this energy function should be negative so the network always moves in such a direction that the function converges to a minimum.
To solve SCED using HNN, the penalty function method is used.

(
) ( ) Gi Gio i j i j

P P B P B P P P
To map this equation into HNN the computation should start with equating (53) and (54), so that the following set of equations is obtained. , A and B being weighting factors, A varies from 0.1 to 3, B is set to 1, and is set to 0.000055.A&B should be greater than or equal to zero.The relation that updates these values is called an adaptive calculation of weighting factors.
NG is the number of committed generating units.In the selection procedure of weighting factors, A is associated with power mismatch (Pm), as it is assigned the highest priority over the other terms [25].In this paper, modified IEEE 118 Bus System with high renewables penetration features and Ethiopian energy systems were used as case studies.This study used MATLAB, and MATLAB/ MATPOWER 6.0 simulation tools.First, objective functions and their respective equality and inequality constraints were coded.Then training, validation, and creating neural networks were performed.

Results and discussions
The following figures depict the simulation results including the behaviors of a particular Hopfield Neural Network.Predictive control enables the Hopfield net to lower the energy state that the net should remember.This way the net can recover from a distorted input to a trained state that can withstand contingencies as shown in Figure 2.
Based on the errors shown in Figure 2   To practically interpret the results, unit commitment input, forecasted data evaluated by predictive control of HNN, the number of recursive blackouts, and demand profile are integrated within the proposed SCED solution.From weight positions plotted in Figure .3, the attractor pattern on the final state (equations 49 and 50), penalty function weights (equation 54), and adaptive calculation of weighting factors (equations 61 to 65) can be obtained.This consideration helps in allocating contingency reserves.Based on the errors obtained from the time series response of training the created HNN, credible contingencies are identified and selected for constraint formulation.
SCED is important for scheduling when/which generator to dispatch, determining how much reserve is need for spinning, standby, ramping, and contingency.Figure 5. Dispatch contributions from Ethiopian existing power plants participated in alleviating the recursive blackouts.As it is indicated in Figure .6,the energy function of HNN representing the whole SCED problem is stabilizing and converging as the number of iterations increase.Staring from epochs 300, the best performance is attained.NREL 118 test system provides a researcher with the privilege of choosing and editing renewable penetrated zones based on their resemblance to a particular project.
Accordingly, Figure 7 presents the dispatch share of renewable generation technologies and Figure 8 depicts ERS adopted from NREL 118 test system zones 2&3.
There is an important difference in load between weekdays and weekends.Furthermore, Mondays and Fridays being adjacent to weekends can have structurally different loads than Tuesday through Thursday.Day and night also, have a different share of load and generation effects.Figure 9 thus helps to grasp the effect of weekend demand profiles on SCED of ERES In Ethiopia, the weather does not significantly vary throughout the year.Apart from solar PV generation.Therefore, demand seasonality on the grid is minimal.Here, the residential demand is characterized by lighting, cooking, and heating and since the peak is in the evening, their contribution to the system peak is significant.The composition of the load is a bit different from the state cities' commercial and public services as large infrastructure, industries, schools, and hospitals operate mainly between 8:00 Am and 6:00 Pm.
Additionally, the country's suburbs can largely consist of small shops, hotels, bars, cafés, and restaurants that stay open throughout the evening Available data is used to understand SCED and the dispatch contribution of each generating unit.

Conclusions
This paper presents Security Constrained Economic Dispatch (SCED) of renewable energy systems (RES) using Hopfield neural networks (HNN) to address power mismatch problems of the Ethiopian power grid.Reformulation of SCED for IRES comprising biomass, large and micro-hydro plants, solar PV, solar thermal, waste to energy plant, wind farm, and geothermal is presented.Each of these sources requires problem formulation and constraint handling mechanisms considering security limits and credible contingencies.This enables renewable energy fuelled power systems to provide secure and reliable service.
Modified IEEE 118 bus system (NREL-118 test system) with high renewable penetration features and Ethiopian renewable energy systems were used as case studies.Modelling and simulation were conducted on MATLAB simulation platform.
According to the simulation results obtained, it can be deduced that economic dispatch of IRES using HNN is a promising step in connection to developments needed in the adoption and realization of smarter grids as it is an excellent solution method of anticipating intermittent fluctuating and predictive control.
It has also a feature for involved multi-objective functions to share feedback and train from them.HNN is an excellent solution method of variability.However, premature convergence and the inability to provide global optimum solutions still is its drawback that needs intensive research and improvements.Hybrid solutions such as hybrid HNN-Genetic Algorithm methods can overcome these drawbacks.
Nomenclature ai = constant coefficient measure of losses bi= constant coefficient representing fuel cost Bij= active power loss coefficients c = Weibull probability distribution factor Ch = Hydropower generation cost Ci = constant coefficient including salary and wages Cs= solar power generation cost Csp= solar power penalty cost Csr= solar power reserve cost Cw= wind power generation cost Cwp= wind power penality cost Cwr= wind power reserve cost DRI = ramp rate limit f(x) = function to be minimized FBth= biomass and waste to energy generation cost FGth= Geothermal power generation cost fpw= wind power probability distribution function Fsth= solar thermal power generation cost Fth= thermal power generation cost g l (x) = Inequality constraints G= solar irradiance Gstd= solar irradiance in a standard environment h k(x) = Equality constraints Hi= average head K = Number of equality constraints k= Weibull probability distribution factor L= Number of inequality constraints Ncc= Number of Credible contingencies NG= Number of generating units NL = Number of security levels Npoz = Number of prohibited zones ɸ = Credible contingencies Phr= Hydropower output PBth= biomass and waste to energy power output PD= Power demand PGth= geothermal power output Phgi = Hydropower unit output Pimax= maximum power generation limit Pimin= minimum power generation limit PL = Power loss Psg = solar power output Psr= rated solar power output Psth= solar thermal power output Pth= thermal power output Pwr= wind power output Qi= discharge outflow Rca= certain irradiance point set at 150 w/m2 Sl = Security level Slmax = maximum Security level SRi= spinning reserve limit SSR= maximum spinning reserve limit Vi= cut in wind speed Vo= cut out wind speed Vr= rated wind speed Vwt= forecasted wind speed x i (1)= Security constraint α = weight factors of unit costs between 0&1 ψ = penetration rate

hP
) depends on the effective area ( effective a ) at the tip of the penstock hitting the turbine and velocity of water ( v ). ij

H
and water discharge outflow ij Q .

14 )
EAI Endorsed Transactions on Energy Web 07 2021 -09 2021 | Volume 8 | Issue 35 | e6 flow and maximum active power flow at the k th line respectively.

Figure 1 .
Figure 1.Flow chart for HNN Endorsed Transactions on Energy Web 07 2021 -09 2021 | Volume 8 | Issue 35 | e6 54)This energy function consists of an objective function also known as a cost function and design constraints function.
means A is determined from any value of B. To determine the value of weighting factor C.

Figure 2 .
Figure 2. Predictive control of variable renewable energy resources using neural networks for the NREL-118 test system (a) and Ethiopian renewable energy systems (b).
credible contingencies with higher error value are selected as credible contingencies for training.Only after training the net accordingly can the credible contingencies be selected EAI Endorsed Transactions on Energy Web 07 2021 -09 2021 | Volume 8 | Issue 35 | e6

Figure 3 .
Figure 3. Weight positions of created HNN

Figure 4 .Figure 3 .
Figure 4. Time series response of training the created HNN Figures 9 and 10 depict energy share and dispatch of each Ethiopian generating unit committed so far to supply 10.023GW of power.Shewit Tsegaye, Fekadu Shewarega and Getachew Bekele EAI Endorsed Transactions on Energy Web 07 2021 -09 2021 | Volume 8 | Issue 35 | e6

Table 1 .
Comparison table between solution methods

Table 1 .
The execution time and production cost of the system solved using HNN is less than that of conventional methods.This comparison was done to indicate the robustness of HNN.

Table 2 .
Daily dispatch of Ethiopian renewable energy system