*2.2. Batteries*

The electric vehicle batteries using the parking lot for charging were assumed to be representative of the current Dutch EV fleet, including BEVs and Plug-in Hybrid Electric Vehicles (PHEVs). The battery energy capacities considered therefore range from the 8.8 kWh Audi A3 PHEV to the 100 kWh Tesla Model X BEV. The solar parking lot also included a stationary Li-ion based battery storage system, for storing excess energy to further reduce the peak demand. The battery had a rated power of 50 kW and a capacity of 50 kWh, of which 80% was usable. The total number of batteries, *Nb*, is at all times less than 41, since the maximum occupancy of the parking lot is 40 EVs and there is always the stationary battery.

The charging efficiency, *ηchg*, and discharging efficiency, *ηdis*, in the battery, were each assumed to be 95%, leading to overall roundtrip losses of 9.75%. Coulomb counting was used to infer the state of charge (SoC) of the battery and changes to it. The rectification stage in the vehicle was assumed to lead to losses of about 6% in charging [15].

#### *2.3. Electric Vehicle Supply Equipment*

The system includes 40 charge points, each rated at 32 A (7.4 kW) for both AC and DC. While this rating is commonly found as AC level 2 charging [16], it is a lower current capacity than commercial DC charge points. The reason for this choice was to enable the slow charging of EV batteries on the DC bus without multiple rectification-inversion stages, as is expected in the future. The losses in the EVSE, which are primarily resistive in nature, were assumed to be around 0.2% [15].

#### *2.4. Electric Vehicle Load Profile*

The electric vehicle load profile was built based on two submodels—first, the EV arrival and departure model and the second, the estimation of the state of charge at the point of entry. In addition, the load is also determined by the extent to which the battery is to be charged by the time of departure. In this work, it is assumed that the EV drivers wish for their EVs to be charged to 100% SoC whenever possible.

#### 2.4.1. EV Arrival and Departure

Direct Use of Observed Activity-Travel Schedule (DUOATS) models are a common method applied in smart charging and demand response studies [17]. Such a model was used in this work, whereby observed vehicle patterns were used to simulate EV behavior. The parking location considered was a workplace, and the model was based on data from the EV Project, a project run by the United States Department of Energy. It included data related to 8228 electric vehicles and hundreds of thousands of trips and charging events [18]. Since the data was collected from a large number of participants and geographical locations across the USA, it was assumed to be generalizable.

This historical parking data was used to determine the arrival and departure rates at both parking lots for each timestep of the day, considering weekdays and weekends separately. Based on these rates, a Monte Carlo approach was taken to determine the number of EV arrivals in each timestep. The duration of parking and the time of day were used to determine the number of departures in each timestep, after which an occupancy profile was built. A representative week of occupancy of vehicles at the workplace is shown in Figure 2. There are noticeable daily patterns of arrivals and departures during weekdays, with weekends having lower arrival rates.

**Figure 2.** Simulated occupancy at the workplace parking lot over a week.

#### 2.4.2. EV State of Charge on Arrival

Truncated normal distributions were used for assigning the SoCs on arrival. The coefficients for the normal distribution were inferred by fitting data from the EV Project [18], which collected data for over 8000 EVs in the USA. They are shown in Table 2.

**Table 2.** Coefficients describing the assignment of EV battery states of charge on arrival.


The lower mean SoC and greater standard deviation for PHEVs are explained by the lower concern of PHEV drivers about depleted batteries in comparison with BEV drivers.

Based on the time of arrival of an individual EV, the battery capacity of the EV and its SoC at the time of arrival, the expected charging demand of the EV was calculated. This demand (or as high a fraction as possible) needed to be met within the plug-in duration. The control system was informed about the time of departure at the time of arrival in all cases.

With knowledge of the available solar energy, the forecasted solar energy over the forecast horizon and the EV charging demand, the optimal charging of EVs in the parking space was to be determined in a manner that minimized the peak electricity demand in the solar parking lot. The following section describes the methods used for this scheduling.

#### **3. Methods for Charge Scheduling**

