Environment Friendly Energy Cooperation in Neighboring Buildings: A Transformed Linearization Approach

: Energy consumption in residential, commercial and industrial buildings is one of the major contributors to global warming. Due to the increase in the latter, and growing global energy crisis, more attention is being paid to renewable energy resources (RES). The use of innovative concepts in existing buildings is gaining popularity to provide reduction in energy requirements for electricity, heating and cooling. In this paper, an electricity, heating and cooling cooperation mechanism among neighboring buildings with RES is proposed. It relies on adjusting the RES tariff with a mutual agreement between the neighboring buildings, with an aim to minimize the operational costs. For this purpose, a mathematical model is developed for joint energy cooperation, where surplus energy in one of the buildings is shared with others, thereby reducing dependency on the grid. The optimization structure of the environment friendly energy cooperation is nonlinear, which is linearized using the McCormick envelopes. A scenario for the city of Islamabad, Pakistan, is considered by utilizing its environmental data obtained from public domain websites. The simulation results show more than twenty percent energy cost savings with the proposed cooperation model.


Introduction
Over the last few decades, energy requirements are incessantly growing due to the increase in population and industries [1].An energy outlook report [2] indicates the fastest global energy consumption growth rate of 2.3% recorded in 2018, and the same report predicted an increase in the near future.In that report, the energy consumption figures of buildings in Asia indicate that energy demands have increased by 95% during 1990 to 2020.The energy demand of the world is forecast to increase by 27% by the year 2040 [3].Efforts to improve the lifestyle and comfort have led to the rapid urbanization and construction of multi-story buildings.According to [4], around 31% to 42% of the world's gross energy is consumed by buildings and accordingly emits up to 35% of greenhouse gases (GHG).The industrial innovation has certainly improved the lifestyle and comfort of mankind, while at the same time resulted in increased dependence on fossil fuels, and an increase in pollution and global warming [5].The fossil fuels (natural gas, crude oil, and coal) are the main source of electricity generation (up to 80%) for global consumers [6].The consumption of fossil fuels has increased recently by 38%, 28% and 27%, respectively [7].To mitigate the utilization of fossil fuels and build an environment friendly generation, the need for the development of efficient energy utilization techniques has become a necessity.
Pakistan enjoys various seasons throughout the year, where the temperature in most of the cities drops to as low as 0 • C in winters, and may touch 50 • C in the summers.In Pakistan, buildings consume about 55% of the total energy generated, the major part of which is consumed by heating and cooling requirements [8].Because of these extreme weather conditions, Pakistan is one country that needs an efficient energy management solution.A number of such techniques are available in the literature that have been exploited world-wide for the same purpose.In what follows, we summarize a fewmost relevant-of those techniques.In legacy approaches [9,10], most of the emphasis is on building design and architecture.These solutions focus on building architecture, insulation materials used, window types, etc.Although these solutions have shown some improvement in energy conservation, there is still a need for alternative approaches that could make buildings more energy efficient in a broader way.Today, there is an increase in adoption of new trends and practices to efficiently manage energy generation and its utilization in the buildings by using renewable energy sources (RES).Many researchers have presented optimal solutions to minimize energy costs in buildings [11][12][13][14][15][16][17].One such mechanism-for selection of energy generation sources to ensure continuation of energy supply-is presented in [11], with the aim of minimizing energy cost.In [12], a scenario is presented, in which a building with photo-voltaic (PV) and battery system trades surplus energy with other buildings, and as a result, reduces dependence on the grid.The problem is formulated as a mix integer linear programming (MILP).Most of the power consumed in a building is used for heating and cooling purposes.Among most of the efforts to increase the environmental and economic performance of a building, combined heating and power (CHP) and combined cooling, heating and power (CCHP) systems are broadly recognized to be the defacto technologies.CCHP is said to offer several advantages including fulfilling cooling, heating and electricity needs.In addition to its trigeneration process, the CCHP can be integrated with RES to provide environment friendly energy interaction with the main grid to contribute in case of high demand and use of the RES.An MILP-based CCHP model is developed for energy management of different buildings [13].PV-assisted CCHP systems are analyzed in [14,15].Both of these works optimize the system efficiency in terms of economic benefits, emission diminution and energy usage [16].Energy trading among the buildings has yielded encouraging results.The CHP based electricity and heating cooperation among various buildings is presented in [18].Another similar CCHP-based framework is presented in [17], and MILP is employed to minimize energy costs.
In energy cooperation techniques, buildings share their surplus energy with one another.The electricity, heating and cooling energy trading presented in the above literature mostly considers buildings with similar types of RES, and each of them has a CCHP system installed.These technologies, especially the CHP/CCHP, are mostly popular in advanced countries; in the developing countries, however, they are rarely used, despite the need to reduce dependence on the fossil fuel and move towards an environment-friendly energy generation.To the best of our knowledge, no work in the context of performing electricity, heating and cooling cooperation for Pakistan's environment has been carried out by far.The only exception is [19], where operation of a CHP system is optimized, and the energy cooperation among multiple buildings is not considered.
The proposed work presents an electricity, heating and cooling trading scheme for neighboring buildings having RES in Pakistan.The presented scheme is flexible and can be integrated with the legacy systems.The main contributions of this work are: 1.
A mathematical model for energy cooperation among neighboring buildings equipped with various configurations of RES is developed.The intention is to fulfill the domestic electricity, heating and cooling needs.The framework is flexible, and can be customized with the users' needs with aim of minimizing operational costs.

