# An Optimal Charging Strategy for PV-Based Battery Swapping Stations in a DC Distribution System

Authors: Shengjun Wu; Qingshan Xu; Qun Li; Xiaodong Yuan; Bing Chen
Journal: International Journal of Photoenergy
 (2017)

---

## Abstract

Photovoltaic- (PV-) based battery swapping stations (BSSs) utilize a typical integration of consumable renewable resources to supply power for electric vehicles (EVs). The charging strategy of PV-based BSSs directly influences the availability, cost, and carbon emissions of the swapping service. This paper proposes an optimal charging strategy to improve the self-consumption of PV-generated power and service availability while considering forecast errors. First, we introduce the typical structure and operation model of PV-based BSSs. Second, three indexes are presented to evaluate operational performance. Then, a particle swarm optimization (PSO) algorithm is developed to calculate the optimal charging power and to minimize the charging cost for each time slot. The proposed charging strategy helps decrease the impact of forecast uncertainties on the availability of the battery swapping service. Finally, a day-ahead operation schedule, a real-time decision-making strategy, and the proposed PSO charging strategy for PV-based BSSs are simulated in a case study. The simulation results show that the proposed strategy can effectively improve the self-consumption of PV-generated power and reduce charging cost.


---

## Body

## 1. Introduction

Renewable energy and electric vehicles (EVs) have emerged as methods for ensuring energy security and for reducing emissions in many countries. However, for photovoltaics (PV) and other intermittent renewable energy sources with output volatility, large-scale renewable energy connected to the power grid still has many barriers to overcome. Moreover, it is difficult to maintain stable operation of the power grid and optimize scheduling for large populations of EVs with uncertain charging characteristics [1–3]. In addition, if the charging power is generated by coal-fired power plants, the emission advantage for EV is not obvious [4, 5]. The direct integration of PV with EV charging devices is an effective way to reduce EV emissions and the impact of EV charging on the power grid [6, 7].There are three types of EV charging modes: conventional charging, fast charging, and battery swapping [8, 9]. The battery swapping mode replaces depleted batteries with fully charged batteries and charges the depleted batteries on a charging platform. The battery swapping mode is mainly applied in public transport, such as electric buses and electric taxis. As an important charging mode, the State Grid Corporation of China has invested in and constructed dozens of battery swapping stations (BSSs) in large cities in China [10, 11]. The centralized charging strategy in BSSs is constructive for the integration of renewable energy generation.Most of the scholarships on EV charging and renewable energy generation have focused on design, operation, and optimal charging strategies [12–16]. A conceptual architecture and an assessment framework were proposed to explore integration scenarios of EVs and renewable energy generation in distribution networks [17]. The combination of PV energy and EVs in uncontrolled charging and smart charging strategies has been studied [18], as was a two-stage framework for the economic operation of an EV parking deck with renewable energy generation [19]. Heuristic optimization algorithms, such as particle swarm optimization (PSO) and genetic algorithm (GA), have been used to solve the multiobjective and nonlinear optimization problems associated with the management of EV charging involved in renewable energy generation. A PSO algorithm was utilized to allocate charging stations of plug-in electric vehicles [20] and to provide a coordinated charging/discharging scheme to increase revenues and incentives [21]. An optimization algorithm was developed based on the well-established PSO and interior point method for the optimal dispatch of EVs and wind power [22]. Two approaches based on the fuzzy genetic algorithm and fuzzy discrete PSO were proposed to minimize energy cost and grid losses by coordinating EV charging [23]. A PSO algorithm can randomly search to achieve satisfactory solutions by using a population of particles and is a practical algorithm for solving EV charging optimization problems involved in renewable energy generation.The aforementioned charging strategies proposed for integrating PV and a charging station are not suitable for battery charging in a BSS. The charging strategy of a BSS is different from the general EV charging mode. In a BSS, a depleted EV battery system is replaced with a fully charged battery system in several minutes, and the depleted batteries are stored on a centralized charging platform. Recently, several studies have investigated charging strategies for BSSs without renewable energy generation. A novel centralized charging strategy for BSSs considered optimal charging priority and charging location [24]. A direct projection method was developed to compute an optimal charging schedule of the BSS efficiently [25]. However, these charging strategies have not properly considered the uncertain features of PV generation and battery swapping requirements.A charging strategy for operating a PV-based BSS should take into account battery swapping demand, fluctuation of PV generation, charging cost, and forecast errors. The primary mission of a BSS is to ensure service availability for battery swapping. Battery charging of the BSS must be scheduled so that every EV that arrives will be provided with fully charged batteries. However, the battery charging schedule is compromised with forecasting errors for PV generation and battery swapping demand. In this paper, we propose a PSO charging algorithm to decrease the impact of forecast uncertainties on the availability of battery swapping services and to minimize the charging power cost.The major contributions of this paper are as follows:(1)
A battery swapping service model and a battery charging model are introduced to improve the service availability of BSSs.(2)
A PSO-based charging strategy is proposed to optimize the charging operation and to achieve self-consumption of PV energy for PV-based BSSs.(3)
The effectiveness of the proposed PSO-based charging strategy is evaluated in a real-time swapping operation while minimizing the total charging cost.(4)
The simulation results indicate that the proposed PSO-based charging strategy can achieve satisfactory effects under different battery demand forecast errors.The content of this paper is organized as follows: Section2 describes the system structure and operation model. Section 3 proposes three indexes used to evaluate the operation performance. Section 4 introduces the PSO-based charging strategy, including the basic PSO algorithm and its implementation in the battery charging operation. A case study and analysis are presented in Section 5, and conclusions are drawn in Section 6.


