A practical approach for modelling PV off-grid systems in EnergyPlus using post-processing of data to identify black out days

The sizing of hybrid photovoltaic systems and standalone photovoltaic systems can be considered similar, since it is based on the design of a generator, an inverter, a storage system and a distribution system. When the battery discharges totally, in hybrid photovoltaics power is taken from the grid, while in standalone systems a power outage occurs. Black-out periods can be considered as a fail on the installation and therefore, software aiming at sizing a functional system do not take them into account as they should never occur. However, these blackouts have to be quantified in the design stage, as they can be compensated by a different generator. The main idea behind this paper is to use the common place building simulator EnergyPlus to understand if it is possible to model a standalone photovoltaic system starting from the simulation of a hybrid photovoltaic system. Our proposal consists of considering the days characterized by a lack of energy stored in the battery system of hybrid photovoltaics as if they were blackout days of a corresponding standalone system. To the best of the authors’ knowledge, this approach to the off-grid PV systems has never been proposed in a scientific paper. Ten different scenarios are simulated and afterwards validated through PVGIS, a tool implemented by the European Commission. The comparison between the two methods shows good accuracy.


Introduction
Photovoltaic (PV) systems are increasing their diffusion worldwide.Their market spread increased in the last years, because of both the technical advances and more affordable costs (Barbose et al., 2015).According to the type of connection, a PV system can be classified as grid-tied, grid-hybrid and off-grid.To put it briefly, a grid-tied system is the most common one and it uses its connection to the electricity grid to generate energy; this is perfect for most urbanized areas.It is common to have a surplus of produced energy, as it exceeds residential electric demand at certain hours of the day.This excess can be sold to the electrical company, but the export tariffs are declining in several PV markets.That is why the aggregation of a storage system is started to be suggested as an alternative in renewable energy (O'Shaughnessy et al., 2018).The Grid/Hybrid system is also connected to the grid, but with a battery backup.This is a good solution for buildings situated in areas with common power outages and they have also the advantage of reducing the peak demand consumption, being able to use the energy stored in the battery.The off-grid systems, also known as standalone systems, are mainly used in remote areas where there is no easy access to the grid.In these areas, energy poverty is a crucial problem, and it was demonstrated its close relationship with a low Human Development Index (Coelho et al., 2015).Where the connection to the grid is not possible and it would involve a high cost to bring the power supply, the off-grid PV system is an excellent solution (Zahedi, 2006;Bekele & Tadesse, 2012).Sometimes, this solution is more affordable than bringing in the power supply and they allow customers to become energy self-sufficient even in peculiar geographical location.Every type of system has its own way to be calculated and sized.For what concerns the off-grid PV systems, the battery plays a particularly important role since it must be designed to secure the energy supply when the energy generated is not enough.Nevertheless, even if the generator and the battery are sized correctly, power outages or blackouts can occur under specific conditions, i.e. peak demand, nights and cloudy days.Oversizing the PV array in order to avoid power outages would require an unaffordable cost increase.For these reasons, taking into account an acceptable percentage of blackout days when sizing an off-grid PV system is crucial.In this paper, a method to compute the power outages of an off-grid photovoltaic system is discussed.Before going further, one last specification has to be done.As aforementioned, PV systems have great differences among them and several ways of classification are commonly used.In particular, a hybrid energy system is a technology that combines solar photovoltaic and wind turbine.To avoid misunderstandings, the reader is asked to remind that, across this document, the word "hybrid" is referred to the type of PV connection, not to the energy generation system.Common energy simulation studies focus on the design of grid-tied systems and hybrid systems (grid-tied systems with a battery back-up to avoid outages), but there is almost no literature on how to model off-grid systems and how to compute the percentage of blackout days.The sizing of a standalone system in the literature is mainly defined through intuitive methods, numerical methods and analytical methods (Khatib et al, 2013) while, when it comes to model a dynamic simulation, most software does not provide specific tools.There are indeed software that allow modelling a standalone PV system, for instance HOMER (Al-Karaghouli et al., 2010) or TRNSYS (Kanyarusoke et al., 2016;Panayiotou et al., 2011;Al Riza et al., 2011).Nevertheless, such software focus on the design of a renewable energy system, while a complete understanding of all the other energy systems of the building does not come as a given.One of the most widely used software, EnergyPlus, permits to consider all the energy uses of a building, including the renewable energy systems.The rational of this work was that we did not find a module in this software that offers a direct way to size an off-grid PV system connected to a building.Considering the diffusion of this software among practitioners and researchers, one can expect that several users have faced the dilemma of choosing between learning a new software from scratch or resorting to simplified methods.In fact, numerous professionals do not focus exclusively on PV systems in their career, hence learning a new software just for the renewable energy systems could be time-consuming and hardly affordable.Contrarywise, EnergyPlus allows the users to model all the energy systems on the same platform, while meeting regulatory compliance and standards requirements.For these reasons, this paper aims to suggest a solution for EnergyPlus' users who prefer the reliability of the dynamic simulations over a simplified method.EnergyPlus is able to simulate the performance of photovoltaic installations that are connected to the grid.For hybrid connection systems, it allows distinguishing between energy provided by the utility and energy stored in the battery back-up.The hybrid PV system is modelled in EnergyPlus through designing a generator, an inverter, a storage system and a distribution system.In its constitution, a hybrid PV system is more similar to an offgrid system than to a grid-tied one, since the latest does not present any battery bank.Therefore, a practitioner would have no difficulties modelling the parts that compose a standalone PV system in EnergyPlus.The similarity between the two types of systems does not lie just in the mechanical parts.They work in a very similar way too.In both systems, the energy that has not been spent in real-time is stored in a battery backup.Users can use it when needed.Because of the unpredictability of meteorologic variables and peak demands, both installations are normally not designed to cover the energy demand in all conditions.In fact, this would not be a cost-effective solution.Instead, a certain number of days in which the energy demand is not covered are contemplated for both hybrid PV system and off-grid PV systems.The difference between the two types lies in how they can face a lack of energy.The hybrid systems can take advantage of the connection to the grid to assure energy to the users.Standalone systems cannot, so blackouts occur and have to be considered in the system's calculation In the literature, an attempt of simulating a standalone PV system is presented by Brumana et al. (2017).They modelled a hybrid connected PV system for a PassivHaus Energy+ (meaning in this context net-positive) building in TRNSYS, sizing it under severe load conditions.In their specific case, there are no imports from the grid throughout the whole year.Since the imports do not occur during the simulation, they stated that the building could be able to operate, hypothetically, also in off-grid conditions.But their method do not support the modelling of black-outs.The solution we proposed is related to the specific case study that the authors were facing, consequently the conclusions cannot be applied to standalone systems in general.In fact, the building of the study is connected to the grid and power import is possible for emergencies, so it is just 'virtually' off-grid.Besides, the disadvantage of calculating a system under very severe load conditions is the possibility of over-sizing it.In normal sizing conditions, as explained above, it is unlikely to assure the total absence of power outage all year round.Besides, blackouts will occur significantly more in future, as the general trend is to increase the use of electrical equipment in several contexts (charger for electrical vehicles, electric heat pumps, electric cooktop and so forth).Hence, an analysis of the power outages has to be taken into account when sizing a standalone system, through a postprocessing phase.Following this way of thinking, our paper proposes the following steps forward:  simulation that accounts for power outages, often forgotten in the off-grid PV systems' literature;  computation of the percentage of blackout days, using post-processing of data after the simulation;  possibility of modelling off-grid systems on EnergyPlus, to perform at the same time whole building energy simulation.To the best of the authors' knowledge, this is a novelty inasmuch as it was never demonstrated that the percentage of outrages of an off-grid PV system was modelled using EnergyPlus.The validation through software modelling of standalone PV systems is recommended in the literature by (Trinidade and Cordeiro, 2019;Huld et al., 2012).In our paper, results will be compared with an online tool developed by the European Commission to simulate PV systems.This tool is called Photovoltaic geographical information system or PVGIS (PVGIS European Union, 2001Union, -2021) ) and it allows to calculate the performance of PV systems that are not connected to the electricity grid, using installed peak power, battery capacity discharge cut-off limit, consumption per day, slope angle, azimuth.The limitation of this kind of tools is, as explained by Khatib et al. (2013), that they can cause an over/undersizing of the system, with a consequence of an increase in the cost of the energy produced or a decrease in the reliability of the system.Nevertheless, the EU PVGIS tool was demonstrated to be reliable, as its outputs are more similar to real results comparing to other methods (Psomopouos et al., 2015).In order to present a case study for the validation of the results, an isolated house in the Region of Murcia, Spain, is analysed.The building is modelled through SketchUp and Openstudio, while the dynamic energy simulation is obtained through the widely used software EnergyPlus.Results are given considering the blackout days and also the number of days in which the battery charge at the end of the day is lower than 10%, i.e. the probability of a blackout day is high.Ten different scenarios are presented, differing in terms of electricity demand profile, PV peak power and battery storage capacity.Afterwards, a PVGIS simulation is set to present the same electricity schedule and the same installation that has been used in EnergyPlus, to allow a more precise comparison.

Methodology
For the simulation, an isolated two-floors house was modelled with the software SketchUp (Fig. 1).The characteristics of the case study are chosen accordingly to their reproducibility in both EnrgyPlus and the European PVGIS tool, in order to assure a reliable validation.The geometry is maintained as simple as possible, with a base of 10x10 m and a height of 3m for each floor.With the plug-in OpenStudio, boundary conditions were defined, and an object called 'Shading surface' was used to simulate the photovoltaic cells.Materials were defined in all their physical characteristics, to obtain a construction in brick and concrete, the most diffuse in southern Europe.
For the schedule, a .csvfile was used to describe the electrical habits of a typical family building.The load profile is obtained from real data (Linssen et al., 2017).The file used contains the electrical consumption of a day expressed in fractions of the total consumption (24 values).Figure 2 shows the value of each hour of the day.To convert into year demand, the electricity profile was concatenated 365 times (8760 values).This choice is due to a particular limitation of the validation tool.In fact, while EnergyPlus works with 8760 values so it accounts for day-to-day variations, the PVGIS tool only allows to insert just 24 different values in the demand profile's definition corresponding to the daily cycle.Hence we did the same on the Energy Plus code.The weather conditions of the site were assigned through an .epwfile of the city of Murcia, one of the sunniest Spanish cities.The region has several rural areas, in which energy self-sufficient housing is already a reality.In order to increase the accuracy, the geographical coordinates of a real weather station have been used.Latitude is fixed to 37.79, longitude to -0.8, elevation to 62 m.
In the following subsections, it will be frequent the reference to the comparison to the PVGIS tool.In fact, the study is focused in particular on the parameters required by PVGIS, in order to obtain a more reliable comparison between the two simulations.In particular, an important limitation of the European tool that is worth mentioning is the assumption of no variations in the demand profile throughout the year.This justify even further the necessity for creating a way of modelling this instalations in EnergyPlus.Energy Plus does allow to account for this variabilities.Not only that, they can be taken directly from the whole building model.
PV model For the photovoltaic system, a hybrid connected system has been modelled.Part of the data is chosen according to EnergyPlus documentation and they will be remaining the same in all the cases considered, while other values will change to simulate different scenarios.There are several ways to simulate a photovoltaic system in EnergyPlus.During a first step, according to an official EnergyPlus Example File, a PVWatts Generator was used (part of the library of EnergyPlus).In this case, the fundamental parameters are the module type and the array type, while the connection to the surface was not a mandatory field.For this reason, another approach was tested: the generator called Simple Photovoltaic Generator (also part of the library of EnergyPlus) allows to use the geometric model for solar radiation for all the parameters (shading, sky models and so on).In this case, selecting the surface of the photovoltaic in the geometric model was mandatory, as well as the fraction of the surface with active solar cells.Regardless, both models are valid, but they need a different shading type, as explained in the next subsection.

________________________________________________________________________________________________
Shading A specification about the surface is necessary here.As stated in the previous paragraph, it is important to specify the surface of the geometric model that is representing the photovoltaic panels.There are two main ways to define the Shading Surface in EnergyPlus.When exporting an .idffile from Openstudio, the Shading Surface created will be modelled as Shading:Building:Detailed. If one looks at the fields of this object, it is possible to assign just the geometrical coordinates of each one of the vertex of the surface and eventually the transmittance schedule.After several attempts, there is no way to apply a tilt angle or an azimuth angle to this surface in the Simple Photovoltaic Generator.Instead, the PVWatts Generator, allows the user to select the tilt angle and the azimuth angle.When using the Simple Photovoltaic Generator, the best option should be to give to the surface a geometrical inclination in SketchUp, when defining the design of the building.There is also another option to define the shading surface in EnergyPlus, called Shading:Building.Creating an object in Shading:Building, the user can assign the coordinates of the starting point, the length and the height of the surface, the azimuth angle and the tilt angle.Nevertheless, it has been noticed that the results are not very reliable using this object, so the first method is suggested.

Cell Efficiency
While in the PVWatts Generator it is possible to assign directly the peak power of the PV system, in the Simple Photovoltaic Generator one can only define the power by the cell efficiency.This is actually an interesting detail because it allows exploring different scenarios without modifying the geometric model.Knowing that the peak power is directly proportional to both surface and efficiency, one can maintain the surface fixed and change just the efficiency, for simulation purposes.This could be particularly useful when the user has to choose among systems with different peak power, saving a good amount of time in the simulation.It is also interesting to notice that, again for simulation purposes, EnergyPlus does not make any distinction for the shape of the surface, taking into count just the total surface.In this work, a shading surface of 10 m 2 is fixed, and differences in peak power will be obtained by variation in the efficiency.

Electric Load Center
The electric load center of EnergyPlus allows connecting the several parts of the PV system: generator, inverter, battery and distribution system.As explained at the beginning of this section, some values are assumed as equal to the EnergyPlus Example File.This is justified by two main reasons.First of all, it is not the aim of the work: the objective of the investigation was not the evaluation of the models of cells or inverter but establishing a way of modelling off-grid systems, so default options for such components were considered suitable for this work.Secondly and most important, PVGIS does not give any information about some of the parameters, so it is useless to focus on such values.In particular, standard parameters have been chosen for the inverter (Figure 3) and for the battery's curves for charging and discharging (Figure 4).The storage system is modelled as a battery bank with 10 modules in parallel and 10 modules in series.The circuit voltage is fixed to 12.5 V, the resistance to 0,054 ohms and the maximum module discharging current to 100 A.
In order to make possible the comparison with the PVGIS, an important parameter is the cut-off limit of the battery.
It has been noticed that, applying variations to the field Module Cut-off Voltage, no changes in the final results are obtained.Then, following the suggestion of the EnergyPlus Example Files, the limit was expressed through the field Fully Discharged Module Open Circuit Voltage.
The main parameter that is needed for the comparison with the PVGIS tool is the battery size expressed in Wh.In EnergyPlus it is not possible to define this value directly, so the different scenarios will be obtained by variations in the Maximum Module Capacity, expressed in Ah.For instance, if one has to refer to a battery capacity of 10000 Wh, considering the number of modules considered (100 in total, 10 in parallel and 10 in series) and the voltage of 12,5, the input value in EnergyPlus would be 8 Ah per module.

PVGIS tool
The online tool created by the European Commission is divided into three parts: grid-connected, hybrid and offgrid.The tool to calculate the performance of the off-grid systems is the one that requires the least parameters.First of all, geographical coordinates are required.The exact latitude and longitude of the weather station could not be used, as the tool uses the correspondent altitude of the ground floor, while the weather station's elevation is 62 m.The most similar point that has been detected has a latitude of 37.799, a longitude of -0.892 and an altitude of 65 m.The database used is the PVGIS-SARAH, that is the one that better fits the European measurements and it is provided by the EUMETSAT Climate Monitoring Satellite Application Facility (CM SAF).The three values that will be changed to obtain the several scenarios are the peak power of the PV installed, expressed in Wp, the battery capacity, expressed in Wh and the total consumption per day, expressed in Wh.The other values will remain fixed in the different cases.For the electricity profile, the tool gives the opportunity to upload a personal csv file that describes the consumption's evolution throughout one day.The file required can have 24 values that define the fraction of consumption for each hour, and the total throughout the day has to be 1.So the same electricity profile's file used for EnergyPlus has been uploaded also on the PVGIS platform, in the 24-values version.The cut-off limit is set to the minimum value (0.1%), in order to be compared to the EnergyPlus model.The slope angle is selected, after some attempts, in order to have higher performance.In particular, the slope angle is fixed to 35° and the azimuth angle to 0°.These same values are used in the EnergyPlus file.

Results
Ten different scenarios, that differ in terms of peak power, battery capacity and electricity consumption per day, were simulated both in EnergyPlus and in the PVGIS tool, as described in the Methodology section.The output that could better describe the performance according to the aim of this work is the percentage of day with empty battery and the percentage of days with a charge smaller than 10%.To a better understanding, an example will be presented.The first case scenario considered presents a peak power of 5 kWp, a battery capacity of 10 kWh and an electric consumption per day of 12 kWh (Table 2).The general outputs given by the PVGIS tool are shown in Figure 5, while the outputs referring to the percentage of days with a given charge is shown in Figure 6.From Figure 5, the parameter Percentage of days with empty battery will be taken into account, while in Figure 6, the percentage of days with a charge smaller than 10% is represented by the last bar of the graph.The output used in EnergyPlus is a variable called Electric Storage Charge Fraction, that expresses the percentage of charge left.Since the work focuses on the number of blackout days, at the beginning the timestep selected in EnergyPlus was a daily sequence.Nevertheless, trying to use a daily reporting frequency, it has been noted that the error increased substantially: if one considers the average value for the whole day, a short blackout is hard to detect (Figure 7).As a consequence, a reshaping was considered and the battery charge at the end of the day was examined.In an hourly reporting frequency, the 24 th hour of the day was used as the main parameter.Figure 8 shows how the accuracy increased through this election.During the days with charge left in the battery, the hybrid system and the off-grid system work in the same way.
During the days with no charge left in the battery, the hybrid system would take energy from the grid, while in a standalone system the building would remain without electric energy until the charge is restored: a blackout would occur.For simulation purposes, the days without charge will be considered as blackout days, and the days with a charge smaller than 10% will be considered as days with a high probability of a blackout.
In order to compare the results, in the post-processing phase a Python script was used to obtain the number of days with no battery and with charge smaller than 10%.The same method was followed for each one of the cases.
Results are resumed in Table 1 (no charge) and Table 2 (charge smaller than 10%).
Table 1: Blackout days of every case considered, calculated both with EnergyPlus and the PVGIS tool.and from 0 to 7.18% for the day that ends with a charge smaller than 10%.Figure 9 compares the results obtained with the two methods.

Conclusion
In this paper, a standalone system has been modelled in EnergyPlus through a hybrid photovoltaic system, focusing in particular on the calculation of the power outages, often forgotten in the literature.In order to check the reliability of this method, results have been compared to those obtained by a tool created by the European Commission: EU PVGIS.The tool allows to calculate the performance of an off-grid system, as well as the performance of other photovoltaic systems, and its accuracy has been tested by former studies.
Outputs are divided into two categories: the percentage of days with no charge left in the battery and the percentage of days with a charge left in the battery smaller than 10%.
In this way, it is possible to compute the percentage of days with a consistent probability of a power blackout.
The result of the validation can be considered satisfactory for most of the proposed cases.In some cases, the difference in percentage can be considered negligible, particularly within the range 0-20% of days.
It is noteworthy to consider that in the 90% of the cases considered, the difference between the two methods is smaller than 10%.There are cases in which the percentage difference is slightly higher.Still, it can be considered smaller than the variability of the weather from year to year.Furthermore, the scarcity of input that one can insert in the PVGIS website makes it hard to understand what these differences are due to.
One should exclude the hypothesis of differences in the geometry considered, since during the experimentation some variations in the shape of the building have been tested.In particular, changing the total area and/or the number of stores, the result in terms of power outages did not change.
It appears legitimate to use EnergyPlus also to simulate standalone photovoltaic systems, since the results obtained in this work do not suggest that the output are reliable, in particular for the range up to 20% of days.The range 0-20% of blackout days is more than enough to assure a correct sizing of the standalone system, considering that higher values would be hardly accepted by the users.This validation permits to use the proposed method also for more complex cases, i.e. more energy systems, different geometry and, in particular, with demand profiles that accounts for seasonal variations.More detailed analysis needs to be done, to investigate the applicability of this method in other contexts.Further studies could focus on the comparison with other software, like TRNSYS or Homer.In particular, it would be interesting to calculate the ultimate accuracy, for the standalone systems' simulation, of the different software and of the PVGIS tool itself.

Figure 1 :
Figure 1: SketchUp model of the building.

Figure 2 :
Figure 2: Fraction of the daily consumption for each hour of the day.

Figure 3 :
Figure 3: The object Inverter, according to EnergyPlus Example Files.

Figure 4 :
Figure 4: The curves of charging and discharging of the battery, according to the EnergyPlus Example Files. doi.org/10.26868/2522708.2021.30133

Figure 5 :
Figure 5: Example of general outputs of the PVGIS tool provided by the European Commission.

Figure 6 :
Figure 6: Example of the percentage of days for every percentile of charge obtained with the PVGIS tool provided by the European Commission.

Figure 7 :
Figure 7: Electric storage charge fraction with a daily frequency calculated with EnergyPlus.

Figure 8 :
Figure 8: Electric storage charge fraction with an hourly frequency calculated with EnergyPlus.

Figure 9 :
Figure 9: Representation of the validation points when comparing the outputs of EnergyPlus and the PVGIS tool.

Table 1 :
Parameters used for the first case scenario.