Electric vehicle charging optimization strategy based on the mopso algorithm

Aiming at the problems of electric vehicle disorderly charging on grid load stability and charging cost, this study considers the grid load pressure and presents a multi-faceted optimized model for electric vehicle charging. The model is addressed by utilizing a particle swarm optimization algorithm designed for multiple objectives. The outcomes demonstrate that the charging framework built upon the multi-objective particle swarm algorithm has a fast convergence speed and can avoid the limitation of the local optimal solutions. Under the premise of reducing by managing the grid load fluctuation, the model effectively curbs the expense of vehicle charging while also minimizing peak-to-valley disparities in grid load.


Introduction
With the increase in global energy consumption and the worsening environmental challenges, electric automobiles are receiving wider and wider attention and recognition as a new type of clean energy transport [1].However, due to the range limitation of EVs and the imperfect charging infrastructure construction, there is a serious mismatch between the charging demand and supply of EVs, especially during peak hours when the charging demand exceeds the carrying capacity of charging facilities [2].Therefore, how to optimize the charging scheduling of electric vehicles has become an important issue.
The goal of electric vehicle scheduling optimization is to maximize the charging demand for mine transport based on the rational allocation of charging resources while reducing the burden on the charging infrastructure and lowering charging energy losses and costs.Electric vehicle charging scheduling optimization is a hot topic in academic and industrial research.For example, in [3], a twolayer optimization model of distribution network-charging stations was established under the hierarchical management of EV charging.The upper layer considered the safety constraints of the distribution network and the lower layer considered the operator's charging plan to optimize the economics of the distribution network and the participation of vehicle owners.However, the model did not take into account the dynamic changes in charging users' behaviour or their electricity demand.In addition, in [4], a charging model was constructed and scheduling models were evaluated to take into account burden aggregator scheduling, PV consumption, user satisfaction and consumption demand.However, it did not consider the impact of time-sharing tariffs on users' charging costs.
The paper aims to address load peak-valley disparities, load variation, and charging expenses post electric vehicle integration into the grid through the creation of a multi-objective optimization charging model.According to the operational principles governing electric vehicles and the access time of charging piles, a multi-objective optimization model is established, and the objectives include

Electric vehicle charging load
2.1.Time of connection to the grid and time of departure from the grid The user's travel pattern is related to the charging load generated by the user, the most important of which is the grid-connected charging time for car charging [5].The appointed moment is designated as hc t and the leaving instant as hd t .

Charging load modelling
To fulfil the user's power requirements and guarantee the secure and seamless functioning of the power grid, the following data can be obtained when combining the grid connection time of the EV, and analyzing the user's charging urgency, the battery capacity, charging efficiency, charging power, and the battery's charge level upon electric vehicle departure in order to achieve the intended state of charge [6].
The owner uploads information about his charging needs to the aggregator when he connects his EV to a charging pile.The aggregator analyses the urgency of EV charging.
The electric vehicle charging indicator i U is the charging mode effectiveness assessment to ensure the EV achieves the desired d i SOC level when leaving.i U can be calculated by using the following equation.
Where i U is used to indicate the indicator for selecting the mode of charging after the car is connected; d i  is the actual departure time; C i T is the actual access time; slow p is the charging power;  is charging efficiency; The amount of charge in the battery is represented by ; SOC denotes the state of charge at departure for charging; SOC represents the state of charge at the onset of charging.

S
Each EV charging demand is different, when i U is less than 0, the disorderly charging mode is used, if is greater than or equal to 0, the sequential charging mode is selected.In practice, unorganised charging of electric vehicles has high charging power and the actual charging time is less than the pre-rated charging time.In addition, in this paper, it is assumed that the electric vehicle is charged according to the pre-determined charging time.
Combining the above data, the electric vehicle charging duration end i T is obtained by the following equation:  In this paper, the proposed model is shown in Figure 1.EVs upload their charging information (arrival time, pre-departure time, state of charge on arrival, expected state of charge) to the aggregator when they are connected to the charging pile, which then sends the charging plan of each EV to the user.If the user does not participate in the charging optimization, once connected to the charging pile, the electric vehicle commences charging at maximum power until the state of charge satisfies the user's charging requirement.In the charging optimization model, EVs are scheduled and optimized by a MOPSO.Hence, streamlining the electric vehicle charging procedure can lead to a decrease in the disparity between peak and off-peak loads, consequently lowering the overall charging expenditure.