## 2. System Structure and Operation Model

### 2.1. System Structure and Components

A typical PV-based BSS structure is shown in Figure1; the structure is mainly composed of a PV system, a battery charging system, a grid-connected system, and an energy management system.Figure 1
Structure of a PV-based BSS.The PV system consists of PV modules and DC/DC converters. The PV modules directly convert solar energy into electric energy and deliver power to the DC bus through the DC/DC converter. The actual output power of the PV system is mainly affected by solar irradiation and environmental temperature [26].The battery charging system is comprised of DC chargers and batteries. AnEV is driven by a battery system consisting of a fixed set of battery packs that is charged by a DC charger. In general, the battery is initially charged with a constant current until the state of charge (SOC) reaches a certain value, after which it is charged with a constant voltage. Recently, batteries have also been charged with a constant power [6].The grid-connected system consists of a bidirectional AC/DC inverter and a distribution transformer. The grid-connected system balances power between the distribution grid and the DC bus and maintains a stable voltage in the DC bus.The energy management system monitors and controls the operation of each component in the PV-based BSS. The optimal charging strategy will run on the energy management system to achieve the operational objectives of the BSS.


### 2.2. Battery Swapping Service Model

The battery swapping service model is shown in Figure2. The most important objective of the BSS is to maintain the availability of the battery swapping service. In the initial development period of the BSS, the quantity of batteries reserved in the BSS is limited to a relatively small swapping demand and the high cost of purchasing batteries. Therefore, studying the battery swapping service model is necessary to improve service availability and reduce charging cost.Figure 2
The battery swapping service model.To analyse the battery swapping service model, we divide one day intoI periods, and each period has a length of Δt. The total number of power battery systems and chargers in the BSS is defined as NB and NCH, respectively. The number of EVs that the BSS can serve is defined as NS.For any time sloti, the batteries in the BSS can be divided into the following states: (1) available status, in which the battery is fully charged and ready for the swapping service, defined as NAi; (2) charging status, in which the battery is in a charging status, defined as NCi, and the battery will complete charging in time slot i, defined as NNAi; and (3) waiting for charging status, in which the battery is replaced in time slot i, defined as NWBi.The total number of EVs waiting to swap a battery in time sloti is defined as NEVi. The number of EVs coming to the BSS to swap a battery in time slot i is defined as NNEVi. The number of EVs waiting to swap a battery that has not yet completed battery swapping in time slot i due to limited battery swapping equipment or a lack of fully charged batteries is defined as NWEVi. The number of EVs that have completed battery swapping in time slot i is defined as NSEVi. NEVi can be calculated as follows:
(1)NEVi=NNEVi+NWEVi−1(2)NEVi=NSEVi+NWEVi.The number of batteries in different states varies dynamically with time. The number of fully charged available battery systems in time sloti can be calculated as follows:
(3)NAi=NAi−1−NSEVi−1+NNAi−1.After the battery is fully charged, it should rest for a period of time to reach a steady state before discharge. Thus, the battery becomes available in the time slot after it has completed charging. Similarly, the replaced battery reaches the charging state in the following time slot.The number of charging state battery systems in time sloti can be calculated as follows:
(4)NCi=NCi−1−NNAi−1+NSEVi−1.Since the BSS configures a charger for every replaced battery system on the charging platform, the replaced battery systems can be charged in the next time slot.


### 2.3. Battery Charging Model

The replaced batteries begin charging in the following time slot. The replaced batteries are charged in a constant power charging mode. In this mode, the charging time for a replaced battery is related to the initial SOC and the final SOC of the charging battery.(5)TB_Cha=SOCend−SOCinit×WBPCha,where TB_Cha represents the battery charging time; SOCinit and SOCend represent the initial SOC and finished SOC of a charging battery, respectively; WB represents the rated capacity of a battery; and PCha represents the constant charging power.To maintain the availability of the battery swapping service, there should be enough fully charged batteries to meet the EV swapping demand in each time slot.(6)NAi>NEVi.In the next time sloti+1, the new fully charged batteries transition to an available state, and new EVs come to the battery swapping service:
(7)NAi+NNAi>NEVi+NNEVi+1.Based on (3) and (7), the following equation can be derived:
(8)NNAi>NNEVi+NNEVi+1+NWEVi−1−NAi−1+NSEVi−1−NNAi−1,where NNAi represents the number of battery systems that are fully charged in the time slot i and NNEVi and NNEVi+1 are the numbers of EVs coming to the BSS for battery swapping in the time slots i and i+1, respectively, which are the forecasted values. The other parameters in (8) are known in time slot i, so NNAi can be determined.However, the batteries may not be fully charged, as it may take several time slots to complete battery charging. The charging time for a battery can be calculated using (5). Thus, (8) needs to be applied to time slot i+n.
(9)NNAi+NNAi+1+⋯+NNAi+n>NNEVi+NNEVi+1+NNEVi+2+⋯+NNEVi+1+n+NWEVi−1−NAi−1+NSEVi−1−NNAi−1.The lower limit of the charging quantity of battery systems in time sloti is decided by NNAi+n. Thus, the minimum charging power can be calculated as follows:
(10)PCha_mini=PCha×NNAi+n.In the actual battery swapping service, the number of EVs coming to the BSS is a typical stochastic value. As a result, the forecast valueNNEVi always includes uncertainty errors. Having more fully charged batteries available in reserve should be considered to respond to forecast errors; however, keeping many fully charged batteries in reserve is not an economical solution. Therefore, an optimal charging strategy is needed to account for both forecast errors and charging economy.


