ENERGY MANAGEMENT AND ACTIVE POWER CONTROL OF A HYDRID DISTRIBUTED GENERATION USING GENETIC ALGORITHM

The possibility of meeting the load demands and manage the energy of Okesha, Ado-Ekiti, Ekiti State, Nigeria using a hybrid system of power generation consisting of Wind/Solar PV energy sources in conjunction with the battery energy storage (Fuel cells) which act as a backup to the system is presented. The control mechanism is done through the use of genetic algorithm to optimally allocate the load and to control the charging and discharging of the battery. The results shows that the hybrid energy system through the control mechanism was able manage the energy generated so as to provide sufficient power to meet the optimum needs of the citizen of Okesha area in Ado Ekiti.


Introduction
Renewable energy source (RES) and distributed generation (DGs) have attracted special attention all over the world in order to reach the following two goals: i. The security of energy supply by reducing the dependence on the imported fossil fuels. ii. The reduction of the emission of greenhouse gases (e.g. CO2) from the burning of fossil fuels.
However, their relatively low efficiency and high cost, the controllability of the electrical production are the main drawbacks of renewable energy generators like wind turbine, hydroelectric and photovoltaic panel [1]. In consequence, their connection into the utility network can lead to grid instability or even failure if they are not properly controlled. Moreover, the standard for interconnecting these systems to the utility become more and more critical and require the DGs Hydrogen technology, combining fuel cells (FC) and Electrolyzer (EL) with hydrogen tanks are interesting for long-term energy storage because of the inherent high mass-energy high massenergy density. In the case of wind energy surplus, the EL converts the excess energy into H2 and can be stored in the hydrogen tank for future reutilization. In the case of wind energy deficit, the stored electrolytic H2 can be reused to generate electricity by using FC to meet the energy demand of the grid. Thus, hydrogen as an energy carrier, contribute directly to the reduction of dependence on imported fossil fuel [5]. However, FCs and ELs have low dynamic performance and fast dynamic storage.
Recent progress in technology make super capacitor (SCs) the best candidates and fast dynamic energy storage devices, particularly for smoothing fluctuant energy production, like wind energy generators. Compare to battery. SCs are capable of very fast charge and discharges and can achieve a very large number of cycles without degradation, even at 100percent depth of discharge without memory effect. Globally, SCs have better round trip efficiency; flywheel systems are also suitable for fast-dynamic energy storage [14] In order to benefit from various technology advantages, in this paper a development of hybrid wind and Solar PV generators is made. The control of internal power and energy management strategies should be implemented in the control system for satisfying the grid requirement while maximizing the benefit of renewable energy system (RES) and optimizing the operation of each storage unit [8]. The purpose of this paper is to present the power management strategies of the studied HPS in order to control the dc-bus voltage and to respect the grid according to the micro grid power requirement. these requirement are formulated as real and reactive power reference which are calculated by a centralized secondary control center in order to coordinate power dispatch of several plants in a control area. This area correspond to a micro grid and limited due to the high level of reliability and speed required for communications and data transfer [17]- [20] The management and the control of the energy flow in a substation of location can be achieved by using different system architecture [5]. Their difference lies on the feature and performance and obviously on the overall cost. Once chosen hardware architecture [6] it is necessary to realize proper software that implements and execute the desired energy management policy [5,7]. Matlab is one of the available software that can be used.
The choice of the energy policy needs is to be known in advance at the exigency of the final user together with their energy consumption time table that is a certain number of data must be collected, in the most of the cases, for a long time. This problem can also be solved by using evolutionary strategies such as the one offered by the genetic algorithm [5,6].
Genetic algorithm (GAs) offered the great advantage of evolving their behavior to match with the behavior of the final users, using a mechanism that is very similar to the one used by nature and artificially.
Matlab was expanded with the suitable library, this library was design to implement the model and simulate the hybrid system based on renewable energy sources. One of the advantages of Matlab software is that library offer a wide range of basic component for modeling the consumers. Thus, it can be modeled both single-phase or three phased consumer with different powers, nature and types (e.g. resistive, capacitive or inductive consumer)

