{'fraction_non_alphanumeric': 0.022548473022362635, 'fraction_numerical': 0.00607074273678994, 'mean_word_length': 4.63097314265783, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Influence of Demand and Generation Uncertainty on the Operational Efficiency of Smart Grids

To ensure the smooth and near optimal operation of storage and controllable generation in a grid with a high share of renewable energies, it is important to have accurate forecasts for load and generation. But even with the advanced forecasts available today, the prediction error can have a significant impact on the operation performance of the system. This paper compares and analyzes the impact of the prediction-error on the operational performance in case of a small virtual power plant.


I. INTRODUCTION
Governments around the world have made climate protection a priority policy goal. This is increasingly occurring as a result of climate change, and the environmental issues it has presented to us. To combat environmental degradation, a shift away from fossil fuels and towards renewable systems is required. In Germany for instance, renewable forms of energy are on the rise. In 1990, renewable energy sources accounted for just under 4% of total electrical energy production, but that share rose to as much as 33% by 2017 [0]. The number of consumers and producers who utilize renewable power generation systems has increased, which also entails new and increased challenges for system operators [0]. When the next generation shifts increasingly towards renewable resources, extensive planning is required to meet, as well as to coordinate and control the loads of individual consumers. This well informed policy will be crucial, as considerable uncertainties can interfere when planning for energy problems. Uncertainty from inaccurate projections of the future needs and capacities of renewable resources can also generate problems in micro grid operation. [0].
In this paper, the effects of the prediction error on the operational efficiency of a small self consumption community is investigated.

II. OPTIMAL OPERATION OF POWER SYSTEMS
The motivation to apply efficient resource scheduling in power systems has increased. It supports the economical and reliable energy production [0]. It also determines the operation of generating resources. This minimizes the total This work has been funded by the Federal Ministry of Economy and Energy in Germany.The authors gratefully acknowledge this support. They are solely responsible for the contents of this publication. generating cost while responding to the system boundaries as well as to the demands [0]. Dynamic programming [0], standard mixed integer programming as well as non-linear programming have been developed as solution methods to cope with scheduling problems in research areas. Further techniques encompass exact approaches such as Lagrange relaxation [0], or heuristics and meta-heuristics methods [0]. One of the most used approaches is the mixed-integer-linear programming (MILP) approach. Efficient solution techniques have been developed to guarantee convergence within few iterations [0]. The production of large power systems is coordinated by these UC approaches. Therefore much effort has been made to optimize the problem formulation. This leads to a decreased number of binary variables which speeds up the process of search and limits the search space.
In this paper the underlying optimization problem is solved in a Model Predictive Control (MPC) fashion. Hereby a dynamic model of the energy system is used to predict the future behavior within a discrete time horizon T . This model depends on various inputs such as the predicted generation or demand. At each sample point the complete optimization problem is solved over the horizon but only the first step is implemented. The software has been implemented in python using CVXPY [0]. An example of the optimized operation for a small self consumption community with renewable generation and a combined heat and power (CHP) cogeneration plant is shown in Fig. 1.

III. PROBLEM FORMULATION
To standardize the modeling of renewable energy resources (PV, wind), intermittent generation units or energy storage devices with limited capacity, a standardized formulation according to the Power Node framework is used in this paper. The reader is referred to [0] for details. Depending on the device properties and the energy supply and demand the constraints are listed and the decision variables are defined to present the characteristic properties of power nodes. In the case of renewable energy generation plants, it is assumed that production can only be curtailed and that otherwise there is no possibility of influence. Consumers are assumed to be passive loads, i.e. not controllable. The cost function of the problem  Fig. 1a the relative prediction error is 0 % and in Fig. 1b the relative prediction error is 10 %. The goal of the optimization in this case is to use as little energy from the grid as possible (negative feed in, red line).
can be expressed as follows: hereby P g denotes power supply/demand by generator/consumer g in the network, while the κ g regards to the price of per kWh supplied/consumed electricity [e /kWh]. The variable P grid corresponds to the power delivered from the external grid and P batt describes the power generated by battery limited by the minimum power P batt and the maximum power P batt . The demand of the consumers is denoted with P dem and the corresponding limit with P dem . Moreover, the power supply P RES is associated with the renewable energy systems (RES) with a maximum output of P RES . The combined heat and power unit is represented by P CHP with a maximum output power P CHP in the related network. The state of charge (SOC) of the battery is designated byẋ t and normalized to 0 ≤ x ≤ 1 with storage capacity C. The optimization is run over the discrete time horizon T .

A. Maximum Ramp Rates
If the production of renewable energy sources changes rapidly due to weather events, these power ramps must be compensated. Therefore, the ability of traditional generation plants and storage facilities to follow these ramps plays a decisive role in system reliability and cost efficiency. In order to avoid fluctuations on the generation side, the physical limitations of the corresponding plants are taken into account in the optimization. In addition power ramp constraints can be applied to network connection points to limit the up and down ramps at this point and to compensate and smooth the power variations. The following equations represent the restrictions for up and down ramps (R U g , R D g ) of the respective unit g [0]:

B. Minimum Up and Down times
Each unit g has limitations regarding its minimum runtime (uptime, T U min,g ) and downtime (T D min,g ). For example, a CHP should be operated at the optimal operation point as long as possible and not be switched on or off arbitrarily. According to Rajan and Takriti [0] these restrictions can be formulated as follows: Here v g,t and w g,t are binary variables that indicate the start up and shutdown process of the respective system. The binary variable u g,t describes the operating state of the corresponding installation.

IV. UNCERTAINTY MODELLING
The problem of investment decisions in the presence of uncertainty was one of the first applications where uncertainty was taken into account within optimization processes. This led researchers to capture uncertainty in modeling energy resource allocation. Thus, there is a transmission from traditional deterministic approaches to stochastic and robust optimization [0] with the aim to answer the demands on system reliability. In this paper a robust optimization approach facilitating a worst case prediction error assumption is implemented.

A. Load and Generation Predictions
In the recent years load and generation predictions have been predominantly generated using machine learning techniques [0]. The predictions for this paper are generated with artificial neural networks using various weather models as input data.
In order to generate a worst case optimization scenario for the optimization process, the accuracy of the load and generation prediction has to be estimated. Therefore a model for the prediction accuracy is created by fitting an inverse harris function to the known prediction errors. The prediction errors are calculated based on data coming from a large monitored PV-farm.
In Fig. 2 the relative prediction error depending on the corresponding forecast horizon is shown. These samples can be approximated with the following function: where ε denotes the predictin error and t the forecast horizon. The parameters a, b and c are fitted to the data in a least squares sense.

V. SIMULATION SCENARIO
The topology of the virtual power plant used in this simulation study is shown in Fig. 3. The corresponding network  model consists of power nodes representing the distributionenergy-resources (DER), the local demand and the external grid. The DERs comprise the CHP and the renewable energy sources such as PV and Wind. Furthermore, a battery serves as a short term energy storage to balance generation and demand. It is assumed that the battery charge power (P batt ) and the electrical generation by the CHP (P CHP ) can be controlled by the energy management algorithm. The CHP is assumed to have a minimum operating power during operation. Moreover it is assumed that the renewable energy generation can be curtailed (P RES ). To capture the seasonal variability of load and generation without increasing the simulation complexity, three sample days are simulated: a summer day, a transitional day between summer and autumn and a winter day. The complete list of constraints for this scenario is shown in Table I. 1) Startup Times: Each system is subject to start-up and shut-down restrictions. If power generation plants with relatively long start-up times are available in the virtual power plant, it is therefore more important to obtain a good forecast so that the corresponding processes and machines can be started up in time.
2) Horizon and Timesteps: In order to make optimal use of the information from the short term forecast and at the same time take the energy balance of the coming hours into account, a variable increment of ∆t over a horizon of 15h is used. For the first control points t control a step size of 5 minutes is chosen, which is then increased to 3 hours (see Fig. 4). This also reduces the dimension of the optimization problem, which speeds up the computation time. The optimization is run every 5 minutes (∆t opt ).

