1 Introduction

Researches on green technologies for transportation sector are gaining popularity among the research communities from different areas. In this wake, Plug-in hybrid electric vehicles (PHEVs) have great future because of their charge storage system and charging facilities from traditional grid system. Some researchers have shown that electrification of transport sector can cause a large amount of degradation in greenhouse gas emissions. Future transportation sector will depend much on the advancement of this emerging field of vehicle optimization. As a recent research interest regarding improving general fuel efficiency over a wider capacity battery system, the plug-in hybrid electric vehicles (PHEVs) can be charged thoroughly thanks to conventional power grid system. That also makes it possible the vehicles to be run in “all-electric-range” (AER) continuously. All-electric vehicles or AEVs is a kind of transport that use electric power as only sources to run the system. An improved adoption of PHEVs can play an important role over alternative energy integration into traditional grid systems because of that plug-in hybrid electric vehicles can employ all of these related strategies via just a connection to the smart grid [1]. It is needed to employ efficient mechanisms—functions and algorithms running in the context of smart grid technologies, for solving advanced problems such as cost reduction, energy management, efficient charging station via different objectives and also system constraints [2].

It is important that about 62% of the vehicles in the United States (US) will comprise of PHEVs within the year 2050, according to the statistics provided by the Electric Power Research Institute (EPRI) [3]. Here, one remarkable objective is making the proper communication between the PHEV and the power grid more practical. For the maximization of customer contentment and minimization of burdens on the grid, a complicated control appliance will need to be addressed in order to govern multiple battery loads from a numbers of PHEVs properly [4]. The total demand pattern will also have an important impact on the electricity production owing to differences in the needs of the PHEVs parked in the deck at certain time [5]. Proper management can ensure strain minimization of the grid and enhance the transmission and generation of electric power supply.

According to the locations, control of PHEV charging can be in whether household charging or public charging. The introduced optimization here deals with the public charging station for plug-in vehicles. That’s because most of PHEV charging is expected to take place in public charging location [6]. Wide diffusion of PHEVs in the market depends on a well-organized charging infrastructure. On the traditional power grid, there will be extra stress by the power demand from this new load [7]. Consequently, a good number of PHEV charging stations with suitable facilities are essential to be built for recharging electric vehicles, for this some strategies have been proposed by the researchers [8]. Charging stations are needed to be built at workplaces, markets/shopping malls and home. Boyle [9] suggested the necessity of building new smart charging station with powerful communication between utilities along with sub-station controlling infrastructure over proper energy utilization and grid stability. Also, sizeable energy storage, cost minimization; Quality of Services (QoS) and intelligent charging station for optimal power are underway [10]. In this stage, numerous techniques and methods were recommended for deployment of PHEV charging stations [11].

Among the research efforts, it is aimed to accomplish practical ways for proper interaction between the PHEV and the power grid. In this context, an advanced mechanism of control will be required to be designed for governing multiple loads of battery from a number of PHEVs appropriately, in the context of maximizing customer pleasure and minimizing the freightage on the grid [6].

Swarm intelligence came from the mimic of the living colony such as ant, bird, and fish in nature, which shows unparalleled excellence in swarm than in single in food seeking or nest building. Drawing inspiration from this, researches design many algorithms simulating colony living, such as ant colony optimization (ACO) algorithm [12], particle swarm optimization (PSO) algorithm [13], artificial bee colony (ABC) algorithm [14], and gravitational search algorithm (GSA) [15], which shows excellent performance in dealing with complex optimization problems [16]. The intrinsic characteristics of all the population-based meta-heuristic algorithms like particle swarm optimization (PSO) and gravitational search algorithm (GSA) are to maintain a good compromise between exploration and exploitation in order to solve the complex optimization problems [17].

The performance of PHEV depends upon proper utilization of electric power which is solely affected by the battery state-of-charge (SoC). In Plug-in hybrid electric vehicles (PHEVs), a key parameter is the state-of-charge (SoC) of the battery as it is a measure of the amount of electrical energy stored in it. It is analogous to fuel gauge on a conventional internal combustion (IC) car [17]. State-of-charge determination becomes an increasingly vital issue in all the areas that include a battery. Previous operation policies made use of voltage limits only to guard the battery against deep discharge and overcharge. Currently, battery operation is changing to what could rather be called battery management than simply protection. For this improved battery control, the battery SoC is a key factor indeed [18].

A charging station is one way that the operator of an electrical power grid can adapt energy production to energy consumption, both of which can vary randomly over time. Generally, PHEVs in a charging station are charged during times when production exceeds consumption and are discharged at times when consumption exceeds production [19]. In this study, it is needed to perform an in-depth study for maximizing the average SoC for making intelligent energy allocation simpler for PHEVs in a charging station.

