Advanced energy management system based on PV and load forecasting for load smoothing and optimized peak shaving of islanded power systems

. Photovoltaic (PV) systems constitute one of the most promising renewable energy sources, especially for warm and sunny regions like the southern-European islands. In such isolated systems, it is important to utilize clean energy in an optimal way in order to achieve high renewable penetration. In this operational strategy, a Battery Energy Storage System (BESS) is most often used to transfer an amount of the stored renewable energy to the peak hours. This study presents an integrated energy management methodology for a PV-BESS energy system targeting to make the load curve of the conventional fuel based units as smooth as possible. The presented methodology includes prediction modules for short-term load and PV production forecasting using artificial neural, and a novel, optimized peak shaving algorithm capable of performing each day’s maximum amount of peak shaving and smoothing level simultaneously. The algorithm is coupled with the overall system model in the Modelica environment, on the basis of which dynamic simulations are performed. The simulation results are compared with the previous version of the algorithm that had been developed in CERTH, and it is reveal ed that the system’s performance is drastically improved. The overall approach proves that in such islanding systems, a PV-BESS is a suitable option to flatten the load of the conventional fuel based units, achieve steadier operation and increase the share of renewable energy penetration to the grid.


Introduction
In island energy systems, smooth operation of the generation units is associated with power quality improvement and promotes the enhanced Renewable Energy Systems (RES) penetration to the energy system [1]. The schemes that are responsible for the optimum operation through the power flow control are usually referred to as Energy Management Systems (EMS). An important function that is encountered by these systems is load shifting or load shaving [2]. In this procedure, the battery contributes to the formulation of a smooth load profile by filling the valleys (storing energy) and eliminating the peaks (discharging the stored energy). Based on this ability, smart algorithms produce the dispatch plan according to load forecasting and intermittent sources' production.
It is evident that accurate forecasts play a major role in system operation. Load forecasting is usually classified by the time-horizon or the lead time. Forecast horizons from one day and up to one-week ahead are referred to as short-term load forecasts (STLF) [3]. Among the various proposed approaches on this topic, data driven approach seems promising and can be found in many studies [3][4][5]. PV forecasting models can be classified into two categories: indirect and direct models [6,7]. In the indirect models, the emphasis is given in forecasting solar irradiance, which is then used alongside other associated data as inputs in commercial PV simulation software to obtain the power generation. On the contrary, in the direct forecasting model, PV generation is directly calculated using historical meteorological and power production data. A comparison of the two methods can be found in [8].
In our group's recent publication [9], a small southern-European island power system (yearly load peak ≈ 1.5MW) was examined, composed of Diesel Generators (DG), a 300kWp PV farm and a Battery Energy Storage System (BESS) of 2MWh capacity. A predictive EMS capable of shaving the demand peaks with stored renewable energy, smoothing the operation of the DG and diminishing the ramp ups that occur before the night hours was presented. The methodology included forecasting and clustering of the load, followed by a custom power flow scheduling algorithm, responsible to perform peak shaving. However, the height of the peak shaved was arbitrarily predefined and set equal for all days of the year. The value of this height was a parameter that after the trial-and-error procedure was found appropriate.
The present study continues the development of the aforementioned EMS, while introduces the following advancements: a) complete, end-to-end methodology, b) integration of the PV forecasting module, c) revised peak shaving algorithm, maximizing the shaved amount of each day, d) shift to non-proprietary tools: Python and Modelica.
As in other similar studies, the proposed EMS performance is evaluated by dynamic simulations before proceeding to prototype. The proposed EMS was simulated against real weather conditions utilizing custom built components, e.g. battery and PV. The simulations were carried out in the Dymola modelling environment, which uses the well-established Modelica language. In this way, the exploitation of the system's strengths and weaknesses became possible.