## 2.1. System Structure and Components

A typical PV-based BSS structure is shown in Figure1; the structure is mainly composed of a PV system, a battery charging system, a grid-connected system, and an energy management system.Figure 1
Structure of a PV-based BSS.The PV system consists of PV modules and DC/DC converters. The PV modules directly convert solar energy into electric energy and deliver power to the DC bus through the DC/DC converter. The actual output power of the PV system is mainly affected by solar irradiation and environmental temperature [26].The battery charging system is comprised of DC chargers and batteries. AnEV is driven by a battery system consisting of a fixed set of battery packs that is charged by a DC charger. In general, the battery is initially charged with a constant current until the state of charge (SOC) reaches a certain value, after which it is charged with a constant voltage. Recently, batteries have also been charged with a constant power [6].The grid-connected system consists of a bidirectional AC/DC inverter and a distribution transformer. The grid-connected system balances power between the distribution grid and the DC bus and maintains a stable voltage in the DC bus.The energy management system monitors and controls the operation of each component in the PV-based BSS. The optimal charging strategy will run on the energy management system to achieve the operational objectives of the BSS.


## 2.2. Battery Swapping Service Model

The battery swapping service model is shown in Figure2. The most important objective of the BSS is to maintain the availability of the battery swapping service. In the initial development period of the BSS, the quantity of batteries reserved in the BSS is limited to a relatively small swapping demand and the high cost of purchasing batteries. Therefore, studying the battery swapping service model is necessary to improve service availability and reduce charging cost.Figure 2
The battery swapping service model.To analyse the battery swapping service model, we divide one day intoI periods, and each period has a length of Δt. The total number of power battery systems and chargers in the BSS is defined as NB and NCH, respectively. The number of EVs that the BSS can serve is defined as NS.For any time sloti, the batteries in the BSS can be divided into the following states: (1) available status, in which the battery is fully charged and ready for the swapping service, defined as NAi; (2) charging status, in which the battery is in a charging status, defined as NCi, and the battery will complete charging in time slot i, defined as NNAi; and (3) waiting for charging status, in which the battery is replaced in time slot i, defined as NWBi.The total number of EVs waiting to swap a battery in time sloti is defined as NEVi. The number of EVs coming to the BSS to swap a battery in time slot i is defined as NNEVi. The number of EVs waiting to swap a battery that has not yet completed battery swapping in time slot i due to limited battery swapping equipment or a lack of fully charged batteries is defined as NWEVi. The number of EVs that have completed battery swapping in time slot i is defined as NSEVi. NEVi can be calculated as follows:
(1)NEVi=NNEVi+NWEVi−1(2)NEVi=NSEVi+NWEVi.The number of batteries in different states varies dynamically with time. The number of fully charged available battery systems in time sloti can be calculated as follows:
(3)NAi=NAi−1−NSEVi−1+NNAi−1.After the battery is fully charged, it should rest for a period of time to reach a steady state before discharge. Thus, the battery becomes available in the time slot after it has completed charging. Similarly, the replaced battery reaches the charging state in the following time slot.The number of charging state battery systems in time sloti can be calculated as follows:
(4)NCi=NCi−1−NNAi−1+NSEVi−1.Since the BSS configures a charger for every replaced battery system on the charging platform, the replaced battery systems can be charged in the next time slot.


## 2.3. Battery Charging Model

