1. Introduction
Air pollution, greenhouse gases (GHG), and the resulting effect on climate change have been major concerns for the world for several decades [
1]. One of the largest contributing sectors is the transport sector, as a result of its dependency on fossil fuels and subsequent emissions of GHG. Thus, one way to reduce the transport sector’s emissions is to transform the transport sector through electrification. This can be accomplished by replacing the internal combustion engine vehicles with electric ones [
2]. This has been identified as one of the solutions that will contribute to counteracting the dependency on future fossil fuel resources [
3]. There are also several additional benefits of rapid EV adoption, such as less local air pollution and reduced oil dependency [
4,
5].
However, there are various obstacles for a larger share of EVs to be feasible in today’s society. One is the lack of charging station (CS) infrastructure, and as the number of EVs are rapidly growing so is the demand for more accessible CSs [
6]. However, where should these be located for optimal accessibility? In a recent review, three CS locations were listed based on how they impact the likelihood of buying an EV and which locations were most frequently used [
7]. Based on previous research [
8,
9,
10], this review indicated that the home location was the most impactful and thus the most frequently used by EV owners. The review further declared the workplace as the second most impactful location for CSs when trying to persuade consumers to purchase EVs [
11,
12,
13]. The workplace was also the second most used type of charging infrastructure. Apart from these, public charging infrastructure was also mentioned to be influential in order to increase the number of purchased EVs [
14,
15,
16,
17,
18]. For example, parking garages are a popular location for public charging amongst EV users [
16].
Despite this impact and the need for CS infrastructure, several papers indicate that the expansion of the CS infrastructure is not rapid enough to keep up with EV adoption [
2,
19,
20,
21]. Additionally, it seems to be uncertain as to how many locations and CSs in relation to the number of EVs are needed to meet the charging demand [
7]. The causality if EVs or CSs come first is not entirely clear. In contrast, it has been suggested that expanding the public CSs infrastructure would bolster the adoption rate, especially in urban areas [
22]. The expansion of CSs has also been shown to reduce range anxiety, which is another obstacle for EV adaptation, referring to EV owners’ fear that the battery’s capacity is not enough to reach the desired destination [
23,
24]. An increased expansion of CSs could encourage consumers to purchase EVs and thereby support the transformation of the transport sector [
6]. Thus, it is important that policymakers, companies, and local authorities aim to be one step ahead in the development of CS infrastructure.
A hindering factor to the adoption of EVs (or vehicle fleets) is the accessibility to sufficient local grid power. The CSs often contribute to high peak power on the grid which, if they are not controlled or restricted in any way, present a challenge for cities where the electric power transmission network has limited capacity and/or experience periods of congestion [
25]. The power peaks caused by EV charging can be mitigated using a local energy storage with peak shaving capabilities to support the EV charging during peak hours. Another option would be to implement a flexible EV charging algorithm or schedule which could alter the charging power and when the EVs are charged throughout the day. Previous research has presented multiple scheduling and control algorithms for the charging of EVs with the goal of supporting the local distribution/transmission network. One way presented by previous research is to include renewable energy (RE) production such as photovoltaic (PV) or wind energy with a complementing energy storage to support EV charging [
26,
27]. Other research instead focuses on intelligent scheduling and control algorithms that control EV charging with the goal of supporting the electrical grid. Many of these papers include Vehicle-to-grid (V2G) technology, i.e., the possibility to discharge the EVs battery for peak shaving or for ancillary services [
28,
29,
30]. Some papers also present scheduling and control algorithms for an entire parking facility such as a parking garage and even coordinating multiple EV charging facilities [
31,
32]. To conclude, there are many different approaches to address the issue of EV charging and power shortage. However, due to the complexity of the real world and the specific condition of a system, there is a need to test these approaches with experimental data from a defined case.
Along with other larger urban cities in Sweden, Uppsala is currently experiencing grid capacity limitations which was concluded by Svenska Kraftnät, the authority responsible for ensuring Sweden’s transmission system for electricity [
33]. Such a capacity limitation increases power subscription costs and limits the expansion of a city’s infrastructure and business.
Uppsala municipality and Uppsala University have collaborated to build a mobility house that is both a commercial parking facility but at the same time a research laboratory. The parking house, called Dansmästaren, aims at answering a number of questions such as how charging infrastructure can be developed to boost EV expansion while simultaneously alleviating, or at least decreasing, the grid capacity congestion.
The mobility house is the first of its kind and consists of three parts: a parking garage, a grocery store, and 133 student apartments. The name “mobility house” refers to the facility’s purpose to offer flexible mobility services and solutions to residents and visitors. Currently, the electricity assigned for EV charging at the parking garage is primarily used for charging passenger cars (1.4–22 kW) owned by residents of the building or visitors. In the current case of Dansmästaren, the main mobility service is providing accessible EV charging possibilities that primarily use PV energy.
By providing EV charging possibilities, the aim of Dansmästaren is to assist in the electrification of Uppsala’s vehicle fleet. The parking garage in the mobility house features the three aforementioned types of EV charging (home, work, and public charging) and is equipped with a battery energy storage system (BESS), a PV system, and an energy management system (EMS). The purpose of this paper is to investigate a battery storage control method, tailored to the case study of the technical infrastructure at Dansmästaren, that will alleviate the EV charging load’s contribution to the facility’s load demand peaks and serve as part of an EMS strategy for EV infrastructure in cities.
The contributions of this paper can be summarized as follows:
A rule-based peak shaving algorithm presented in previous research is tested and evaluated using experimental load demand and EV data from the mobility house Dansmästaren.
A two-layer neural network is constructed using historical experimental load demand, EV, and weather data from the mobility house Dansmästaren and is combined with a rule-based peak shaving algorithm.
Three day-ahead predictions are presented for the days with the best and worst performances of the prediction model as well as the day with the highest load demand peak. In addition to this, the corresponding rule-based peak shaving operation for the three days based on the prediction is presented and evaluated.
Finally, this study shows that a perfect prediction model is not required for the rule-based peak shaving algorithm to effectively reduce the load demand peaks in a parking facility such as Dansmästaren.
2. System Description
The energy system at Dansmästaren is divided into four subsystems, EMS (A), CSs (B), BESS (C), and PV (D), as shown in
Figure 1. A more detailed description of the system can be seen in
Table 1.
The load demand (
) at Dansmästaren consists of two components (Equation (1)): the EV charging (
) and the peripheral load (
). The peripheral load includes loads such as light, elevators, and ventilation. At the moment, EV charging in parking garages cannot be controlled and therefore can be regarded as an uncontrollable load. The highest peak during 2021 ranged between 80 and 110 kW and occurs in the afternoon at 18:00–20:00.
The load demand is covered by several sources (
Ps): the grid (
Pgrid), the PV farm (
Ppv), and the local BESS (
Pb), as can be seen in Equation (2).
The load demand should always be equal to the sources, as shown by Equation (3).
2.1. Subsystem A—Energy Management System (EMS)
In order to gather data and control the subsystems (B-D), an EMS was built using a Windows-based Beckhoff C6030 Ultra-Compact Industrial PC with the associated programming language TwinCAT 3 Structured Text. The system uses a combination of Modbus TCP/IP and Modbus RTU to gather measurement data from the subsystem’s devices and sensors at the parking garage.
2.2. Subsystem B—Charging Station (CS)
The 30 CSs at the parking garage are of the brand Charge Amps AURA and each CS has two 22 kW charging points, i.e., 2 × 22 kW. The CS is capable of load balancing and is also prepared for the international communication standard ISO 15118 used for the bidirectional charging (V2G) of EVs. The CSs are also capable of limiting the output power to between 0 and 22 kW via the charging station manufacturer’s internet portal service and a REST API.
2.3. Subsystem C—Battery Energy Storage System (BESS)
The BESS of 137 kWh can charge or discharge at a maximum power of 60 kW; e.g., it has a C-rating of 0.44. The BESS is capable of performing peak shaving operations using three static limits: An upper limit
, a lower limit
, and a rate limit for the maximum charge and discharge from the BESS. The BESS continually measures the transferred power to and from the local distribution grid with an external network analyzer to determine how to utilize peak shaving. If the parking garage’s power consumption exceeds the upper limit, the BESS tries to compensate by discharging the battery with the goal of keeping the power consumption at the upper limit for as long as possible. In the same manner, if the power consumption of the parking garage drops below the lower limit, the BESS charges its batteries whilst keeping the power consumption at the lower limit. The BESS’s peak shaving operation is described in
Table 2. The rate limit determines the allowed charge and discharge power in the BESS.
2.4. Subsystem D—Photovoltaic (PV) Farm
The 160 PV panels at Dansmästaren have a total output power of 62 kW with two 25 kW power inverters. There are two different types of PV panels: 80 monofacial and 80 bifacial. The 80 monofacial panels have a maximum output power of 385 W, each with an efficiency of 19.95%. The remaining 80 are bifacial, meaning they can absorb solar irradiation from both sides of the panel module. The bifacial panels have a maximum output power of 390 W and an efficiency of 19.5%. In order to easily compare the different types of PV panels, they are connected to their own power inverter and an energy meter sensor device.
3. Method
In this paper, a rule-based peak shaving control was simulated using predicted load demand and measured PV data from the parking garage at the mobility house Dansmästaren. The mobility house’s load demand profile consists of two elements: the EV charging and the peripheral load, as described in Equation (1). The rule-based peak shaving control in this paper was originally published by [
34] and uses a dynamic demand limit and a PV feed-in limit for a grid-connected PV system including a battery subsystem. The method provides a day-ahead charge and discharge schedule for a given day and therefore requires a day-ahead forecast of the load demand and the PV power pattern. Because of this, a simple 2-layer feedforward neural network was created to obtain the load demand profile forecast of Dansmästaren.
The method of this paper can be divided into 4 sections:
- (i)
Modeling background;
- (ii)
Neural network and data for prediction of load demand;
- (iii)
PV day-ahead predicition;
- (iv)
Rule-based peak shaving control.
3.1. Modeling Background
Peak shaving is a well-known method to alter the load demand with the goal of alleviating residential buildings, industries, and grids [
35]. Peak shaving can be carried out by charging, e.g., a local BESS during off-peak hours and discharging it during peak hours, resulting in a flatter load demand curve. A flatter load demand curve in this manner results in a reduction in the facility’s power subscription costs since the electricity is more expensive during peak hours [
36]. Thus, peak shaving is a suitable option to flatten the load demand curve at Dansmästaren. However, before implementing a peak shaving schedule or plan that can be deployed in practice on-site, a day-ahead forecast of the future load demand and PV production is required [
37].
Using simple feedforward neural networks is a fairly common way of obtaining a day-ahead (24 h) prediction of a facility’s or system’s load demand profile [
38]. A previous study describes a feedforward single layer with 20 hidden units’ neural network based on the Kolmogorov theorem with a linear regression index of R = 0.99189 when forecasting a load containing diesel generators, a PV setup, and a BESS [
39]. The neural network created in this paper was heavily inspired by the work conducted by a research group from the Centre for Research & Technology Hellas and the National Technical University of Athens [
39]. After a satisfactory implementation of the forecasting model, peak shaving algorithm was chosen.
The rule-based peak shaving control published by the research group from Vasavi College of Engineering, Hyderabad India, was chosen to be evaluated via simulation using data from Dansmästaren due to their simplicity and robustness, and also due to the similarities in the presented energy system and Dansmästarens energy system [
34]. The major difference is the scale and rating of the different subsystems; for example, the BESS in the paper has a total capacity of 12 kWh and the PV system a maximum power output of 1.6 kW and the BESS at Dansmästaren has a capacity of 137 kWh and PV power output of 62 kW. Another difference is that the load at Dansmästaren primarily consists of EV charging sessions. However, these differences do not affect the performance of the rule-based peak shaving control, which was chosen to be used in the simulation of Dansmästaren.
The model presented by [
34] included a method for determining the charge and discharge schedule for the battery system using 3 battery operation modes and 8 rules. The modes and rules are described as follows:
Discharging mode: When the load demand is larger than the determined peak shaving limit and the produced PV power is not sufficient. The battery is discharged for the amount that the PV source cannot provide and is determined by rule 1.
Charging mode 1: When the load demand is less than the determined peak shaving limit. The mixture of power from the grid or the PV system for the load and the BESS is determined by rules 2–5.
Charging mode 2: When the load demand is less than the determined peak shaving limit and the PV system can meet the demand, the power usage is determined by rules 6–8.
The operating modes of the battery and the associated 8 rules as well as the process of obtaining the necessary control parameters are explained in further detail in the paper [
34]. The rule-based peak shaving control uses several constraints, one of which is that the battery’s state-of-charge at the end of the day (
) should be equal to its state-of-charge at the start of the day (
), i.e.,
, and
which is described to be desired for flexible day-to-day management.
3.2. Neural Network and Data for Prediction of Load Demand
As previously stated, in order to implement the rule-based control presented by [
34], a day-head prediction of the load demand and PV production is needed. Therefore, a forecasting model was implemented to predict the load demand by creating a simple two-hidden-layer feedforward neural network containing 8 hidden units in each layer based on the method presented by [
39]. The neural network was created by the first author using MATLAB. The number of hidden layers and units in each layer was determined using a trial-and-error approach with the goal of finding a set of layers and units that yielded the lowest Root mean square error (
RMSE) for testing data.
A diagram overview of the created neural network is shown in
Figure 2 and the input variables are explained in
Table 3.
The parking garage’s load demand, PV production, EV charging, and ambient temperature from 2021 were used to train the network. The parking garage’s load demand (
) was calculated using grid demand (
) data collected from the grid owner Vattenfall’s customer portal and the PV data (
), as shown in Equation (4).
Hourly discrete time steps were used due to the grid demand and the sold PV data having an hourly time resolution of kWh/h The energy data from the parking garage’s PV system (
was collected from Sunny Portal cloud service and had the time resolution kWh/15 min, i.e., 4 measurements per hour. An average of the 4 measurements each hour was calculated using Equation (5), thereby converting the data to kWh/h.
The data from the EV charging (
) were provided by the manufacturer of the charging stations used at Dansmästaren with a resolution of 2 measurements per minute, i.e., 120 measurements per hour. The data contained measurements including three-phase voltage and current as well as time stamps from when each measurement was performed. Using the voltage and current measurements, the power for EV charging was calculated and then converted to kWh/h using equation Equation (6).
Temperature data were collected from the Swedish Meteorological and Hydrological Institute (SMHI) and had a time resolution of one measurement per hour. However, there were several missing temperature measurements in the data set. To adjust for this, linear interpolation was used to create a complete data set. The temperature data were included in addition to the previous load, day, and date, due to it being the weather parameter most commonly used as an input variable in neural networks [
40,
41]. Previous research has shown a stronger correlation between the temperature and the load compared to the load and other weather parameters such as air humidity and wind speed [
42].
The neural network was trained on the collected data (
Table 3) from 2021 and the input data were structured as shown in Equation (7). The input data were also normalized between 0 and 1.
The data set of 365 days of 2021 was reduced to a set of 363 data points, by excluding two data points (1st and 2nd of January) since two previous days are needed for the prediction model and data from 2020 was not available. The data set of 363 days from 2021 was divided into training and validation data by randomly extracting one day from each week resulting in a data set with 52 days and labeling it as validation data. The other 311 in the data set were labeled as training data. Both data sets were randomized before creating and training the neural network. This resulted in two new data sets,
and
, as can be seen in
Table 4. The input variables
and
indicate which weekday (1–7) or day of the month (1–31) it is without taking into account for holidays and non-working days.
Once trained and validated, the neural network was tested using the testing data
from January–April 2022. The testing data were constructed in the same manner as the training and validation data, as shown in
Table 3. The neural network’s performance was evaluated using
RMSE (Equation (8)).
N = 24 represents the data points in a day.
3.3. PV Day-Ahead Prediciton
As mentioned in the introduction, rule-based control requires a day-ahead prediction of the load demand and of the PV production. However, in this paper, only a model to forecast the load demand profile was implemented since also forecasting a PV production profile was deemed outside the scope of this paper/project. Therefore, the historical PV data collected from the mobility house were used instead of predicted PV data when training and testing the neural network.
3.4. Rule-Based Peak Shaving Control
The predicted load demand profile (
) and
PV production (
) were then used in the rule-based peak shaving control presented by [
34], with the objective of determining the necessary amount of dischargeable energy from the BESS (
that would yield the lowest power peak in a given day. The control parameter
informs the peak shaving control of how much energy is available to be discharged from the battery.
is not allowed to be larger than the BESS’s maximum capacity (
or less than 0, i.e., Equation (9). The rule-based peak shaving model has four inputs: a 24 × 1 vector of the predicted load demand, a 24 × 1 vector of the predicted PV production, the allowed amount of energy that can be discharged from the battery, and the maximum battery capacity, as can be seen in
Figure 3.
The rule-based peak shaving model has three outputs: the resulting load demand (), the used peak shaving limit , and the used limit for PV feed-in limit (). is used to limit the hourly PV energy used to charge the BESS if there is excess PV energy. The PV energy is only used to charge the BESS when , and in this case for the amount of .
The input variables based on the mobility house’s technical system are shown in
Table 5. The lower and upper SOCs of the BESS were chosen to be 20% and 90%, respectively. Therefore, the depth of discharge (DOD) was 70% (95.9 kWh), as this is suggested as an acceptable range to reduce battery degradation and maximize the battery’s lifetime. The BESS at Dansmästaren has two peak shaving limits,
and
, as described in
Section 2.3, but due to the rule-based peak shaving model only using one limit these two limits were treated as one and the same,
.
As described in
Section 2.3, the battery capacity at Dansmästaren is 137 kWh, meaning that
. As presented in the paper by [
34], a genetic algorithm solver in MATLAB was used to determine the control variable
that would yield a
to lower the highest power peak
in a given day, e.g., minimizing the objective function (Equation (11)).
The genetic algorithm had a population size of 20, a maximum generation of 50, and had to satisfy the constraints in
Table 6.
for the forecasted data was obtained with the genetic algorithm that satisfied the constraints and yielded the lowest possible for a given day using the forecasted data.
5. Discussion
In this paper, a neural network structure was created in MATLAB using collected data from 2021 from the mobility house Dansmästaren in Uppsala, Sweden. The created neural network was then tested using the testing data set from January–April 2022. The neural networks’ regression index on the testing data set was R = 0.61. Thereafter, each predicted day was evaluated based on RMSE. Three days were evaluated and used for peak shaving operation: the day with the best prediction in terms of RMSE, the day with the worst prediction in terms of RMSE, and the day with the highest load demand peak. These days were chosen to show the system’s capability during worst-case scenarios, either when the prediction model does not work in a satisfying manner or when there were high peak load demand peaks. These three predicted days were then used in the rule-based peak shaving control to find the control parameter , which in turn was used to determine the peak shaving scheme for the real day, e.g., using actual data gathered from the mobility house Dansmästaren.
The neural network was trained on data from 2021 and tested on data from January- April 2022 and the network had a linear regression index of 0.61. The resulting day-ahead predictions of the neural network were satisfactory and the best predicted day had an
RMSE of 5.25 and the worst predicted day had an
RMSE of 26.27. The reason for the relativity low linear regression index was due to the training data set only containing data from 2021. In the future, more data will be available for training the network, and the performance of the neural network will improve. However, the forecasted data were close enough to the real data to yield a satisfying
, which in turn yielded a day-ahead peak shaving strategy that satisfies the constraint
in 96 out of the 120 days in January–April 2022 and would never discharge the battery below 20% of the max SOC. On the day with the highest
RMSE (day 2), the constraint
was satisfied (
), as can be seen in
Figure 9. However, the BESS is not utilized fully since the highest SOC was 82.87 % and only PV was used to charge the BESS. This occurs due to differences between the prediction and the actual load demand curve (
Figure 6), resulting in a lower
that what was necessary, as can be seen in
Table 10. In turn, this results in a slightly too high
(76.48 kW instead of 70.34 kW) and therefore the rule-based peak shaving control misinterprets the load demand and selects incorrect rules for charging and discharging the BESS. Day 3 is a good example of why a better prediction model is required for an optimal peak shaving operation at Dansmästaren.
To evaluate if the predictions were good enough, the real data from the three days was used, i.e., assuming perfect prediction results , as input to the rule-based peak shaving control resulting in the parameters and . The subscript pp refers to the use of perfect prediction.
Thereafter, the control parameters (
and
) using the real data were compared with the control parameters (
and
) using the predicted data.
Table 10 shows this comparison and, as can be seen, the final
in the two cases of either using the predictive model or a perfect prediction model is quite similar on days 1 and 2. On the day with the highest load demand (day 3), there is a relatively big difference between
and
as well as
and
which impacts the performance of the peak shaving control. However, this results in a less active/restrictive peak shaving operation due to
being higher than
. This indicated that the prediction model does not have to be perfect for the rule-based peak shaving control to still function in a satisfactory manner.
6. Conclusions
In this paper, a simple two-layered feedforward neural network used for load prediction and a rule-based peak shaving control algorithm was used to investigate the impact of peak shaving operation at the parking garage Dansmästaren in Uppsala, Sweden. In the three studied days, the model was capable of lowering the load demand peak by 25.4–38.5% while satisfying the constraint of a minimum SOC of 50% at the end of the day.
To further improve the performance, more data from the parking garage are required. However, the presented neural network provides rule-based peak shaving control with adequate day-ahead prediction to yield a satisfying peak shaving operation. This shows that the predictive model of such a system does not have to be perfect to yield a satisfying peak shaving result.
To continue electric vehicle (EV) adoption and charging station infrastructure expansion—without contributing to the capacity shortage—it is important to further investigate EV charging operations and how to support the EV charging. A future step would be to incorporate the smart charging of the EVs in the peak shaving operation. Additionally, another future step would be to add a predictive model for the solar farm. Finally, the presented model will be implemented on-site at Dansmästaren using the local energy management system.