Objective function
To enhance grid stability and mitigate user charging expenses, three objectives are established: discrepancy between peak and off-peak loads, load fluctuation, and overall charging expenditure [7].The peak-to-valley load difference represents the variance between the highest load value and the lowest load value within the power grid.Load variance refers to the level of total load fluctuation.A reduced variance signifies minimal load fluctuation within the power grid, indicating greater stability.The aggregate charging cost represents the summation of the charging expenses for all the electric vehicles, with a reduced total indicating superior economic efficiency.The complete network load during the j time slot is denoted as j P , and can be computed in the following manner.

Constraint condition
At the conclusion of the electric vehicle charging process, the state of charge (SOC) of the battery should align with the user's anticipated value and adhere to the user's operational needs.The maximum coordinated charging load should be lower than the maximum uncoordinated load. 1 Where is the desired charge state; is the charging state when connected to the grid.In the model of this article, for users who meet the emergency charging demand index, the electric vehicle will be charged at maximum power to meet the arrival time or meet the requirements of the desired battery charging state.Therefore, the equation below can express the charging status of electric cars across various time intervals:

PSO algorithm model
In the original PSO algorithm, the subsequent adjustments govern the position and velocity of each individual particle: Where k represents the count of particle iterations; , k id V stands for particle velocity i in ddimensional space; w stands for inertia weight; 1 c and 2 c are learning factors; The values of 1 r and 2 r are random between 0 and 1; k id P represents the individual extreme value of the particle; , k id G represents the optimal solution within the particle swarm; In the d -dimensional space, k id x represents the position of particle i .

MOPSO
The electric vehicle charging scheduling optimization model is a nonlinear multi-objective optimization model, and the scheduling model should improve the search speed on a global basis.As the number of iterations increases, more local searches are performed.Because the individual users of electric vehicles are not closely connected, their randomness is large.Subsequently, the algorithm is prone to local optima and exhibits reduced solution accuracy.In this paper, the dynamic inertia weight factor w is employed to mitigate this limitation.This paper uses the dynamic inertia factor to adjust the weight value, namely: Where max w and min w are the extreme values of the weighting factors; k represents the current number of iterations; max k represents the total number of iterations.The learning factor is adjusted to make the particles pay attention to the population position information, which could better maintain the convergence speed and search ability, and adjust the fitness of the population.
Where the larger 1 c is, the wider the search range of particles is; The larger 2 c is, the more particles converge to the global optimum; max C represents the upper limit, while min C denotes the lower limit of the learning factor, with values of 2 and 0.2, respectively.

Algorithm flow
The specific process is as follows: 1.When an electric vehicle is accessed, charging information is collected, charging urgency is calculated according to the equation, and charging power is selected.
2. Algorithm parameters are set, and particle position and velocity are initialized.
3. The value of each objective function is calculated according to Equations ( 7)-(9), and both the individual extremum and the collective extremum of the particle are obtained.
4. The position and velocity of the particle are adjusted by using Equations ( 13) and (14). 5.The inertia weight and learning factor are adjusted according to Equations ( 15) and ( 16). 6.The optimal Pareto solutions that meet the objective function and constraints are selected, and the historical best and global best are updated.7. It is verified if the maximum number of iterations has been reached; if not, it is necessary to return to step 3.And the number of iterations is increased by one.
8. Operation is ceased when the maximum number of iterations is reached, and the optimal solution is displayed along with the objective function value.

Basic parameters
Considering the grid connection time of electric vehicles, this paper divides a day into 24 periods, and each electric vehicle will remain in the same charging state for a specific period of time [8].To evaluate the effectiveness of the proposed charging scheduling optimization model, simulation experiments are conducted by using the multi-objective particle swarm optimization algorithm in MATLAB R2021a with the following parameter settings: The average battery capacity of the EV is 45 kWh, the EV charging power slow p and fast p are 3 kW• h and 7 kW• h, respectively, and the charging efficiency is designated as 0.9.The Time-of-Use (TOU) pricing is delineated in Table 1.
Table 1.Peak-valley time-of-use Electricity Price.

