Abstract
The disorderly charging of large-scale electric vehicles will aggravate the peak-valley difference of the power grid, and affect the power quality and life of the transformer. The fuzzy logic control strategy for charging and discharging optimization of charging vehicles under the framework of fuzzy logic control from the perspective of the group is considered in this article. A real-time control method based on the clustering characteristics of the charging end time is proposed according to the different charging requirements of the connected electric vehicles and fuzzy logic control is adopted to solve the problem of optimal charging and discharging power of the entire cluster and a single electric vehicle. A fuzzy logic control model considering the charging and discharging of electric vehicles is established orienting at minimize daily load fluctuations and control penalties in the upper layer. The charging and discharging cost of electric vehicle owners is considered to solve the optimal control problem of the charging and discharging power of a single electric vehicle. Taking the data of the typical regional distribution network load as an example, it is verified that the real-time charging optimization strategy under fuzzy logic control through simulation can ensure the reliable operation of the power grid while considering the interests of all parties.
Keywords
Introduction
The coal has long dominated the energy consumption in our country and direct combustion of massive coal has caused serious air pollution, which is the main cause of haze. The continuous increase of the proportion of electric energy in energy end-use, renewable energy in the proportion of electricity consumption and thermal coal in the proportion of coal consumption is proposed in the “Thirteenth Five-Year Plan for Electric Power Development” issued by the National Development and Reform Commission and the National Energy Administration, accompanied by using the electrical energy instead of burning coal and fuel oil based on the development of clean energy and the prevention and control of air pollution However [5], the access of large number of new energy power generation based on wind, light and other renewable energy has brought severe challenges to the economic and safe operation of the power distribution network [3]. The overrun of the node voltage and branch electric power caused by the reversible feed of power flow of the power grid will limit the absorption capacity of new energy [5]. In addition, the charging and discharging power of electric vehicles also affects the distribution of network power flow and as the scale continues to increase, it will have a unignorable impact on the power grid [6, 8]. Network reconfiguration is an important means for the power distribution network to achieve power flow optimization [4]. The topology of the power distribution network is changed through the switching change of switches to optimize the electric power distribution [1]. However, if the real - time control cannot be realized through the switch, the switches need to be optimized on a long-term scale and the switching plan need to be determined [7]. The charging and discharging power station for the electric vehicles has the electric power adjustment ability for a short-term [2], the charging and discharging electric power can be optimized to optimize the network power flow distribution in a short time scale [9, 11]. In order to achieve the coordination between the two methods and maximize the consumption of renewable energy, it is necessary to comprehensively consider the network reconfiguration scheme and the optimization of charging and discharging power on a long-term scale (usually day-ahead) [10, 12]; Under the short-term scale (usually the intraday), it is necessary to optimize the charging and discharging power of electric vehicles quadratically according to the actual situation on the basis of the control determined a few days ago, so as to stabilize the uncertainty of new energy output [13, 15]. Therefore, a two-stage optimization method that can fully realize the coordination between the two is needed to further improve the consumption capacity of new energy generation in the power distribution network [14].
In response to the above problems, clustering is conducted in this paper, based on the distributed hierarchical control framework, according to the charging characteristics of the electric vehicle cluster, taking the end time of charging as the discrimination amount, and a double-layer real-time fuzzy logic control model is established. The optimal charging and discharging power of the cluster is solved with the goal of minimizing daily load fluctuations, control deviations and security constraint penalties in the upper layer and the optimal electric power distribution of the charging and discharging power for single electric vehicle is solved in the clustering with the goal of minimizing the economic cost of electric vehicles and control deviations of the cluster in the lower layer. Taking the data of typical regional distribution network load as an example, it is verified that the effectiveness of the proposed real-time charging and discharging control method for electric vehicle clusters under distributed hierarchical control to ensure the economic operation of the power grid on the basis of meeting the travel needs of users of electric vehicles.
Hierarchical control framework for electric vehicle clusters
The distributed hierarchical control framework for charging and discharging electric vehicles as shown in Fig. 1 is adopted in this paper. The information communication and instruction transmission are carried out between the intelligent charging and discharging units of electric vehicles through the control center of the distribution network and cluster controller of each electric vehicle, to realize the real-time control of electric vehicle cluster charging and discharging.