2.
Considering solar irradiance and wind speed data of Islamabad, PV arrays and wind turbines (WT) are modeled.The simulation results, based on realistic harvesting models, represents electricity, heating and cooling cooperation among buildings.

3.
For energy cooperation, a constrained nonlinear mathematical model is presented.
McCormick envelopes are employed to linearize the problem, which is then solved using the interior point method.
The paper is organized as follows.Section 2 describes the system model optimization problem and presents its solution.Section 3 presents the simulation results of the proposed cooperation technique, before the paper is concluded in Section 4, respectively.

Methods
There are N neighboring buildings considered in the system model.We assume that neighboring buildings are in close vicinity so that it is possible to have physical connections between them for energy transfer.Each building is connected to the national power grid through a net metering and also has a connection for the natural gas (NG).The buildings have mutual tariff agreements to share energy among themselves.Each building could have various configurations of PV and WT depending upon the available area and budget.The electricity, heating and cooling consumption varies throughout the day.Similarly, power generation from PV panels and WT also varies throughout the day according to the solar radiations and wind's intensity, respectively.Consequently, these variations in generation and load gives distinctive profiles for each building.Three types of buildings are considered: residential, official and industrial.The presented model provides maximum utilization of RES, and through energy cooperation, it reduces dependence on the grid leading to energy cost savings.The main system is presented in Figure 1.The electricity harvested through PV and WT is considered as the preferred source of electricity.In case the demand is more then the harvested electricity, the latter can be purchased from other buildings.In case the other buildings don't have surplus electricity, it is purchased through the grid.The heating demands are met through the NG source or from any excess heat generated through a process in an industry.In case of surplus heat generated by a building, it can be shared with other buildings through similar tariff agreements.The cooling requirements are met through the chillers or absorption chillers (in the case of industry).Each building can share its surplus electricity, and can also buy and sell it to the grid using smart metering.However, surplus heating and cooling may only be shared among the buildings.The electric energy demand for electrical appliances is met directly from electricity sources, i.e., installed RES, using electricity cooperation and utility.To compensate for the heating load of buildings, NG generators and excessive heat from industry buildings are exploited by using the cooperation model.The absorption chillers are used for the cooling purpose.The latter uses the excessive heat from industry, taking steam as input, and subsequently converts it into cool air.

Modeling of Wind Energy
Wind energy is one of the most popular sources of energy due to its continuous availability, and clean generation process.However, due to the uncertainty in wind speed, the output power of wind energy is cannot be estimated.The energy output of WT can be found using (a) manufacturers assessments (b) power curve technique (c) and swept area technique.WT is characterized by features given on its (i) rated power, which is obtained by rated speed of turbine and wind (ii) peak power (iii) power curve representing output vs wind speed.We have used the power swept area technique in our work.The generated electricity from WT is determined as [20]: where, A WT is the area swept by WT blades, v is the wind speed, C p is the efficiency coefficient of WT and ρ is air density.The Weibull Probability Distribution (WPD) is used to produce the wind speed profile for a known wind average speed and shape parameter k.
The average monthly wind speed for Islamabad is shown in