The replaced batteries begin charging in the following time slot. The replaced batteries are charged in a constant power charging mode. In this mode, the charging time for a replaced battery is related to the initial SOC and the final SOC of the charging battery.(5)TB_Cha=SOCend−SOCinit×WBPCha,where TB_Cha represents the battery charging time; SOCinit and SOCend represent the initial SOC and finished SOC of a charging battery, respectively; WB represents the rated capacity of a battery; and PCha represents the constant charging power.To maintain the availability of the battery swapping service, there should be enough fully charged batteries to meet the EV swapping demand in each time slot.(6)NAi>NEVi.In the next time sloti+1, the new fully charged batteries transition to an available state, and new EVs come to the battery swapping service:
(7)NAi+NNAi>NEVi+NNEVi+1.Based on (3) and (7), the following equation can be derived:
(8)NNAi>NNEVi+NNEVi+1+NWEVi−1−NAi−1+NSEVi−1−NNAi−1,where NNAi represents the number of battery systems that are fully charged in the time slot i and NNEVi and NNEVi+1 are the numbers of EVs coming to the BSS for battery swapping in the time slots i and i+1, respectively, which are the forecasted values. The other parameters in (8) are known in time slot i, so NNAi can be determined.However, the batteries may not be fully charged, as it may take several time slots to complete battery charging. The charging time for a battery can be calculated using (5). Thus, (8) needs to be applied to time slot i+n.
(9)NNAi+NNAi+1+⋯+NNAi+n>NNEVi+NNEVi+1+NNEVi+2+⋯+NNEVi+1+n+NWEVi−1−NAi−1+NSEVi−1−NNAi−1.The lower limit of the charging quantity of battery systems in time sloti is decided by NNAi+n. Thus, the minimum charging power can be calculated as follows:
(10)PCha_mini=PCha×NNAi+n.In the actual battery swapping service, the number of EVs coming to the BSS is a typical stochastic value. As a result, the forecast valueNNEVi always includes uncertainty errors. Having more fully charged batteries available in reserve should be considered to respond to forecast errors; however, keeping many fully charged batteries in reserve is not an economical solution. Therefore, an optimal charging strategy is needed to account for both forecast errors and charging economy.


## 3. Evaluation Indexes for Operation Performance

Considering the purpose and characteristics of the battery swapping service, the evaluation indexes for the operation performance are given based on three points [27, 28]: (1) self-consumption of PV energy, (2) availability of the battery swapping service, and (3) economic cost of charging.


### 3.1. The Self-Consumed PV in Total EV Charging Energy

There are two power sources for EV charging, namely, PV energy and distribution grid energy. This index evaluates the PV self-consumption rate in total EV charging energy, which is represented as the percentage of self-consumed PV energy in total EV charging energy (PPTC):
(11)PPTC=∑i=1IEEVi−Egridi∑i=1IEEVi×100%,where EEVi represents the charging energy of the battery charging platform in time slot i and Egridi represents the energy supplied by the distribution grid in time slot i.


### 3.2. Waiting Time for Battery Swapping Service

EVs have to wait for battery swapping primarily due to a lack of fully charged batteries or limited swapping equipment. The battery swapping time for one EV is approximately 6–8 minutes and is not included in the waiting time. This index evaluates the availability of the battery swapping service, which is represented as the waiting time of the battery swapping service (WTBSS):
(12)WTBSS=∑i=1I∑j=1NSEViWTi,j∑i=1INSEVi,where WTi,j represents the time that EVs spend waiting for battery swapping.


### 3.3. The Price of Charging Energy

The charging energy price differs based on the energy sources. The energy from the distribution grid is more expensive than the energy from PV generation. The charging energy price is calculated as follows:(13)PREV=PRPV∑i=1IEEVi−Egridi+PRgrid∑i=1IEgridi∑i=1IEEVi,where PREV represents the average electricity price of the charging energy, Egridi represents the charging energy value from the distribution grid in time slot i, PRPV represents the electricity price from PV energy, and PRgrid represents the electricity price from the distribution grid.


## 3.1. The Self-Consumed PV in Total EV Charging Energy

There are two power sources for EV charging, namely, PV energy and distribution grid energy. This index evaluates the PV self-consumption rate in total EV charging energy, which is represented as the percentage of self-consumed PV energy in total EV charging energy (PPTC):
(11)PPTC=∑i=1IEEVi−Egridi∑i=1IEEVi×100%,where EEVi represents the charging energy of the battery charging platform in time slot i and Egridi represents the energy supplied by the distribution grid in time slot i.


## 3.2. Waiting Time for Battery Swapping Service

EVs have to wait for battery swapping primarily due to a lack of fully charged batteries or limited swapping equipment. The battery swapping time for one EV is approximately 6–8 minutes and is not included in the waiting time. This index evaluates the availability of the battery swapping service, which is represented as the waiting time of the battery swapping service (WTBSS):
(12)WTBSS=∑i=1I∑j=1NSEViWTi,j∑i=1INSEVi,where WTi,j represents the time that EVs spend waiting for battery swapping.


## 3.3. The Price of Charging Energy

The charging energy price differs based on the energy sources. The energy from the distribution grid is more expensive than the energy from PV generation. The charging energy price is calculated as follows:(13)PREV=PRPV∑i=1IEEVi−Egridi+PRgrid∑i=1IEgridi∑i=1IEEVi,where PREV represents the average electricity price of the charging energy, Egridi represents the charging energy value from the distribution grid in time slot i, PRPV represents the electricity price from PV energy, and PRgrid represents the electricity price from the distribution grid.


## 4. Charging Strategy

### 4.1. PSO

