Case Study of Residential PV Power and Battery Storage with the Danish Flexible Pricing Scheme

: The economic viability of renewable energy generation is vital for sustainability. Ensuring that optimal operation is always achieved, using energy management systems and control algorithms, is essential in this endeavor. Here, a new real-time pricing scheme, the Danish ﬂexible pricing scheme, illustrates how residential PV and battery systems can optimize the electricity bill of households, without changing consumption behavior or providing grid services in exchange. This means that the only addition is PV production, storage, and control. A case study is constructed from Danish household consumption data, irradiance measurements, and recorded spot prices. With the input data, the pricing scheme, and the energy ﬂow, simulation models are computed in MATLAB, thereby validating the algorithmic potential and ﬁnding the best strategy for charging and discharging the energy storage unit. Different methods are compared to list the viable options and evaluate them, based on the economic feasibility for the household. Furthermore, a discussion of the system implementation is also included to highlight technical difﬁculties, co-integration opportunities, short-comings, and advantages present in the case study. In conclusion, it is possible to make renewable energy generation, and storage, viable for a Danish residential household under the new pricing scheme.


Introduction
Concerns about the implications of energy production, transmission, and consumption with respect to the environmental challenges that the world is currently faced with have sparked tremendous research into sustainable alternatives and the consequences if changes are not made with sufficient determination [1][2][3]. A shift in the energy mix, from fossil fuels to renewable energy sources (RES), has been made a priority, and the aftermath presents several challenges to the energy industry. Many of the RES are inherently distributed energy resources (DES), which means that the production of energy is moved from centralized to decentralized power plants, of varying sizes and controllability. Therefore, problems naturally arise when the electrical grid is forced to change [4]. Some of the challenges that this presents are natural [5,6], as new initiatives arise and technological advancements are weaved into the mix [7]. Others are inherent to the nature of intermittent sources [8] or related to the power electronic interfaces of wind power systems (WPS), photovoltaic power (PV) plants, among others [9]. A crucial variable is the levelized cost of energy [10], as the economic motivation is prominent.
From the consumers' perspective, the electricity market is mostly a supply of energy, traded for monetary value. This has been coupled with real-time pricing (RTP), to prioritize RES [11][12][13]. In turn, technical advancements in consumer technology and systems have been made to utilize RTP schemes, including behind-the-meter storage (BTMS) systems, where energy storage is installed locally to minimize the electricity bill of the consumers [14][15][16][17][18]. As the RTP schemes become more widespread, so will BTMS. A country that is in the process of installing smart-meters and introducing an RTP scheme is Denmark.