For covering the general objective and its sub-ones, four swarm intelligence-based techniques: particle swarm optimization (PSO), gravitational search algorithm (GSA), accelerated particle swarm optimization (APSO), and hybrid version of PSO and GSA (PSOGSA) were applied for solving the particular optimization problem hence presents comparative study on these four techniques. Results obtained thanks to this study are important findings for such an advanced real-world optimization problem of charging plug-in hybrid electric vehicle.

2 Mathematical formulation of the charging optimization

Assume that, we have a charging station employing a capacity of total power called as P. Total N numbers of PHEVs need to be served in a day (24 h). In order to make the system more effective, the suggested system should allow PHEVs for leaving the charging station before their expected leaving time. It is worth to mention that; each PHEV is regarded to be plugged-into the charging station once. The aim is to separate power intelligently for each PHEV coming to the charging station. The state-of-charge is the main parameter which needs to be maximized in order to allocate power efficiently. For this, the fitness function considered in this chapter is the maximization of average SoC, hence, allocates energy for PHEVs at the next time step. The constraints considered are: charging time, present SoC and price of the energy.

The fitness function is defined as:

$$ {\text{Max}}\; J_{ } \left( k \right){ = }\mathop \sum \limits_{i} w_{i } \left( k \right)SoC_{i} \left( {k + 1} \right) $$
(1)
$$ w_{i } \left( k \right){ = }f \left( {C_{r,i} \left( k \right), T_{r,i} \left( k \right),D_{i} \left( k \right)} \right) $$
(2)
$$ C_{r,i} \left( k \right){ = }\left( {1 - SoC_{i} \left( k \right)} \right) \cdot C_{i} $$
(3)

where \( C_{r,i} \left( k \right) \) is the battery capacity (remaining) needed to be filled for \( {\text{i}} \) no. of PHEV at time step \( k \); \( C_{i} \) is the battery capacity (rated) of the \( i \) no. of PHEV; remaining time for charging a particular PHEV at time step \( k \) is expressed as \( T_{r,i} \left( k \right) \); the price difference between the real-time energy price and the price that a specific customer at the \( i \) no. of PHEV charger is willing to pay at time step \( k \) is presented by \( D_{i} \left( k \right) \); \( w_{i } \left( k \right) \) is the charging weighting term of the \( i \) no. of PHEV at time step \( k \) (a function of charging time, price of the energy and also present \( {\text{SoC}} \)); \( SoC_{i} \left( {k + 1} \right) \) means the state for charge of the \( i \) no. of PHEV at time step \( k + 1 \).

The weighting term considered here corresponds to a bonus, which is proportional to the attributes associated with a PHEV. As an example, if the considered PHEV comes with a lower initial \( {\text{SoC}} \) and less charging time (as remaining) and the driver is willing to pay a higher price, this particular PHEV battery charger will receive more power by the system:

$$ w_{i } \left( k \right)\upalpha \left[ {C_{r,i} \left( k \right){ + }D_{i} \left( k \right){ + 1/}T_{r,i} \left( k \right)} \right] $$
(4)

The charging current is also assumed to be constant over \( \Delta t \).

$$ \left[ {SoC_{i} \left( {k{ + 1}} \right) - SoC_{i} \left( k \right)} \right] \cdot Cap_{i} { = }Q_{\text{i}} { = }I_{i} \left( k \right)\Delta t $$
(5)
$$ SoC_{i} \left( {k + 1} \right){ = }SoC_{i} \left( k \right){\text{ + I}}_{\text{i}} \left( k \right)\Delta t/Cap_{i} $$
(6)

where the sample time \( \Delta t \) is defined by the charging station operators, and \( {\text{I}}_{\text{i}} \left( k \right) \) is the charging current over \( \Delta {\text{t}} \).

The model of battery is considered as a capacitor cycle, where is the capacitance of battery (Farad). The model is briefly as:

$$ C_{i} . \frac{{dV_{i} }}{dt}{ = }I_{i} $$
(7)

Therefore, one can assume here that the change of voltage to be linear over a small time interval,

$$ C_{i} .\left[ {V_{i} \left( {k + 1} \right) - V_{i} \left( k \right)} \right]/\Delta t{ = }I_{i} $$
(8)
$$ V_{\text{i}} \left( {k + 1} \right) - V_{i} \left( k \right){ = } I_{i} \Delta t/C_{i} $$
(9)

Because the decision variable is the power allocated to the vehicles, replacing \( I_{i } \left( k \right) \) with \( P_{i} \left( k \right) \),

$$ {\text{I}}_{\text{i}} \left( k \right) = P_{i} \left( k \right)/0.5 \times [V_{\text{i}} \left( {k + 1} \right) - V_{i} \left( k \right)] $$
(10)
$$ V_{\text{i}} \left( {k + 1} \right) = \sqrt {\frac{{2P_{i} \left( k \right)\Delta t}}{{C_{i} }} + V^{2}_{i} \left( {\text{k}} \right)} $$
(11)