The optimal charging strategy for PV-based BSSs is a stochastic program, as traditional linear optimization methods cannot handle the random calculations. The probabilistic transition rules used in a PSO make it an appropriate solution for the stochastic problem of the battery charging and swapping operations. A PSO simulates the group behaviours of flocking birds to find a particular optimal objective.Initially, the PSO algorithm chooses candidate positions randomly within the search space. It then searches for the best positions by updating the generations. During each iteration of the algorithm, the objective function evaluates the fitness of each candidate position. The best fitness and positions are updated by comparing the newly evaluated fitness against the previous best fitness. Finally, the PSO algorithm maintains the best fitness and positions achieved among all particles in the swarm. The velocity and position of each particle are updated as follows [29]:
(14)vidk+1=wvidk+c1r1pidk−xidk+c2r2pgdk−xidkifvidk+1>vmax,vidk+1=vmax;ifvidk+1<vmin,vidk+1=vmin;xidk+1=xidk+vidk+1,where k represents the iteration number; w is the inertia weight; c1 and c2 are the learning factors; r1 and r2 are two random numbers in the range [0, 1]; and vidk,xidk,pidk, and pgdk are the d-dimensional vectors of velocity, position, best position, and global best position for the ith particle at the kth iteration, respectively.


### 4.2. PSO-Based Strategy

Forecast data are provided in time slots, which includes PV generation and EV battery swapping demands. Then, the BSS operation plans are created for each time slot based on the battery swapping service model and the battery charging model. The BSS operation plans should guarantee the availability of battery swapping and maintain a low charging cost for each time slot.However, the forecast values of PV generation and battery swapping demands always include uncertainty errors, and operational plans cannot be updated according to the real-time data, leading to suboptimal solutions. The PSO algorithm can search for the best charging solutions with the data from the previous time slot. A group of positions and velocities is randomly selected from the feasible solution space to initiate the PSO. The charging cost is the objective function with constraints on the charging power. Then, the positions and velocities are updated to search for the best solutions by evaluating the fitness. The best solutions of the PSO are used as the BSS operation plans for the next time slot. There areI time slots in one day, and the PSO algorithm is run to optimize the operation plans. The flowchart for the proposed PSO-based charging strategy is shown in Figure 3.Figure 3
Flowchart for the proposed PSO strategy.The charging cost is evaluated based on the electricity price of the charging energy, considering that the electricity quantities vary in the solutions. The charging power constraints are the minimum and maximum charging power. The minimum charging power is calculated using (10). The maximum charging power is decided by the quantity of chargers in the constant power charging mode.The number of batteries being charged is the decision variable for the optimization. The PSO stops when it reaches the number of iterations that ensures convergence to the global best position.


## 4.1. PSO

The optimal charging strategy for PV-based BSSs is a stochastic program, as traditional linear optimization methods cannot handle the random calculations. The probabilistic transition rules used in a PSO make it an appropriate solution for the stochastic problem of the battery charging and swapping operations. A PSO simulates the group behaviours of flocking birds to find a particular optimal objective.Initially, the PSO algorithm chooses candidate positions randomly within the search space. It then searches for the best positions by updating the generations. During each iteration of the algorithm, the objective function evaluates the fitness of each candidate position. The best fitness and positions are updated by comparing the newly evaluated fitness against the previous best fitness. Finally, the PSO algorithm maintains the best fitness and positions achieved among all particles in the swarm. The velocity and position of each particle are updated as follows [29]:
(14)vidk+1=wvidk+c1r1pidk−xidk+c2r2pgdk−xidkifvidk+1>vmax,vidk+1=vmax;ifvidk+1<vmin,vidk+1=vmin;xidk+1=xidk+vidk+1,where k represents the iteration number; w is the inertia weight; c1 and c2 are the learning factors; r1 and r2 are two random numbers in the range [0, 1]; and vidk,xidk,pidk, and pgdk are the d-dimensional vectors of velocity, position, best position, and global best position for the ith particle at the kth iteration, respectively.


## 4.2. PSO-Based Strategy

Forecast data are provided in time slots, which includes PV generation and EV battery swapping demands. Then, the BSS operation plans are created for each time slot based on the battery swapping service model and the battery charging model. The BSS operation plans should guarantee the availability of battery swapping and maintain a low charging cost for each time slot.However, the forecast values of PV generation and battery swapping demands always include uncertainty errors, and operational plans cannot be updated according to the real-time data, leading to suboptimal solutions. The PSO algorithm can search for the best charging solutions with the data from the previous time slot. A group of positions and velocities is randomly selected from the feasible solution space to initiate the PSO. The charging cost is the objective function with constraints on the charging power. Then, the positions and velocities are updated to search for the best solutions by evaluating the fitness. The best solutions of the PSO are used as the BSS operation plans for the next time slot. There areI time slots in one day, and the PSO algorithm is run to optimize the operation plans. The flowchart for the proposed PSO-based charging strategy is shown in Figure 3.Figure 3
Flowchart for the proposed PSO strategy.The charging cost is evaluated based on the electricity price of the charging energy, considering that the electricity quantities vary in the solutions. The charging power constraints are the minimum and maximum charging power. The minimum charging power is calculated using (10). The maximum charging power is decided by the quantity of chargers in the constant power charging mode.The number of batteries being charged is the decision variable for the optimization. The PSO stops when it reaches the number of iterations that ensures convergence to the global best position.


## 5. Case Study

### 5.1. Simulation Environment