The Flexible Pricing Scheme
In Denmark, the electricity market has many operators influencing the energy mix and pricing for consumers, which also complicates the market pricing procedure. A brief overview is presented to introduce this, with emphasis on the most influential actors. The Danish transmission system operator (TSO) is Energinet. Its role is to run the transmission grid, ensure energy balance in the grid, and create the framework for a well-functioning electricity market. Datahub is responsible for data integrity and validity, reporting to the European electricity exchange, Nord Pool, owned by the European TSOs. Operators responsible for balancing trade energy on the exchange, which is supplied by plant owners, bought by suppliers, and re-sold to consumers. The energy is transported through the transmission grid and then through a distribution grid, owned by various grid companies, to the consumer. Despite this market structure, with hourly-quoted RTPs, the Danish residential consumers pay a fixed price for electricity (DKK/kWh) along with various tariffs, taxes, subscriptions, and profits to the involved operators in the electrical energy market.
In December 2017, the Danish Energy Agency and Energinet began imposing a new price structure, called the flexible pricing scheme (FPS) (DA: Flexafregning). Within this, the fixed price for electricity will be substituted by the hourly-quoted (flexible) spot price from Nord Pool, an RTP scheme. Consumers are thereby incentivized to adopt more environmentally-friendly consumer habits by favouring an energy mix of inexpensive RES instead of fossil fuels [19]. Additionally, modifications in consumer behaviour, seen from the grid, can be dynamically incentivized through price changes.
The FPS was first introduced in December 2017 by two Danish grid companies, Radius (in the Copenhagen area) and NRGI Net (in the Eastern Jutland area). A requirement for the FPS is remote electricity meters, installed in the households. The FPS is planned to be fully implemented on a national scale by 2020.
A new pricing scheme has the potential to influence consumer behaviour, but will also inherently alter which energy investment options are economically viable and to what degree.
While there are options for consumers to change behaviour dependent on external factors and scheduling schemes [20,21], there will still be a segment of them who cannot or does not wish to change their consumption behaviour. RES and BTMS with intelligent control, linked to Nord Pool spot prices, could be a viable option, with the FPS. This involves implementing an energy management algorithm, which considers the behaviour of the residential household load, as seen from the gridproducing/selling energy when prices are high, and consuming/buying energy when prices are low. The general idea has been investigated in the literature, in relation to other countries and cases [22][23][24][25][26][27]. This paper investigates BTMS with unchanged energy consumption behaviour in Denmark for residential consumers. It furthermore addresses the technological challenges associated with it and discusses the economic validity of the solution.
The current pricing scheme and FPS are summarized in Tables 1 and 2, respectively. Please note that ∆E = Σconsumption − Σproduction. From the tables, these two schemes primarily differ in two ways: (1) prices for electricity are either fixed or tied to the hourly-quoted spot price, and (2) the surplus subsidiary is lowered from 600 to 250 DKK/MWh. These changes are significant because the residential energy balance under the FPS now relates to the instantaneous balance of energy, and not only to the annual accumulated values, net-transfer. This motivates a monitoring and control system for households to minimize the electricity bill. It is difficult to provide a simplified example for calculating the difference in the electricity bill for a household with PV under the new and old pricing schemes. This is due to a large dependence on the correlation between price-production, price-consumption, and the instantaneous overlap between production and consumption. These factors influence the results so highly that a simplification cannot be representative, i.e., simulations should be made in each case to calculate the difference. Table 1. Current pricing scheme for residential PV systems in Denmark [28,29].

Danish Case Study
A case study of a randomly-selected Danish household in the Thisted area was used to assess the economic validity. The household did not have electric heating or any renewable energy production, so the energy consumption time series data were purely from home appliances (lighting, cooking, refrigeration, cleaning, etc.). A plot of the time series is shown in Figure 1. On a yearly basis, the household had a consumption of 3.900 kWh. To simulate the PV system, a time series of measured irradiance has been converted to energy production from the data sheet values of a 6-kWp system. PV power (including inverter) is, simply, related to irradiance, r, panel area, A, and system efficiency, which states that power can be calculated by the incident irradiance per area times the actual area, including a measure of efficiency for conversion. From the PV panel data sheet values and inverter efficiency of 90% (low estimate for worst case), the system efficiency is calculated from (1) as: As the panel efficiency has been determined, energy production within a given hour (t 2 − t 1 ) can be calculated by integrating irradiance, yielding the maximum possible energy output, and then multiplying by the system efficiency to obtain the output, The PV energy production time series is shown in Figure 1. This amounts to 5.100 kWh per year, making the household a net-producer seen from the grid. Energy storage is added to the system in the form of a 13.5-kWh, AC-coupled stand-alone Li-ion battery system (storage and inverter), with a power rating of 5 kWp and a round-trip efficiency of 90% (5% for charging and discharging, respectively). The residential energy system is schematically depicted in Figure 2. Prices of energy are recorded by Datahub and are available online for the Danish grid, DK1, synchronized with western Europe. This time series is also shown in Figure 1. The PV, storage, and combined PV with storage systems pose an investment for the consumer, which must be accounted for when solutions are compared. Therefore, investment, annual service, and annuity are incorporated into the analysis, for each of the three cases, shown in Table 3. The annual interest was assumed to be 3.95%, based on Danish credit institutions.  Simulations were done with a MATLAB script that loops through each hour of the past year and records the system behavior, consumption, production, and spot price to calculate the yearly electricity bill as a metric for performance. This is done for a select set of configurations, 1. Only consumption (current pricing scheme); 2. Only consumption (FPS); 3. Consumption with FPS and PV; 4. Consumption with FPS, PV, and storage (simple); 5. Consumption with FPS, PV, and storage (optimal).
These were all compared based on their relative economic viability (investment and reduction in electricity bill). As shown above, this was done in relation to two energy management algorithms for battery storage: simple and decision tree-based (referred to as "optimal", due to the decision process).