Load and PV Forecasting Modules
Optimal utilization of RES requires accurate load and production forecasts, able to compensate for future events. In this framework, two forecasting modules were developed which form the base on which EMS will optimize the system operation.
The load forecasting module was implemented using a feedforward Artificial Neural Network (ANN) with 79 input neurons, one single hidden layer of 20 neurons and 24 neurons as output (79-20-24). The inputs of the network are based on input variables common for similar networks referred in load forecasting studies [4] and include a) 48 values of the hourly consumption data of the two previous days, b) 24 values of previous day temperature data and c) 7 binary values corresponding to the day of the week. The network output consists of a 24-variable vector containing the forecasted next day's hourly load values. The module's structure is schematically depicted in Fig. 1. The network was trained using the backpropagation algorithm that uses the square error as the loss function. The training algorithm that gave the best approximations was limited-memory Broyden-Fletcher-Goldfarb-Shanno (l-BFGS). Regarding the PV forecasting module, various methods were tested and Support Vector Regression (SVR) was selected as it produces the best estimations. As in many other studies [8,[10][11][12], this method is used to correlate the inputs, usually irradiation and temperature, with the output, which is the power production of the PV. The PV forecasting module structure is depicted in Fig. 2. The used kernel function, which maps the data to a higher dimension in order to become linearly separable (as SVR can only perform linear separations), is the Radial Basis Function (RBF).

Fig. 2. PV forecasting using SVR
The development was carried out in Python utilizing the well-known open-source machine learning framework "scikit-learn" [13]. The feature datasets of each module were pre-processed using the min-max normalization function which scales them down to [0, 1] interval. The needed historical meteorological data, i.e. hourly time-series of temperature and irradiation, were obtained from ERA5 climate reanalysis dataset produced by the European Centre for Medium-Range Weather Forecasts [14].
The modules were trained using data of the years 2014, 2015 and 2016 and produced forecasts for the year 2017, which were evaluated against the real year's values. Normalized Root Mean Square (nRMSE) is the metric that was considered most suitable to this application with corresponding values 0.037 and 0.092 for the load and PV forecasts, respectively. The forecasts were then imported in the scheduling algorithm which plans the optimized dispatch plan as described below.

Peak Shaving Algorithm
The present section continues the development of the peak shaving optimization algorithm presented in [9,15]. The initial version of the algorithm included a clustering procedure to separate the load profiles with a clear peak during evening hours. This task was necessary in order to restrict the application of the algorithm on a specific load shape. Furthermore, an arbitrary value of the shaved area was set, that was decided after a trial-and-error procedure.
In this study, the focus is on optimizing the amount of the achieved peak shaving alongside the overall simplification of the algorithm, making it applicable on a broader spectrum of load profile shapes. Initially, the two 24-value vectors representing the next day's load and PV forecasted values are inserted as input into the algorithm. Then, the difference of the load and PV curves is calculated, which refers to the DG production in the case of no battery installation. An important variable corresponds to the amount of energy needed for the flattening of the conventional generation curve. This amount is initialized with the maximum value available for peak shaving, and if flatness is achieved with less than this amount, the procedure will be terminated. In the case where maximum utilization is desirable, a following while loop is responsible to lower the already flatten curve until the remained capacity is used. The maximum available energy parameter can be set for example as a percentage of the total solar energy for the particular day. In general, through this parameter, system operators can easily implement their own tailor-made strategy, which corresponds to their particular needs and size of their system components (batteries and PV capacities).
The main algorithm includes two while loops cascaded inside another while loop. The two cascaded loops are responsible for calculating the heights of two level lines: the offset level, referring to the charging of the battery, and the shave level indicating the discharge of the battery and consequently peak shaving.
An important perk of the present approach is the fact that the battery only stores renewable energy that is generated from the PV plant. This is accomplished by the innermost if statement of the first while loop, where the charging plan is drawn. Another approach, simpler to implement, would be to neglect the relatively small amounts of non-renewable energy that may be stored in the BESS and concentrate only in the flatness of the output. However, we chose to include the relatively complicated version as any simplifications can be easily applied. Another attribute of this algorithm is that the charging and discharging energy amounts of each day are equal (assuming perfect forecasts). The corollary of this feature implies the ability of the system operator to define the shaved amount of each day as a percentage of the battery's cycle. In this way, the batteries' ageing that occurs due to cycling can be managed and thus the batteries can be fully exploited through their lifecycle. The algorithm output is the 24-value vector of the battery hourly setpoints which can be directly imported in a dynamic simulation environment for further analysis.

Dynamic Models Development
Dynamic simulations have become an indispensable tool for energy system designers as they assist them in understanding the overall systems' behavior. In the context of the present study, the islanded MicroGrid (MG) under consideration includes a fossil-fuel based power plant with DG, a PV plant and a lithium-ion BESS. In this Section, a brief description of the developed MG model alongside with its components will be given.
PV cells are modelled using the equivalent electrical circuit, which consists of a current source connected in parallel to a diode and a resistor, and in series with another resistor [16]. The battery was also modelled with its equivalent electrical circuit as in [17], consisting of a voltage source in series with its internal impedance, represented as two series resistor and two RC networks. Although the battery model can consider both cycling and calendar ageing, these effects were neglected in the context of this study. PV and BESS were interfaced with the 3-phase AC grid through ideal average inverter models. The developed components were coupled with the open-source PowerSystems library [18] to form the MG dynamic model. The complete methodology is depicted in Fig. 3.   Fig. 3. Followed methodology for the EMS development

Results and Discussion
A set of metric indicators were employed to evaluate the proposed algorithm and are listed in Table 1. These indicators were calculated for the three cases: i) no BESS installation in the system as the reference case, ii) the previous algorithm's version [9], and iii) the current improved version. The first indicator was calculated by lowering the signal until its mean value became 0 (by subtracting the mean value) and calculating the standard deviation of the points. The second indicator is the fraction of the curve's length to the length of the time axes. The minimum value of this indicator is 1 and is achieved when the curve becomes a straight horizontal line. Modelica simulations confirmed that such methodology is beneficial even when there are significant inaccuracies in the forecasting estimations, occurring due to insufficient data amounts. Fig. 4 presents the resulted DG operation for the three aforementioned cases. The improvement in the overall DG operation can be noticed by the change of colors in the peaks of the yearly curve. Furthermore, in the zoomed area corresponding to a week duration, the diminishing of the ramp-ups that occur right before the night hours can be recognized. From the above results, it is evident that the proposed methodology considerably improves the system's behavior.

Conclusions
We are currently experiencing a major challenge of islanded energy systems towards high RES penetration combined with smart grid solutions. In this regard, EMSs are constantly gaining attention due to the need for optimal utilization of clean energy production. This study proposes an improved EMS methodology consisting of DG, PV fields and BESS that smoothens the operation of DG permitting higher renewable penetration. These improvements will contribute to the development of a fully autonomous EMS controller for islanded systems, which maximizes the RES share.