For an investigation into the effect of uncertainty of EV demand on peak loads, two reference cases and three scenarios are considered. One reference case is unscheduled charging, where EVs charge at maximum power as soon as they are plugged in. In addition, a case is simulated with perfect forecasting of solar production and EV demand, which may be considered as another reference case. The three scenarios investigated lie between these two extreme cases:


In all these three scenarios, the schedule was designed to be robust across a range of possible solar forecasts. These scenarios thus differ only in their approach to EV demand forecasting. The objective function for peak reduction under perfectly accurate forecasts is described in Section 3.1. The introduction of uncertainty in the forecasts is described in Section 3.2, after which each of the three scenarios and its optimization formulations are described. The commercial solver, Gurobi, was used with MATLAB in each case on a Windows PC with an Intel i5 1600 MHz quad-core processor and 32GB RAM.

#### *3.1. Problem Formulation with Perfect Forecasting*

In the scenario with perfect forecasting, the future solar production, as well as future electric vehicle demand over the 24 h horizon in the future, are assumed to be accurately known in advance. This is not a practically feasible scenario since neither of these can be accurately known in advance. However, this scenario clearly defines the best possible performance of the scheduling approach, with reference to which other scenarios may be compared. In addition, it also provides an idea of the performance of the scheduling algorithm independent of the degree of accuracy of the forecast.

To optimize the scheduling of EVs within the carport, we apply Model Predictive Control (MPC). MPC is a control technique used for determining the optimal behavior of complex multivariate problems. The control action is determined at each time step by solving an open-loop optimal control problem over a finite time horizon. MPC is used to solve problems during the operation of the system, taking the state of the system into account at each time step. These characteristics make MPC suitable for the control of EV charge scheduling at the solar parking lot.

The goal of the scheduling of EV charging is to reduce the peak demand of the solar parking lot over the time horizon under consideration. Thus, the objective function is:

$$\text{minimize} \quad \max \left( E\_{\text{grid}}(k), \dots, E\_{\text{grid}}(k + N\_{\text{p}} - 1) \right), \tag{1}$$

where *Egrid*(*k*) is the net energy exchange between the parking lot and the grid at time *k* and *Np* is the time horizon, which is 24 h. A sensitivity analysis on the duration of the horizon revealed that longer forecasts had no increased benefits to the simulation. Further, with reducing the accuracy of the length of the simulation, the reliability of longer horizon forecasts is lower upon the introduction of forecasting uncertainty. An auxiliary variable, *Emax grid* (*t*) is introduced, which represents the local maxima or peak in grid exchange of the parking lot with *Nb* batteries and lighting load, *Eload* over the considered horizon, *Np*.

The objective function is thus rewritten as:

$$\underset{E^{\max}\_{\text{grid}}, E, \delta, z}{\text{minimize}} \quad E^{\max}\_{\text{grid}} \tag{2}$$

with the decision variables

$$E\_{\text{grid}}^{\text{max}}, E\_i(t), \delta\_i(t), z\_i(t) \quad \text{for } i \in \{1, \dots, N\_b\}, \quad t \in \{k, \dots, k + N\_p - 1\}, \tag{3}$$

subject to a number of constraints, described below.

At any given time, *t*, the energy exchanged with the grid, *Egrid*(*t*), depends on the PV production, *EPV*(*t*), the lighting load, *Eload*(*t*), and summed load of each battery, *<sup>E</sup>*(*t*). It is ensured that the energy exchange peak, which is subject to minimization, is the highest peak within the considered horizon both in purchase as

$$E\_{grid}^{\text{max}} \ge E\_{load}(t) - E\_{PV}(t) + \sum\_{i=1}^{N\_b} E\_i(t) \,\,\forall \, t\_\prime \tag{4}$$

as well as in feed in as

$$E\_{grid}^{\min} \le E\_{load}(t) - E\_{PV}(t) + \sum\_{i=1}^{N\_b} E\_i(t) \,\,\forall \, t. \tag{5}$$

The stored energy in the *ith* battery in the (*k* + 1)*th* timestep, the state variable, *Si*(*k* + <sup>1</sup>), is described as