Energy Management Algorithms
For comparison, two algorithms are covered in the following subsections.

Simple Strategy
The first is simply to charge the battery with PV power when there is excess production (as opposed to selling it to the grid) and discharging the battery when PV production cannot cover consumption (instead of drawing from the grid). When the battery is depleted, energy is supplied from the grid, without regards to the prices. When PV power is available, but the battery is fully charged and the load is met, energy is sold to the grid.

Optimal Decisions
The second attempts to calculate an optimal decision flow for the battery charge, with respect to the electricity bill, within a prediction horizon (N). This is done by assuming that the controller has a finite number of choices each hour (to simplify the control objective), corresponding to the hourly price changes, in this case five. These are: (1) do not use the battery (always applicable); (2) discharge the battery to the grid (battery charge > 0 kWh); (3) discharge battery to the household (battery charge > 0 kWh); (4) charge battery from the grid (battery charge < 13.5 kWh); (5) charge battery from PV (battery charge < 13.5 kWh). Realistically, not all of these options are available in every time-step since the battery can be fully charged or discharged, and PV energy may not be available. However, the optimal algorithm works by constructing the full decision tree with all available options every hour of the prediction horizon and then selecting the outcome with the lowest electricity bill, providing the controller with a decision for every hour. If all options are available for all time-steps (no leaf/terminal nodes in the decision tree), the number of nodes is n = ∑ N i=0 5 i , where N is the prediction horizon, i.e., number of hours.
For a case of five options and a prediction horizon of 12 h, the number of nodes becomes approximately 300 million, which is not computationally feasible. Therefore, prediction horizons of less than 12 h will be used in this paper.
An example of a decision tree is shown in Figure 3. Each node contains information about the parent (decision in the previous time-step), the current decision (status quo, discharge-grid, discharge-house, charge-Grid, charge-PV), battery state-of-charge (SoC), electricity bill, and accumulated energy transferred to and from the grid. This allows the nodes at the final time-step to be inspected for an optimal solution and then back-tracing the decisions that yield that particular outcome.
The procedure is repeated every hour, to ensure that the controller is always using the most recent data and using the optimal decision to match the real-time price progression. Additionally, the algorithm needs a second part, to feed in the necessary data every hour, namely N-hour forecasts of prices, PV production, and consumption, which are beyond the scope of this paper. As they will introduce uncertainty and thereby reduce the accuracy of the optimal solution, a short discussion of this is presented in the following section. Figure 3. An example of a decision tree for the optimal energy management algorithm.

Forecasting of Time Series
As previously mentioned, this paper does not address the issues of uncertainty imposed by forecasting prices, residential load, and PV production. As these will inevitably influence the viability of the solution, they are briefly mentioned in this section, with references to other work in the literature.
There are many different approaches to forecasting these variables, such as support vector machines (SVM) with kernel functions or soft margins, various deep learning neural networks (NN), and seasonal auto-regression integral moving average exogenous (SARIMAX) time series models, to name a few. In this particular case, the seasonal trend is more important than the absolute value, i.e., a large error can be tolerated, as long as the volatility and seasonality are accurately represented in the forecasting model. Therefore, it is difficult to draw conclusions, based on previous work where only the average error over the entire prediction horizon was reported. Mohsenian-Rad and Leon-Garcia reported a 17% average forecasting error for a 24-h prediction horizon using a weighted average price predictor. They simulated that this results in a 1.5% increase in cost for the consumer [12]. However, the results are difficult to generalize.
Other work with forecasting, such as Khan and Jayaweeara, reported a mean absolute percentage error (MAPE) of around 10% for yearly aggregated consumer forecasts, with k-means machine learning for classification of customer segments and a neural network for forecast regression [21]. Anbazhagan and Kumarappan [30] studied electricity price forecasting errors, which generally range from approximately 5% to 36%. In comparison, [31] reported short-term electric load forecasting with between 1% and 3% error.
As the forecasting error is dependent on methodology, pricing scheme, modeling, computational effort, and data availability, it is difficult to make an assessment of the impact on the economic viability for the consumer in this particular case study. A deviation of 1 to 2% can be tolerated, but this will also depend on the prediction horizon. Therefore, it is suggested that predictions be incorporated into a future analysis, if possible.