Genetic Algorithm
A genetic algorithm (GA) is a method for solving both constrained and unconstrained optimisation problems based on a natural selection process that mimics biological evolution. The algorithm repeatedly modifies a population of individual solutions. At each step, the genetic algorithm randomly selects individuals from the current population and uses them as parents to produce the children for the next generation. Over successive generations, the population "evolves" toward an optimal solution.
Genetic Algorithms (GAs) have been developed by John Holland and his colleagues, and students at university of Michigan. These are the robust search mechanisms based on the mechanics of natural genetics and are very different from most of the traditional optimization methods. The main features of their working strategy are: i. Population based search i.e., multipoint start, ii. Operator inspired by biological evolution, such as crossover and mutation, iii. Probabilistic transition rules, iv.
Fast convergence to near global optimum, v. superior global searching capability in a complex searching surface using little information of searching space, such as derivative, continuity [24].
The workability of genetic algorithms (GAs) is based on Darwinian's theory of survival of the fittest. Genetic algorithms (GAs) may contain a chromosome, a gene, set of population, fitness, fitness function, breeding, mutation and selection. Genetic algorithms (GAs) begin with a set of solutions represented by chromosomes, called population. Solutions from one population are taken and used to form a new population, which is motivated by the possibility that the new population will be better than the old one. Further, solutions are selected according to their fitness to form Http://www.granthaalayah.com ©International Journal of Research -GRANTHAALAYAH [459] new solutions, that is, offspring's. The above process is repeated until some condition is satisfied. Algorithmically, the basic genetic algorithm (GAs) is outlined as below: Step I [Start]: Generate random population of chromosomes, that is, suitable solutions for the problem.
Step II [Fitness]: Evaluate the fitness of each chromosome in the population.
Step III [New population]: Create a new population by repeating following steps until the new population is complete. a) Selection: Select two parent chromosomes from a population according to their fitness. Better the fitness, the bigger chance to be selected to be the parent. b) Crossover: Crossover with a crossover probability, cross over the parents to form new offspring, that is, children. If no crossover was performed, offspring is the exact copy of parents. c) Mutation: mutate new offspring at each locus. d) Accepting: Place new offspring in the new population.
Step IV [Replace]: Use new generated population for a further run of the algorithm.
Step V [Test]: if the end condition is satisfied, stop, and return the best solution in current population.
The genetic algorithms performance is largely influenced by crossover and mutation operators. This paper is aimed to model and carry out energy management and active power control of distributed generation using genetic algorithm. This section will be looking and explaining how this paper is carried out. Each system in hybrid system will be analyzed and modeled mathematically individually. The power produced from the different models will be used in system simulation, depending on the value of produced primary energy (solar and wind) and the battery bank. Matlab simulation tool is used in the modeling and the codes which will be used in the management of the generated power. Figure1 shows the flow chart of the process of the proposed optimization model using genetic algorithm.

Modeling of PV Panels
The solar radiation calculation is presented here. The power produced by a PV panel and the sizing of the PV system are also presented in this unit.
The Extra-terrestrial Radiation, Gon, is the radiation incident on the surface tangent to the outer surface of the atmosphere and is expressed as The Daily Radiation, Ho,(J/day.m2) is given as: For the power output of the PV [6] present the following method of calculating the power of the PV panels at the specified temperature and irradiance: Where Ns is the number of series PV panels connected in the system, Np is the number of parallel panels connected to the system, Voci is the open circuit voltage at the specified temperature and irradiance, and is calculated in equation 5 Isci is the short circuit current at the specified temperature and irradiance, and is calculated in equation 4 F is the fill factor of the panel.
Where Isc is the short circuit current at STC, Kt is the temperature coefficient for short circuit current, Tc is the calculated temperature, Tn is the STC temperature, G is the irradiance and Gn is the irradiance at STC.  Where Ppv is the required power, ɳcable is the efficiency of the cable which is 95%, ɳreg is the efficiency of the regulator which is 80%, ɳbatt is the coulomb efficiency of the battery which is 95% and ɳinv is the efficiency of the inverter which is 95%.

MATLAB Modeling of the Solar System
Figure 2: Matlab Modelled structure of PV panel The solar system model consists of three Simulink blocks: the solar block, the PV model block and energy conversion modules. The solar model implement the mathematical model of the solar radiation. This is done by using standard Simulink and matlab modules and functions. This block allows selecting different type of patterns for the solar radiation. The PV module implements the equivalent circuit of a solar cell, Standard functions and blocks matlab and Simulink were used to obtain this model. Its structure is presented in figure.2. The output of the PV module is processed by an energy conversion block implemented with PWM IGBT inverter block from standard Simulink/SIM power systems library.