Substituting (10) into (6) yields

$$ SoC_{i} \left( {k + 1} \right){ = }SoC_{i} \left( k \right){ + }\frac{{P_{i} \left( k \right)\Delta t}}{{0.5.C_{i} .\left[ {\sqrt {\frac{{2P_{i} \left( k \right)\Delta t}}{{C_{i} }}{ + }V^{2}_{i} \left( {\text{k}} \right)} { + }V_{\text{i}} \left( k \right)} \right]}} $$
(12)

Finally, the objective function becomes

$$ \mathop {J\left( k \right) = \sum }\limits w_{i} .\left[ {SoC_{i} \left( k \right){ + }\frac{{2P_{i} \left( k \right)\Delta t}}{{0.5.C_{i} .\left[ {\sqrt {\frac{{2P_{i} \left( k \right)\Delta t}}{{C_{i} }}{ + }V^{2}_{i} \left( {\text{k}} \right)} { + }V_{\text{i}} \left( k \right)} \right]}}} \right] $$
(13)

There are two kind of inequality constraints used here to optimize the fitness function: (1) power from the charging station operator and (2) individual PHEV’s state-of-charge (SoC). Power obtained from the utility (\( {\text{P}}_{\text{utility}} \)) and the maximum power (\( {\text{P}}_{{{\text{i}},{ \hbox{max} }}} \)) absorbed by a specific PHEV correspond to the constraints regarding primary energy. The overall charging efficiency of a particular charging station is described by \( \upeta \). From the system point of view, charging efficiency is supposed to be constant at any given time step. Maximum battery \( {\text{SoC }} \) limit for the \( {\text{i}} \) no. of PHEV is \( {\text{SoC}}_{{{\text{i}},{ \hbox{max} }}} \). When \( {\text{SoC}}_{\text{i}} \) reaches the values close to \( {\text{SoC}}_{{{\text{i}},{ \hbox{max} }}} \), the \( {\text{i}} \) no. of battery charger passes to a mode of standby. Here, limits by the constraint \( \Delta {\text{SoC}}_{ \hbox{max} } \) is applied over the state of charge ramp rate.

Table 1 represents the fitness function parameters, which were adjusted—updated for the optimization process. There are total three (03) kinds of parameter: fixed, variables and constraints. Total charging time is fixed to 20 min and charging station efficiency assumed to be 0.9. The values are retrieved from various literatures [4, 28]. Moreover, State-of-Charge is in the range of 0.2–0.8 [29].

Table 1 Parameter settings of the objective function

2.1 Swarm intelligence algorithms for charging optimization

The chosen four swarm intelligence algorithms for the charging optimization problem of this study can be explained briefly as follows, in order to enable readers to have enough idea about capabilities of the related algorithms regarding effective, intelligent optimization:

2.1.1 Particle swarm optimization (PSO)

PSO is not only a technique, but also is known as a technique of evolutionary computation as introduced by Kennedy and his colleague Eberhart [15]. This technique was briefly an inspiration from social behavior shown by bird flocking. In detail, there are some particles (in other words, candidate solutions) in the algorithm structure and these particles fly within the search space for searching the best solution. In the meantime, they all are affected by the best solution (best particle) along their travel done. In other words, particles consider both best solutions, which are their own top solution and the best one, which has been detected so far. Generally, each of the particles should focus on its current velocity, current position, and position difference according to pbest and the gbest separately, for updating its position. PSO is briefly started to run over a randomly placed group of particles (solutions) and after that it runs over searching for optimum solution(s) by updating generations. In each iteration, all particles are updated by considering two “best” values, which are respectively the best solution (fitness) a particle has achieved so far. (This is called as “pbest”. Also, the fitness value is stored). And the “best” value got so far by any particle in the related population (This is the global best value and called as the “gbest”).

PSO was mathematically modelled as followed as:

$$ V_{i}^{t + 1} { = }wv_{i}^{t} { + }c_{1} . { }rand \, .\left( {pbest_{i} - x_{i}^{t} } \right){ + }c_{2} .rand .\left( {gbest - \, x_{i}^{t} } \right) $$
(14)
$$ x_{i}^{t + 1} { = }x_{i}^{t} + V_{i}^{t + 1} $$
(15)

where \( {\text{v}}_{\text{i}}^{\text{t}} \) means velocity of the particle \( {\text{i}} \) at the iteration \( {\text{t}} \). \( {\text{w}} \) is briefly a weighting function as follows:

$$ \omega { = }\omega_{\hbox{max} } - \frac{{w_{\hbox{max} } - \omega_{\hbox{min} } }}{{Itre_{\hbox{max} } }} Itre $$
(16)

The principal steps in PSO can be summarized as follows (Fig. 1).

Fig. 1
figure 1