$$S\_i(k+1) = \begin{cases} S\_i(k) + \eta\_{c\lg, i} \cdot E\_i(k), & E\_i(k) > 0 \\ S\_i(k) + \frac{1}{\eta\_{dis, i}} E\_i(k), & E\_i(k) \le 0 \end{cases} \tag{6}$$

In order to formulate the battery behavior linearly, the Mixed Logical Dynamics (MLD) formalism is used [19]. A binary decision variable *<sup>δ</sup>i*(*t*) is introduced, defined as:

> [*<sup>δ</sup>i*(*t*) = 0] ↔ [*Ei*(*t*) > 0] (EV or battery is charging) (7)

$$\left[\delta\_{i}(t) = 1\right] \leftrightarrow \left[E\_{i}(t) \le 0\right] \text{(battery is discharged)},\tag{8}$$

and leads to the constraint:

$$
\delta\_i(t) \in \{0, 1\} \; \forall \; i, \; t. \tag{9}
$$

This binary decision variable, *<sup>δ</sup>i*(*t*), is then used to reformulate Equation (6) as

$$S\_{i}(k+1) = S\_{i}(k) + \eta\_{\text{clg},i} \cdot E\_{i}(k) \cdot (1 - \delta\_{i}(k)) + \frac{1}{\eta\_{\text{dis},i}} E\_{i}(k) \cdot \delta\_{i}(k). \tag{10}$$

However, this formulation is still nonlinear because it contains the product of two decision variables, *Ei*(*k*) and *<sup>δ</sup>i*(*k*). An additional set of continuous decision variables is introduced as

$$z\_i(t) = \delta\_i(t) \cdot E\_i(t). \tag{11}$$

The minimum energy, which can be stored in the *<sup>i</sup>th*, battery in the (*t* + 1)*th* timestep, is limited by the lowest possible energy which can be delivered to it with the objective of maximimizing the SoC at departure. This is formulated as

$$S\_i^{\min}(t+1) \le S\_i(t) + \eta\_{\text{clg},i} E\_i(t) + \left(\frac{1}{\eta\_{\text{dis},i}} - \eta\_{\text{clg},i}\right) z\_i(t) \,\,\forall \, i,\tag{12}$$

The maximum energy which can be stored in the *i*-th, battery in the (*t* + 1)-th timestep is limited by the physical constraints on the battery capacity and the power rating of the chargepoints. It is formulated as 

$$S\_i^{\max}(t+1) \ge S\_i(t) + \eta\_{\text{chg},i} E\_i(t) + \left(\frac{1}{\eta\_{\text{dis},i}} - \eta\_{\text{chg},i}\right) z\_i(t) \,\,\forall \, i,\tag{13}$$

The constraints on the energy exchanged with the *ith* battery in each time step is given as

$$E\_i(t) \le M\_i \cdot (1 - \delta\_i(t))\tag{14}$$

$$E\_i(t) \ge \varepsilon + (m\_i - \varepsilon) \cdot \delta\_i(t) \tag{15}$$

where *Mi* is the maximum allowable value of *Ei*(*t*) and *mi* is the minimum allowable value. An overestimate of *Mi* or an underestimate of *mi* is acceptable, but values close to the true maximum and minimum are preferred to lower computational time. These values are taken as

$$M\_{\bar{l}} = P\_{\bar{l}}^{\text{max}} \cdot \Delta t \tag{16}$$

$$m\_i = -P\_i^{\max} \cdot \Delta t\_\prime \tag{17}$$

where *Pmax i* and *Pmin i* are the power limits of the *ith* battery and Δ*t* is the length of the time step i.e., 15 min. The tolerance, *ε* is a small value, typically the machine precision of the solver.

The following constraints then limit the auxiliary MLD variables *<sup>δ</sup>i*(*t*) and *zi*(*t*) to ensure they will be equivalent to their stated definitions [20]

$$z\_i(t) \le M\_i \cdot \delta\_i(t) \tag{18}$$

$$\forall z\_i(t) \ge m\_i \cdot \delta\_i(t) \tag{19}$$