Simulation analysis
Aiming at the charging optimization matter of EVs, this paper compares the power grid load before optimization with that after optimization.In the pre-optimization charging mode, the electric vehicle will start charging at the maximum power after being connected to the charging pile, and stop charging until the expected state of battery charge or the predetermined charging time is reached.In the optimized charging mode, electric vehicles with urgent charging needs will be charged at a higher charging power to accomplish the desired goal of SOC.
To more clearly display the change in charging load and charging cost, a 24-hour scheduling interval is used.The total load and total cost after optimized scheduling are shown in Figure 2 and Table 2.As can be seen from Figures 2 and 3, 18:00 to 22:00 are respectively the peak time points for EVs connected to the grid, forming a peaking superposition with the original network load.The load in the distribution network reaches its peak at 21:00 and then begins to decline sharply, which may be caused by some electric vehicles reaching the expected charge state.After participating in coordinated charging, the peak load can be effectively transferred to the off-peak period, and the overall power demand of the coordinated charging mode is more dispersed.
As depicted in Table 2, in contrast to the grid load index before and after optimization, the discrepancy between peak and off-peak loads, as well as the charging expenses for electric vehicles, decreases notably.The power grid's peak-to-valley variance decreases by 559 kW.On the whole, the total load of the charging optimization model proposed in this paper is more dispersed.Combined with the TOU price, the charging cost of the three different methods is as follows: The pre-optimization charging cost is 4324.96yuan, and the charging cost after optimization is 3496.18yuan, reducing the cost by 19.16%.Based on Figure 4, Observations indicate that the proposed MOPSO algorithm demonstrates a faster convergence speed and superior optimization performance.This algorithm effectively avoids the problem of particle swarm clustering, poor searchability, and getting trapped in local optima.Moreover, it demonstrates excellent stability.

Conclusion
To mitigate the adverse effects of disorganized electric vehicle charging on the power grid and enhance grid operational efficiency, an orderly scheduling strategy is proposed, which combines the time-of-charge price.A coordinated multi-objective optimization model is established, which takes into account the total charge cost and load fluctuation variance, and adopts a MOPSO algorithm to address this issue.Through simulation analysis, the results demonstrate that compared with unordered charging, the orderly scheduling strategy considering the charging choice of EV users can effectively mitigate the impact and adverse effects of unordered charging on the peak load curve, improve the load level during the peak and trough of the load at night, and thus improve the efficiency of the generator set and improve the electric power supply quality.At the same time, this strategy can also help users reduce their own charging costs and achieve mutual benefit and win-win results.

Figure 1 .
Figure 1.Optimization model for electric vehicle charging.In this paper, the proposed model is shown in Figure1.EVs upload their charging information (arrival time, pre-departure time, state of charge on arrival, expected state of charge) to the aggregator when they are connected to the charging pile, which then sends the charging plan of each EV to the user.If the user does not participate in the charging optimization, once connected to the charging pile, the electric vehicle commences charging at maximum power until the state of charge satisfies the user's charging requirement.In the charging optimization model, EVs are scheduled and optimized by a MOPSO.Hence, streamlining the electric vehicle charging procedure can lead to a decrease in the disparity between peak and off-peak loads, consequently lowering the overall charging expenditure.
of fast charging services.

Figure 2 .
Figure 2. Total load curve of power grid.

Figure 3 .
Figure 3. Electric vehicle load curve.As can be seen from Figures2 and 3, 18:00 to 22:00 are respectively the peak time points for EVs connected to the grid, forming a peaking superposition with the original network load.The load in the distribution network reaches its peak at 21:00 and then begins to decline sharply, which may be caused by some electric vehicles reaching the expected charge state.After participating in coordinated charging, the peak load can be effectively transferred to the off-peak period, and the overall power demand of the coordinated charging mode is more dispersed.As depicted in Table2, in contrast to the grid load index before and after optimization, the discrepancy between peak and off-peak loads, as well as the charging expenses for electric vehicles, decreases notably.The power grid's peak-to-valley variance decreases by 559 kW.On the whole, the total load of the charging optimization model proposed in this paper is more dispersed.Combined with the TOU price, the charging cost of the three different methods is as follows: The pre-optimization charging cost is 4324.96yuan, and the charging cost after optimization is 3496.18yuan, reducing the cost by 19.16%.Table2.The Evaluation Indices of the Power Grid Load Before and After Optimization.

Figure 4 .
Figure 4. Comparison diagram of convergence before and after algorithm improvement.

Table 2 .
The Evaluation Indices of the Power Grid Load Before and After Optimization.The improved MOPSO algorithm is compared to the PSO algorithm to validate its effectiveness and superiority.The convergence curves of the algorithm are depicted in