A. Cost Assumptions
For the optimization process it is necessary to define the costs for each DER as well as the electricity and the battery costs. These costs are summarized in Table II. For the battery it is assumed that only the capital and the operational costs contribute to the optimization costs (taxes are neglected) [0]. For the electrical generation from the CHP the costs are assumed to be 0.10 e/kWh [0].
The electricity price is assumed to be 0.30 e/kWh and the feed-in tariff 0.03 e/kWh. In addition costs for the limitation of renewable generation are applied corresponding to the levelized cost of electricity [0].

VI. RESULTS
To show the influence of the prediction error on scheduling applications a simulation based on the before mentioned scenarios is carried out. All results are normalized to the base case: perfect predictions (ε pred = 0.0) and no battery.
In Fig. 5 the overall costs depending on the prediction accuracy for a scenario with and without battery are shown. On the x-axis the prediction error scenarios are listed and on the y-axis the costs relative to a scenario without prediction error nor battery are displayed. The first error scenario shows the costs based on real predictions generated with neural networks. The second item describes a worst case scenario based on real predictions (robust optimization). This is the most conservative scenario which is supposed to ensure a save operation of the plant in presence of prediction errors. The following columns describe synthetic prediction scenarios with a RMSE of 0.0, 0.1 and 0.2 relative to the maximum value of the profile. The error was modeled using the fit described in equation (7) normalized to the maximum power of the corresponding unit.  A. Sensitivity on the prediction error In Fig. 5 it can be observed that the costs increase with a decreasing prediction accuracy. One reason for this is due to the delayed start-up behavior of the CHP unit: The controller must request the required power 15 minutes before the call time so that there is enough time for the co-generation unit to start up. This can also be seen in Fig. 6, where the costs per device for a scenario without a battery are shown. The use of the CHP declines with increasing prediction error. At the same time the amount of energy drawn from the grid increases to compensate the shortage of energy from the CHP. The amount of curtailed renewable generation (RES waste) is about the same for all scenarios.
The same plot is shown in Fig 7 for a scenario with a 20kWh battery. Compared to the scenario without a battery very little RES energy has to be curtailed as the excess can be stored in the battery.  The battery usage itself decreases with an increasing prediction error. As an increased battery usage also raises the operation costs it is only used when it is predicted to be beneficial for the total costs over the optimization horizon. If these predictions overestimate the local generation and underestimate the local demand, the battery usage decreases.
In all cases the use of a battery decreases the overall costs as the battery round trip price per kWh is in this scenario cheaper than buying electricity from the grid. Furthermore, the battery can compensate the effect of prediction errors to some extend: the costs for ε pred = 0.1 are almost the same as for the case with ε pred = 0.0 and the required power supply from the mains can be reduced.
The real predictions perform around 5 % worse compared to the perfect predictions (ε pred = 0.0). The worst case scenario creates the highest costs but provides also the highest operational safety.