$$z\_i(t) \le E\_i(t) + M\_i \cdot (1 - \delta\_i(t)) \tag{20}$$

$$z\_i(t) \ge E\_i(t) + m\_i \cdot (1 - \delta\_i(t))\tag{21}$$

#### *3.2. Inclusion of Uncertainty in Forecasting*

Since historic data of the PV yield and modeled data for the EV demand were used, the values of the future PV yield and EV demand were known. In order to simulate an inaccurate forecast, errors were introduced to the known PV production and the EV demand over the relevant horizon.

#### 3.2.1. Uncertainty in PV Forecasting

*EPV*(*t*) is known to be the PV production over the relevant horizon at the timestep, *t*. The forecasted value of PV production is the sum of *EPV*(*t*) and an additional solar forecasting error term, *<sup>ω</sup>PV*(*t*), as

$$E\_{fest}(t) = E\_{PV}(t) + \omega\_{PV}(t). \tag{22}$$

Monte Carlo methods are used in this case to generate a finite but large number of error vectors, <sup>Ω</sup><sup>∗</sup>*PV*, which are then considered.

$$
\Omega\_{PV}^\* = \{\omega\_{PV}^{(1)}, \dots, \omega\_{PV}^{(N\_\ell)}\} \subseteq \Omega\_{PV\_\ell} \tag{23}
$$

where *Ne* is the number of error vectors considered. If *Ne* is large enough, <sup>Ω</sup><sup>∗</sup>*PV* may be considered to be a reasonably good approximation of Ω*PV*, the set of all possible error vectors. 10,000 is chosen for *Ne* in this case. Though forecasting error is normally distributed, for robust optimization, a bounded distribution is required. The distribution is therefore truncated such that

$$-3\sigma\_{PV}(t) \le \omega\_{PV}^j \le 3\sigma\_{PV}(t),\tag{24}$$

for all *t* in *k*,..., *k* + *NP* − 1 and *j* in 1, . . . , *Ne*. The upper and lower bounds are determined by *<sup>σ</sup>PV*(t) the standard deviation of the forecasting error at time, *t*. The forecasting error is also truncated so that the forecasted power generation cannot be less than zero or greater than the clear sky generation. The choice of three standard deviations as a limit, rather than more conservative values of five or seven, is justified based on simulation results.

#### 3.2.2. Uncertainty in EV Forecasting

Two approaches were considered here—the average approach and the Monte Carlo approach, as used in the PV uncertainty introduction. In the average approach, the terms *S*min *i* and *S*max *i* , defined in Equations (12) and (13) are taken to be their average values based on data collected from EVs in the parking lot at the timestep, *t*. Thus, uncertainty in a number of variables like arrival time and numbers, departure times, the energy capacity of the vehicle, the SoC of the vehicle on arrival are all clustered together to be dealt with through the optimization formulation. The nature of the formulation implies a single forecast is available in each timestep, which is based upon average values in the past, thus satisfying the aim of this method of introduction of uncertainty.

In the second approach, error terms are introduced through Monte Carlo simulation, as with the errors in PV generation forecasts. However, as in the average case, the errors are introduced in the terms *S*min *i* and *S*max *i* , influencing the state constraints rather than the state variables. This formulation thus considers a range of possible forecasts, treated as equally probable, over which the problem needs to be solved.

#### *3.3. No EV Demand Forecast*

No EV forecasting is the simplest strategy where the charging of EVs plugged-in at the parking lot at the current time step are optimized over the period they are expected to be plugged in. The arrival of additional EVs in the near future and their demands are not considered—a drawback of the approach.

The schedule is designed to deal with uncertainty in the PV forecast. It does this by considering a range of possible PV forecasts, over all of which it reduces peaks. In other words, it operates robustly over a range of PV uncertainties.

To ensure robustness, we use min max optimization, which minimizes the cost function over the decision variables for the worst case i.e., highest peak load. In this case, the objective function is