Modeling of Solar Energy
The electrical energy generated by a PV panel is dependent upon the following parameters: (i) solar yield η m (ii) performance ratio (PR) (iii) PV panel area (A) and (iv) solar insolation (I).The amount of energy generated (kWh) by a PV panel is calculated as [22]: where, η m can be found by dividing PV generated power (in kW) by the panel's area m 2 .Islamabad's month-wise average insolation is presented in Figure 3 [23] for the area of Zero Point in Islamabad City with panel angle of 45 degree, this data was accessed on 4 November 2021 at around 1500 h.It can be observed from the graph that its highest value is in the month of June, while the lowest is in December.Considering a standard size PV having 1.63 m 2 area, PR value of 0.75 and 0.26 kW output power, the PV array size for a building that can give 14.4 kWh daily electrical energy yield for the month of November needs to have area of 20 m 2 .This means that it requires a total of 9 panels.Whereas, for the month of June, due to the increase in I, the electrical energy yield increases up to 17.1 kWh per day.In the simulation part, according to the area and load demand of building, the quantity of PV arrays will be selected.

Problem Statement and Linear Transformation
The main objective of the proposed model is to minimize the energy cost.The buying and selling among the buildings is through tariff agreements.However, one condition must be maintained during the tariff assignment that the tariff of RES, which is to be shared among the buildings, must be less than the tariff of utility, i.e., Cost RES < Cost utility .This condition gives incentive for a building to purchase energy from another building instead of the utility.The generation and load profiles can be generated for any specified time period, i.e., a year, a month, a week or a day.Here, a one-day time slot (24 h) is selected for simplicity.The proposed energy cooperation model for cost minimization optimization problem is given as below: Given: • The total number of neighboring buildings; The total cost savings as a result of electricity, heating and cooling cooperation.
The objective, J (E ) for each building is to minimize the electricity, heating and cooling procurement cost and maximize the electricity, heating and cooling sold cost, stated as below: where E t,rg n is the electricity generated through RES.H t,x n is the heat generated through the fossil fuels.Q t,y n is the cooling generated through some cooling process.E t u,n is the electricity purchased from the utility and E t n,u is the electricity sold back to the utility.E t m,n , Q t m,n and H t m,n are the electricity, heating and cooling energy transfer, respectively, from the building m to building n, building m is the seller while building n is the buyer.C(•) represents cost of the specific energy term.Equation (4) formulates our optimization problem as follows: subject to: where EL t n , HL t n and QL t n are the electricity load, heating load and cooling load, respectively, for the nth building.H t L,n and Q t L,n are the heat and cool loss at any time t.The constraints from C1 to C6 are related to electricity transfer, constraints, C7 to C12 are related to heat transfer and constraints, and C13 to C18 are cooling transfer.For the electrical constraints part, C1, C3 and C4 are the box constraints.C2 gives the electricity balance equation for electricity in and electricity out from the nth building at any time t.C5 states that a building cannot sell electricity back to itself.C6 binds a building to either sell or buy electricity at the same time.It is the positive bi-linear function that makes our problem nonconvex bi-linear.The McCormick envelopes are often used for the convex relaxation of bi-linear functions [24].Therefore, for our problem, using McCormick envelopes, it is reformulated as a linear optimization problem given as f (E t mn , E t nm ) = E t m,n E t n,m .Therefore, the McCormick envelopes for C6 are given by (6): where C E is the convex envelope coefficient.E min m,n and E max m,n are minimum and maximum limits of electricity transfer from building m to building n.Similarly, E min n,m and E max n,m are minimum and maximum limits of electricity transfer from building m to building n.Like electrical constraints (C1-C7), heating and cooling constraints are stated from C7 to C12 and C13 to C18, respectively.Moreover, as we are not selling back heating and cooling to the utility, in constraints C8 and C14, there is no selling to utility term.C12 and C18 are positive bi-linear functions, same like C6, and are reformulated as a linear optimization problem.The McCormick Envelopes for C12 are given by (7): where H E is the convex envelope coefficient.H min m,n and H max m,n are minimum and maximum limits of heat transfer from building m to building n.Similarly, H min n,m and H max n,m are minimum and maximum limits of heat transfer from building m to building n.The McCormick envelopes for C18 are given by (8): where Q E is the convex envelope coefficient.Q min m,n and Q max m,n are minimum and maximum limits of cooling transfer from building m to building n.Similarly, Q min n,m and Q max n,m are minimum and maximum limits of cooling transfer from building m to building n.Now using the interior point method [25], the linear optimization problem may be solved.