Flowchart of particle swarm optimization (PSO)

The values known as the most appropriate ones for \( \upomega_{ \hbox{min} } \) and \( \upomega_{ \hbox{max} } \) are respectively 0.4 and 0.9 [22]. For \( c_{1} \) and \( c_{2} \), it is 1–2 [7] while 2 is known as the most appropriate one in different cases [23]. On the other hand, \( {\text{rand}} \) means a random number as between 0 and 1 [7], \( {\text{x}}_{\text{i}}^{\text{t}} \) is the current position of particle \( i \) at iteration \( t \), \( pbest_{i} \) means the \( {\text{pbest}} \) of the agent \( i \) at the iteration \( t \).

2.1.2 Accelerated particle swarm optimization (APSO)

Accelerated PSO was developed in order to accelerate the convergence of the algorithm is to use the global best only, by Yang [24] at Cambridge University in 2007. PSO and APSO-based optimizations have already been studied by the researchers for optimal design of substation grounding grid [25], performance analysis regarding MIMO radar waveform [26], designing frame structures [27], dual channel speech enhancement [28] and a faster path planner [29] etc.

In the algorithmic structure of the APSO, members of a population are called as particles while the population itself is the swarm. APSO briefly runs by initial adjustment as a randomly located population and here, each particle moves randomly according to some factors.

A simplified version that could speed up the convergence of the algorithm is to use the global best only. So, in the APSO [94], the velocity vector is manufactured by a basic formula as where randn is drawn from (0, 1) to replace the second term. The update of the position is simply like-

$$ V_{i}^{t + 1} = V_{i}^{t} + \alpha .randn(t) + \beta .(g^{*} - x_{i}^{t} ) $$
(17)

where \( randn \) is drawn from N (0, 1) and the update of the position is like the standard PSO method. The update of the position can be written in a single step in order to increase the convergence even further, as:

$$ x_{i}^{t + 1} = (1 - \beta )x_{i}^{t} + \beta .g^{*} + \alpha r $$
(18)

In our simulation, we use [30]:

$$ \alpha = 0.7^{t} $$
(19)

Figure 2 shows the flowchart of APSO method.

Fig. 2
figure 2

Flowchart of accelerated particle swarm optimization (APSO)

The typical values for this accelerated PSO are α ≈ 0.1–0.4 and β ≈ 0.1–0.7; nevertheless, α ≈ 0.2 and β ≈ 0.5 are proposed [25]. In general, any evolutionary search algorithm shows improved performance with a relatively larger population. However, a very large population will cost more in terms of fitness function evaluations without producing significant improvements. In this simulation, the population size is set to 100. The parameter settings for APSO are demonstrated in Table 2.

Table 2 APSO parameter settings

2.1.3 Gravitational search algorithms (GSA)

GSA is briefly a population based optimization approach as developed by Rashedi et al. [17]. In this algorithm, there are total four specifications of each mass (or agent), which is position, inertial mass, passive gravitational mass and also active gravitational mass and. The position regarding the mass corresponds a solution of a particular problem. In this context, the masses (which are gravitational and inertial) are calculated through a fitness function. GSA briefly includes some agents (in other words, candidate solutions) and masses of these agents are proportional to their value calculated through fitness function. Along the appeared generations, all the masses attract each other by the gravity forces between them. Here, a heavier mass means higher force of attraction. In this context, the heavier masses seem close to the global optimum affects other masses, as proportional to their distances.

GSA-based optimization has already been used for economic dispatch with valve-point effects, optimal sizing and suitable placement for distributed generation (DG) in distribution system, post-outage bus voltage magnitude calculations, optimization of synthesis gas production [31], solving thermal unit commitment (UC) problem [32] and finding out optimal solution for optimal power flow (OPF) problem in a power system [33] etc. by the researchers. Specifically, we are studying the application of the Gravitational Search Algorithm (GSA) method for developing real-time and large-scale optimizations for allocating power.

The gravitational force is expressed as follows:

$$ {\text{F}}_{\text{ij}}^{\text{d}} \left( {\text{t}} \right) = {\text{G}}\left( {\text{t}} \right)\frac{{{\text{M}}_{\text{pi}} \left( {\text{t}} \right) \times {\text{M}}_{\text{aj}} \left( {\text{t}} \right)}}{{{\text{R}}_{\text{ij}} \left( {\text{t}} \right) +\upvarepsilon}}\left( {{\text{x}}_{\text{j}}^{\text{d}} \left( {\text{t}} \right) - {\text{x}}_{\text{i}}^{\text{d}} \left( {\text{t}} \right)} \right) $$
(20)