Distributed hierarchical control framework diagram of electric vehicle cluster.
The charge and discharge of all electric vehicles are controlled orderly within a certain area with the cluster as a means of load management for power distributors. After the electric vehicle reaches the charging area, it submits its own battery status and charging requirements to the cluster controller and accepts its control in charge and discharge. There are a large number of electric vehicles in the cluster, and their intraday trips are distributed overall relatively stable. Its statistical model can be analyzed through statistical analysis of historical data. Therefore, the day-ahead and real-time control policy is formulated, the cluster can be used as the control unit.
Inside the electric vehicle cluster, the electric vehicles are divided into charging queues according to the driving characteristics. First, the available schedulable capacity (ASC) of the electric vehicles is calculated, which is defined as the ratio of the time D to the power grid and the shortest charging time tmin.
When ASC > 1, the electric vehicle can be regarded as having available schedulable capacity, the larger the ASC value, the more flexible the control strategy of the electric vehicle will be. During the actual control, considering that the available schedulable capacity of electric vehicles with an ASC value slightly greater than 1 is extremely limited, such vehicles are not included in the V2G control process. The electric vehicles with ASC over 1.5 is selected as the object of real-time optimization control in this paper.
Each charge and discharge queue is modeled as a virtual battery, its power changes with time, it is affected by the charging efficiency of electric vehicles in the queue and the initial power of newly connected electric vehicles, which can be expressed by the following formula:
Objective function
As a medium of interaction between owners of the electric vehicles and the power distribution network, each electric vehicle cluster controller needs to maximize the economic benefits of users under the premise of ensuring the safe operation of the power distribution network. From the perspective of the power distribution network, it is hoped that the load fluctuations can be stabilized after orderly charging of electric vehicles; from the perspective of vehicle owners, it is hoped that the charging needs can be met with the minimum cost. Therefore, the electric vehicle cluster aims at minimizing the load peak-valley difference and penalty cost from the beginning of the cluster optimization to the expected completion time of the cluster in the control are to establish the charging and discharging optimization model.
In the formula: F1 means that the net load fluctuation of the area controlled by the cluster is the minimal; F2 means that the control cost of the cluster controller is the minimal, including the control cost caused by the deviation between the control electric power of the charging and discharging queue and the actual electric power of each electric vehicle and the control cost due to bordering on the security constraint of the power distribution network.
Where: PL,t is the conventional load in the electric vehicle cluster control area at t time period; PelectricvehicleA,t is the total charging and discharging power of the electric vehicle cluster at t time period, that as positive means charging, that as negative means discharging; T0 is the cluster start optimization period;; Tq is the unified charging completion time of the cluster.
For each charging and discharging queuen, there are the following constraints on the charge demand, state of charge and charging and discharging power: Electric vehicles must meet the minimum charging requirements before they leave the power grid.
Where: T0,n is the charging start time of the nth queue; Tq,n is the unified charging end time of the nth queue; ηq,n is the charging efficiency of the nth queue. The state of charge should meet the following constraints to prevent excessive charging and discharging.
Where: Sk,max and Sk,min are the upper and lower limits of the state of charge of the k-th electric vehicle. The charging and discharging electric power should meet the limit of the electric power.
Algorithm solution process and parameter settings
The IEEE33-node power distribution network is taken as an example to verify the effectiveness of the cluster control architecture in this paper. The reference electric power is selected as 10 MV·A, the reference voltage is 12.66 kV, the allowable voltage deviation of the load node is ±5%. The power distribution network is divided into 3 areas, the charging piles for electric vehicles in each area are uniformly controlled by a cluster controller. It is assumed that the charging piles are centrally connected to nodes 3, 13, and 30, the simulation time of each node is 12:00 until 12:00 the next day, the simulation time interval is 15 minutes, a total of 96 time periods, the load is considered unchanged in each time interval. Assuming that each cluster has 50 vehicles connected during the simulation time, a total of 150 vehicles are connected to the power distribution network area.
Impact of real-time charging optimization strategy on power grid
Comparing the orderly real-time charging and discharging model of clustering control proposed in this paper with the disordered charging model, the result is shown in Fig. 2. Disorderly charging means that when the electric vehicle is connected to the power grid, the system is directly charged according to the maximum charging power to meet the demand.