A simulation was conducted based on the PV-based BSS located in Nanjing, China; the configuration parameters are shown in Table1. The BSS in the case study provides a battery swapping service for twenty EV buses running along three bus lines. The capacity of the battery system is 160 kWh, with five big battery packs and four small battery packs for each EV bus. The charging mode is constant power charging at a rate of 1/3 C.Table 1
BSS case study configuration parameters.
Parameters
Values
PV capacity
500 kW
Capacity of an EV battery system
160 kWh
Rated capacity of a charger
60 kW
Battery charging rate
1/3 C
Total number of EV battery systems
34
Total number of EV buses
20
PV electricity price
$0.0567/kWh
Distribution grid electricity price
$0.1243/kWhAccording to the actual operation of the BSS, the working time of the battery swapping service runs from 6:00 to 23:00. A robot automatically swaps the batteries, and the battery swapping time of one EV bus is set to 7 minutes. The battery swapping times and the SOC of the replaced battery are acquired from the BSS operation database. The parameters of the PSO in the simulation are set as follows: the number of particlesN is 20, the learning factors c1 and c2 are both 2, the inertia weight w is 0.8, and the iteration number k is 50.In the simulation, the duration of a single time slot is set to 30 minutes, and there are 34 time slots for the battery swapping service in one day. The simulation analyses and compares a day-ahead operation schedule [30, 31], a real-time decision-making (RTDM) strategy [28], and the PSO charging strategy in a typical day.


### 5.2. Simulation Results and Analysis

The day-ahead operation schedule provides the BSS operators with a set of plans for the entire day’s operations according to the forecast data. Uncertain forecast errors may affect the availability of battery swapping service and the cost of charging. The RTDM strategy updates the forecast parameters in real time as more operational data become available and repeatedly adjusts the schedule to reduce the impact of forecast errors. We compare the BSS using the day-ahead operation schedule and the PSO charging strategy and analyse the evaluation indexes of these three strategies under different forecast errors.The same PV production and battery swapping demand data are used to simulate the real-time operations of the BSS. We perform these two approaches to battery charging for 34 time slots in one day. The forecast and actual PV production are shown in Figure4, and the forecast and actual values of the battery swapping demand are shown in Figure 5. The simulation results show the BSS operation under two charging approaches, as depicted in Figures 6–8.Figure 4
Forecast and actual PV power generation.Figure 5
Forecast and actual values of battery swapping demand.Figure 6
The number of batteries charged using the schedule and PSO strategies.Figure6 shows the number of batteries charged by the day-ahead operation schedule and the PSO charging strategy. The day-ahead operation schedule charges batteries 158 times in total, and the PSO strategy charges 156 times. During the real-time operation, the PSO charging strategy takes advantage of PV production to charge more batteries, while the operation schedule uses less PV energy due to the battery demand forecast errors. Figures 7 and 8 show the numbers of EVs swapping batteries and the number of EVs waiting for battery swapping using these two approaches in all 34 time slots. In the schedule operation, eight EVs must wait for battery swapping mainly due to the battery demand forecast errors.Figure 7
The number of batteries swapped using the schedule and PSO strategies.Figure 8
The number of EVs waiting using the schedule and PSO strategies.The power distribution results from the two charging approaches can be obtained from the simulation, as shown in Figure9. Both charging approaches achieve a good PV power consumption performance; only a little of the PV energy is supplied to the grid at noon. Charging the batteries in the BSS mitigates the fluctuation of PV generation, and the charging load of the BSS on the distribution grid decreases. In addition, the PSO strategy performs better than the schedule operation in terms of the self-consumption of PV energy, particularly at noon.Figure 9
Power distribution results using the schedule and PSO strategies.To analyse the performance of the proposed charging strategy in real-time operations, the evaluation results of the indexes proposed in Section3 are listed in Table 2. The results show that the performances of all the charging strategies are influenced by the battery demand forecast errors.Table 2
Evaluation results for the different strategies.
Indexes
Battery demand forecast errors
Schedule
RTDM
PSO
PPTC
10%
63.1%
63.9%
67.1%
20%
62.3%
63.2%
66.9%
30%
62.0%
62.8%
66.5%
40%
61.2%
62.4%
65.7%
WTBSS
10%
1.3 min
0.5 min
0.3 min
20%
1.6 min
0.7 min
0.5 min
30%
2.7 min
0.8 min
0.7 min
40%
3.8 min
1.1 min
1.2 min
PREV
10%
$0.0816/kWh
$0.0811/kWh
$0.0790/kWh
20%
$0.0822/kWh
$0.0816/kWh
$0.0791/kWh
30%
$0.0824/kWh
$0.0819/kWh
$0.0793/kWh
40%
$0.0829/kWh
$0.0825/kWh
$0.0799/kWhThe evaluation indexPPTC is influenced by both the PV production and battery demand forecast errors. When PV output power is greater than the battery charging demand, PV self-consumption is related to the charging strategy. The charging strategies of the day-ahead operation schedule and RTDM track PV generation power, and the charging strategy of PSO is to minimize the charging cost. The global search ability of PSO enables the charging strategy to perform a little better than the other two strategies in the boundary between PV production and battery charging demand under the influence of forecast errors, as shown in Figure 9. The results of the evaluation index PPTC show that all the strategies achieve a good performance on the self-consumption of PV energy. The PPTC of the PSO strategy is greater than that of the other strategies by 3-4 points on average. The battery demand forecast errors have little impact on PV energy self-consumption.For charging decisions that are made based on battery swapping demand, the availability of the swapping service is seriously influenced by battery demand forecast errors, as indicated on the evaluation indexWTBSS. The WTBSS of the schedule strategy increases from 1.3 min to 3.8 min, with battery demand forecast errors growing from 10% to 40%. The increased forecast errors have relatively less impact on the other charging strategies. The RTDM and PSO strategies update the operation data in real time and adjust charging plans to reduce the impact of the accumulated forecast errors. The PSO strategy achieves satisfactory results under 30% forecast errors. When the forecast errors increase to 40%, the WTBSS of the PSO strategy reaches 1.2 min, which is not as good as the RTDM strategy. However, the forecast errors cannot be eliminated. The availability of the battery swapping service can be improved by reserving more fully charged batteries, though this strategy increases charging cost, and purchasing batteries is expensive.The charging cost evaluation indexPREV is related to the charging energy source. The electricity price of PV generation is lower than that of the distribution grid. As forecast errors increase, PV self-consumption reduces, and the charging cost increases. PREV is negatively correlated with PV self-consumption. The PSO strategy achieves higher PV self-consumption than the other two charging strategies, so PREV is lower in the same forecast errors. The PREV of the PSO strategy is lower than that of the other two strategies in all cases. Even when forecast errors expand to 40%, PREV still reaches $0.0799/kWh.The results clearly show that the evaluation indexes of the proposed PSO charging strategy are better than those of the day-ahead operation schedule and RTDM strategy. The proposed strategy is sufficiently sophisticated to handle the forecast errors during real-time operations. The proposed PSO charging strategy can provide a charging reference to optimize the manual operation in the BSS at present, and it may be applied in automatic charging operation in the future.