where \( {\text{M}}_{\text{aj}} \) is the active gravitational mass related to agent \( {\text{j}} \), \( {\text{M}}_{\text{pi }} \) is the passive gravitational mass related to agent \( {\text{i}} \), \( {\text{G }}\left( {\text{t}} \right) \) is gravitational constant at time \( {\text{t}} \), \( \upvarepsilon \) is a small constant and \( {\text{R}}_{\text{ij}} \left( {\text{t}} \right) \) is the Euclidian distance between two agents \( {\text{i}} \) and \( {\text{j}} \). The \( {\text{G }}\left( {\text{t}} \right) \) is calculated as:

$$ {\text{G}}\left( {\text{t}} \right) = {\text{G}}_{0} \times \exp \left( { -\upalpha \times {\text{iter}}/{\text{maxiter}}} \right) $$
(21)

where \( \upalpha \) and \( {\text{G}}_{0} \) are descending coefficient and primary value respectively, current iteration and maximum number of iterations are expressed as \( {\text{iter }} \) and \( {\text{maxiter}} \). In a problem space with the dimension \( {\text{d}} \), the overall force acting on agent \( {\text{i}} \) is estimated as following equation:

$$ {\text{F}}_{\text{i}}^{\text{d}} \left( {\text{t}} \right) = \mathop \sum \limits_{{{\text{j}} = 1,{\text{j}} \ne {\text{i}}}}^{\text{N}} {\mathrm{rand}}_{\text{j}} {\mathrm{F}}_{\text{ij}}^{\text{d}} \left( {\text{t}} \right) $$
(22)

where \( {\text{rand}}_{\text{j}} \) is a random number with interval [0, 1]. From law of motion we know that, an agent’s acceleration is directly proportional to the resultant force and inverse of its mass, so the acceleration of all agents should be calculated as follow:

$$ {\text{ac}}_{\text{i}}^{\text{d}} \left( {\text{t}} \right) = \frac{{{\text{F}}_{\text{i}}^{\text{d}} \left( {\text{t}} \right)}}{{{\text{M}}_{\text{ii}} \left( {\text{t}} \right)}} $$
(23)

where \( {\text{t }} \) a specific is time and \( {\text{M}}_{\text{ii}} \) is the mass of the object \( {\text{i}} \). The velocity and position of agents are calculated as follow:

$$ {\text{vel}}_{\text{i}}^{\text{d}} \left( {{\text{t}} + 1} \right) = {\text{rand}}_{\text{i}} \times {\text{vel}}_{\text{i}}^{\text{d}} \left( {\text{t}} \right) + {\text{ac}}_{\text{i}}^{\text{d}} \left( {\text{t}} \right) $$
(24)
$$ {\text{x}}_{\text{i}}^{\text{d}} \left( {{\text{t}} + 1} \right) = {\text{x}}_{\text{i}}^{\text{d}} \left( {\text{t}} \right) + {\text{vel}}_{\text{i}}^{\text{d}} \left( {{\text{t}} + 1} \right) $$
(25)

where \( {\text{rand}}_{\text{i}} \) is a random number with interval [0, 1]. Moreover, the step involves in optimization using GSA is shown Fig. 3.

Fig. 3
figure 3

Flowchart of gravitational search algorithm

In the technique of Gravitational Search Algorithm, the agents are firstly located via random values as each of them is accepted as a candidate solution. Following that, velocities of all agents are adjusted according to (23) while the gravitational constant, overall forces, and accelerations are set respectively by using the Eqs. (20) (21), and (22). The Eq. (24) is used for calculating positions of the agents. In this context, run of the GSA will be stopped when the stopping criterion of 100 iterations is met. Here, the parameter settings regarding GSA are shown in Table 3. The GSA parameters were selected: Primary parameter, \( {\text{G}}_{0} \) = 100, Acceleration coefficient, \( \upalpha \) = 20 and no. of mass agents = 100. Since each agent could observe the performance of the others, the gravitational force is an information-transferring tool. The parameter settings for GSA are demonstrated in Table 3.

Table 3 GSA parameter settings [17]

2.1.4 Hybrid particle swarm optimization and gravitational search algorithm (PSOGSA)

PSOGSA-based optimization has been employed already over the problem of economic load dispatch [34, 35], optimal static state estimation [36], dual channel speech enhancement [37], training feed-forward neural networks [38] and multi-distributed generation planning [39] etc.

The basic idea is to fit in the exploitation ability in PSO with the exploration ability in GSA to synthesize both algorithms’ strength. The basic idea of PSOGSA is to combine the ability of social thinking (gbest) in PSO with the local search capability of GSA. In order to combine these two algorithms, velocity update is proposed as:

$$ v_{i} (t + 1) = w \times v_{i} (t) + \alpha^{\prime} \times rand \times ac_{i} (t) + \beta^{\prime} \times rand \times (gbest - x_{i} (t)) $$
(26)