Results and Discussion
The results of the presented model are validated by considering a scenario comprising three different buildings: residential, official and glass manufacturing industrial building.These three buildings are assumed to lie in same vicinity in Islamabad, Pakistan.The industry is equipped with PV arrays, WT and also generates residual heat through its industrial process, which could fulfill its heating requirements, and can be shared with other buildings.The office building is equipped with PV arrays and WT, while the residential building has PV as RES.All the buildings are connected to the power grid and also have direct connections of the NG.The heating and cooling amounts are also converted into equivalent watt units for comparison.The home and office buildings have chillers for cooling, while the industrial building has an absorption chiller.The results for the months of November and June are presented here in detail, and their environmental data is considered for electricity generation through RES.The load demands are based on the average load demands of electricity, heating and cooling in the Zero Point region of Islamabad.The home building is of a single floor, having 2 rooms, a washroom and a kitchen.The heating requirements are mainly for cooking and space heating.The home building has four PV panels of generating a max energy of about 1000 watts at peak time.The heater/burner functioning on NG is of 500 watts and air-conditioner of about 12,000 British thermal unit (BTU) for cooling.The office building has two floors and have office space for about 12-15 employees accommodated in 5 rooms.Each floor has an air-conditioner of about 24,000 BTU.The office building is equipped with eight PV panels generating about 1800 watts at peak time, and has WT generating 500 watts at peak time.The heater burner is of 500 watts.The industrial building has ten PV panels generating about 2500 watts at peak time and WT generating 500 watts at peak time.The industrial building is of a single floor and is of hanger type.The industrial process is generating about 7000 watts equivalent heat from its process.The surplus energy generated through RES has a tariff of 2.5 cents/kWh.The surplus heating and cooling at any building has a tariff of 2.1 cents/kWh.The electricity is purchased from the utility at price of 4 cents/kWh.NG has equivalent tariff of 6 cent/kWh.
First, the results are presented for the month of November, which is in the winter season.The electricity load demands and generation through RES for home, office and industrial buildings are shown in Figure 4.It can be observed that for the home, the minimum electricity load is at day time when most of the occupant are at their work place.The maximum load is at night time when all the occupants are at home.The home has only PV as the source of harvested, so in night time, the electricity demands can't be met through RES alone.In office building, the maximum demand of electricity is at the day time, during the office hours.The electricity generated through RES is surplus in the night time.The industrial building has large electricity requirements as compared to the home and office, its electricity demands are almost constant throughout the day.The heating load demands and generation for home, office and industrial buildings are shown in Figure 5.It can be observed that for the home building, the heating requirements are more in the night and early morning when all the occupants are at home.NG based space heaters are utilized for the heating purpose in all three buildings.The industrial building produces excess heat through process, which could be used for the space heating and fulfill the heating demands of home and office through cooperation.The industrial building is also equipped with an absorption chiller, which can be utilized in summer season to convert the excess heat into cooling.
For a full day of November, the mathematical model of our proposed cooperation scheme is simulated in MATLAB.The results for electricity cooperation are given in Figure 6.The figure shows how our proposed model through energy cooperation has been able to reduce dependence on the grid.The surplus energy generated by a building is shared among the buildings.Our proposed model finds the magnitude and the direction of energy flow among the buildings.When a building is unable to meet its electricity demands from its RES, it purchases electricity from other buildings, if there is any.In case other buildings also don't posses sufficient energy, it will be purchased from the utility.The heating cooperation among the three buildings is shown in Figure 7.It can be seen from the figure that industrial building generates excess heat through its process, which is purchased by the home and office buildings to fulfill their heating demands.It can be seen that each building is either purchasing or selling according to its needs.This cooperation model minimizes the usage of utility and gives us the net cost saving.The month of June is considered as the second month for validating our energy cooperation model.June is the hottest month in Islamabad, Pakistan, in which the cooling demand is generally the highest in the year, whereas the demand for heating is minimal.The electricity load demands and generation through RES for home, office and industrial buildings for the month of June are shown in Figure 8.Similarly, Figures 9 and 10 present the heating and cooling load demands and generation for home, office and industrial buildings for June, respectively.
The results for electricity, heating and cooling cooperation for June are given in Figures 11-13, respectively.These figures shows how our proposed model has been able to reduce energy cost through energy cooperation.It can be seen from the Figure 12 that industrial building generates excess heat through its process, which is converted into cooling through the absorption chiller and shared with oher buildings when in surplus.

