Research on energy storage charging piles based on improved genetic algorithm

Aiming at the charging demand of electric vehicles, an improved genetic algorithm is proposed to optimize the energy storage charging piles optimization scheme. Firstly, the characteristics of electric load are analyzed, the model of energy storage charging piles is established, the charging volume, power and charging/discharging timing constraints in the charging process are considered, and the optimization is carried out by the improved genetic algorithm, and the profit of charging piles and user charging electricity charges are calculated, so as to obtain the possible optimal parameters, as well as the impact of the energy storage system on the stability of the power grid. Secondly, the analysis of the results shows that the energy storage charging piles can not only improve the profit to reduce the user’s electricity cost, but also reduce the impact of electric vehicle charging on the power grid load.


Introduction
In the context of China's vigorous promotion of "dual carbon", EVs (electric vehicles) will become the mainstream.This technology has the advantages of environmental protection, can improve the energy structure, and regulate the load curve of the power grid.The global EVs industry has been developing rapidly.However, the increasing price difference between peak and valley electricity consumption has greatly increased the cost of electricity, and the large-scale charging of EVs has also had a certain impact on the stability of the power grid.For this reason, this paper proposes to combine energy storage with charging piles to have some positive impact on the above problems.
Currently, some scholars have made a lot of research on the relationship between EVs and power grids.Literature [1] proposes the use of V2G technology to enable EVs to participate in power grid peaking services to achieve the objectives of minimizing operating costs, minimizing load fluctuations on the power grid side, and maximizing benefits on the customer side, focusing mainly on the monsoon factor.Literature [2] proposes the participation of electric vehicle users in orderly discharging under time-sharing tariffs, using a particle swarm algorithm optimization scheme to reduce the load peakvalley difference of the power grid as well as the cost of electricity consumption.
However, EV users will be reluctant to participate in peaking considering the impact of power grid regulation via V2G on EV battery life.Energy storage charging piles can replace EVs for V2G regulation.Currently, scholars have conducted research on energy storage charging piles.Literature [3]  proposes an energy storage charging piles that can reduce the load peak-valley difference, improve the system efficiency and equipment utilization, which is of great significance and practical application value for the problems such as power grid fluctuation caused by EVs.Literature [4] proposes a movable EVs charging system based on energy storage system, which overcomes the limitations of fixed charging facilities and effectively solves the drawbacks of fixed charging piles.
This paper improves the genetic algorithm to achieve better economy and power grid stability.

Characterization of electrical loads
In this paper, charging-based private EVs are used as the object of study.Most of the time EV users charge at the charging piles is during the peak load hours of the power grid, which can further increase the original power grid load peak.The EV charging load and the daily load characteristics of the power grid need to be studied during the low power grid usage when EV charging is low.By dividing the day into 96 time intervals of 15 minutes each [5] , the load curve of the day is obtained as in Figure 1.It is possible to visualize the changes in electricity consumption of a community in a day, with peak periods concentrated at 8 to 15 and 18 to 21 (from 32 to 60 and 72 to 84), and trough periods concentrated at 22 to 6 the next day (from 88 to 24 the next day).Shifting the charging load from peak load to low power consumption periods, charging the charging piles for energy storage during the low power grid load periods, and then discharging the stored energy from the charging piles for electric vehicles that need it during the peak power grid load periods [6] .Then, Shifting the load of EVs on the power grid through energy storage at charging piles, reduce EV charging on the power grid perturbation, and improves the economics of charging piles.

Charging load modeling
Figure 2 shows the framework diagram of the energy storage system, The energy control system (EMS) is used to monitor, control and manage the operation of the energy storage system, monitor the status of the energy storage equipment, including voltage, current, temperature, etc., and control the flow of energy, the charging and discharging process, as well as the protection and safe operation of the system according to the demand.The constraints and objective functions of this paper are as follows: 1) The following constraints are set to ensure power conservation in the energy storage system.
Pt are the maximum charging and discharging efficiency of the charging pile i during the t time period, respectively.
2) In order to prevent the battery from overcharging or overdischarging during the charging and discharging process, it is necessary to constrain the SOC (state of charge) of the battery of the energy storage system [7] .
Where, t SOC , is the charge state at time t , t C refers to the remaining usable power of the battery at time t , and C is the rated capacity of the battery; max SOC is the maximum charge state of the battery to be charged .
3) In order to ensure that the charging pile is economically efficient enough, the power of the charging pile needs to be constrained [6] .
During the valley price, the power grid charges the energy storage and the power grid directly charges the trams that need it [6] .
At parity, whether the energy storage system acts or not is divided into two cases, a) The energy storage system is inactive when fully charged, and the power grid directly charges the trams that need it, as in equation ( 5), and the charging piles do not generate economic benefits; and b) when the energy storage system is not fully charged the storage system continues to charge at parity, and obtains the peak- When the price of electricity is at the peak price, energy storage prioritizes the discharge of the electricity stored at the low price of electricity to obtain the peak-valley price difference.


   Where () c Pt, () f Pt is the storage charging and discharging power at time t , max () c Pt and max () f Pt are the maximum charging and discharging power of the storage at time t 4) Energy storage charging piles charging time [8] .
24,32 60,72 84,88 If the electric vehicle charging demand during peak hours is not greater than the storage capacity of the energy storage system, this is, when If the electric vehicle charging demand during peak hours is greater than the storage capacity of the energy storage system, this is, 1 =   the power required by the electric vehicle is supplied by the energy storage system and the power grid, and the charging piles can be obtained with the profit objective function as: In the formula,

