Development and validation of an intelligent algorithm for synchronizing a low-environmental-impact electricity supply with a building’s electricity consumption

Standard algorithm of building’s energy strategy often use electricity and its tariff as the sole criterion of choice. This paper introduced an algorithmic regulation using global warming potential (GWP) of energy flux, to select which installation will satisfy the building energy demand (BED). In the frame of the Correlation Carbon project conducted by the Smart Living Lab (SLL), a research center dedicated to the building of the future, this paper presents the algorithm behind the design, the selection and the operation of appropriate energy installations for low-carbon buildings. The control strategy governing the building’s energy flow takes into account demand, supply and storage. The latter being mainly linked to economic or energy benefits, which standard algorithms often use as the only criterion of choice, thus increasing the environmental impact of the energy flowing through the building. In contrast to those, the algorithm introduced in this paper controls the energy fluxes of the electrical grid, photovoltaic (PV) panels, static and vehicle batteries according to their GWP. A simulation over one year at an hourly time step – enabling one to take into account small but significant variations of the GWP of the electricity from grid – is presented for different scenarios, in order to draw an annual balance for a given combination of energy systems. The algorithm chooses the “cleanest” instantaneous energy source combination to meet the BED. Simulations show that a building using this algorithm can satisfy its BED while reducing its GWP by as much as 40% compared to an energy supply using the grid only.


Introduction
Most electricity consumers in the electrical grid support a certain type of "clean" energy production. However, they feel less concerned by the provenance or by the waste generated by the energy, they consume every day. Different research have recently been done for assessing hourly GWP of national mixes (e.g. Switzerland [1], France [2], Belgium [3] and Sweden [4]). The electricity available on the grid, thanks also to international energy markets, comes from multiple power plants, whose quantities of pollutants produced are different and which do not always operate continuously and simultaneously. Thus, each country has his own energy mix with its own GWP (CO2-eq per kWh) fluctuating during the day and throughout the year (See figure 1).
For this reason, an environment-friendly control algorithm has been developed on LabVIEW [5] in the Correlation Carbon project with the aim of reducing grid dependency when it has an unfavorable carbon footprint [6]. This regulation is different of mostly building energy management based on cost or consumption optimization [7] - [10]. A hypothetical building is designed to define energy requirements and to test the control strategy. The complete technical equipment of the building is composed of building integrated photovoltaic panels (BiPVs) installed on the east and west facades as well as on the roof, fixed batteries, and the batteries of electric vehicles connected to the building. Furthermore, in order to reduce the users' energy requirements during critical phases and to compensate them during more appropriate periods with higher needs (by load shift), the developed algorithm considers possibilities to influence the users' behavior [11].
The algorithm also includes the possibility to use only parts or none of the available equipment, and to interfere or not on the users' behavior.
As algorithm was conceived for a given context building, the structure of the current paper is: • Definition of building case study and his context, • Review of possible energy supply, • Shape of a decision tree that is the algorithm's main part • Validation process of the algorithm, • Results and conclusions.

Context
A feasibility study of the smart living building, planned to host the research activities of the SLL by 2021 in Fribourg, Switzerland, is considered as a case study for the simulations of the control algorithm. This structure will be a giant laboratory dedicated to studying the building of the future; it will host an experimental hall, offices, common areas, conference rooms, restaurants and even some apartments. Electricity needs of the case study [6] have been defined at the hourly time step for a typical year for Switzerland on the base of national standards [12].

Carbon footprint
The reference parameter to investigate is the Global Warming Potential (GWP), representing the amount of CO2 per kWh of energy produced. The fluctuations of the electrical grid are thus represented by this parameter, same as the energy coming from the photovoltaic panels and the batteries. Each part of the installation have his own GWP index, calculated on the basis of the lifetime's production prediction and the cradle-to-cradle environmental impacts [13].

Electrical grid
In the context of the case study, Switzerland, which is partly bordered by Italy, France, Germany and Austria, is considered. Several electricity purchase and sale transactions are realized: imports from France, Germany and Austria as well as exports to France and Italy. The electrical energy consumed in Switzerland depends therefore mainly on the production means of the importing countries. In addition, each of these nations has its own energy supply and production policy. While Germany has abandoned nuclear power and has returned to older and polluting techniques based on coal, Austria has never used atomic power for production and France continues to give priority to nuclear power. The GWP index of the Swiss electricity grid is therefore very closely related to the transactions with these three countries and to its own energy strategy. For this reason, an hourly GWP of electric grid is needed. Overall, the grid represents an "unclean" energy source for the building, and despite the fluctuations of its GWP, it competes with solar energy from photovoltaic panel with most appropriate orientation only during less than ten hours over the whole year. GWP index of the Swiss grid fluctuates between 0.41 and 0.03 kg CO 2-eq./kWh during a whole year [1].

