1. Introduction
Buildings are responsible for 20% and 40% of the total energy consumption across the globe and the EU, respectively. The share of energy-inefficient buildings is 36% in the EU, mainly due to their age (over 50 years) [
1,
2,
3,
4]. In the context of the 2020 European Energy Strategy, the 2010/31/EU Directive—along with its amendment (2018/844/EU)—requires all EU member states to intensively concentrate on the building energy sector, due to its high energy consumption and the necessity of meeting by 2020 and 2050 the energy targets defined in EU Decision No 406/2009/EC [
5,
6,
7]. Moreover, according to the EU Proposal 2016/0381 (COD) [
8], which led to the new 2018/844/EU Directive, almost 75% of existing buildings are energy-inefficient, and only approximately 1% of these buildings undergo a renovation to upgrade their energy efficiency.
Based on the above concerns and in order to achieve the energy targets, the 2010/31/EU Directive introduced nearly-zero-energy buildings (nZEBs), buildings with high energy efficiency, nearly zero primary energy consumption and, simultaneously, capable of utilizing building-integrated renewable energy sources (RES) in an optimized manner. The directive required EU member states to transform governmental buildings into nZEBs in 2018, and to develop new policies and guidelines for applying the nZEB requirement in all new buildings from 2020 onwards [
6]. Consequently, both academics and professionals continue to seek methods to make these buildings adoptable, practical, and, undoubtedly, economically feasible. The nZEB concept, which is clearly defined by the EU Directive, arose from the general concept of a zero-energy building (ZEB). While not officially defined, such buildings are connected to energy grids, have integrated renewable energy sources, use weighting systems to balance their demand with local renewable generation along with their carbon footprint, and aim to zero the exchange between the import and export energies during a reference period, which is widely accepted to be a full year [
9,
10]. Thus, the nZEB concept requires a building to have a low energy consumption and to maximize its energy autonomy as much as possible.
A plethora of publications have proposed different approaches and methods concerning the adoption, optimal design, and energy consumption control of new nZEBs, the optimal renovation or retrofit of existing buildings, and the optimal sizing of different RES technologies, so that nearly zero energy levels are met (e.g., References [
7,
11,
12,
13,
14,
15]). To this end, the optimal energy management of buildings through linear programming (LP)—a convex optimization method—was the main focus of this paper, motivated by the various existing studies related to LP for buildings’ electrical energy management, including storage and RES, with indicative examples presented below.
Nottrot et al. [
16] developed an LP optimization algorithm for optimizing the battery charging or discharging (dispatch) of a photovoltaic (PV) grid-connected building, mainly for minimizing the net-peak load. Forecasted data for both the load demand and the PV production were taken as inputs to the model. Hanna et al. [
17] addressed the forecasting error uncertainty of the model presented in [
16] by calculating the net error of the PV generation and load demand and rerunning the LP routine for the remaining optimization horizon under certain criteria. The authors showed that the improved model was more practical and could be adopted in real-life problems, as any uncertainties raised from forecasting errors could be addressed. Chen et al. [
18] developed a stochastic LP tool for optimally operating a building’s electrical appliances during the day. With the presence of electrical storage and RES, an optimal appliance schedule was achieved, considering electricity prices and any uncertain changes of the consumption and generation profiles, as well as the times of operation of the different equipment. Youn and Cho [
19] used LP to define the optimum initial storage level of a battery at the beginning of the optimization horizon, and, based on the initial storage level and electricity spot prices, the optimum operation scheme of the battery throughout the day was calculated, to minimize the purchases from the grid. Rahmani and Shen [
20] proposed a LP algorithm to optimize a mixed energy generation schedule within a smart home, and thus minimize the operational cost. Energy sources such as an electricity grid, PV, battery of an electric vehicle, and diesel generator were dispatched through model predictive control (MPC) to address the uncertainties of the PV generation. Oh et al. [
21] initially modeled an energy storage system of a building as a LP problem, and then used Markov decision processes to decide the battery charge/discharge in order to minimize the peak load. The uncertainties of the price and load change were addressed through the utilization of heuristic optimization methods. Wu et al. [
22] presented a LP model for optimizing the dispatch of a grid-connected PV system with a battery, in a building, while MPC was used to address the uncertainties of both the load and the PV generation. Electricity cost, electricity sale price as well, and the wearing cost of the hybrid system were the main parameters included in the optimization function. Dargahi et al. [
23] used LP to optimize the operation of a PV-grid-connected building, using the battery of an electric vehicle as the storage medium. The authors introduced within the objective function a bonus term for maximizing the consumption of local PV generation. Wen and Agogino [
24] optimized the operation of the lighting within an office building using LP and considering dimming and illuminance levels, so as to simultaneously minimize the lighting energy consumption and maximize user satisfaction. Lauinger et al. [
25] presented a LP decision tool for optimizing the investment as well as the operating costs of a mixed energy generation system in a building. Energy sources and storage technologies such as natural gas, solar, earth, electric grid, heat tank, and battery technologies were included within the problem. The main aim of the study was to minimize the operational costs for electricity, space heating, and hot water, and simultaneously maintain the investment costs as low as possible, based on the initial investment and maintenance costs of the system. Georgiou et al. [
26] made a first attempt to use a hybrid optimization approach using LP and genetic algorithm (GA) for optimal dispatching of a battery in a building with PV installed. The authors demonstrated the benefits of using such approaches for maintaining the building’s net grid energy at low levels.
Despite the variety of existing energy-efficient building designs and international energy policies for nZEB implementation, an absence of methods for real-time control in nZEBs was reported by Lu et al. [
27]. This absence, as mentioned by the authors, is due to the stochastic and complex behavior of energy consumption and renewable energy generation (REG). To this extent, the adoption of nZEBs in the EU remains low, as was also demonstrated by Reference [
28]. Moreover, nearly all studies related to the optimum energy dispatch in a building focus on electricity cost and/or peak load reduction, while the main requirement for an nZEB is the enhancement of the building’s autonomy; that is, from an electrical point of view, minimizing both the grid import and export energies while maximizing the self-consumption from RES.
Taking into account the rising trend of electrification in building energy sectors (e.g., the transition from traditional heating systems to heat pumps), along with the existing gap in research relating to the individual control of storage media, import and export energies, and the consequent energy consumption in nZEBs [
29], this paper proposes a new approach for nearly flattening (i.e., zeroing) the daily electrical net grid energy, in real time, of a building with a PV system and a battery installed. The purpose of the current study was the nearly zeroing of the net grid electrical energy in buildings, in real time, in an optimal manner. This is a problem that, to the best of our knowledge, has only been dealt with on two occasions (References [
26,
30]), but not in the holistic manner of the current paper, which utilized and integrated convex optimization, heuristic optimization, load and PV forecasting, and realistic battery dispatch software to nearly zero the building’s daily net-grid energy. This target was achieved by using LP to optimally dispatch the battery operation in an adaptive manner, assisted by equally powerful methods such as artificial neural networks (ANN) used to forecast both the next 24 hours’ PV generation and load demand, and GA to drive LP to optimal solutions based on daily forecasts relating to PV generation and demand. Finally, to address the non-linear and complex battery behavior and model its performance in a more realistic manner, the proven freeware system advisor model (SAM) of National Renewable Energy Laboratory (NREL) was integrated with the proposed approach, giving the final dispatch.
The structure of this paper is as follows.
Section 2 presents, explains, and demonstrates the mathematical optimization model, the procedure followed for integrating the different individual modules of the study (LP, GA, ANN, and SAM), the operation of the algorithm in real-time, and the outcome of a cross-checking analysis for validation purposes with the aid of SAM.
Section 3 deals with the annual outcomes of the proposed model obtained from a base study, as well as the dominance of the proposed model compared to a conventional dispatch algorithm. Finally,
Section 4 outlines the conclusions drawn from this study and discusses future research work.
2. Materials and Methods
2.1. Proposed Linear Programming Model
The current study used MATLAB (R2020a, The MathWorks, Inc., Natick, MA, USA) to solve the linear optimization problem through a LP algorithm [
31], which constitutes a special case of convex optimization that always converges toward a global solution. Moreover, the simplicity and fast convergence of LP, as well as the variety of different mature algorithms for solving such problems, have resulted in its widespread adoption in many engineering applications [
32,
33].
The objective function is a weighted sum of five “separate optimization” functions (terms). A detailed derivation of this can be found in [
30], where the LP optimization method was applied and validated for a building case study. The optimization problem reads as follows.
subject to
where
f is the objective function to be minimized;
t is the discrete time and
T (= 24) is the optimization horizon (h);
wim,
wex,
wch,
wdis, and
ws are the weights responsible for “penalizing” the different energy sources related to import, export, charging, discharging, and energy stored, respectively, with an aggregate sum of 1;
Egrid,im and
Egrid,ex represent the energies imported/exported (not occurring simultaneously) from/to the grid (kWh);
Ebat,ch and
Ebat,dis represent the energy received/delivered (not occurring simultaneously) by/from the battery, respectively (kWh);
Es is the energy stored in the battery (kWh);
EPV is the PV electrical energy supplied (kWh);
Eload is the load consumption (kWh);
Ebat,max is the maximum energy that can be supplied/received by the battery (kWh); and
Es,min and
Es,max are the minimum and maximum allowable energy to be stored in the battery, respectively (kWh). Note that the associated power of each energy source as well as the load can be calculated by dividing the energy by the time interval (step), which in this case is equal to 1.
To appropriately embed the optimizable variables, a normalization formulation is needed. The star symbol, used below, denotes that the optimization variable within
f is “normalized” (i.e., non-dimensionalized). Normalization is achieved by dividing the optimization variable by the difference between its upper and lower bounds, as shown below.
where
Eload,max,
Eload,min,
EPV,max,
EPV,min,
Ebat,ch,max,
Ebat,ch,min,
Ebat,dis,max, and
Ebat,dis,min refer to the maximum and minimum points of load demand, PV generation, charging, and discharging energies, respectively.
The use of the “normalized” weighted sum method through
wim,
wex,
wch,
wdis, and
ws, allows for the determination of each optimization variable’s (or function) importance within the objective function, depending on the scales and the nature of the problem. Lumping these variables together allows for the simultaneous management of both the grid energies and the battery usage, and thus the achievement of a high-self-consumption scheme with reduced import (related to primary energy) and export energies. In addition, according to the definition of LP [
32], the objective function is composed of the decision variables defined within the problem. Hence, the decision variables
Egrid,im,
Egrid,ex,
Ebat,ch,
Ebat,dis, and
Es are added within the objective function and are lumped using the appropriate weights.
Equations (2)–(12) represent the different physical constraints of the problem, such as energy balance, battery available energy storage level, battery maximum and minimum energy storage levels, battery maximum and minimum charging and discharging energies, and the prevention of the battery’s supplying or receiving energy to or form the grid, so as to avoid unexpected grid balances. More details can be found in Reference [
30], where the role of each equation forming the proposed LP model is explained.
The non-simultaneous occurrence of
Egrid,im with
Egrid,ex and
Ebat,ch with
Ebat,dis is always true at optimality due to the conditions (4)–(7). Similarly, to the proposed problem, an example verifying this property may be demonstrated by considering the following reduced problem.
subject to
If for some reason (due to other possible constraints) the optimum value of f is greater than 0, then obviously the next optimum value of f is either or , showing that at optimality the condition is always met. In other words, neither Egrid,im nor Egrid,ex may occur simultaneously; this is a condition that is also valid for variables Ebat,ch(t) and Ebat,dis(t). The use of this key property allows the problem to be linearly formulated.
With the proposed approach, each desired weight w may be assigned accordingly, with values lying in the range 0 < w ≤ 1, in order to select the variables with the greatest importance, and thus minimize them. For instance, in nZEBs, where the minimization of the net grid energy is given high priority, must be greater than for the battery utilization to be maximized.
2.2. Proposed Genetic Algorithm Model
Finding the optimum weight values is strongly related to the PV generation and load consumption profiles and, due to their stochastic behavior, the problem becomes a non-deterministic polynomial-time (NP-hard) optimization (non-convex) problem. To address this problem, a heuristic optimization method, namely GA, was used a priori to find optimum weight values, based on the forecasted PV generation and demand provided by the ANN (discussed in
Section 2.3).
Imitating biological evolution, GA provides a mechanism capable of solving NP-hard optimization problems [
34]. It relies on natural selection processes that enable the production of a population of points, promotes the best solution to the next iteration, and progressively recommends the optimal configuration [
35]. In addition, GA utilizes random number generators (rather than deterministic computation), to strengthen the exploration space and repeatedly modify a population of “child” solutions to conclude to an optimal “parent” solution. Consequently, it offers a heuristic approach for minimizing the burden of computational time, deteriorating the optimization task and the number of required function evaluations [
36]. In our analysis, we considered a positive scalar value, equal to 80%, to represent the fraction of the population created by the crossover function at the next generation. Moreover, we defined the population size as 100, though for an optimizable set of five variables, a population of up to 50 would be adequate. The probability rate, for each GA’s optimization variable (weights of LP), of being mutated was 1%. Generating random directions that are adaptive with respect to the last successful generation, the algorithm selects those directions for the weights and step length that satisfy the pre-determined bounds and linear constraints [
37].
The most important steps in the GA process refer to the population production, successive evaluation, and the best candidate recommendation, crossover, and mutation. This procedure is repeatedly performed until convergence, the criterion of which is commonly reflected as “no change in the solution for n generations” [
35]. This way, the exploitation of the best solutions via the exploration of new regions guarantees a large search space, which heuristically provides a high-quality solution. The proposed GA mathematical formulation, which searches for the optimum weight values based on the feedback from the proposed LP model, is shown below.
subject to
where
fGA corresponds to the GA objective function;
Eim,LP and
Eex,LP correspond to the import and export energies, respectively, obtained from the LP.
The objective function in Equation (22) is necessary for flattening (zeroing) the daily net grid electrical energy, with the absolute term maintaining the positive difference between the import and export energies, and thus preventing the maximization of the export energy. Due to the normalization of Equation (1), the sum of weights must be equal to unity—see Equation (23)—and with Equation (24) ensuring that none of the weights is assigned the value of zero. To account for all optimization variables, this was also necessary for Equation (1). Finally, as mentioned in
Section 2.1, for nZEBs, the minimization of the net grid energy is of high priority, and hence the term
must be greater than
. This was ensured with the aid of Equation (25) and, in this regard, the feasible exploration space was further decreased, mitigating the consequent computational burden. The algorithm shown above constitutes an amelioration of a previously applied algorithm presented in Reference [
26].
2.3. Proposed Artificial Neural Network Models
ANNs are a subject of artificial intelligence (AI) and may be used for different problem applications. Such applications may include pattern recognition, data clustering, function approximation, data classification, data-driven regression, optimization, and time-series forecasting [
38,
39,
40]. ANNs are fault-tolerant and robust to outliers, errors, or noise within the data studied. Moreover, they converge fast due to their relatively simple, yet efficient, architecture. For these reasons they are widely applied, mainly in control systems and prediction [
40].
An ANN is composed of different artificial neurons, connected together mainly in a feed-forward architecture. The neurons, which are found in groups (or layers), receive input signals from other neurons and process these signals before sending the final output information to other neurons of the network. The information travels through the interconnections between the neurons, which are mathematically described with weight values. In particular, a downstream neuron sums the signals received from upstream neurons connected to that neuron, propagates the lumped signal through its activation function, and sends the outcome to the neurons of the next downstream layers. This process is then repeated for another downstream layer and keeps repeating itself for all downstream layers.
The idea of ANNs arose from the main function of the human brain, which learns from real examples. With their learning capability, they can guess the output based on an input signal similar in nature to the training signal, but never seen before. An ANN is usually trained using known inputs and outputs (supervised learning method), and during the training process, the weights—forming the neurons’ interconnections—are adjusted. The weight adjustment stops once the error between the guessed and the actual values is minimized or reaches a predefined tolerance. An error may be described using indices such as squared error, mean squared error, mean absolute error, and so on. Finally, ANN training may be accomplished via methods known as back-propagation algorithm, batch learning, online learning, and momentum, which constitute the most common training methods for maximizing an ANN’s performance [
38].
In this study, two feedforward ANNs were used to forecast the next day’s PV generation and load consumption, with their architectures shown in
Figure 1. The ANN used for the 24 hour PV forecasting,
Figure 1a, utilized as inputs the hourly PV ac generation of the previous day from a dwelling located in the town of Nicosia in Cyprus, and the next day’s hourly forecast of the global horizontal irradiation (GHI) for the same location. The GHI was gathered from the Department of Meteorology of Cyprus, which uses a numerical weather prediction (NWP) model to forecast different meteorological parameters at 20 different locations in Cyprus.
Using the generation of the previous day as one of the two inputs allowed exogenous factors affecting production, which were not measured or quantified in this case, to be captured and considered by the ANN. Such parameters may reflect a partial loss of production due to module, string, and/or inverter failures, atmospheric pressure, PV panel soiling, and so on. On the other hand, as it is known that, (i) PV generation is highly correlated with sun’s radiation, (ii) irradiance forecasts from meteorological departments are commonly given for horizontal surfaces, and (iii) converting GHI to the actual irradiance hitting the PV modules (plane of array irradiance—PoA) is complex and not straightforward, GHI was chosen as the second input. With the aid of a trial and error approach, using root-mean-square error (RMSE) as the performance metric, 80 neurons in the hidden layer were used, with a sigmoid as their activation function, and 1 output neuron in the output layer with a linear activation function for giving the next day’s PV generation forecast. With this configuration, a RMSE (normalized) of 11% was obtained for the studied year.
Regarding the ANN used for the load consumption forecasting,
Figure 1b, we followed a similar procedure to the PV forecast procedure explained above. The load consumption of the previous day was used in this case, as it was necessary to capture exogenous factors not measured or quantified in this case, such as ambient temperature, CO
2 concentration, natural illuminance (ambient lighting), and so on. Moreover, the weekday number and the hour of the day for the forecasted period were used, as the load pattern was strongly correlated with the day of the week and the hour of the day. For instance, the load behaved differently in Sundays compared to Mondays and the peak load occurred—generally—in the afternoon. Finally, to improve the learning of the load profile, inputs such as the load’s moving average, the moving minimum, and moving maximum of the previous day were also used. With 30 neurons in the hidden layer with a sigmoid as their activation function and 1 neuron in the output layer possessing a linear activation function, a RMSE (normalized) of 6% was obtained for the studied year.
It is worth mentioning that in both networks, the training process was performed using the backpropagation learning algorithm and an annual training dataset obtained from a dwelling, located at Lat/Lon: 35.101765, 33.348838, for 2017. Finally, the ANN forecasts versus the measured values, by month against daily-hour average, are shown in
Figure 2.
To give a clearer understanding of the weather at the location under study,
Figure 3 shows different weather-related parameters for one representative month per season in 2018. The representative months selected were January for winter, April for spring, July for summer, and October for autumn. By closely examining these parameters, one may conclude that in Cyprus the climate is significantly warm with high humidity levels. Despite the high temperature and humidity, which may affect the generation of PV systems, high irradiance levels are observed, leading to significant PV energy generation. On the other hand, the presence of high humidity and high temperatures leads to the intense use of cooling systems in summer, thus increasing the energy needs of buildings.
The data were monitored through a small weather station installed locally, using measuring equipment such as a pyranometer, temperature sensor, and humidity sensor. PV generation was measured automatically by the inverter installed at the inverter’s ac output, and load consumption was measured by a digital meter positioned at the beginning of the building’s installation. PV and weather data were available through the inverter’s integrated software, while load consumption data were available through a separate software package. PV and weather data were available in 15 min resolution, while load was available in hourly resolution.
2.4. Integrating ANN, GA, LP, and SAM
Integrating the three models introduced above allowed a battery dispatch to be globally optimized in real time, since historical, current, and future values for both PV and load were recurrently considered during the optimization horizon. Therefore, based on the input information mixture of the measured and forecasted values, the dispatch was repeated and rescheduled in an optimum manner for every time step (one hour) of the optimization horizon (24 h). As mentioned earlier, to address the non-linear and complex nature of the battery and model its performance in a more realistic manner, SAM was embedded in the proposed algorithm. The successful coupling of the proposed LP with SAM was previously reported in another study [
30].
Specifically, at the end of each simulation day, the two ANNs forecast the next day’s PV generation and load consumption, while the GA, based on the forecasts, repeatedly ran the LP algorithm until the next day’s optimum weights were found. With the resulting optimum weights, a forecasted dispatch for the next 24 hours was attained through LP and the final dispatch was then obtained with the aid of SAM. In particular, once the LP dispatch was obtained from MATLAB, then the PV load and the desired battery optimum dispatch were imported into SAM. Here, the whole dispatch was recalculated by SAM, by following the given PV, load, and the desired LP dispatch obtained in MATLAB. If the desired LP dispatch required the battery to operate beyond its physical limits, then SAM recalculated the correct battery charge/discharge and the net grid energy, based on the energy balance equation and the available energy storage level of the battery at the current time step. During the real-time phase, at each time step, the matrices containing the PV and load forecasts were substituted by their corresponding measured values, the LP reran relying on the new, updated data, and SAM calculated the final dispatch based on the updated ideal battery dispatch from LP. Finally, at the end of the day, the resulting state of charge (SoC) of the battery calculated by SAM was used as the initial SoC of the next day. This procedure was repeated for each day of the simulation period, i.e., for one year in this case.
In
Figure 4 and
Figure 5, the aforementioned procedure is graphically demonstrated with the aid of a block diagram and a flowchart. It should be noted that in the algorithm’s flowchart shown in
Figure 5, the parameters displayed on the right correspond to the output parameters of the current algorithm’s state, which are used as inputs by the algorithm’s next state. For instance, the state “GA weights optimization and LP”, in the block in which both the optimum weights and the forecasted dispatch are obtained, provides the next state’s inputs, such as the optimum ideal battery charging and discharging energies along with the day’s initial storage level.
Figure 6 shows an example of the proposed ANN-GA-LP-SAM model’s outcome, regarding the forecasted and real-time dispatches and the battery’s SoC, for a three day simulation period. A snapshot of the simulation, representing the forecasted dispatch for 24 January 2018 and the status of the real-time dispatch for the same day at 15:00, is shown in
Figure 6a,b. The top diagrams show the expected dispatch and the battery’s SoC of the day, whereas the bottom diagrams show how both the dispatch and the battery’s SoC evolved in real-time when changes in PV and load occurred. Similarly,
Figure 6c,d show the overall forecasted (or expected) dispatch and the battery’s SoC along with their evolution, in real-time, for the full three day simulation period. A visual comparison of the forecasted and measured values for both PV and load shows that a noticeable difference existed, resulting in a different from the expected dispatch. Despite the forecasting errors, due to the stochasticity of both the PV generation and load, it was clearly shown that the proposed model is able to adapt to such stochastic events and any uncertain changes, since the battery operated within its SoC limits and the energy balance was maintained at all times.
4. Conclusions and Discussion
This work aimed to meet the need for a new model able to minimize primary energy consumption from the electrical point of view, and to maximize a building’s renewable energy self-consumption through storage and a real-time optimization method within an nZEB. This was achieved through a novel and holistic integration of artificial intelligence (ANN) for PV and load forecasting, with a real-time hybrid optimization method (heuristic—GA, and convex—LP optimization), for battery energy management, and with a realistic battery dispatch software (SAM), for a more realistic battery dispatch. To the best of our knowledge, such an approach has never been attempted before to address the aforementioned aim. To this end, the current study showed the significant reduction of a building’s aggregated grid usage throughout the year in relation to the sum of import and export energies. Owing to this minimization, self-consumption was significantly enhanced, allowing a higher autonomy of the building.
It must be stressed that the current analysis mainly focused on zeroing the daily net electrical energy, as is expected for nZEBs. In the context of nZEB definitions, electricity prices, investment costs, operation and maintenance costs, and so on, do not necessarily act as a low energy target, and remained beyond the scope of this study. To use such factors/parameters in a problem such as the one presented here would limit its possible findings to the solutions to a specific and not a global problem, as these factors strongly rely on subsidies, loans, surplus energy sell price, electricity buying price, PV and battery prices, and so forth. Some of these (e.g., subsidies) may not even be available in many countries, and, more importantly, they may change in an unpredictable way, based on a country’s amendment of energy policies and/or energy economics. As a result, an optimized solution based on today’s situation may not be suitable for future times. On the other hand, addressing the sheer energy size and not its cost toward achieving low energy targets is a common and global problem that can be adopted irrespective of costs and prices.
Returning to this study’s findings, with the battery essentially acting as an “extension” of the PV generation throughout the day, a parametric study conducted using three different storage sizes showed that the average self-consumption could be increased by a factor of two, the annual aggregated grid usage (import + export energies) could be reduced by 53%, on average, and the annual load could be mostly supplied by the PV at a rate of 60%, as compared to the no-storage scenario. This shows the importance of having battery storage even in grid-connected PV systems. By accurately forecasting the PV generation and the load consumption (RMSE of 11% for PV and RMSE of 6% for load), verifying the accuracy of our model when it was cross-checked with a realistic software (SAM), and optimally driving the coupled LP-SAM model through GA, the adaptiveness of the model in real-time is observed, leading to better outcomes compared to a conventional, rule-based dispatch model. In this regard, researchers and professionals may be influenced toward the development of new controllers, in order to meet the desired energy levels of an nZEB in real-time. Based on our findings, the practical application of the proposed approach in each individual building can contribute toward an energy-efficient system. In particular, aiming the enhancement of an nZEB’s energy autonomy and its daily zeroing of the net grid energy, it is possible in a district to simultaneously achieve a higher penetration of distributed energy resources (DER) and a lower energy exchange between the buildings and the grids. This will also allow existing grids to adapt to these challenges, without the need for introduction of expensive and complicated mechanisms by the grid operators. However, this remains a challenge, as current policies within the EU need to alter to support and enable such schemes.
In every battery application, the battery’s aging (natural calendar aging and capacity fade due to the excess battery performance) constitutes an important factor when it comes to the concept of maximizing a battery’s life, and hence minimizing any potential economic damage. Nevertheless, the consideration of the associated battery degradation, the improvement of the forecasting model to further reduce the effect of errors due to the stochastic nature of the PV and load, and the result of a potential application in a cluster of buildings demand a further considerable effort and analysis, and constitute a naturally consequent study for the future.