where \( v_{i} \left( t \right) \) means velocity of the agent i at the iteration t. On the other hand, w is the weighting factor, rand means a random number (between 0 and 1), \( ac_{i} \)(t) means the acceleration of the agent at the iteration t. Finally, gbest is the best solution detected so far. Here, \( \alpha^{'} \) and \( \beta^{'} \) are the weighting factors [40]. With adjusting \( \alpha^{'} \) and \( \beta^{'} \), the abilities of global search and local search can be balanced. The position of the particle \( x_{i} \left( {t + 1} \right) \) in each iteration is updated using the equation:

$$ x_{i} (t + 1) = x_{i} (t) + v_{i} (t + 1) $$
(27)

The flowchart of hybrid PSOGSA method is shown in Fig. 4.

Fig. 4
figure 4

Flowchart of PSOGSA

PSOGSA (adjusted according to the parameter setting in Table 4) was also run over the same fitness function and it was compared with the performance of gravitational search algorithm, by considering average best fitness. Maximum iterations and even swarm sizes were set exactly same to that of GSA and PSO techniques for achieving an objective comparison approach. The values of parameters c1, c2 and alpha were set as standard values, 0.5, 1.5 and 23 respectively [38]. The total number of runs remain 50 for the fare comparison purpose with other single techniques.

Table 4 Parameters settings of PSOGSA

3 Application details

In order to optimize state-of-charge with respect to charging time and present SoC, the explained four swarm intelligence-based methods (PSO, GSA, APSO, and PSOGSA) were applied considering the fitness function stated at the Eq. (13). All the optimization techniques were simulated to achieve the best fitness values by running them over the computer system having the configuration of CPU: Core™ i5-3470 M, Processor: 3.20 GHz, RAM: 4.00 GB, with the MATLAB version-R2013a for the software environment of optimization experiments. A general flow of the application done in the study is presented in Fig. 5.

Fig. 5
figure 5

Flowchart of the charging optimization application in the study

The related application process—comparison was done over five different problem scenarios over changing number of PHEVs: (1) 50 PHEVs, (2) 100 PHEVs, (3) 300 PHEVs, (4) 500 PHEVs, and (5) 1000 PHEVs. Findings and discussion moving from them are expressed under the next section.

4 Findings and discussion

Considering the application flow and five different problem scenarios, obtained findings can be expressed briefly as follows, over each of the employed swarm intelligence algorithms.

4.1 Findings with particle swarm optimization (PSO)

The algorithm was adjusted to run for a total of 100 iterations despite the fitness value converges before five iterations for all five scenarios and become stable. That’s why an early convergence may cause the fitness function to trap into local minima.

For 50 PHEVs, the maximum best fitness and minimum best fitness were 469.7489 and 7.6478 respectively. The average best fitness is 165.9650. In 100 PHEVs, the maximum best fitness and minimum best fitness were 767.8722 and 9.5076 respectively. The average best fitness increases up to 182.9313. For 300 PHEVs, the maximum best fitness and minimum best fitness were 793.09 and 5.9631 respectively. The average best fitness is 197.5908. For 500 PHEVs, the maximum best fitness and minimum best fitness were 774.559 and 5.9631 respectively. The average best fitness is 197.5908. Finally, in 1000 PHEVs, the maximum best fitness and minimum best fitness were 678.9197 and 0.9963. The average best fitness decreases up to 172.4528.

Because PSO is a population-based optimization techniques and the fitness function is non-linear, so the fitness values fluctuates for each iteration [31,32,33,34]. Table 5 briefly presents the result. According to the table, it can be indicated that the average best fitness is in almost similar value scope for five different scenarios.

Table 5 Fitness evaluation for PSO

Table 6 shows the average computational time requirement for PSO method. The average computational time for 50 PHEVs is 1.620 s while for 1000 PHEVs it increases up to 2.328 s.

Table 6 Average computational time for PSO

4.2 Findings with accelerated particle swarm optimization (APSO)

The algorithm was adjusted to run for a total of 100 iterations but the fitness value converges after 10 iterations and become stable. Consequently, there is an early convergence that may cause the fitness function to trap into local minima. This can be avoided by increasing the size of swarm hence the computational time will also be increased as well. For instant, a trade-off should be taken into consideration between the proper convergence and computational time.

Here, we applied each scenario 50 times for having idea about the performance and also superiority and efficiency level of the related algorithm.

In 50 PHEVs, the maximum best fitness and minimum best fitness were 469.7489 and 7.6478 respectively. The average best fitness is 165.9650. In 100 PHEVs, the maximum best fitness and minimum best fitness were 679.7151 and 9.5076. The average best fitness here is 182.9313. In 300 PHEVs, maximum best fitness and minimum best fitness were 541.4769 and 5.9631 respectively. The average best fitness is 197.5908. For 500 PHEVs, the maximum best fitness and minimum best fitness were 615.8314 and 5.9631. The average best fitness is 197.5908. In 1000 PHEVs, the maximum best fitness and minimum best fitness were 678.9197 and 0.9963. The average best fitness is 172.4528.