Building integrated photovoltaic panels (BiPV)
Depending on the PV technology and the resulting characteristics -lifetime, efficiency, etc. -the GWP index for solar production varies. Photovoltaic electricity production is ensured by three clusters of panels installed on the east/west facades and roof of the building, each cluster having its own GWP index due to the total lifetime's production. For example, in the context of the case study, GWP of PV on the roof (0.041 kg CO2-eq./kWh) is less than index for PV on the east side of the building (0.094 kg CO2-eq./kWh), because of roof mounted PV will produce more energy. These values are considered constant throughout the simulated year. The algorithm therefore has the possibility to favor the direct use for the building of the energy from the "cleanest" cluster and, according to the energy strategy, to deliver to the electrical grid the energy from the most polluting cluster. Regardless of the PV technology and the side of the building on which the panels are placed, their index is lower than the yearly average index of the grid, varying between 40-80% of its value.

Batteries
In the frame of the case study, two types of Li-Ion batteries are considered. The first are fixed storage batteries and the second are those of the various electric vehicles associated to the building mobility. The GWP index of the energy delivered from the batteries is calculated from a weighted average according to the index and the amount of energy stored. An initial GWP index is defined for each battery. Through the control period, the GWP index of each battery can therefore vary from the best value of the solar panels to the maximum value of the grid. In addition, the battery index of vehicles varies when these are used, and they are only available when people are at their workplace.
At time i, the GWP calculation of the batteries (b) is described by Eq.1: The letter E represents the amount of energy transiting during a time interval (i-1)→i, which is multiplied by the GWP index of the source to obtain the Greenhouse Gases (GHG) emissions value.

Decision tree
Thanks to the GWP index, the different sources of energy available to supply the building could be compared. On this basis, a decision tree is created, comprising all technical equipment -thus simulating scenario no. 5 -in order to define the best energy management strategy. Other scenarios were also tested by limiting the algorithm to the essential branches of the decision tree. Based on  figure 3, the green parts of output cases represent the sources of electricity and those in red the electric consumers.
The first case of the decision tree (vertical branch on the far left) visible on figure 3 is the ideal one: when the production of BiPVs exceeds the building's needs, the remaining energy is used to charge the batteries and the rest is sent to the grid. In contrast, case number 12, the most critical, is also represented: when there is no energy produced by the BiPVs and the batteries are empty, the only source of energy is the grid. Cases 7, 10 and 13 are used when the supply conditions of the building are not optimal and a load shift is allowed but not necessarily possible. In these cases, the algorithm restarts with a new consumption value, if it has been possible to reduce the building's demand.
The decision tree shown in figure 3 is a simplified version. Indeed, in each case, the algorithm must define what it is the part of energy that is managed. Moreover, solar production is ensured by three faces of the building with different GWP indices and storage possible in two different types of batteries, creating the necessity for a second level of decision tree that set which type of battery or PV from which side is first to be used.

Process validation
In order to validate the accuracy of the algorithm, two types of tests were carried out: the first one to confirm the quality of the decision tree. Artificial values were entered in the decision tree subprogram. Output cases were compared to the expected ones from quality point of view. The second test was performed to demonstrate the consistency of energy values for different parts of the installation by energy conservation balance.

Results
Several scenarios, shown in figure2, were tested in order to assess the impact of each element on the carbon footprint of the building.

Figure 2.
Tested scenarios in the carbon-based energy strategy for building [6] Some scenarios are tested several times by varying the technology of an equipment or the assumptions of operation, for example with several types of PV panels or batteries, various possibilities or quantities of needs distributed differently, etc. The control algorithm is tested over one year using fixed meteorological values.
According to the simulation performed over a whole year, the results show that the algorithm allows improving the GWP of the consumed electricity. Figure 4 shows different combinations of mix supply and their respective GWP. A building using only the grid obtains an average annual GWP supply of 0.206 kg CO2-eq./kWh. A user equipped with solar panels, fixed batteries and electric vehicle can use the algorithm to lower its time average annual GWP supply to 0.122 kg CO2-eq./kWh. This value represents a gain of 40% on the GWP supplied by the grid. Figure 4 shows also that using fixed batteries alone and/or using fixed batteries coupled with vehicle batteries allows obtaining similar curves. Coupling these two types of batteries allows a gain of only 0.3% compared to the use of static battery alone. The recurring actions chosen by the algorithm are numbers 8 and 1 (27% each). There is therefore a frequent transit between solar panels and batteries. Case 3 (battery and PV consumption)

Conclusions
The algorithm presented in this paper allows improving the global warming potential of electricity supply by a smart control of the energy flow necessary to satisfy the building electricity demand.
Simulations were carried out in order to validate the methodology developed. Moreover, the tests of different technologies integrated in algorithm allowed to dimension and select the best option during the design phase of a building. This method can be used to identify the impact of different technical installations on a future or on an existing building. Using an hourly time step for simulations with iterative values, always adapted to the last actions, the results give an indication about the rate of building's autonomy.
In the frame of the case study in Fribourg, simulations demonstrated that the building's autonomy is not directly linked to the batteries capacity whereas this last affect environmental building's impact.
A project is currently underway to apply the regulation to an existing building. This real application will allow further improvements and optimization of the algorithm.