Comparison between of Cooperation and Non Cooperation Model
To see the impact of electricity, heating and cooling cooperation among the three buildings, we generate loads and generation profiles according to the environmental data of Islamabad for each month.To compare the results of our proposed model and estimate the cost saving, a same scenario of three buildings is considered but without any energy cooperation.The cost function of the system without any cooperation is stated as follows: It can be observed from the system in (9), that there is no energy cooperation among the buildings in this case.Each building is only dependent upon self generation or through the grid.The non-cooperative mathematical formulation can be written as: In non-cooperation case, when the harvested energy is not enough, the utility is the only option to meet the energy demands.The total cost of electricity, heating and cooling for one month with the presented energy cooperation model is USD 219.4.The total cost without cooperation, in contrast, is USD 299.4.This is about 27% cost savings.It can be observed that there is a significant cost savings in our proposed model of energy cooperative model in comparison to the model without energy cooperation.

Conclusions and Future Work
Efficiently managing the energy requirements in a building can result in cost saving consumed by a building.Like other countries, in Pakistan, the heating and cooling demands of buildings are the major components of its energy costs.Through electricity, heating and cooling cooperation among the buildings, the dependence on the grid could be decreased, resulting in a less use of fossil fuels.During the off-peaks hours, when a building has surplus electricity, heating or cooling, it can share it with buildings that needs it.Unfortunately, however, no such cooperation model exists in the literature for the case of Pakistan.In this work, an energy cooperation model is presented in which electricity, heating and cooling are shared among neighboring buildings.Our proposed model through energy cooperation helps in reducing dependence upon the grid and energy costs.The environmental data of Islamabad-the capital of Pakistan-is used to validate the proposed scheme.The presented mathematical model is solved by the interior point method.The simulation results show significant cost savings of about 27%.In future, to compensate for the unstable nature of RES, battery thermal storage for storing electricity and cooling, respectively, will be incorporated.

Figure 1 .
Figure 1.A zone of neighboring buildings driven by RES and utility, sharing their electricity, heating and cooling with other buildings.

Figure 2 [
21] for the area of Zero Point in Islamabad city, this data was accessed on 1 December 2021 at 1300 h.WPD of wind having k of 1.8 and annual average speed of 2.5 m/s for Islamabad, Pakistan, is considered.When we apply Equation (1) to WT(BWC-Excel-R/48) having a height of 7 m, the daily average output comes out about 20 kWh.

Figure 2 .
Figure 2. Monthly average wind speed data for Islamabad.

Figure 4 .Figure 5 .
Figure 4. Electricity demand and harvested electricity of 24 h for the month of November, (a) for the home building, (b) for office building, and (c) for industry building.

Figure 6 .
Figure 6.Electricity cooperation among the buildings for 24 h in the month of November, (a) for the home building, (b) for office building, and (c) for industry building.

Figure 7 .
Figure 7. Heating cooperation among the buildings for 24 h in the month of November, (a) for the home building, (b) for office building, and (c) for industry building.

Figure 8 .
Figure 8. Electricity demand and harvested electricity of 24 h for the month of June, (a) for the home building, (b) for office building, and (c) for industry building.

Figure 9 .
Figure 9. Heating demand and generation of 24 h for the month of June, (a) for the home building, (b) for office building, and (c) for industry building.

Figure 10 .Figure 11 .
Figure 10.Cooling demand and generation of 24 h for the month of June, (a) for the home building, (b) for office building, and (c) for industry building.

Figure 12 .
Figure 12.Heating cooperation among the buildings for 24 h in the month of June, (a) for the home building, (b) for office building, and (c) for industry building.

Figure 13 .
Figure13.Cooling cooperation among the buildings for 24 h in the month of June, (a) for the home building, (b) for office building, and (c) for industry building.