As APSO is a population-based optimization techniques and the fitness function is non-linear, so the fitness values fluctuates for each iteration [31,32,33,34]. However, the maximum best fitness remains in the range of 450–700 and the minimum best fitness remains in the range of 0.5–10. According to Table 7, average best fitness is in near value scopes for five different scenarios.

Table 7 Fitness evaluation for APSO

As APSO is a population-based optimization techniques and the fitness function is non-linear, so the fitness values fluctuates for each iteration [31,32,33,34]. However, the maximum best fitness remains in the range of 450–700 and the minimum best.

Table 8 shows the average computational time requirement for APSO method. The average computational time for 50 PHEVs is 1.696 s and for 1000 PHEVs it increases up to 2.092 s.

Table 8 Average computational time for APSO

APSO requires more adjustment of parameters, according to the standard form of PSO. But more number of PHEVs can be solved in less time by APSO, comparing to the PSO. By using the APSO, the velocity vector is effective for the capability of local exploitation. Also, APSO suffers early convergences in primary stages. In order to avoid premature convergence, Gravitational Search Algorithm (GSA) has been used in this study.

4.3 Findings with gravitational search algorithm (GSA)

Majority of the optimization algorithms comes with local searching techniques and these techniques may get stuck on the local maxima. Most search techniques make an effort for searching and detecting a global maximum in the presence by the local Maxima [20]. At this point, the GSA is good at performance shown during searching process. The term: exploration is used for defining the ability of an algorithm to spread out the problem in search gap whereas the term: exploitation is for the ability of detecting optimum solution, which is near to a favorable one [21].

In 50 PHEVs, 781.1267 and 0.2191 were found as the maximum best fitness and the minimum best fitness values. Here, the average value of best fitness is 158.8289. For 100 PHEVs, 872.648 and 1.005 were the maximum best fitness and the minimum best fitness values respectively. At this point, the average value of best fitness decreases up to 182.309. For 300 PHEVs, the maximum best fitness and minimum best fitness were 743.1251 and 2.3279 respectively. The average best fitness is 172.4296. In 500 PHEVs, the maximum best fitness and minimum best fitness were 836.2707and 0.9818. The average best fitness decreases up to 152.36437. For 1000 PHEVs, the maximum best fitness and minimum best fitness were 968.7652and 7.2747. The average best fitness decreases up to 161.52349.

Finally, Table 9 summarizes the result. From that it can be concluded that, average best fitness remain almost in similar pattern for five different scenarios.

Table 9 Fitness evaluation of GSA

Table 10 shows the Average computational time requirement for GSA method. The average computational time for 50 PHEVs is 2.72 s while for 1000 PHEVs it increases up to 2.092 s.

Table 10 Average computational time for GSA

We performed each scenario 50 times to have idea regarding the performance and also superiority and efficiency of the related algorithm.

For 50 PHEVs, the maximum best fitness and minimum best fitness were 931.03 and 7.6478 respectively. The average best fitness is 165.9650. In 100 PHEVs, the maximum best fitness and minimum best fitness were 625.82 and 3.39 respectively. The average best fitness decreases up to 184.36. For 300 PHEVs, the maximum best fitness and minimum best fitness were 434.16 and 7.43 respectively. The average best fitness is 181.03. In the case of 500 PHEVs, the maximum best fitness and minimum best fitness were 454.04 and 7.23 respectively. The average best fitness is 186.70. Finally, for 1000 PHEVs, the maximum best fitness and minimum best fitness were 740.40 and 0.17. The average best fitness decreases up to 185.16.

From the above numerical data, we can analyze the simulation behavior of APSO method. As it is a population-based optimization techniques and the fitness function is non-linear, so the fitness values fluctuates for each iteration. However, the maximum best fitness remains in the range of 400–950 and the minimum best fitness remains in the range of 0.1–8. Table 11 summarizes the result. From that it can be concluded that, average best fitness remain almost in similar pattern for four (05) different scenarios.

Table 11 Fitness evaluation for APSO

Table 12 shows the Average computational time requirement for APSO method. The average computational time for 50 PHEVs is 4.228 s while for 1000 PHEVs it increases up to 72.408 s.

Table 12 Average computational time for APSO

4.4 A comparison among swarm intelligence techniques

In addition to the findings over each algorithm, it is also important to focus on a comparison including all algorithms. This sub-section deals with that in this manner. In detail, all of the four techniques were run on same computer along with same iterations (100) and total 50 independent runs in order to ensure the fare comparison [31]. The comparisons among applied swarm intelligence-based techniques are given below:

4.4.1 Stopping criteria