Modeling of Wind Turbine
The output power of the wind turbine by the wind turbine (power delivered by the by the rotor) is given by: = 0.5 р × ( / )…………….……..
Where ρ is the air density (kilograms per cubic meter) = 1.2 kg\m^3 v is the wind speed in meters per second, this is getting from the data obtained Ng is the generator efficient = 0.65, Nb is gear bus = 0.95, Pt is the power generated by the turbine, A is the blades' swept area, = 8495msq, Cp is the turbine-rotor-power coefficient, which is a function of the tip-speed ratio = 0.35, (λ) and pitch angle (β). ω = rotational speed of turbine rotor in mechanical radians per second, and R = radius of the turbine.
The coefficient of performance of a wind turbine is influenced by the tip-speed to wind-speed ratio, which is given by The wind turbine can produce maximum power when the turbine operates at maximum Cp (i.e., at Cp_max). Therefore, it is necessary to keep the rotor speed at an optimum value of the tip-speed ratio λopt. If the wind speed varies, the rotor speed should be adjusted to follow the change. Figure.3 below shows wind system model consisting of: Pitch angle controller which is used in controlling the pitch angle which help in varied the output power.

Matlab Modelled of Wind System
Wind turbine model which consists of the generator that have blade with specific area that are used in converting the mechanical energy into electrical energy, pitch angle in P.U. The power generated is passing through the bus bar and to rectifier which help in converting the power into D.C. The system consists of two scopes to display the measured wind turbine power, ground terminal and current generated

Batteries (Fuel Cell)
The energy management battery can either add to the load or supply to the load depending on the amount of energy generated by the other energy sources (i.e. PV panels and wind Power). Whether the batteries act as supply or load is also dependent on the state of charge of the batteries. Battery manufacturers stipulate that discharging the batteries below specific state of charge is harmful for the number of cycles the battery can complete and therefore the lifetime of the battery. This minimum state of charge is called the depth of discharge. The battery can therefore supply power between the full state of charge and depth of discharge i.e. between (SOC) and (DOD). [4] The minimum battery capacity is therefore shown in the equation 14 below; Where EBMAX; is the maximum battery capacity and DOD; is the recommended depth of discharge of the battery [5].
There are various methods of incorporating the energy supplied and used by the battery in the model. Equation 15 is used to calculate the energy used when the battery is being charged [5].
Where EB(T-1); is the energy stored in the battery the previous hour σ; is the rate of self-discharge per hour of the batteries Eg(t) ; is the energy generated in that hour by the wind turbine and PV panels, Ei(t) ; is the load that needs to be supplied, ninv ; is the efficiency of the battery. When the energy required by the load is greater than the energy generated by the PV panel, the wind turbine, the energy supplied by the battery is calculated as shown in equation 16 below; The calculation of the capacity of the battery at a point in time, t, is shown in equation 17 [6]; Where C(t-1); is the battery capacity at the previous increment of time, nbat ; is the battery round trip efficiency, PB(t); is the power supplied or used by the battery VBUS; is the voltage of the bus that the system is connected to and Δt; is the increment of time used and P_B(t) van be calculated as shown in equation 18 below; PB (t) is therefore negative when the energy generated by the other energy sources is not sufficient to supply the system and the battery supplies additional power to the system and the value is positive when the battery is charging [6].
In the above method the maximum amount of current can be set to be drawn from the battery, to further ensure that the battery is never overdrawn and maintains a long expected life of the battery. [4]. For the battery sizing, Where DOD is the depth of discharge which is 50% and DR is the discharge rate.
Where n is the number of months of autonomy, DOD is the depth of charge (50%) and Cb is the battery capacity. energy knocks electrons loose from their atoms, allowing the electrons to flow through the material to produce electricity. 2) Wind turbine: wind turbines use wind to generate electricity. When the wind blows, the combination of lift and drag forces on turbine blades causes the rotor to spin, and the turning shaft spins a generator to generate electricity. 3) Inverter: An inverter is a circuit for converting direct current (DC) to alternating Current (AC), which acts as the interface between the PV arrays and load. 4) Converter: Converter is circuit that convert variable DC supply into controlled DC Supply. 5) Battery: the function of batteries are to store the energy when generation is more than load demand, and supply the energy to the load when load demand is higher than generation. 6) Permanent magnet synchronous generator: They are commonly used to convert the mechanical power output of turbine into electrical power. In the rotating assembly of the PMSG the rotor contains the magnet, and the stator is the stationary armature that is electrically connected to a load.