$$\underset{E^{\text{max}}\_{\text{grid}'}, E\_i(t), \delta\_i(t), z\_i(t)}{\text{minimize}} \quad \underset{\omega \in \Omega\_{PV}(t)}{\text{maximize}} \quad E^{\text{max}}\_{\text{grid}'} \tag{25}$$

where *ω* is a vector representing a random possible value for the forecasting errors at each time step *t*, and <sup>Ω</sup>*PV*(*t*) is the bounded set of all possible forecasting errors. The errors at each time step are therefore drawn randomly from the uniform distribution given by

$$
\omega\_{PV}^{\bar{j}}(t) \in \mathcal{U} \left( -\mathfrak{A}\sigma\_{PV}(t), \mathfrak{A}\sigma\_{PV}(t) \right). \tag{26}
$$

A new auxiliary variable, *T*, is now defined as the maximum value for the objective function under all the forecasting errors considered. Because the objective function is not directly dependant on the forecasting uncertainty, *T* can simply be defined as being equal to the original objective function. If *J* is the maximum peak in each case of forecasting error considered, and *u*˜ the decision variables, *T* is given by

$$T = \max\_{\mathcal{A}} (f(\omega\_{PV}^{(1)}), \dots, f(\omega\_{PV}^{(N\_t)}) \ \ = \mathbb{E}\_{\text{grid}}^{\text{max}} \tag{27}$$

where *Emax grid*is independent of the uncertainty variables.

The objective function is redefined as

$$\underset{T, E\_{grid}^{\max}, E, \delta, z}{\text{minimize}} \quad T\_{\prime} \tag{28}$$

with the decision variables:

$$T.E\_i(t), \,\delta\_i(t), \,z\_i(t) \qquad \text{for } i \in \{1, \dots, N\_b\}, \quad t \in \{k, \dots, k+N\_p-1\}. \tag{29}$$

The constraints in Equations (4) and (5) are changed to include the solar forecasting error as

$$E\_{grid}^{\text{max}} \ge E\_{load}(t) - E\_{fcst}(t) + \omega\_{PV}^{\text{max}}(t) + \sum\_{i=1}^{N\_b} E\_i(t) \tag{30}$$

$$E\_{grid}^{\min} \le E\_{load}(t) - E\_{fct}(t) + \omega\_{PV}^{\min}(t) + \sum\_{i=1}^{N\_b} E\_i(t) \tag{31} \tag{31}$$

The optimization problem is then solved to be robust across the errors in PV forecast, *<sup>ω</sup>PV*(*t*), which lie within the bounded range of uncertainty <sup>Ω</sup>*PV*(*t*). As proven in [20], a constraint cannot be active at some intermediate value of the disturbance without violating the constraint at the extreme value. In this model, the greater-than constraint will be active only at the maximum value of the disturbance and a less-than constraint will be active only at the minimum. Hence, only the minimum value, *ωmin PV* (*t*), and maximum value, *ωmax PV* (*t*), of the errors were considered, which are sufficient for the all intermediate error values.

Although there is no EV forecasting, vehicles which are not plugged in at the charging station at the relevant timestep, would still begin charging at some point in the future. These limits are then included in constraints in Equations (12) and (13), which are modified to

$$\mathcal{S}\_{i}^{\min}(t+1) \begin{cases} = 0, \text{ when a vehicle is not present at the current timestep, } t, \text{ in space, i} \\ \leq \mathcal{S}\_{i}(t) + \eta\_{\text{clg},i} E\_{i}(t) + \left(\frac{1}{\eta\_{\text{cli},i}} - \eta\_{\text{clg},i}\right) z\_{i}(t) \,\forall \, i, \\ \text{when a vehicle is present at the current timestep, } t, \text{ in space, i} \end{cases} \tag{32}$$

and

$$\mathcal{S}\_i^{\text{max}}(t) \begin{cases} = 0, \text{when a vehicle is not present at the current timestep, } t, \text{ in space, } i \\ \ge \mathcal{S}\_i(t) + \eta\_{\text{clg},i} \mathcal{E}\_i(t) + \left(\frac{1}{\eta\_{\text{cla},i}} - \eta\_{\text{clg},i}\right) z\_i(t) \; \forall \; i, \\ \text{when a vehicle is present at the current timestep, } t, \text{ in space, } i \end{cases} \tag{33}$$

The constraints in Equation (15) through Equation (21) remain unchanged.

#### *3.4. Average EV Demand Forecast*

The objective function with robust solar PV forecast and a single average EV forecast remains the same as Equation (28). The stored energy terms, *S*min *i* (*t*) and *S*max *i* (*t*) in the constraints in Equations (12) and (13) are replaced by average values of these variables. The new constraints are therefore:

$$\overline{S\_i^{\min}(t+1)} \le \overline{S\_i(t)} + \eta\_{\text{clg},i} E\_i(t) + \left(\frac{1}{\eta\_{\text{dis},i}} - \eta\_{\text{clg},i}\right) z\_i(t) \tag{34} \\ \qquad \qquad \forall \, i, \\ \tag{34}$$

$$
\overline{S\_i^{\text{max}}(t+1)} \ge \overline{S\_i(t)} + \eta\_{\text{clg},i} E\_i(t) + \left(\frac{1}{\eta\_{\text{dis},i}} - \eta\_{\text{clg},i}\right) z\_i(t) \tag{35}
$$

where *S*min *i*(*t*) and *S*max *i*(*t*) are the average values for the variables *S*min *i*(*t*) and *S*max *i*(*t*) respectively.

#### *3.5. Robust EV Demand Forecast*

The system is meant to be robust in the sense of reducing peak grid exchange across a wide range of EV forecasting errors as well as errors in the solar forecast. The maximum value, *ω*max *i* (*t*) and minimum value, *ω*min *i* (*t*), in the range of errors introduced in the EV demand forecast through the Monte Carlo simulation, as described in Section 3.2.2, were used to define the state constraints for *S*min *i*(*t*) and *S*max *i*(*t*) as

$$S\_i^{\min}(t) + \omega\_i^{\max}(t) \le S\_i(t) + \eta\_{\text{clg},i} E\_i(t) + \left(\frac{1}{\eta\_{\text{dis},i}} - \eta\_{\text{clg},i}\right) z\_i(t) \tag{36}$$

$$S\_i^{\min}(t) + \omega\_i^{\min}(t) \ge S\_i(t) + \eta\_{\text{clg},i} E\_i(t) + \left(\frac{1}{\eta\_{\text{dis},i}} - \eta\_{\text{clg},i}\right) z\_i(t). \tag{37}$$

However, constraints risk making the problem infeasible if *ω*max *i* (*t*) > *ω*min *i* (*t*), which is highly likely. In order to enable a feasible solution to the problem, the state constraints for vehicles which are forecasted to arrive, are expressed as soft constraints:

$$S\_i^{\min}(t) + \omega\_i^{\max}(t) \le S\_i(t) + \eta\_{\text{clg},i} E\_i(t) + \left(\frac{1}{\eta\_{\text{dis},i}} - \eta\_{\text{clg},i}\right) z\_i(t) + \varepsilon\_i^1(t) \tag{38}$$

$$S\_i^{\min}(t) + \omega\_i^{\min}(t) \ge S\_i(t) + \eta\_{\text{clg},i} E\_i(t) + \left(\frac{1}{\eta\_{\text{dis},i}} - \eta\_{\text{clg},i}\right) z\_i(t) - \epsilon\_i^2(t). \tag{39}$$

for all *i* ∈ {1, ... , *Nb* − <sup>1</sup>}, *t* ∈ {*k*, ... , *k* + *Np* − <sup>1</sup>}. The slack variables 1*i* (*t*) ≥ 0 and 2*i* (*t*) ≥ 0 correspond respectively to the constraints for the minimum and maximum stored energy, and are added to the optimization problem as an auxiliary decision variables. For the stationary battery as well as the vehicles plugged in at the parking lot at a given timestep, *k*, the state constraints remain hard since the minimum and maximum stored energies are known with certainty.

The complete optimization formulation is then given by:

$$\underset{T, \underset{\text{prim}}{\text{minimize}}}{\text{minimize}} \quad T + \frac{1}{(N\_b - 1) \cdot N\_p} \sum\_{i=1}^{N\_b - 1} \sum\_{t=k}^{k + N\_p - 1} c\_1 \epsilon\_i^1(t) + c\_2 \epsilon\_i^2(t),\tag{40}$$

where *c*1 and *c*2 are penalty constants. The values *c*1 = 1 and *c*2 = 1 were found empirically to lead to lowest values of peak demand. Increasing the penalty constant values did not however lead to large changes in peak demand. The decision variables are:

$$T, E\_{\rm grid}^{\rm max}, \, E\_i(t), \, \delta\_i(t), \, z\_i(t), \, \epsilon\_i^1(t), \, \epsilon\_i^2(t) \qquad \text{for } i \in \{1, \ldots, N\_b\}, \quad t \in \{k, \ldots, k + N\_p - 1\}, \tag{41}$$

with the additional constraint

$$
\epsilon\_i^1(t), \epsilon\_i^2(t) \ge 0 \quad \forall \, i, \, t. \tag{42}
$$

#### **4. Results and Discussion**

A year of operation of the solar parking lot was simulated for each of the three described scenarios to determine the performance of the system at peak reduction in each case. During the comparison, the reference cases of unscheduled charging and perfect forecasts are also included to provide additional insights.

## *4.1. Example Simulations*

Figure 3 shows the energy flows within the system over a representative period, in this case, a week. The two reference cases, unscheduled charging and charging with perfect forecasting, are compared. The characteristics of the scheduling seen here are also valid for longer simulations over the year.

(**a**) Energy flows (unscheduled charging).

(**b**) Energy flows (perfect forecasting).

**Figure 3.** Comparison of energy flows in the solar parking lot with unscheduled charging as opposed to charging with perfect forecasts.

In accordance with thermodynamic system conventions, the energy entering the electrical system (PV production, grid purchase and battery discharge) is taken as positive and energy leaving the system (EV and battery charging, lighting load and feed-in to the grid) as negative. The shape of the positive and negative sides are similar, showing the energy balance in each timestep, excluding losses. The solar energy production is shown in yellow, battery charge and discharge in red and EV charging in blue. The lighting loads, which are very small in comparison with the others, are shown in green and residual grid load (after solar self-consumption and battery charge/discharge) in gray. The highest peak in the week is highlighted in each figure.

The largest peak in the residual grid load (110 kW) as a result of unscheduled charging, seen on Thursday in Figure 3a, is considerably reduced in magnitude to 50 kW as a result of scheduled charging with perfect forecasts. In addition, the frequency of these peaks is found to decrease considerably and a uniformly flat load profile achieved. The arrivals of many EVs on Tuesday, Wednesday and Thursday mornings, all of which lead to peaks in energy demand if unscheduled are all adequately shaved. Although the perfect forecasting scenario is not an applicable case, it demonstrates the success of the method at reducing the peak residual load in the week considered.

Figure 4, similarly, shows the energy flows in the system for the three scenarios. As seen in Figure 4a, where no EV forecast is available, the magnitude of the highest peak in this case (100 kW) is lower than that in the unscheduled case. Relative to the perfectly forecasted case, though, the peaks are considerably higher. A drawback of the scenario can be seen in the situation leading to the Wednesday afternoon peak. The EVs in the parking lot on Tuesday night was charged slowly to reduce the peak load at night. This led to a larger number of vehicles in need of simultaneous charging on Wednesday morning, leading to a high peak in electricity demand in the afternoon. On the other hand, the Thursday peak seen in the unscheduled charging case was effectively shifted.

The single average forecast seen in Figure 4b already provides a considerable reduction in the magnitude of the highest peak (85 kW) relative to the case without an EV forecast. On the same Wednesday, the vehicles parked overnight are charged in the morning in anticipation of future arrivals, thus lowering the peak on Wednesday. However, a drawback of the system is seen on Monday, which has a lower than average EV charging demand. A large number of EVs are charged in the morning in anticipation of demand later in the day. However, the demand in the afternoon was lower than expected, making the morning peak unnecessary in hindsight. This leads to Monday having the highest peak in the week.

The robust treatment of forecasting seen in Figure 4c results in even further reduction in the magnitude of the highest peak in the week, which is about 75 kW. The Wednesday load is lowered even more, and there is a better performance in the case of the lower demand on Monday. Similar to the average forecast, there are many peaks with similar magnitude across the week, but the height of the highest one is lower than in the case without the demand forecast.

(**a**) Energy flows (no electric vehicle (EV) demand forecast).

#### **Figure 4.** *Cont*.

(**b**) Energy flows (average EV demand forecast).

(**c**) Energy flows (robust EV demand forecast).

**Figure 4.** Comparison of energy flows in the solar parking lot with no EV demand forecast, a single average EV demand forecast and a robust consideration of EV demand forecasting.

It can be seen that in the system, the peak loads on the grid are always the result of EV charging and never the result of solar feed-in. While solar peaks did occur under low occupancy of the parking lot during summer when the stationary battery was full, they were generally lower than the EV charging peaks. Further, it was assumed that curtailment would be the strategy for peak shaving of solar feed-in peaks.

The power flows also reveal that the use of fixed storage remains low in all cases. A sensitivity analysis was conducted on the battery size used. It revealed that small batteries had a considerable impact on peak reduction, but the returns diminished with increasing battery size. Increasing the battery size beyond 50 kWh had no further effect on peak reduction.

#### *4.2. Maximum Annual Peak Exchange with the Grid*

The scenarios are compared in terms of a few metrics, which provide insight into the simulation results. The first metric considered is the highest annual peak in each scenario. These peaks have a magnitude which is generally close to the transformer rated capacity and occur rarely—a few times in the transformer lifetime. They lead to a type of transformer loading known as short term emergency loading, involving a very high demand occurring for periods of half an hour or less. However, despite the short duration and relative rarity of their occurrence, these overloads can cause considerable damage. Increased hot-spot temperatures, resulting in the evolution of free gas from insulation and insulating fluid, reduced mechanical strength and deformation of conductors and structural insulation, and high internal pressures resulting in leaking gaskets or loss of oil can all be results of short term

emergency loading. These loads can considerably shorten the lifespan of these assets [21]. A reduction in the highest annual peak indicates a reduction in the intensity of these events. Figure 5 illustrates the peak annual power demand compared across the three scenarios and the two reference cases.

**Figure 5.** Comparison of annual peak power exchange with the grid.

The comparison shows that smart charging for peak reduction in the absence of EV demand forecasting is effective at the reduction of short term peak loads, but this effect is limited (about 16% peak reduction relative to unscheduled charging). Further, the magnitude of peak reduction in the absence of EV demand forecasting is considerably less than that possible with perfect forecasting of future EV demand (about 54% reduction), which is the case often assumed in the literature. The availability of single forecasts based on average demands in the past result in an increase in the effectiveness of reducing short term peak loads. Peaks are reduced by an additional 20% relative to unscheduled charging. Consideration of multiple possible forecasts across which the system works in a robust manner further reduces the peak power exchange of the system. Such a system had an annual peak of 39% lower than that found in unscheduled charging.

#### *4.3. Duration of Peak Loads*

While the previous metric considered short term load intensity, it did not consider the frequency of occurrence of peaks of marginally smaller magnitude, whose impact is similar to that of the annual peak. A comparison of load duration curves can provide further insight. Figure 6 focuses on the leftmost section of the curve, where high peaks are visualized:

The downward shift of the y-intercept through smart charging represents the reduction in the magnitude of annual peak loads, whereas the leftward shift near the y-intercept represents the reduction in the number of peaks. Smart charging without EV demand forecasting, in addition to lowering the magnitude of peaks, is also found to reduce the number of peaks. The curve reveals that the times for which loads are greater than 100 kW are reduced by more than half while the times for which loads are greater than 80 kW are reduced by about half.

The provision of EV demand forecasting further reduces these durations. Loads above 100 kW are avoided altogether and the number of peaks greater than 80kW are greatly reduced. There is no clear advantage of robust forecasting over average forecasting in this case, with both methods providing similar reductions in the number of peaks that the asset is exposed to.

**Figure 6.** Load duration curves.