Simulation and Results
Running the simulations yielded profiles for battery charge, production, and consumption throughout the year. However, the most important metric was the final electrical bill. This number represents the system performance, along with investment cost. Table 4 summarizes the results. Table 4. Results from the simulated model. "Bill" is the yearly household electricity bill, and "Total" includes annual investment service (interest and back-payment). FPS, flexible pricing scheme.

Config.
Pred. A notable difference can be seen between the current pricing scheme and the new FPS. This is due to three things: (1) the fixed price used, (2) RTP level, and (3) price-consumption correlation. In this case, the consumer was predicted to have a reduction of the electricity bill of 1.041 DKK, without taking any action. The addition of 6 kWp PV significantly reduced the electrical bill even further (830 DKK), but not enough to off-set the investment as the total yearly cost (11.497 DKK) was higher than without PV (8.151 DKK). With the FPS, PV, and a 10-h prediction horizon, the addition of storage substantially reduced the electricity bill, towards a monetary gain. Again, this is not enough to counteract the investment with the simple energy management algorithm. With the optimal algorithm, a clear trend can be seen when the prediction horizon is increased from N = 5 h to N = 10 h. Breaking even was achieved when N = 8, and the electricity bill was further decreased as the horizon was increased. Simulations for N = 10 took approximately five days for a computer with 32 GB RAM and six 3.60-GHz CPU cores. Therefore, results for N = 11, 12, . . . have not been obtained.

CPS
The best option, listed here, was FPS incl.PV and storage with a 10-h prediction horizon. From Table 4, the difference between this and FPS without an energy management system was 8.151 − 7.505 = 0.646 DKK/year, with loan service over the first 10 years. After the initial 10 years, the loan is paid back, and the earnings would be 8.151 − (−11.142) = 19.293 DKK/year, not including repairs, maintenance, and replacement. For a 20-year period (10 years with loan service and 10 years without), the total difference between FPS and FPS with a PV and storage system would be 10 · (8.151 − 7.505) + 10 · (8.151 − (−11.142)) = 199.390 DKK. This is significant for its viability, as it poses an opportunity for the consumers to not only break even, but also to have a reasonable return on their investment.