Comparison diagram of optimization effects of electric vehicle cluster charging and discharging.
It can be seen from Fig. 2 that there is a certain peak-valley difference during the daily operation of the conventional load, the standard deviation of the load fluctuation is 298.16 kW, while the disordered charging will further aggravate the peak load during the time period 16–32 (16:00–20:00), The standard deviation of load fluctuation increased to 346.44 kW, which made the utilization efficiency of power resources decrease. In addition, it can be seen from Fig. 3 that the voltage at the end node of the power distribution network drops below 0.95 pu during this time period after the use of disorderly charging, which does not meet the system’s requirements for voltage quality and threatens the safety of grid operation. After the charging and discharging strategy of this article is adopted, charging load of the part of the electric vehicle is shifted to the time period 56–72 (02:00–06:00 the next day) with less conventional load and higher voltage margin, which greatly stabilized the fluctuation of the load curve. The standard deviation of load fluctuation dropped to 160.39 kW, which realized peak load shaving.

The voltage amplitude curve of the end node 18 of the power distribution network.
Figure 4 shows the optimized electric power command and the actual response electric power curve of the electric vehicle for the clusters in 3 areas during the whole day control period. It can be seen that through the objective function of penalizing the control difference of each charging queue in the cluster, the actual charging and discharging electric power curve of the electric vehicle can be basically consistent with the overall optimized electric power command of the cluster.

Response curve of cluster optimized electric power and actual electric power of the electric vehicles.
5 electric vehicles are randomly selected with different access and departure times in area 1. The charging and discharging optimization effect of individual vehicles in the cluster are observed, the SOC changes are shown in Fig. 5, and the overall trend is consistent with Fig. 4(a). It can be seen from the figure that the load demand in the 16–32 period is large, therefore, the electric vehicles connected to the system (except electric vehicle 2) at this time are discharged first to feed back to the power grid, and then start charging after the 40–48 period. During the 82–90 period, there is a small peak in the load. At this time, because electric vehicles (electric vehicle 1, electric vehicle 3, electric vehicle 4) are off grid successively, electric vehicle 2 has flexible time to control and has not discharged after being connected to the grid, so the electric vehicle 2 feeds back energy to the power grid.

SOC change curve of selected 5 electric vehicles.
Meanwhile, in terms of the economic benefits of the owners, the charging cost of all owners during disorderly charging is 2,149 yuan and after the optimization strategy of this article is adopted, the total cost of charging and discharging after including discharge income and discharge loss is reduced to 1,495 yuan, a 30.43% reduction. It can be seen that the charging and discharging management of the cluster controller reduces the load peak-valley difference while also taking into account the economic interests of the owners of electric vehicles.
In this paper, a real-time control method for charging and discharging power of charging vehicle is designed, which can output real-time charging and discharging power according to vehicle emergency degree, node voltage deviation and real-time electricity price; Compared with the current charging condition, the battery dwell time is more reasonable; The fuzzy processing method of real-time price based on median mean absolute deviation is proposed, so that the controller can reasonably feedback the real-time price and make the corresponding real-time control decision. In the design process of fuzzy logic controller, there are some subjectivity in the selection of membership function and the determination of fuzzy rules.
Conclusion
A distributed hierarchical charging and discharging control framework for electric vehicle clusters is adopted to conduct the grouping of the clusters with the end of charge as the discrimination amount, establishing a real-time optimization model of electric vehicle cluster charging and discharging power with the goal of minimizing daily load fluctuations. Considering the charging and discharging cost of owners of electric vehicle, the optimal electric power distribution of the charging and discharging electric power of a single electric vehicle in the cluster is solved, and the total output of the cluster is as close as possible to the control result through the iterations of upper and lower layers. The simulation algorithm shows that the control framework and optimization model proposed in this paper is used to effectively stabilize load fluctuations, it ensure that the system voltage meets the security constraint, and make the actual charging and discharging power of electric vehicles basically close to the overall optimized power of the cluster. Meanwhile, the interests of all parties are taken into account, realizing the coordinated control between the power distribution network, electric vehicle clusters and electric vehicle individuals, which is suitable for real-time optimization control of electric vehicle clusters.
