Engineering, Technology & Applied Science Research Vol. 7, No. 5, 2017, 1934-1939 1934 www.etasr.com Αhmadi et al.: Optimal Resources Planning of Residential Complex Energy … Optimal Resources Planning of Residential Complex Energy System in a Day-ahead Market Based on Invasive Weed Optimization Algorithm Pouria Αhmadi Electrical Engineering Dpt Amirkabir University of Technology Tehran, Iran Pouria7091@aut.ac.ir Mohammad Ηassan Νazari Electrical Engineering Dpt Amirkabir University of Technology Tehran, Iran nazary@aut.ac.ir Seyed Ηossein Ηosseinian Electrical Engineering Dpt Amirkabir University of Technology Tehran, Iran hosseinian@aut.ac.ir Abstract—This paper deals with optimal resources planning in a residential complex energy system, including FC (fuel cell), PV (Photovoltaic) panels and the battery. A day-ahead energy management system (EMS) based on invasive weed optimization (IWO) algorithm is defined for managing different resources to determine an optimal operation schedule for the energy resources at each time interval to minimize the operation cost of a smart residential complex energy system. Moreover, in this paper the impacts of the sell to grid and purchase from grid are also considered. All practical constraints of the each energy resources and utility policies are taken into account. Moreover, sensitivity analysis are conducted on electricity prices and sell to grid factor (SGF), in order to improve understanding the impact of key parameters on residential CHP systems economy. It is shown that proposed system can meet all electrical and thermal demands with economic point of view. Also enhancement of electricity price leads to substantial growth in utilization of proposed CHP system. Keywords-combined heat and power system (CHP); electricity tariff; energy management system; smart home I. NOMENCLATURE i Time interval ,Battery iC Total cost of battery in the i th interval ,Gas iC Total cost of purchasing gas in the ith interval ,FC iC Total cost of fuel cell in the i th interval ,i Pur GridC Total cost of utility in the ith interval ,i Sell GridC Total Revenue of utility in the ith interval U Length of time interval GasB Cost of purchasing natural gas per kW ,gas iP Heat power produced directly from gas MU Normalized price of electricity tariff GridB Maximum value of utility purchasing electricity cost per kW ,Grid iP Purchased power from utility by home BatteryB Operation and maintenance cost of battery (kw) ,Battery iP Output power of battery PLR Part Load Ratio ,eFC iP Electrical power produced by fuel cell ,FC iή Efficiency of fuel cell. ,eL iP Electrical load demand LoadQ Thermal load power ,FC iQ Heat power produced by fuel cell minW Minimum energy limit of battery maxW Maximum energy limit of battery SOC Available energy in battery , ,Battery dch maxP Maximum limit of battery discharging rate , ,Battery ch maxP Maximum limit of battery charging rate dchή Efficiency of battery discharging. chή Efficiency of battery charging  hourly self-discharge rate ,FC UP Upper limit of ramp rate of fuel cell ,FC DP Lower limit of ramp rate of fuel cell ,FC minP Minimum limit of fuel cell generated power ,FC maxP Maximum limit of fuel cell generated power chή Efficiency of Battery charging ,FC ir Electrical to thermal power ratio of fuel cell dchή Efficiency of Battery discharging ,T iG Reference Irradiation ,c iT Environment Temperature SGF Sell to Grid Factor Engineering, Technology & Applied Science Research Vol. 7, No. 5, 2017, 1934-1939 1935 www.etasr.com Αhmadi et al.: Optimal Resources Planning of Residential Complex Energy … II. INTRODUCTION CHP (combined heat and power) system is a lucrative alternative which offers lower energy costs, higher efficiency, higher reliability, stability in the face of uncertain electricity costs and lower greenhouse gas (GHG) production. The application of CHP systems for residential loads will be promoted if optimal operation of the integrated energy system is completely investigated. Authors of [1] have proposed a mixed integer nonlinear programming approach to minimize annual cost of the system for a given residential customer equipped with the CHP plant, combining with a back-up boiler. Authors in [2] have presented optimal sizing of RERs (renewable energy resources) including PV/WT beside CHP units in a grid connected to residential complex using simulated annealing optimization (SA). It has been shown in [2] that RERs and CHP unit can properly complement each other. Authors of [3] have proposed operational strategy for a CHP- based grid-tied MG (microgrid) including PV/FC/WT and MT (micro-turbine). It has been presented in [3] that an increase in the price of electricity encourages the utilization of MGs based on RERs. Also in order to have a higher level of reliability, a higher number of DGs must be employed in MGs. In [4], a hybrid electrical/ thermal home energy system including FC, CHP and battery is studied using hyper-spherical search algorithm. It has been shown that the battery and variable electricity tariffs have substantial effect on system operating costs. In [5] optimal scheduling of home energy system has been shown that the efficiency of battery has a major effect on the system operating cost; however, the impact of selling electrical energy to grid is not considered. In this paper, an optimal resources planning in the hybrid thermal/electrical grid-connected residential complex including a FC, PV and battery is studied. A day-ahead power scheduling based on invasive weed optimization (IWO) algorithm for managing different resources is developed to generate an efficient look-up table that determines an optimal operation schedule for the distributed energy resources at each time interval, in order to minimize the operation cost of the system. The impacts of bilateral trading to grid during different tariffs are taken into account and all practical constraints of the energy resources and utility are considered. Also accurate models of each energy resources including upper and lower limits of ramp rates of FC and charge and discharge ramp rates of battery are also applied. Moreover, in order to examine different energy price policies, sensitivity analysis have been conducted on electricity prices and sell to grid factor (SGF). It should be noted that the model of this study is formulated in general terms, so it can be easily adapted to various residential building systems by applying hourly load data, meteorological data, energy price policies etc. This paper is structured as follows. Firstly the system architecture and operation is given in section III. Energy management system (EMS) is explained in section IV. Problem formulation is outlined in section V. Results and discussion are investigated in section VI and Section VII draws the concluding remarks. III. SYSTEM CONFIGURATION AND OPERATION Figure 1 shows the configuration of the proposed hybrid residential energy system. The system includes of PV panels as a renewable energy source, a FC as a CHP system and battery to store surplus energy and improve the system reliability. The thermal load can be supplied by either natural gas or recovered heat from the FC. The electrical load can be supplied by the PV, FC, battery or main grid. Sell to grid is also taken into account. Fig. 1. Residential building multi-carrier energy system A. Modeling the System Components 1) PV System The output power of PV (PPV) at each time (t) can be calculated [6, 7]: , ,i PVPV iP A G   (1) where G is solar radiation, A is PV area and PV is overall efficiency of solar panel without considering efficiency of DC/AC converter. The PV in each time can be determined using following equation:  , 10 ,[1 ]PV ref ref c i ref T iή ή T T ylog G    (2) 2) FC The maximum electrical power of the FC is restricted by maximum capacity of FC given in Table II. If output power of FC becomes less than a lower threshold, the FC cannot work and it should be switched off. The Efficiency of the FC is a function of part load ratio (PLR). PLR is ratio of electrical generation to maximum FC power rating. The efficiency and ratio of the electrical to thermal energy of FC are also function of PLR [8] and can be obtained by following equations: 0.05iif PLR  ,i ,0.2716 0.681FC FC iή r  (3) 0.05iif PLR  5 4 , 3 2 0.9033PLR 2.9996PLR 3.6503PLR 2.0704PLR 0.4623PLR 0.3747 FC i i i i i i ή       (4) Engineering, Technology & Applied Science Research Vol. 7, No. 5, 2017, 1934-1939 1936 www.etasr.com Αhmadi et al.: Optimal Resources Planning of Residential Complex Energy … 4 3 , 2 1.0785PLR 1.9739PLR 1 .5005PLR 0.28 ( 17PLR 0. ) 6838 FC i i i i i tr      (5) Therefore, thermal energy provided by FC in each time interval is: , ,,FC iFC i FC iPrQ   (6) In this paper, as an accurate model of the energy resources is considered, upper and lower limits of ramp rates of FC are taken into account. Therefore following equations are considered through simulation procedures. , , 1 , eFC t eFC t FC U P P U P    (7) , 1 , , eFC t eFC t FC D U P P P    (8) 3) Battery The battery bank capacity is presented in Table II. In this study an accurate model for battery is considered in which battery and converter efficiencies, self-discharge rate and charge and discharge ramp rates of battery are taken into account. The charge and discharge quantity of the battery bank at time t can be determined by following equations, respectively. 1 ,i(1 )i Battery hi cSOCSOC P ή     (9) ,i 1 (1 ) Batter i y i dch P SO ή SO CC    (10) The following inequalities represent limitations of discharging and charging ramp rates for the battery, respectively: ,1 ,1 ch maxi Battery dch maxi Batter i y i SOC U SOC SOC P SOC P U       (11) IV. ENERGY MANAGEMENT SYSTEM (EMS) The main role of the EMS is to minimize the operating cost while satisfying all thermal and electrical demands of residential complex. In order to use available energy resources effectively, operation scheduling should be determined one day or longer in advance. It is assumed that the predicted values of heat and electricity demands are available one day ahead in the optimization model studied in this paper. It should be noted that as the objective of this study is to minimize the operating cost of residential complex energy system, the components of system are previously installed and there is no need to consider installation costs. In this study, the model is formulated in general terms, so it can be easily adapted to various systems by applying hourly load data, meteorological data tariffs, natural gas price etc. A. Cost Function The objective of EMS is to minimize following cost function.   ,i ,i ,i ,i ,i )( Pur SellFC Battery Grid Grid GasiMin f x C C C C C     (12) where ,FC tC , ,Battery tC , , Pur Grid tC , , Sell Grid tC and ,Gas tC can be calculated using following relations: ,i , ,i eFC FC t F Ga C s P C U C ή          (13) Also, in this study startup cost and shutdown costs of FC are taken into account. ,i ,i Battery Battery BatteryC U B P  (14) ,i ,i Pur Grid Grid GridC U M PBU    (15) ,i ,i Sell Grid Grid GridC U M S FPB GU     (16) ,i ,iGas Gas gasC U B P  (17) B. Constraints Following constraint should be satisfied. , ,i ,FC min FC FC maxP P P  (18) min xi maSOCO SOCS C   (19) C. Power Balance In this study, the load shedding is not considered, so all the electrical and thermal demands must be supplied. , ,, , , 0FC i Battery iP Grid i L iV ai o dP P P PP     (20) , , , 0Gas i FC i Load iQQ Q   (21) It is assumed that sell to and purchase from grid must not be occurred simultaneously. Namely, at each t , the residential complex energy system should only sell energy to grid or purchase electricity from grid. D. Electricity Tariff In this paper, three different tariffs are considered for electricity price: peak, intermediate, and off-peak tariffs. All of the tariffs are normalized regarding the maximum electricity tariff defined in the “peak” period. Normalized values of these tariffs and their pertaining time intervals are listed in Table I [9]. In this study, electricity price during on-peak hours is 0.13($/kWh) [5]. In base scenario, sell to grid (SGF) factor is assumed to be 0.9 [10]. V. INVASIVE WEED OPTIMIZATION ALGORITHM A. Terms Used • Seeds – All units in the optimization problem that are assigned a value pertaining to the limiting conditions. • Plants – Seeds that grow into plants before being evaluated. Engineering, Technology & Applied Science Research Vol. 7, No. 5, 2017, 1934-1939 1937 www.etasr.com Αhmadi et al.: Optimal Resources Planning of Residential Complex Energy … • Fitness value – A value that determines how good the plant is, i.e. how much optimized the solution is. TABLE I. ELECTRICITY TARIFF [8] Period Time range Normalized Electricity Purchase Price Peak (9:00-12:00), (17:00-22:00) 1pu Intermediate (13:00-16:00) 0.9pu Off-peak (23:00-08:00) 0.78pu The IWO algorithm is inspired from the biological growth of weed plants. This technique is based on the colonizing behavior of invasive weed plants [13]. Weed plants are called invasive because the growth of weed plants is extensively invading in the growth area. IWO is known to be highly converging in nature since it a derivative free algorithm. It also converges to the optimal solution thereby eliminating any possibilities of sub optimal solutions with easy coding implementation. IWO has been so far implemented for applications like DNA computing and antenna system design [14]. In this algorithm, the number of decision variables are taken in the form of seeds and then randomly distributed in the feasible space [15]. These seeds are then permitted to grow into plants and the fitness of each individual plant is determined. Depending upon these fitness values, new seeds are generated by each plant in accordance with a normalized standard deviation σ. In the next step the combined fitness values of seeds and plants is calculated until the fitness value converges to an optimal solution. The objective function is utilized as the fitness function to achieve the optimized results using convergence technique. Simulation procedure of IWO algorithm has been explained below. Step 1: The seeds are initialized based on the number of selected variables involved in the process over the probable search boundary. The seeds are randomly initialized based on feasible space. Step 2: The fitness of the seeds initialized is evaluated depending upon the fitness function. These seeds then evolve into weed plants capable of producing new units. Step 3: The evolved plants are arranged in a definite order (increasing or decreasing) and new seeds are produced by these plants depending upon its position in the sorted list of plants, starting with the maximum number of seeds produced by the best fit plant. Step 4: The number of seeds to be produced by the plants varies linearly from Nmax to Nmin which is obtained by given formulation: max min min( ) i worst best worst Number of se F F N N N F F eds      (22) Step 5: The generated seeds are distributed normally over the feasible space with zero mean and a standard deviation that is updated during each iteration using: max 0 max ( ) n iter f f iter iter iter             (23) where n is used to help algorithm to traverse around the feasible space more efficiently and is generally assumed to be between 2 and 3. Step 6: The fitness of each seed generated in the above steps is calculated along with the parent weeds and by means of competitive exclusion, the seed-parent combinations that are least in fitness are eliminated and the number of weed plants is limited to the maximum of number of weeds allowed. Step 7: The above steps are repeated until convergence criteria is reached, so that the plant with the best fitness value is the optimized solution. The simulation procedure of IWO algorithm is given in Figure 2. VI. RESULTS AND DISCUSSION A. Operation Behavior The simulation has been conducted for 24 hours in MATLAB software environment. The profile of thermal and electrical load demands of the residential complex in a typical day in spring has been presented in [2]. For this system, the peak of thermal and electricity demands are 34 kW and 78 kW, respectively. The parameters of the system are presented in Table II. Figure 3 shows the optimal operation of each energy resources in a typical day. According to this figure, in early hours of the day, as the price of electricity is low, the residential complex energy system purchases electrical energy to supply the load and store in battery. Then, during the high- cost hours, the EMS orders the sell of electrical energy in order to make the operation of the system more economic. In addition, this sold energy contributes to power system for supplying electrical demand of the system during peak hours. Namely, in the first eight intervals, as the utility electrical cost is at its lowest level, the battery is charged and the major part of electrical demand is supplied by the utility. FC does not generate at its maximum capacity and generates the limited power such that its cost becomes less than the utility. In other words, if FC generates more power, its efficiency is reduced and it causes higher cost compared to the utility cost. Also as ramp rate of FC is taken into account, FC needs to increase its power generation at interval 6th and 7th, so that there will be no limit on high-cost hours to generate at its maximum capacity. During the 13th to 16th intervals that the electricity tariff is in the intermediate period, only FC and PV supply the electrical load. Also natural gas contributes to recovered thermal energy from FC to meet thermal demand. In the 9th to 12th and 17th to 22th intervals, the electricity tariff is in the peak period. Therefore, the battery delivers all of its stored energy, FC generates at its maximum power limit and PV panel contributes to other energy resources to supply the load and sell electrical energy to grid. So it can be concluded proposed residential energy system sells energy to grid only in high-cost periods and purchase energy from grid in low-cost intervals. As a result, proposed residential system can help to have smoother Engineering, Technology & Applied Science Research Vol. 7, No. 5, 2017, 1934-1939 1938 www.etasr.com Αhmadi et al.: Optimal Resources Planning of Residential Complex Energy … load profile in power system. The power generations of each energy resource are listed in Table III. NO YES Fig. 2. The simulation procedure of IWO algorithm B. Sensitivity Analysis Sensitivity analysis improves the understanding of impact of key parameters on the behavior of proposed residential CHP systems. In this study, sensitivity analyses have been performed on electricity prices and sell to grid factor parameters. An imperative parameter of the operation cost for residential energy system is electricity price, which also has an important effect on the adoption of residential CHP systems. Figure 4 shows the result of sensitivity analysis. It is clear that electricity price and sell to grid factor strongly affect the economy of residential CHP system operation. According to Figure 4, while the electricity price is low, sell to grid factor has a negligible effect on operation cost of residential CHP system, because of low electricity price, the EMS provides the majority of required electrical energy of system from utility. In fact, purchasing electricity from utility is more economic than operation of FC close to its maximum capacity and system. Therefore after this point, by increasing the electricity price, the operation of residential CHP system becomes more economic and operation of FC near its maximum power gradually becomes more economic. Also Figure 4 demonstrates that by increasing the electricity price, the impact of sell to grid factor on operation cost of residential CHP system will be increased. Therefore, enhancement of electricity price encourages other residential buildings to install proposed CHP system. Fig. 3. Optimized resources power generations TABLE II. SYSTEM PARAMETERS [5, 11,12 ] ,FC UP , Upper limit of ramp rate of fuel cell 0.15 ,FC DP , Lower limit of ramp rate of fuel cell 18 ,FC maxP , Maximum limit of fuel cell generated power 25 ,FC minP , Minimum limit of fuel cell generated power 0.05 maxW , Maximum energy limit of battery 40 GasB , Cost of purchasing natural gas per kW 0.04 GridB , Maximum value of utility purchasing electricity cost per kW 0.13 dchή , Efficiency of battery discharging 0.971 chή , Efficiency of battery charging 0.921 , ,Battery dch maxP , Maximum limit of battery discharging rate 15 , ,Battery ch maxP , Maximum limit of battery charging rate -15 refT , Reference temperature (°C) 25 ref 0.0044 refή , Reference efficiency of PV 0.125 Fig. 4. Operation cost sensitivity related to different Electricity prices and SGFs Initialize Input Data The distributed seeds grow into weed plants Calculated fitness of each individual plant Sort the fitness in descending order and rank the plants Generate new seeds using spatial distribution based on the rank of the plant Determine the new fitness of the seed plant combination Competitive exclusion Convergence criteria is satisfied Stop Start Engineering, Technology & Applied Science Research Vol. 7, No. 5, 2017, 1934-1939 1939 www.etasr.com Αhmadi et al.: Optimal Resources Planning of Residential Complex Energy … TABLE III. SIMULATION RESULTS interval Pbat Pefc Phfc Pgas Ppv Pu 1 -0.342 5.864 3.985 0 0 7.645 2 -16.174 5.8641 3.985 0 0 23.477 3 -16.181 5.8637 3.985 0 0 23.484 4 -10.451 5.8644 3.985 0 0 17.753 5 0 5.8641 3.985 0 0 7.469 6 0 5.8643 3.985 0 0.802 14.999 7 0 5.8642 3.985 0 2.407 18.228 8 0 9.3859 6.666 0 5.778 15.169 9 9.105 23.0037 22.185 47.8147 9.1485 -8.757 10 12.3867 23.0037 22.185 56.148 11.395 -13.45 11 8.4253 23.0039 22.185 52.8143 13.0005 -10.59 12 3.5214 23.0033 22.184 49.4822 13.482 -6.59 13 -1.0473 21.0413 18.877 51.1221 12.84 -0.0006 14 0 21.265 19.220 50.7793 11.23 0 15 0 22.3577 21.016 38.9837 9.309 0 16 0.0002 22.0736 20.528 29.4712 6.259 0 17 0.4367 23.0035 22.185 16.1484 3.21 -0.483 18 0.1085 23.0036 22.185 14.4816 0.8025 -0.581 19 2.5615 19.4696 16.666 0 0 -0.364 20 1.7907 12.7233 9.5076 0 0 -0.014 21 1.4468 12.724 9.5082 0 0 -0.004 22 0 13.6667 10.371 0 0 0 23 0 5.8642 3.9853 0 0 7.635 24 0 5.8641 3.9853 0 0 7.469 VII. CONCLUSION In this paper, a new configuration for a residential building energy system has been proposed, including a FC, PV and a battery connected to the utility. An optimization model has been established based on deterministic prediction of electrical and thermal power demands and utility prices. A day-ahead EMS based on IWO algorithm has been defined for managing different resources to determine an optimal operation schedule for the energy resources at each interval to minimize the operation cost of the system. The impacts of the sell to grid and purchase from grid have been considered and all practical constraints of the each energy resources and utility policies have been taken into account. Sensitivity analyses have been conducted on electricity prices and SGF. It has been shown that proposed system can meet all electrical and thermal demands with economic point of view. Also it has been proved that with the increase in electricity price, the operation cost of proposed system has been increased. But from one particular point on, by increasing the electricity price, the operation of residential CHP system has been more economic and operation of FC near its maximum power gradually has become more economic. Also it has been offered that by increasing the electricity price, the impact of sell to grid to factor on operation cost of residential CHP system will be increased. Therefore, enhancement of electricity price encourages other residential building to install proposed CHP system. REFERENCES [1] H. Ren , W. Gao, Y. Ruan, “Optimal sizing for residential CHP system”, Applied Thermal Engineering, Vol. 28, No. 5-6, pp. 514–523, 2008 [2] Y. Yang, W. Pei, Z. Qi, “Optimal Sizing of Renewable Energy and CHP Hybrid Energy Microgrid System”, IEEE Innovative Smart Grid Tech. ASIA Conf., pp. 1-5, China, May 21-24, 2012 [3] M. H. Moradi, M. Eskandari, M. Hossenian, “Operation strategy optimization in an optimal sized microgrid”, IEEE Transactions on Smart Grid, Vol. 6, No. 3, pp. 1087–1095, 2015 [4] M. J. Sanjari, H. Karami, A. H. Yatim, G. B. Gharehpetian, “Application of Hyper-Spherical Search algorithm for optimal energy resources dispatch in residential microgrids”, Applied Soft Computing, Vol. 35, pp. 15-23, 2015 [5] H. Karami, M. J. Sanjari, S. H. Hosseinian, G. B. Gharehpetian, “An Optimal Dispatch Algorithm for Managing Residential Distributed Energy Resources”, IEEE Transactions on Smart Grid, Vol. 5, No. 5, pp. 2360-2367, 2014 [6] G. Notton, C. Cristofari, M. Mattei, P. Poggi, “Modelling of a double- glass photovoltaic module using finite differences”, Applied Thermal Engineering, Vol. 25, No. 17-18, pp. 2854–2877, 2005 [7] E. Skoplaki, J.A. Palyvos, “On the temperature dependence of photovoltaic module electrical performance: A review of efficiency/power correlations”, Solar Energy, Vol. 83, No. 5, pp. 614- 624, 2009 [8] M. Y. El-Sharkh, M. Tanrioven, A. Rahman, M. S. Alam, “Cost related sensitivity analysis for optimal operation of a grid-parallel PEM fuel cell power plant”, Power Sources, Vol. 161, No. 2, pp. 1198–1207, 2006 [9] A. Gianfreda, L. Grossi, “Zonal price analysis of the Italian wholesale electricity market”, 6th International Conference on the European Energy Market, pp. 1-6, Belgium, May 27-29, 2009 [10] S. Y. Derakhshandeh, A. S. Masoum, S. Deilami, M. A. S. Masoum,, M. E. Hamedani Golshan, “Coordination of Generation Scheduling with PEVs Charging in Industrial Microgrids”, IEEE Transactions on Power Systems, Vol. 28, No. 3, pp. 3451 – 3461, 2013 [11] H. S. Rad, C. Lucas “A recommender system based on invasive weed optimization algorithm”, IEEE Congress on Evolutionary Computation, Singapore, September 25-28, 2007 [12] Akbar Maleki, Alireza Askarzadeh, “Optimal sizing of a PV/wind/diesel system with battery storage for electrification to an off-grid remote region: A case study of Rafsanjan,Iran”, Sustainable Energy Technologies and Assessments, Vol. 7, pp. 147–153, 2014 [13] M. Ahmadi, H. Mojallali, R. Izadi-Zamanabadi, “State estimation of nonlinear stochastic systems using a novel meta-heuristic particle filter”, Swarm & Evolutionary Computation, Vol. 4, pp. 44–53, 2012 [14] S. Karimkashi, A. A. Kishk, “Invasive Weed Optimization and its Features in Electromagnetics”, IEEE Transactions on Antennas and Propagation, Vol. 58, No. 4, pp. 1269–78, 2010 [15] S.G. Tichi, M. M.Ardehali, M.E.Nazari, “Examination of energy price policies in Iran for optimal configuration of CHP and CCHP systems based on particle swarm optimization algorithm”, Energy Policy, Vol. 38, No. 10, pp. 6240–6250, 2010