B. Robust optimization
For the robust optimization the worst case estimate for the prediction error is used for the optimization. This ensures a failsave operation despite the presence of prediction errors. In Fig. 7 the costs per device relative to the case with perfect predictions are shown. The worst case prediction shows the largest CHP usage and the least grid draw. This is due to the worst case optimization: as the CHP exhibits a deadtime of 15 minutes it will be switched on if the predicted profiles show any sign of a negative energy balance which could exceed the grid limits. This leads also to the larger use of the battery (see Fig. 8), as the all excess of energy is stored in the battery before fed into the grid. Furthermore, the amount of energy supplied by the grid is less than for any other strategy, which shows the robustness of the approach. One further drawback is the increased amount of curtailed renewable energy.

VII. CONCLUSION
The results presented in this paper show the importance of accurate forecasts for smart-grid or micro-grid operations. For the presented scenario without a battery a relative prediction error of 10 % leads to an 8 % increase in operational costs and a 20 % prediction error leads to an increase of about 25 %. If a battery is added to the system a relative prediction error of 10 % leads approximately to an 2 % increase in operational costs and a 20 % error leads to an increase of about 30 % respectively.
Especially if devices with a start-up time delay are included in the system, an accurate short term power prediction is needed. The effects of the prediction error can be reduced if a battery is used. If a large error margin is required (e.g. for critical facilities running in an environment with tight grid constraints) a robust optimization can be performed. This increases the failure safety of the operation but also increases the costs.
Also for storage operation a high quality forecast is important to use the battery efficiently.