Improved multi-objective genetic algorithm
Genetic algorithm is practical and simple, but for the usual genetic algorithm optimization is prone to local optimum, slow convergence, etc., this paper improves the selection by applying the elitist idea, using the method of crossover and mutation operator cooperation to solve the phenomenon of local optimum and improve the convergence speed.

Improved selection operations
The selection operation adopts an elite retention strategy, whereby the population individuals are sorted in descending order according to the size of their fitness as well as numbered, the 2% of the individuals with the highest fitness are selected as the elite individuals, and the indexes of the 2% of the individuals with the highest fitness are extracted and saved, In subsequent genetic algorithm operations, these elite individuals can be indexed to ensure that better parent genes are passed on to the next generation, thus facilitating algorithm convergence and improved optimization results [9] .

Improved mutation operations
Mutation operation continuously increases the diversity of the population in evolution and helps to jump out of the local optimum [10] .Mutation probability M is an important parameter, representing the number of variants of the mutated individuals, which usually takes a value not greater than 0.1 and is constant, M is small and helps to jump out of the local optimum, but too large or too small a value of M has an impact on the iterative process of the algorithm.Therefore, a new scale of variation is introduced [11] , M changes with the process of iteration, a wide diversity of individuals is required in the initial population, and a gradual decrease in diversity is needed in the evolution of the population to prevent the phenomenon of prematurity, prevent the loss of good genes, and improve the local search ability of the algorithm.The trend is approximated by an exponential function with e as the base is shown in Figure 3 and defined as: x y e − = (15) By using mathematical methods to transform the function and by using the MATLAB function fitting

Improvement of crossover operations
Index for selecting crossover genes from populations.The crossover genes are indexed as a randomly generated vector, and each element of this vector is a random integer within the population size range.Selection of individual E selected from elite individuals according to the index provided in the crossgene index.The population N generated by the mutation operation.The corresponding genes of elite individuals and population N were averaged to generate the crossover population RN ,as shown in equation (17).
RN is the mixing of genes from elite and mutant individuals to produce new individuals and introduce more genetic variation and diversity, thus contributing to the search for a wider solution space.

Termination of evolution
Terminate the evolution to satisfy the combinatorial objective function Z of the following relationship: It mainly satisfies the charging pile to obtain the maximum benefit, secondly realizes the minimum user charging electricity cost, and finally achieves the minimum peak-to-valley difference of the power grid, so it accounts for the weights of 0.5, 0.  In order to ensure that the algorithm is not prematurely limited to local optimization and ensure that the algorithm has a convergence speed, after improving the selection, mutation, crossover and other operations, the operation flow of the algorithm is shown in Figure 5.

Parameter setting
In order to verify the effectiveness of the improved algorithm in this paper, we can calculate and compare according to the following conditions: There are 100 electric vehicles in the neighborhood, each with a battery capacity of 40kW-h and a charging rating of up to 50kW.Each user wants to charge the battery to 90% capacity to avoid overcharging.The maximum capacity of the energy storage charging piles' energy storage battery is 1MW.Set the initial SOC (proportion of remaining battery capacity) of the electric vehicle to a randomly generated 0.2 to 0.9.The initial population size is 200, and the number of evolutionary generations is 1000.All users in the cell charge in the cell, of which 80% charge during peak load hours, 10% charge during valley hours, and 10% charge during normal hours.The charging load is calculated for 100 electric vehicles at 15 minute intervals.
Under the above conditions, we can use the improved optimization method proposed in this paper to perform calculations and compare with other traditional algorithms or no optimization.The superiority of the method proposed in this paper can be verified by comparing the load curve, charging piles profit, charging cost and other indicators.

Figure 2 .
Figure 2. Framework diagram of energy storage system.

T
storage charging time; o SOC is the initial charging state of the energy storage system.5) Profit of energy storage charging pile, user charging fee, power grid peak and valley differential rate calculation.The peak-to-valley difference in electricity captured by energy storage 1 Peak leveling difference power is generated only when the storage system capacity is still remaining in the low valley of electricity consumption and 12 , all the power required by electric vehicles is provided by the energy storage system, and the charging pile can obtain the profit objective function as:

1 W and 2 W
are the amount of power stored by energy storage charging piles in the valley and flat periods of the grid, respectively; 1,2,3 v W are the amount of power charged to EVs by charging piles in the valley, flat and peak periods, respectively; vc T is the charging time of EVs in each time period; vc P is the charging power of EVs corresponding to each time period; PCzd zp PC and zf PC are the charging prices for charging pile valley time, flat price, peak time tariff; W  is the power shortage; d PC is the power grid low valley tariff; p PC is the power grid flat tariff; g PC is thepower grid peak time tariff; R is the profit of charging pile; COST is the charging charge of the user;F the power grid peak-valley difference; minimum loads on the load curves.

Figure 3 .
Figure 3. Trend plot of exponential function with e as the base.

Figure 4 .
Figure 4. Trend plot of the transformed function.

Figure 1. Daily load curve for a neighborhood. Table 1 shows the tariff table for different time periods in a city, and this paper optimizes the energy storage charging piles according to the tariff table and load curves. Table 1. Electricity tariffs in a city
Pt is the maximum work efficiency during the t time period.
max () c Pt and max () function to obtain a new function that conforms to the trend of variation, the desired M trend can be obtained, as shown in Figure4: 6 3, and 0.2, respectively.