Limitations and Further Work
From the previous section, it is evident that the methods presented here pose an opportunity for PV and storage in the residential sector, under the new Danish FPS. As the prediction horizon was increased, the algorithm approached a yearly optimum, for the energy management scheme, and minimized the household electricity bill. However, the results presented here are based on assumptions and are subject to constraints that limit the potential to extrapolate and scale indefinitely. These assumptions and limitations are discussed below.
Firstly, the time series forecasting has been omitted for simplicity. However, this part has the potential to influence the viability significantly. Perfect forecasting is impossible to achieve in practice, and even though the progression of the time series is more important than the exact values, this should be addressed.
The second is data availability. Residential consumers may not have historical data records of energy consumption and/or PV production. The algorithm must therefore run, without data, while the necessary inputs are gathered. As data become available, the performance can be improved with higher fidelity forecasting estimates. Price data are available on Datahub, and the system therefore, only, needs an Internet connection to access the vast records of historical price developments.
Another issue is the integration with other controllers in the system. Since this algorithm provides the overall guideline for what action is preferred within the hour, another controller must be designed to actuate this. If the choice is to charge the battery from PV, the intra-hour controller must standby, prepared to route power from the PV system, whenever power comes on-line, and reroute power when the battery is fully charged. Additionally, this paper has assumed no overlap between PV production and household consumption. Even though the pricing scheme refers to instantaneous energy balance and power transfer, this is not a realistic case. The intra-hour controller must also account for this, possibly by using the battery as a buffer, to achieve the overall command objective.
The optimal energy management problem described here is continuous in nature, but is discretized into five available options, per hour. This is done to simplify the solution process; however, other choices may lead to better solutions with higher pay-offs.
Computational requirements by the system processor and memory are currently quite high, as a real-time system must finish the optimization routine within the hour to avoid process overrun. Since there is an obvious trade-off between economic viability/profit, prediction horizon, and computational effort, a reduction in algorithmic complexity and processor/memory requirements will enable the system to generate better solutions and possibly increase profits beyond the current prediction. With respect to this, it would be desirable to have an operable heuristic alternative to the brute-force approach described herein, since this is where the bulk of the effort is spent, i.e., the bottleneck.
Another assumption lies in the representative nature of the available data. The correlation between price and consumption time series is imperative. A high positive correlation merits the investment into storage and PV, as the average price of energy is relatively high. Conversely, a high negative correlation leads to a relatively low average price of energy, meaning that this solution has less merit. It is still possible to produce from PV, store it, and sell the energy when prices are high, yet it cannot be coupled with a lower price for consumption, which neutralizes half of the control advantage. The consumption and price time series used in this case study have a cross-correlation coefficient of 0.775, with a p-value of 0.8·10 −12 (with the null-hypothesis that there is no correlation, i.e., the correlation is statistically significant). The result of this is that the household is a good case for the application of this energy management system.
Additionally, an important assumption behind the motivation for this work is that the consumers intend to maintain their consumption habits, regardless of the electricity price developments. This assumption in itself may be valid to some extent; nevertheless, initiatives such as smart-grid, smart-appliances, and electric vehicle (EV) charge controllers open up the possibility of additional flexibility for the residential energy management system, as consumption can be, partially, used to decrease costs even further. Consequently, this adds another layer of complexity, though the overall methodology described in this paper could still be valid or used to form the basis for further work.
Lastly, for a given household, with a fixed pricing scheme, there is an optimal size for PV and storage systems. Analogously, it would be desirable to develop an approach to determine the optimal storage capacity and PV system with the FPS. Factors such as price-consumption correlation, base load, and consumption variance could influence how the system is scaled and can maximize investment return. Additionally, other options for renewable energy production and storage technologies could also be included in the analysis as these also have the potential to influence the economic viability. It is also possible that some cases cannot support production, as it does not off-set the investment, and storage is the only addition that makes economic sense. Therefore, a full analysis of all possible scenarios will reveal what solution is best in the given case. For a complete analysis and evaluation of the economic impact, from the installation of PV and storage, it is also prudent to briefly mention the household market price [32]. In the Danish market, this is positively correlated with the Energy Certificate rating [33], which is improved by renovations with renewable energy installation. Therefore, a monetary gain, besides reduction in the electrical bill, is also added in the form of an increase in property value. The exact value of this is complicated to assess and goes beyond the scope of this paper, but it is worth mentioning that it also has an impact on the economic viability.

Conclusions
Changes in the energy sector are occurring in more ways than one. The electrical energy mix is shifting from fossil fuels to renewable; decentralized generation is being favored over centralized generation; and different economic initiatives such as RTP enable BTMS solutions. This is also seen in Denmark with the new FPS being implemented over the next few years. To capitalize on this and support the integration of renewable energy sources in the residential sector, a case study has been formulated and analyzed, including energy management. The choice of algorithm has potential to influence the viability of PV and storage, without altering consumer behavior or installing any other smart technology in the household. This is done by predicting PV production, residential consumption, and energy spot prices a certain number of hours in advance and then calculating the best course of action for the storage unit to charge, discharge, supply the load, sell energy to the grid, or buy when prices are low. As the prediction horizon increases, the algorithm minimizes the electricity bill, thereby increasing the profits. It remains inconclusive whether this off-sets the uncertainty of the predictions or where the optimal prediction horizon lies, as further work is needed to verify the results conclusively and implement the algorithm. By focusing not on renewable energy or CO 2 emissions, but rather relying on the market economics, this methodology is shown to make storage and RES viable for Danish households in the foreseeable future.