Structure of Control System of the Hybrid System
Power converters introduce some control inputs for power conversion. In this case, the structure of the control system can be divided into different levels [7]. The switching control unit (SCU) is designed for each power converter. In an SCU, the drivers with opt couplers generate the transistor's ON/OFF signals from the ideal states of the switching function {0, 1}, and the modulation technique (e.g., pulse width modulation) determines the switching functions from the modulation functions (m).
The automatic control unit (ACU) is designed for each energy source and its power conversion system. In an ACU, the control algorithms calculate the modulation functions (m) for each power converter through the regulation of some physical quantities according to their reference values.
The power control unit (PCU) is designed to perform the instantaneous power balancing of the entire HPS in order to satisfy the grid requirements. These requirements are real-and reactivepower references, which are obtained from the secondary control centre and from references of droop controllers [24], [25]. In a PCU, some power-balancing algorithms are implemented to coordinate the power flows of different energy sources. The different power-balancing algorithms correspond to a number of possible operating modes of the HPS and can be gathered.

Climatic Data Set
As the load profile for residential area has peak and valleys and therefore the load is not constant for a daily period, it is better not to work with a daily average value for the load. In addition to the fluctuating load values, the solar and wind profiles are also fluctuating, therefore to ensure the power match between the load and the supply, it was decided to use monthly climatic values. For calculations, the PV panels, the monthly irradiance as well as the monthly temperature is required. For the wind turbine, the monthly wind speed is required for power calculations. The wind speed, irradiance and the temperature data of OKESHA area, Ado Ekiti, Ekiti State, Nigeria were gathered. The monthly data is been used for the execution of the flow chart. Table 1 below is the monthly upper and lower value of the monthly data been used.

Load Data Set
As discussed, monthly load data is required to ensure that the outcome of the optimization is accurate and the system sizing suggested accounts for the fluctuations of both supply and load. Load data of the selected area (Okesha, Ado Ekiti) on monthly basis for the period of a year were obtained from Benin Electricity Distribution Company (BEDC) and the analysis is carried out on this data.
Load data set of Okesha, Ado-Ekiti in Ekiti state is shown the Table 2 below:

Matlab Coding
Matlab scripts were used to write programs which enable us to generate power from wind, solar and battery source according to the following equation. Vm= = 0.5 * * * * * * ^3…… Where Im, Vm, Pm, Pt is max solar panel current, max solar voltage, power generated from the solar panel and power generated from wind respectively.
The battery is able to act as a backup for the system when the power generated exceed load demand, the battery is charging from the exceed power but when the power generated in less than the load demand, the battery will be discharging and supply the power to the system out of the power stored in it so as to make the system stable. For easy understanding of the above phenomenon, the power GUI (graphical user interface) were used in design the system as shown in Figure Figure.6) will give us the power generated. This is compared with the demand to investigate the status of the power generated which can either be in excess or shortage and it will also show the status of the battery whether is charging or discharging.

Simulation Results
The hybrid power system has been built and its control structure. The model in Figures 2, 3  It was observed that the power obtained from the wind, solar and battery is not constant and they were subject to great fluctuation due to change in the atmospheric weather condition.
Secondly, the hybrid power system in Figure 5 was simulated and the following results were obtained as shown in Figure10, 11 and 12. It observed that the current, voltage and the power in the HPS were fairly constant and were subjected to small disturbances.

Result of the Power Generated using Genetic Algorithm
The codes were written to calculate the output power of the wind and solar PV so as to optimally allocate load for economic reasons. The following results were obtained:    The Table 4 above indicated and shows the hybrid power generated, optimized temperature, irradiance and wind speed. It also showed the excess power generated and the battery status whether charging or discharging.

Conclusion and Recommendation
The possibility of meeting the load demands and management of energy of Okesha, Ado-Ekiti, Ekiti State, Nigeria using a hybrid system of power generation consisting of wind/solar PV energy sources in conjunction with the battery which act as a backup to the system is presented. The control mechanism does two things which is to optimally allocate the load and control the charging and discharging of the battery. The hybrid energy system was able to provide sufficient power to meet the optimum needs of the citizen of Okesha area in Ado Ekiti.
The availability of different sources of energy is highly useful to meet the load. Therefore, dependence on a sole source of energy may not be good enough as there would be lack of efficiency in meeting the load demand all year round (especially when a renewable energy source is being used because of fluctuation in weather condition e.g. temperature, irradiance and wind speed. etc.). Due to this reason, an optimized combination of various sources of energy will be a very good solution to ensuring that load demand is always met.
Hence, the reliance on a hybrid power system rather than a sole source of energy is a reliable way of generating electricity to meet load.