## 5.1. Simulation Environment

A simulation was conducted based on the PV-based BSS located in Nanjing, China; the configuration parameters are shown in Table1. The BSS in the case study provides a battery swapping service for twenty EV buses running along three bus lines. The capacity of the battery system is 160 kWh, with five big battery packs and four small battery packs for each EV bus. The charging mode is constant power charging at a rate of 1/3 C.Table 1
BSS case study configuration parameters.
Parameters
Values
PV capacity
500 kW
Capacity of an EV battery system
160 kWh
Rated capacity of a charger
60 kW
Battery charging rate
1/3 C
Total number of EV battery systems
34
Total number of EV buses
20
PV electricity price
$0.0567/kWh
Distribution grid electricity price
$0.1243/kWhAccording to the actual operation of the BSS, the working time of the battery swapping service runs from 6:00 to 23:00. A robot automatically swaps the batteries, and the battery swapping time of one EV bus is set to 7 minutes. The battery swapping times and the SOC of the replaced battery are acquired from the BSS operation database. The parameters of the PSO in the simulation are set as follows: the number of particlesN is 20, the learning factors c1 and c2 are both 2, the inertia weight w is 0.8, and the iteration number k is 50.In the simulation, the duration of a single time slot is set to 30 minutes, and there are 34 time slots for the battery swapping service in one day. The simulation analyses and compares a day-ahead operation schedule [30, 31], a real-time decision-making (RTDM) strategy [28], and the PSO charging strategy in a typical day.


## 5.2. Simulation Results and Analysis