In any swarm intelligence algorithm there are some initial solutions from which candidate solutions are created. Next, each solution is evaluated and the algorithm choose the best solution. If the stopping criteria is met, the algorithm will produce final solution otherwise it will again search for best solutions from the initial step.

4.4.2 Convergence analysis

Speed and rate of convergence to the optimal solution are significant when an algorithm discovers an ideal solution to a given problem [41]. Here, a trade-off is required to be done between computational time and the proper convergence. Table 13 shows the number of iterations needed to be converged for each algorithm for five different cases.

Table 13 Convergence iterations

4.4.3 Fitness value

Fitness value presents the solutions for optimization technique applying to a particular objective function upon given constraints and set of parameters. The fitness value represents the strength of any optimization technique. In detail, maximum best fitness, average best fitness and minimum best fitness have been presented in order to evaluate the performance of the applied optimization techniques. PSOGSA shows best fitness values for all five cases (50, 100, 300, 500 and 1000 PHEVs). The fitness value comparison among all techniques are shown in Fig. 6. Single techniques like GSA and APSO show overall better result compared to PSO technique.

Fig. 6
figure 6

Average best fitness versus number of PHEVs

4.4.4 Computational time

In order to maintain fare comparison, all the simulation runs on same computer as well as same swarm size (population) and iteration. Figure 7 shows the average computational time comparison of all the four optimization techniques considering five scenarios. PSOGSA, the hybrid technique takes more time to complete 100 iterations whereas both PSO and APSO techniques show better results in terms of computation time.

Fig. 7
figure 7

Average best fitness versus number of PHEVs

4.4.5 Robustness

Robustness is based on the ability of an optimization problem to perform well over a wide range of population [42]. Furthermore, optimization strategies and parameters must either remain constant over the set of problems or should be automatically set using individual test problems attributes. Among our optimization techniques, PSOGSA shows best robustness as the standard deviation is less compared to PSO, APSO and GSA. Table 14 shows the standard deviations of each techniques considering all five cases of PHEVs. According to the table, single methods like PSO, APSO and GSA show deviation in terms of average best fitness values. The standard deviation for each of these techniques is more than 10. Whereas, Hybrid PSOGSA shows the standard deviation 2.55.

Table 14 Standard deviation for the applied techniques

5 Future research directions

Obtained results—findings in this study open the doors to further ideas. In this context, it is possible to think about some future research directions. Multi-objective capability should also be provided for multi-criteria optimization problems [43]. Some of remarkable ones can be explained as follows:

  • Ant colony optimization (ACO) Ant colony optimization (ACO), introduced by Dorigo in his doctoral dissertation, is a class of optimization algorithms modeled on the actions of an ant colony. ACO is a probabilistic technique useful in problems that deal with finding better paths through graphs. Artificial ‘ants’ simulation agents locate optimal solutions by moving through a parameter space representing all possible solutions [12]. For solving a highly non-linear fitness function, ACO method can be applied in order to achieve high fitness value and also less computation time. This method is a member of Swarm Intelligence (SI) group. So, the similar results are expected like PSO and APSO. Researchers should apply ACO for solving charging problem of PHEVs and find the outcomes with extensive comparison with other methods.

  • Artificial bee colony (ABC) optimization Artificial bee colony (ABC) algorithm is one of the most recently introduced swarm-based algorithms. In ABC, as a population based algorithm, the status of a food source symbolizes a possible solution to the optimization problem and the nectar amount of a food source corresponds to the quality (fitness) of the associated solution [44]. Future studies for solving smart charging problem of PHEVs should involve the ABC, too because of its proved success in advanced optimization problems.

  • Hybridization with local search method Although swarm intelligence-based methods have established their capability to explore large search spaces, they are comparatively incompetent in fine-tuning the solution. Future studies can be carried out by hybridizing PSO or GSA (swarm intelligence-based algorithm) with local search method.

6 Conclusions

In this study, it was aimed to optimize state-of-charge, with respect to charging time, present SoC and in this context, the performed applications covered the related sub-objectives of optimizing the state-of-charge of Plug-in hybrid electric vehicle using swarm intelligence techniques and a general performance evaluation of swarm intelligence techniques in terms of fitness value and computational time. In order to achieve that, the study has employed four swarm intelligence techniques called particle swarm optimization (PSO) and gravitational search algorithm (GSA), accelerated particle swarm optimization (APSO) and hybrid version of PSO and GSA (PSOGSA), respectively. Because the results—findings that can be obtained with this study are important for an advanced real-world optimization problem like charging plug-in hybrid electric vehicle, necessary emphasis has given to different types of problem scenarios and the applied swarm intelligence research flows in this manner.

The future research works will be carried out with other meta-heuristics approaches such as Genetic Algorithms, Differential Evolution, Harmonic Search Algorithms, Ant Colony Optimization, Cuckoo Search Algorithms and hybrid optimization techniques of swarm intelligence and evolutionary computation.