The day-ahead operation schedule provides the BSS operators with a set of plans for the entire day’s operations according to the forecast data. Uncertain forecast errors may affect the availability of battery swapping service and the cost of charging. The RTDM strategy updates the forecast parameters in real time as more operational data become available and repeatedly adjusts the schedule to reduce the impact of forecast errors. We compare the BSS using the day-ahead operation schedule and the PSO charging strategy and analyse the evaluation indexes of these three strategies under different forecast errors.The same PV production and battery swapping demand data are used to simulate the real-time operations of the BSS. We perform these two approaches to battery charging for 34 time slots in one day. The forecast and actual PV production are shown in Figure4, and the forecast and actual values of the battery swapping demand are shown in Figure 5. The simulation results show the BSS operation under two charging approaches, as depicted in Figures 6–8.Figure 4
Forecast and actual PV power generation.Figure 5
Forecast and actual values of battery swapping demand.Figure 6
The number of batteries charged using the schedule and PSO strategies.Figure6 shows the number of batteries charged by the day-ahead operation schedule and the PSO charging strategy. The day-ahead operation schedule charges batteries 158 times in total, and the PSO strategy charges 156 times. During the real-time operation, the PSO charging strategy takes advantage of PV production to charge more batteries, while the operation schedule uses less PV energy due to the battery demand forecast errors. Figures 7 and 8 show the numbers of EVs swapping batteries and the number of EVs waiting for battery swapping using these two approaches in all 34 time slots. In the schedule operation, eight EVs must wait for battery swapping mainly due to the battery demand forecast errors.Figure 7
The number of batteries swapped using the schedule and PSO strategies.Figure 8
The number of EVs waiting using the schedule and PSO strategies.The power distribution results from the two charging approaches can be obtained from the simulation, as shown in Figure9. Both charging approaches achieve a good PV power consumption performance; only a little of the PV energy is supplied to the grid at noon. Charging the batteries in the BSS mitigates the fluctuation of PV generation, and the charging load of the BSS on the distribution grid decreases. In addition, the PSO strategy performs better than the schedule operation in terms of the self-consumption of PV energy, particularly at noon.Figure 9
Power distribution results using the schedule and PSO strategies.To analyse the performance of the proposed charging strategy in real-time operations, the evaluation results of the indexes proposed in Section3 are listed in Table 2. The results show that the performances of all the charging strategies are influenced by the battery demand forecast errors.Table 2
Evaluation results for the different strategies.
Indexes
Battery demand forecast errors
Schedule
RTDM
PSO
PPTC
10%
63.1%
63.9%
67.1%
20%
62.3%
63.2%
66.9%
30%
62.0%
62.8%
66.5%
40%
61.2%
62.4%
65.7%
WTBSS
10%
1.3 min
0.5 min
0.3 min
20%
1.6 min
0.7 min
0.5 min
30%
2.7 min
0.8 min
0.7 min
40%
3.8 min
1.1 min
1.2 min
PREV
10%
$0.0816/kWh
$0.0811/kWh
$0.0790/kWh
20%
$0.0822/kWh
$0.0816/kWh
$0.0791/kWh
30%
$0.0824/kWh
$0.0819/kWh
$0.0793/kWh
40%
$0.0829/kWh
$0.0825/kWh
$0.0799/kWhThe evaluation indexPPTC is influenced by both the PV production and battery demand forecast errors. When PV output power is greater than the battery charging demand, PV self-consumption is related to the charging strategy. The charging strategies of the day-ahead operation schedule and RTDM track PV generation power, and the charging strategy of PSO is to minimize the charging cost. The global search ability of PSO enables the charging strategy to perform a little better than the other two strategies in the boundary between PV production and battery charging demand under the influence of forecast errors, as shown in Figure 9. The results of the evaluation index PPTC show that all the strategies achieve a good performance on the self-consumption of PV energy. The PPTC of the PSO strategy is greater than that of the other strategies by 3-4 points on average. The battery demand forecast errors have little impact on PV energy self-consumption.For charging decisions that are made based on battery swapping demand, the availability of the swapping service is seriously influenced by battery demand forecast errors, as indicated on the evaluation indexWTBSS. The WTBSS of the schedule strategy increases from 1.3 min to 3.8 min, with battery demand forecast errors growing from 10% to 40%. The increased forecast errors have relatively less impact on the other charging strategies. The RTDM and PSO strategies update the operation data in real time and adjust charging plans to reduce the impact of the accumulated forecast errors. The PSO strategy achieves satisfactory results under 30% forecast errors. When the forecast errors increase to 40%, the WTBSS of the PSO strategy reaches 1.2 min, which is not as good as the RTDM strategy. However, the forecast errors cannot be eliminated. The availability of the battery swapping service can be improved by reserving more fully charged batteries, though this strategy increases charging cost, and purchasing batteries is expensive.The charging cost evaluation indexPREV is related to the charging energy source. The electricity price of PV generation is lower than that of the distribution grid. As forecast errors increase, PV self-consumption reduces, and the charging cost increases. PREV is negatively correlated with PV self-consumption. The PSO strategy achieves higher PV self-consumption than the other two charging strategies, so PREV is lower in the same forecast errors. The PREV of the PSO strategy is lower than that of the other two strategies in all cases. Even when forecast errors expand to 40%, PREV still reaches $0.0799/kWh.The results clearly show that the evaluation indexes of the proposed PSO charging strategy are better than those of the day-ahead operation schedule and RTDM strategy. The proposed strategy is sufficiently sophisticated to handle the forecast errors during real-time operations. The proposed PSO charging strategy can provide a charging reference to optimize the manual operation in the BSS at present, and it may be applied in automatic charging operation in the future.


## 6. Conclusions

This paper proposes an optimal charging strategy that considers the impact of forecast errors to improve service availability and reduces the operating cost of PV-based BSSs. A battery swapping service model is used to describe the regular battery swapping operation of a BSS, and a battery charging model is developed to determine the charging time and quantity. Then, a PSO-based strategy is proposed to optimize the charging time and the charging number of batteries based on PV production and battery demand forecast errors. The simulation results show that the PSO charging strategy can effectively improve the self-consumption of PV energy and the availability of the swapping service. In addition, the charging cost of the PSO strategy is lower than that of the day-ahead operation schedule and the RTDM strategy. The PSO charging strategy updates the charging plans in each time slot according to the actual data to avoid the influence of cumulative errors. Therefore, the proposed PSO charging strategy can perform well for the real-time operation of PV-based BSSs.It is difficult to improve the service availability and PV self-consumption of PV-based BSSs without increasing the charging cost. A common practice to improve service availability is to reserve more fully charged batteries, but this increases the charging cost. Deploying energy storage systems with battery second use may be a good solution to the problem. The authors will continue the optimal charging strategy of PV-based BSS considering battery second use in the future work.



---

*Source: 1504857-2017-04-06.xml*