Distribution Network Hierarchically Partitioned Optimization Considering Electric Vehicle Orderly Charging with Isolated Bidirectional DC-DC Converter Optimal Efﬁciency Model

: The access of large-scale electric vehicles (EVs) will increase the network loss of medium voltage distribution network, which can be alleviated by adjusting the network structure and orderly charging for EVs. However, it is difﬁcult to accurately evaluate the charging efﬁciency in the orderly charging of electric vehicle (EV), which will cause the scheduling model to be insufﬁciently accurate. Therefore, this paper proposes an EV double-layer scheduling model based on the isolated bidirectional DC–DC (IBDC) converter optimal efﬁciency model, and establishes the hierarchical and partitioned optimization model with feeder–branch–load layer. Firstly, based on the actual topology of medium voltage distribution network, a dynamic reconﬁguration model between switching stations is established with the goal of load balancing. Secondly, with the goal of minimizing the branch layer network loss, a dynamic reconstruction model under the switch station is established, and the chaotic niche particle swarm optimization is proposed to improve the global search capability and iteration speed. Finally, the power transmission loss model of IBDC converter is established, and the optimal phase shift parameter is determined to formulate the double-layer collaborative optimization operation strategy of electric vehicles. The example veriﬁes that the above model can improve the system load balancing degree and reduce the operation loss of medium voltage distribution network.


Introduction
In recent years, due to the large-scale access of distributed new energy sources and electric vehicles (EVs), the economy and reliability of the distribution network have been severely challenged [1,2]; especially with the surge of electric vehicle (EV) users, disorderly charging behavior will aggravate the imbalance of the distribution network load [3]. Therefore, there are usually two solutions to the above problems. The first is distribution network reconstruction [4,5], that is, the topology of the distribution network is adjusted, and then the power flow direction is adjusted by changing the closing and opening of switches. The other is optimal scheduling for controllable load.
Nowadays, relying on the rapid development of information collection, communication, and processing technology, the active distribution network can collect a large amount of data to provide a data basis for the distribution network reconfiguration plan. Thus, by changing the switch combination state, load balance can be achieved, system loss can be reduced, and the economic reliability of the distribution network can be improved [6,7]. Taking into account the temporal and spatial characteristics of loads such as EVs, and the uncertainty of the charging time, it is necessary to dynamically adjust the switch state to 1. Compared with most previous researches on dynamic reconstruction, this paper takes the switch station as the research object. This paper not only establishes a dynamic reconfiguration model between switch stations, but also proposes a dynamic reconfiguration model under a certain switch station. Especially, in the branch layer optimization, the chaotic niche particle swarm optimization (CNPSO) is proposed to speed up the solution convergence speed and prevent falling into the local optimum.

2.
In order to reduce the solving difficulty of dispatch, this paper proposes a doublelayer distributed optimization scheduling model. Specifically, multiple aggregators are set under a switch station, and the multi-level information interaction mechanism of network-aggregator-vehicle is established to formulate the charging strategy of electric vehicles.

3.
This paper innovatively proposes an orderly charging model for electric vehicles considering isolated bidirectional DC-DC converter optimal efficiency model. Specifically, the power loss model of the IBDC converter is established to determine the optimal shift ratio parameter for a given transmission power, and the optimal efficiency is applied to the ordered charging model.
The rest of this paper is organized as follows: In Section 2, medium voltage distribution network dynamic reconfiguration model with EV is established. Specifically, a dynamic reconstruction model between switch stations is established and an internal dynamic Energies 2021, 14,1614 3 of 20 reconfiguration model under a switch station is established. Subsequently, not only the principle of dual phase shift control is analyzed, but the transmission power loss model is established in Section 3. Furthermore, the orderly charging model of EV considering IBDC converter optimal efficiency is set up in Section 4. Simulation analysis is implemented in Section 5, and some useful conclusions are finally drawn in Section 6.

Distribution Network Dynamic Reconfiguration Model with EV
In Figure 1, A~N represent the switch station. The reconstruction between switch stations described in this paper means to change the state of disconnect switches and tie switches in the network to achieve regional load balance. The lower part of the arrow represents the location information of the specific load node under the switch station. The ring network cabinet adopts the interval power supply mode, and its branches can be directly connected to the distribution transformer, that is, directly supply power to the low voltage transformer area, and can also be connected to the ring network cabinet for external distribution. The rest of this paper is organized as follows: In Section 2, medium voltage distribution network dynamic reconfiguration model with EV is established. Specifically, a dynamic reconstruction model between switch stations is established and an internal dynamic reconfiguration model under a switch station is established. Subsequently, not only the principle of dual phase shift control is analyzed, but the transmission power loss model is established in Section 3. Furthermore, the orderly charging model of EV considering IBDC converter optimal efficiency is set up in Section 4. Simulation analysis is implemented in Section 5, and some useful conclusions are finally drawn in Section 6.

Distribution Network Dynamic Reconfiguration Model with EV
In Figure 1, A~N represent the switch station. The reconstruction between switch stations described in this paper means to change the state of disconnect switches and tie switches in the network to achieve regional load balance. The lower part of the arrow represents the location information of the specific load node under the switch station. The ring network cabinet adopts the interval power supply mode, and its branches can be directly connected to the distribution transformer, that is, directly supply power to the low voltage transformer area, and can also be connected to the ring network cabinet for external distribution.  The feeder voltage level in the structure diagram described in Figure 1 is 10 kV. Different numbers of EVs are installed under different distribution transformers. In view of the large number of electric vehicles in the future, this paper gives priority to optimizing the topological structure, and then sets up multiple aggregators under the switch station to guide the charging time of a specific electric vehicle.
In this paper, the DC charging pile is used to charge the electric vehicle. The control panel in the charging pile is used to collect the battery capacity of the electric vehicle and upload the next day's travel demand. The charging module uses IBDC converter to supply power to the high voltage distribution box in the vehicle. The structure of specific load layer is shown in Figure 2.  The feeder voltage level in the structure diagram described in Figure 1 is 10 kV. Different numbers of EVs are installed under different distribution transformers. In view of the large number of electric vehicles in the future, this paper gives priority to optimizing the topological structure, and then sets up multiple aggregators under the switch station to guide the charging time of a specific electric vehicle.
In this paper, the DC charging pile is used to charge the electric vehicle. The control panel in the charging pile is used to collect the battery capacity of the electric vehicle and upload the next day's travel demand. The charging module uses IBDC converter to supply power to the high voltage distribution box in the vehicle. The structure of specific load layer is shown in Figure 2. The rest of this paper is organized as follows: In Section 2, medium voltage distribution network dynamic reconfiguration model with EV is established. Specifically, a dynamic reconstruction model between switch stations is established and an internal dynamic reconfiguration model under a switch station is established. Subsequently, not only the principle of dual phase shift control is analyzed, but the transmission power loss model is established in Section 3. Furthermore, the orderly charging model of EV considering IBDC converter optimal efficiency is set up in Section 4. Simulation analysis is implemented in Section 5, and some useful conclusions are finally drawn in Section 6.

Distribution Network Dynamic Reconfiguration Model with EV
In Figure 1, A~N represent the switch station. The reconstruction between switch stations described in this paper means to change the state of disconnect switches and tie switches in the network to achieve regional load balance. The lower part of the arrow represents the location information of the specific load node under the switch station. The ring network cabinet adopts the interval power supply mode, and its branches can be directly connected to the distribution transformer, that is, directly supply power to the low voltage transformer area, and can also be connected to the ring network cabinet for external distribution.  The feeder voltage level in the structure diagram described in Figure 1 is 10 kV. Different numbers of EVs are installed under different distribution transformers. In view of the large number of electric vehicles in the future, this paper gives priority to optimizing the topological structure, and then sets up multiple aggregators under the switch station to guide the charging time of a specific electric vehicle.
In this paper, the DC charging pile is used to charge the electric vehicle. The control panel in the charging pile is used to collect the battery capacity of the electric vehicle and upload the next day's travel demand. The charging module uses IBDC converter to supply power to the high voltage distribution box in the vehicle. The structure of specific load layer is shown in Figure 2.  The driving circuit acts on the power switch to convert the DC voltage after rectifier filtering into AC voltage. Then, the AC voltage is isolated by the high frequency transformer, and the DC pulse is obtained by rectification filtering, thus charging the battery pack. In this paper, the optimization between switching stations is defined as the feeder layer optimization, the optimization within the switching station is defined as the branch layer optimization, and the charging optimization for electric vehicles is defined as the load layer optimization.

Dynamic Reconstruction Model between Switch Station Groups
For the optimization of switch stations in feeder layer, it is necessary to analyze the connection mode of 10 kV distribution network, and derive different constraints for different connection modes. The actual typical connection types of 10 kV distribution network are single power supply, series supply, T-type series supply, etc. The feeder layer in Figure 1 is a series connection mode, this paper focuses on the analysis of T-type series supply wiring mode, which is more complicated. The specific connection mode is as follows.
Taking the switch topology of Figure 3 as an example, the power supply demand guarantee constraints are as follows: where P t G,A 1 and P t G,A 2 represent all loads supplied by A 1 and A 2 , respectively. P l,i denotes the total load under the switching station after the i-th switch. S t i represents the state of the i-th switch. t represents time.
The driving circuit acts on the power switch to convert the DC voltage after rectifier filtering into AC voltage. Then, the AC voltage is isolated by the high frequency transformer, and the DC pulse is obtained by rectification filtering, thus charging the battery pack.
In this paper, the optimization between switching stations is defined as the feeder layer optimization, the optimization within the switching station is defined as the branch layer optimization, and the charging optimization for electric vehicles is defined as the load layer optimization.

Dynamic Reconstruction Model between Switch Station Groups
For the optimization of switch stations in feeder layer, it is necessary to analyze the connection mode of 10 kV distribution network, and derive different constraints for different connection modes. The actual typical connection types of 10 kV distribution network are single power supply, series supply, T-type series supply, etc. The feeder layer in Figure 1 is a series connection mode, this paper focuses on the analysis of T-type series supply wiring mode, which is more complicated. The specific connection mode is as follows.
Taking the switch topology of Figure 3 as an example, the power supply demand guarantee constraints are as follows: where P t G,A1 and P t G,A2 represent all loads supplied by A1 and A2, respectively. Pl, i denotes the total load under the switching station after the i-th switch. S t i represents the state of the i-th switch. t represents time.  Three active power equality constraints ensure the power supply demand of each switch station. For the other two topologies, it is only equivalent to the change of power supply position. In the left graph of Figure 4, the original topology can be obtained by exchanging the position of A2 point and A3 point. In the right graph of Figure 4, the original topology can be obtained by exchanging the position of A1 point and A3 point. Three active power equality constraints ensure the power supply demand of each switch station. For the other two topologies, it is only equivalent to the change of power supply position. In the left graph of Figure 4, the original topology can be obtained by exchanging the position of A 2 point and A 3 point. In the right graph of Figure 4, the original topology can be obtained by exchanging the position of A 1 point and A 3 point. For T-type serial supply structure, topology constraint is established:   For T-type serial supply structure, topology constraint is established: Three inequality constraints ensure that there must be one or two disconnected switches between two power points, and equality constraints determine the number of disconnected switches in the T-type series supply structure. The three networks with different switch positions satisfy the constraint condition of Formula (2).
Therefore, according to the typical topology and connection mode of 10 kV main feeder, the total prediction load curve of each switch station is obtained. Taking the minimum load fluctuation level in the region as the goal, the reconstruction scheme between switching stations is established. The objective function is as follows: Considering the high cost of breaking the switch, this paper needs to calculate the load balancing index to determine whether to perform the switch action.

Branch Layer Reconstruction Model
After the feeder layer topology optimization is completed, it is necessary to analyze the load in each switch station to realize the branch layer autonomous optimization.
In this paper, the load curve of each ring network cabinet in the switching station is analyzed, and the minimum loss is achieved by changing the switch state between the ring network cabinets. At a single time level, the objective function of minimizing network loss is as follows: where y Br is the switch state of branch Br, 0 means open, 1 means close; U Br is the voltage value at the beginning of branch; P Br and Q Br represent the injected active power and reactive power of the first node. In addition, the power flow equation equality constraints, voltage amplitude constraints and line capacity constraints should be satisfied. The formula is as follows: where S Br,max is the maximum line capacity, U i,max is the maximum node voltage. In addition to the above constraints, the model also needs to meet the network topology operation constraints. In this paper, through network coding and simplification, a single-loop matrix is formed, which constitutes a radial constraint and a connected constraint, so as to determine the infeasible optimization solution. The switches in each loop network are coded, and the single loop matrix is formed by searching the path from each node to the parent node. Each row in the single loop matrix represents a loop. The optimization variable in the reconstruction scheme is a switch in each row of the matrix. In order to make the solution satisfy the constraint of no-island and no-ring network, this paper uses SL correlation matrix and upper node search to determine the feasibility of each solution.
SL correlation matrix is defined as follows: where a ij represents the membership relationship between the j-th dimension solution and the i-th loop in the SL correlation matrix. If the solution belongs to this loop, it is 1, otherwise it is 0. The principle of no-island judgment method is that if two rows are the same in the SL matrix, the solution of the j-dimension belongs to two loops at the same time. At this time, the system has a loop, and the infeasible solution must be eliminated.
The principle of upper node search is that the upper node of each node in turn is found, putting the result into a matrix, and finally it is judged whether there are 0 elements in the matrix except for the first column. If it exists, it means that there are islands in the network, and the infeasible solution must be eliminated.
Considering the high cost of the switch, this paper analyzes the difference between the network loss value before optimization and the optimized network loss value. Once the difference is less than a threshold, the switch optimization action is not performed.

Reconstruction Method Based on CNPSO Algorithm
Aiming at the branch layer dynamic reconstruction model, and in order to prevent particle swarm algorithm from falling into local optimum and accelerate the iterative speed, this paper improves the traditional particle swarm optimization algorithm by introducing logistic chaotic equation and niche elite retention algorithm. Refer to Appendix B for dynamic updates of inertia weights.
To solve the problem of local optimum, by adding a mixed disturbance near the group extremum, the solution space near the optimal solution is searched and the local search is strengthened. The specific steps are as follows: Step 1: The global optimal solution of the n-th iteration output is mapped to the definition domain of the logistic equation to generate the chaotic variable z nj . The formula is as follows: where x j is the global optimal particle, that is, the disconnected switch combination of loops, n is the number of iterations; x max, j and x min, j represent the upper and lower bounds of the j-th dimensional variable, respectively.
Step 2: Using logistic mapping equation to generate d chaotic sequences, and then the chaotic variables are inversed to the original solution space to obtain new optimization variables. The formula is as follows: Step 3: The fitness function value of the new optimization variable is calculated and compared with the fitness value of the original solution x j . If it is better than the original solution or reaches the maximum number of iterations, the position of the original particle is replaced by the position of the new particle. Otherwise, let n = n + 1, and turn to Step 2. In addition to the local optimal problem, once the population is too large, it will affect the iteration speed. In this paper, the niche technology of sharing fitness mechanism is used to solve, that is, by calculating the sharing degree of individual particles in the group. The greater the degree of sharing, the higher the degree of closeness with other particles.
In this paper, the Euclidean distance between each particle is calculated, and the niche radius of the current population is calculated. The sharing degree of each individual is sorted, and the whole population is pruned. The individuals with higher sharing degree are deleted to ensure the uniform distribution of the solution. The number of all particles in the initial population is N sh , and the shared fitness function is defined as follows: where Ω N sh represents the whole group space, σ share represents the niche radius, D ij represents the Euclidean distance between individual x i and x j , and d represents dimension of decision variables.

Isolated Bidirectional DC-DC Converter Optimal Efficiency Model
According to the topological structure of the medium voltage distribution network group, after determining the topological structure of the feeder layer and the branch layer, the orderly charging modeling of electric vehicles in each switch station is carried out. However, the charging efficiency of electric vehicles is affected by the transmission loss of the DC-DC converter, which further affects the accuracy of formulating the charging timing strategy for electric vehicles. It is assumed that the charging power is 12 kW and the battery capacity is 80 kWh. If the charging efficiency is increased by 5%, an additional 3 kW can be charged. In some scenarios, the next-day travel demand of EVs can be met in advance, and the charging load at that time at the branch layer can be reduced.
Therefore, aiming at the problem of peak current and return power when single-phaseshift (SPS) control IBDC converter, this paper adopts dual-phase-shift control (DPS) method to establish an optimal efficiency calculation model.

Principle of Dual-Phase-Shift Control
As shown in Figure 5, a typical IBDC converter circuit consists of two symmetrical H-bridges and high-frequency transformers. Compared with the traditional SPS control, DPS control is to introduce a new phase shift duty cycle between the two diagonal switch tubes of the full bridge on the primary side or on the secondary side. In this paper, the shift ratio D 1 of the primary side in a half period is defined as the internal shift ratio, and the shift ratio D 2 between the two sides in the half period is defined as the external shift ratio. When the internal shift ratio D 1 = 0, DPS control becomes traditional SPS control.
As shown in Figure 5, a typical IBDC converter circuit consists of two symmetrical H-bridges and high-frequency transformers. Compared with the traditional SPS control, DPS control is to introduce a new phase shift duty cycle between the two diagonal switch tubes of the full bridge on the primary side or on the secondary side. In this paper, the shift ratio D1 of the primary side in a half period is defined as the internal shift ratio, and the shift ratio D2 between the two sides in the half period is defined as the external shift ratio. When the internal shift ratio D1 = 0, DPS control becomes traditional SPS control. Figure 5. IBDC converter topology. Figure 6 describes the working state of the converter in a switching cycle, such as the conduction time of the switch tube and diode, and the voltage change. Due to the symmetry of control, the system waveform of t0-t4 period is taken as the research object, and the working mode of converter can be divided into five states. According to the analysis of the working status of these five stages in turn, it can be found that the inductance current formula in the t0-t4 period is a piecewise linear formula.   Figure 6 describes the working state of the converter in a switching cycle, such as the conduction time of the switch tube and diode, and the voltage change. Due to the symmetry of control, the system waveform of t 0 -t 4 period is taken as the research object, and the working mode of converter can be divided into five states. According to the analysis of the working status of these five stages in turn, it can be found that the inductance current formula in the t 0 -t 4 period is a piecewise linear formula.
As shown in Figure 5, a typical IBDC converter circuit consists of two symmetrical H-bridges and high-frequency transformers. Compared with the traditional SPS control, DPS control is to introduce a new phase shift duty cycle between the two diagonal switch tubes of the full bridge on the primary side or on the secondary side. In this paper, the shift ratio D1 of the primary side in a half period is defined as the internal shift ratio, and the shift ratio D2 between the two sides in the half period is defined as the external shift ratio. When the internal shift ratio D1 = 0, DPS control becomes traditional SPS control.  Figure 6 describes the working state of the converter in a switching cycle, such as the conduction time of the switch tube and diode, and the voltage change. Due to the symmetry of control, the system waveform of t0-t4 period is taken as the research object, and the working mode of converter can be divided into five states. According to the analysis of the working status of these five stages in turn, it can be found that the inductance current formula in the t0-t4 period is a piecewise linear formula.  When 0 ≤ D 1 ≤ D 2 ≤ 1, set t 0 = 0, and then other time point can be expressed as t 1 = D 1 T hs , t 2 = D 2 T hs , t 3 = (D 1 + D 2 )T hs , t 4 = T hs , t 5 = (1 + D 1 )T hs , t 6 = (1 + D 2 )T hs , and t 7 = (1 + D 1 +D 2 )T hs . Voltage regulation ratio was set to k = V 1 /(nV 2 ), and switching frequency was set to f s = 1/(2T hs ). According to the symmetry, i L (t 0 ) = −i L (t 4 ) can be obtained, so the inductance current i L (t) in each time period can be obtained, and then the following transmission power formula is derived by the inductance current formula:

Transmission Power Loss Model of IBDC Converter
The loss of an IBDC converter under DPS control mainly includes switching loss, conduction loss caused by switching devices, copper loss, and iron loss caused by magnetic components. The loss generated by the switching device is related to its on-state voltage drop and switching frequency. The loss generated by the magnetic element is related to the effective value of the inductance current and the winding resistance. When the switch tube works in soft switching mode, switching losses can be ignored. When the switch tube is in a hard switching state, due to the overlap of voltage waveform and current waveform in the transient process of opening and closing, the loss is generated [20]. The turn-off loss and turn-on loss are: where t off and t on are switch turn-off time and turn-on time, respectively, and V F is the forward voltage drop of diode. Ω s and Ω Q indicate the set of turn-off moments.

Conduction Loss Model
Since both the switch tube and the diode have a forward voltage drop when they are turned on, the on-state loss will be generated when the current flows, which is manifested in the form of heat.
Based on the odd symmetry of the converter working waveform and the conduction state of the switches and diodes in each stage, the conduction loss of IGBT and diode can be obtained [21]: where V sat represents the on-state voltage drop of IGBT, which is a constant.

Magnetic Components Loss Model
Magnetic components mainly include transformers and auxiliary inductance, and the loss that produced during their work are mainly composed of copper loss and iron loss [22].
During the whole switching period, the current i L flows through the transformer and the auxiliary inductance, and the copper loss is related to the root mean square of the current i L : where R tr and R au are winding resistance of the transformer and auxiliary inductor, respectively, which are constants. I rms represents the root mean square of the current i L . Iron loss of magnetic components is mainly composed of hysteresis loss, eddy current loss, and residual loss. The calculation formula is as follows: where m is the iron loss coefficient, µ 0 is the vacuum permeability, g is the air gap, N is the turns of the coil, and V e is the effective volume. These parameters can be found from the parameter table [23].

Optimal Efficiency Calculation Model
According to Formulas (14)- (19), the switching loss P SW , conduction loss P CON , and transformer and auxiliary inductance loss P TA of the IBDC converter can be obtained, so the total loss P loss can be obtained. The detailed formula derivation is reflected in the Appendix A. P loss = P SW + P CON + P TA (20) Therefore, the total loss P loss under the control of DPS is related to the internal shift ratio D 1 and the external shift ratio D 2 . This paper establishes an optimal efficiency model to select the optimal parameters D 1 and D 2 for a specific transmission power.
The efficiency of IBDC converter is defined as the percentage of the ratio of output power to input power: It can be seen from Formula (13) that the given transmission power P 0 can be obtained by various combinations of D 1 and D 2 , but the total loss of the converter is different under each combination, so its efficiency is also different. In order to obtain the combination of D 1 , D 2 corresponding to the minimum total loss of the converter, the Lagrange function can be established: Formula (22) is solved to find the optimal total loss value. The calculation formula is as follows: By substituting Formulas (13) and (19) into Formula (23) and solving the root of the above equations, the optimal combination (D 1 , D 2 ), and the efficiency of the IBDC converter reaches the maximum.

Orderly Charging Model of EV Considering IBDC Converter Optimal Efficiency
At the load layer, this paper takes the electric vehicles under the switch station as the research object. In this paper, a double-layer optimal scheduling model for EVs is established based on the distributed scheduling architecture.

Multi-Level Information Interaction Mechanism
The principle of distributed scheduling is as follows: each switch station can further decompose all transformer area into several areas according to their geographic location, each area is dispatched by aggregators, and all aggregators accept the instructions of the dispatch center.
As shown in Figure 7, under the switch station, electric vehicle aggregators spanning multiple transformer areas are set up as an information bridge between a single electric vehicle and the dispatch center. It not only implements the instructions of the upper-level dispatch center, but also guides the lower-level specific electric vehicle charging time. The aggregators autonomy model facilitates centralized management of electric vehicles in the same area, avoiding the problems of low efficiency and huge data volume caused by the direct dispatch of each electric vehicle by the dispatch center.
The steps of the multi-level interaction mechanism are as follows: Step 1: The user's charging pile uploads the daily time when the electric vehicle is connected to the system, the state of charge at the time of connection, and the time when the user is expected to leave the system to the aggregator.
Step 2: Each aggregator obtains information about all electric vehicles in the area under its jurisdiction, and the dispatch center formulates demand targets according to the data integration of each aggregator so as to issue a dispatch plan for each time period to each aggregator.
Step 3: Based on the data uploaded by each electric vehicle, each aggregator's scheduling goal not only requires the minimum variance of the load level under the switch station, but also requires the minimum sum of deviations between the actual scheduling results of each aggregator and the scheduling plan determined by the scheduling center.
Step 4: Under each aggregator, by controlling the charging time of all electric vehicles in the area, the deviation between the upper-level scheduling plan and the actual scheduling results of the lower-level electric vehicles is minimized, and step 4 is returned until the given convergence condition is reached.

Multi-Level Information Interaction Mechanism
The principle of distributed scheduling is as follows: each switch station can further decompose all transformer area into several areas according to their geographic location, each area is dispatched by aggregators, and all aggregators accept the instructions of the dispatch center.
As shown in Figure 7, under the switch station, electric vehicle aggregators spanning multiple transformer areas are set up as an information bridge between a single electric vehicle and the dispatch center. It not only implements the instructions of the upper-level dispatch center, but also guides the lower-level specific electric vehicle charging time. The aggregators autonomy model facilitates centralized management of electric vehicles in the same area, avoiding the problems of low efficiency and huge data volume caused by the direct dispatch of each electric vehicle by the dispatch center. The steps of the multi-level interaction mechanism are as follows: Step 1: The user's charging pile uploads the daily time when the electric vehicle is connected to the system, the state of charge at the time of connection, and the time when the user is expected to leave the system to the aggregator.
Step 2: Each aggregator obtains information about all electric vehicles in the area under its jurisdiction, and the dispatch center formulates demand targets according to the data integration of each aggregator so as to issue a dispatch plan for each time period to each aggregator.
Step 3: Based on the data uploaded by each electric vehicle, each aggregator's scheduling goal not only requires the minimum variance of the load level under the switch station, but also requires the minimum sum of deviations between the actual scheduling results of each aggregator and the scheduling plan determined by the scheduling center.
Step 4: Under each aggregator, by controlling the charging time of all electric vehicles in the area, the deviation between the upper-level scheduling plan and the actual scheduling results of the lower-level electric vehicles is minimized, and step 4 is returned until the given convergence condition is reached.

Upper-Level Dispatch Model Considering Load Balance Under the Switch Station
The upper-level dispatch model fully considers the overall load fluctuation level under the switch station, and realizes peak-shaving and valley-filling by formulating a reasonable dispatch plan. Therefore, for the topological structure of the branch layer, the upper-level objective function is established. The specific expression is as follows:

Upper-Level Dispatch Model Considering Load Balance under the Switch Station
The upper-level dispatch model fully considers the overall load fluctuation level under the switch station, and realizes peak-shaving and valley-filling by formulating a reasonable dispatch plan. Therefore, for the topological structure of the branch layer, the upper-level objective function is established. The specific expression is as follows: where P L,t represents the original load level at time t in the network; x j,t represents the scheduling plan of the j-th aggregator at the branch layer at time t; P j,t represents the actual scheduling result of j-th aggregator; N represents the total number of aggregators in a certain switch station; and λ represents the penalty coefficient, which is used to restrict the deviation between the actual scheduling result and the scheduling plan. In addition to satisfying power flow equation constraints and voltage constraints, the other upper-level model constraints are as follows: where P j,i,ch represents the charging power of the i-th electric vehicle under the j-th aggregator; y j,i,t represents the state of the i-th electric vehicle under the j-th aggregator connecting to the network at time t; the value is 1 when it is connected (may participate in the operation of the distribution network or not), and 0 when it is not connected.

Lower-Level Scheduling Model
In the lower-level dispatch model, this article considers the transmission power loss of the IBDC converter, and selects the optimal parameters D 1 and D 2 for a specific transmission power. In addition, the target of the lower model is taken as a part of the objective function of the upper-level. Each aggregator receives the dispatching instructions from the dispatch center, and the objective is to minimize the deviation between the actual dispatching results of all electric vehicles, which under the jurisdiction of each aggregator and the dispatching plan. For the j-th aggregator, the objective function is as follows: where P j,i,ch represents the rated charging power of the i-th electric vehicle under the j-th aggregator; y j,i,t represents whether the i-th electric vehicle under the j-th aggregator participates in the dispatching of the distribution network at time t.
The constraints are as follows: where t j,i,dep and t j,i,arr , respectively, represent the time when the i-th electric vehicle under the j-th aggregator is connected to the system on the same day (may participate in the distribution network operation or not), and the time when it is off the grid the next day is used to restrict off-grid electric vehicles from participating in distribution network dispatching.
where S ev,max represents the maximum capacity of electric vehicles. Formula (28) is to meet the next day's driving capacity demand, and Formula (29) is to prevent electric vehicles from overcharging.
where S j,i,t represents the SOC of the i-th electric vehicle at time t; ∆t represents a period of time, the value is 1; η ch represents the charging efficiency, and this parameter is determined by Formula (23) in Section 3. With a given transmission power, find the optimal D 1 and D 2 to minimize the power transmission loss of the IBDC converter and obtain the optimal efficiency η ch .

Overall Flow Chart of Hierarchical and Partitioned Optimization
This paper proposes an EV double-layer scheduling model based on the IBDC converter optimal efficiency model, and establishes the hierarchical and partitioned optimization model of the feeder-branch-load layer. The specific flow chart is shown in Figure 8: where Sj,i,t represents the SOC of the i-th electric vehicle at time t; t Δ represents a period of time, the value is 1; ch η represents the charging efficiency, and this parameter is determined by formula (23) in Section 3. With a given transmission power, find the optimal D1 and D2 to minimize the power transmission loss of the IBDC converter and obtain the optimal efficiency ch η .

Overall Flow Chart of Hierarchical and Partitioned Optimization
This paper proposes an EV double-layer scheduling model based on the IBDC converter optimal efficiency model, and establishes the hierarchical and partitioned optimization model of the feeder-branch-load layer. The specific flow chart is shown in figure  8:

Case Study
In order to verify the effectiveness of the proposed dynamic reconfiguration and electric vehicle scheduling model, this paper analyzes the cases in Figure 9 and Figure 10 on MATLAB R2014b. The system structure diagram is 10 kV medium voltage distribution network diagram. In Figure 9, the power point is 35 kV substation, and the shadow part is different switching stations. The network contains five switches on the main feeder. In

Case Study
In order to verify the effectiveness of the proposed dynamic reconfiguration and electric vehicle scheduling model, this paper analyzes the cases in Figures 9 and 10 on MATLAB R2014b. The system structure diagram is 10 kV medium voltage distribution network diagram. In Figure 9, the power point is 35 kV substation, and the shadow part is different switching stations. The network contains five switches on the main feeder. In the initial state, the black switch represents the closed state, and the white switch represents the breaking state. In Figure 10, the switch station contains 13 segmented switches and three tie switches, and three dispatching aggregators are configured. The dispatching aggregators manage 100 electric vehicles, respectively, and the tie switches 14, 15, and 16 are all disconnected before optimization.

Optimization Results of Feeder Layer Reconstruction
The structure is powered by T-type series connection, and the Gurobi solver is called for optimization by analyzing the total load of each switch station in each period. In the actual simulation, the switch station near the substation is generally not used as the transfer object. The final switching operation number is 8, which can achieve load balancing of three substations. The results are shown in Table 1. Therefore, the load balancing level is improved by adjusting the switching state between switching stations, and the load difference of the three substations is minimized in one day.

Optimization Results of Feeder Layer Reconstruction
The structure is powered by T-type series connection, and the Gurobi solver is called for optimization by analyzing the total load of each switch station in each period. In the actual simulation, the switch station near the substation is generally not used as the transfer object. The final switching operation number is 8, which can achieve load balancing of three substations. The results are shown in Table 1. Therefore, the load balancing level is improved by adjusting the switching state between switching stations, and the load difference of the three substations is minimized in one day.  The parameters of electric vehicle are as follows: the average charging power is 12 kW, the charging efficiency is 90%, the average battery capacity is 60 kWh, the upper limit of battery SOC is 95%, and the lower limit is 5%. For the calculation process and results of the orderly charging model of electric vehicles, this paper adopts the per unit (pu) value to facilitate calculation and explanation.

Optimization Results of Feeder Layer Reconstruction
The structure is powered by T-type series connection, and the Gurobi solver is called for optimization by analyzing the total load of each switch station in each period. In the actual simulation, the switch station near the substation is generally not used as the transfer object. The final switching operation number is 8, which can achieve load balancing of three substations. The results are shown in Table 1. Therefore, the load balancing level is improved by adjusting the switching state between switching stations, and the load difference of the three substations is minimized in one day.

Topology Reconstruction Results under Switch Station
Population sizepop = 100; iteration number N = 100; inertia weight is dynamic parameters. The threshold value is 0.1. It can be seen from Table 2   Assuming that the load connected to the lines numbered 4 and 5 in the original diagram are office buildings and other loads, the load is large during the day, so the network loss on lines 4 and 5 during the period after 12:00 is relatively large. At this time, it is necessary to open the line switch and the part of the load is transferred to the rest of the line for power supply. Table 3 shows the changes in the network loss before and after optimization. The network loss is reduced by 17.42%, which shows that the network loss of the branch layer can also be reduced by adjusting the switch state. It can be seen from Figure 11 that the traditional particle swarm optimization algorithm may fall into local optimum and the iteration speed is slow. However, in the case of increasing the population size, the algorithm proposed in this paper makes iterative speed faster by deleting individuals with a higher degree of sharing. The average number of iterations can reach convergence at about 10 times. Moreover, while ensuring the speed, the global optimal solution is ensured by adding a mixed disturbance near the group extreme value. Therefore, the improved algorithm in this paper is more accurate and efficient. rithm may fall into local optimum and the iteration speed is slow. However, in the case of increasing the population size, the algorithm proposed in this paper makes iterative speed faster by deleting individuals with a higher degree of sharing. The average number of iterations can reach convergence at about 10 times. Moreover, while ensuring the speed, the global optimal solution is ensured by adding a mixed disturbance near the group extreme value. Therefore, the improved algorithm in this paper is more accurate and efficient.  Figure 11. Algorithm iteration number comparison chart. Figure 11. Algorithm iteration number comparison chart.

Orderly Charging Results of Electric Vehicles
The simulation parameters of the converter in this article are as follows: load R = 100 Ω, DC capacitance C 1 = C 2 = 2200 µF, switching frequency f s = 20 kHz, and transformer leakage inductance L = 7.7 µH. It can be seen from Figure 12 that when the power of 60 kW is given, D1 = 0.14, and the efficiency reaches the highest. The output voltage of electric vehicle is 300 V in this paper, so the optimal efficiency in the ordered charging model in this paper is 96.2%.

Orderly Charging Results of Electric Vehicles
The simulation parameters of the converter in this article are as follows: load R = 100 Ω, DC capacitance C1 = C2 = 2200 F μ , switching frequency fs = 20 kHz, and transformer leakage inductance L = 7.7 H μ . It can be seen from Figure 12 that when the power of 60 kW is given, D1 = 0.14, and the efficiency reaches the highest. The output voltage of electric vehicle is 300 V in this paper, so the optimal efficiency in the ordered charging model in this paper is 96.2%. The switch station is mostly residential areas. It can be seen from the Figure 13 that electric vehicles were originally charged from 16:00 to 22:00, that is, the electric vehicles are charged immediately when residents arrive home. At this time, it is superimposed with other original loads, resulting in a large load under the switch station during this period of time. In addition, residents use less electricity at night, and electric vehicles are already fully charged, so the load is very small from 0:00 to 5:00, resulting in a large peakto-valley difference in a day. After optimization, it can be seen from Figure 13 that the peak-valley difference is reduced from the original 16.5026 to 13.3174, which greatly improves the load stability of the branch layer and alleviates the phenomenon of adding peaks on the peak. The switch station is mostly residential areas. It can be seen from the Figure 13 that electric vehicles were originally charged from 16:00 to 22:00, that is, the electric vehicles are charged immediately when residents arrive home. At this time, it is superimposed with other original loads, resulting in a large load under the switch station during this period of time. In addition, residents use less electricity at night, and electric vehicles are already fully charged, so the load is very small from 0:00 to 5:00, resulting in a large peak-to-valley difference in a day. After optimization, it can be seen from Figure 13 that the peak-valley difference is reduced from the original 16.5026 to 13.3174, which greatly improves the load stability of the branch layer and alleviates the phenomenon of adding peaks on the peak. Load level before and after orderly charging Original load Orderly charging Disorderly charging Figure 13. Load level changes before and after EV orderly charging. Figure 14 shows the initial capacity and the capacity after the final optimization of all electric vehicles in aggregator 1. In this paper, the travel scenarios of electric vehicles are divided into three types by analyzing the arrival time and expected travel time of electric vehicles. Figure 14 illustrates that no matter when the electric vehicle is connected, the optimization model in this article can guarantee the travel demand of the electric vehicle the next day. After the aggregator receives the dispatching instruction from the dispatch center, through double-layer optimization iteration, the actual dispatch results of the three aggregators is shown in Figure 15. The low cost of electricity at night and low load levels cause the charging behavior to be more frequent from 0:00 to 10:00 and after 22:00. By formulating a reasonable orderly charging strategy, the original disordered state of "plug and play" is changed. On the premise of meeting the demand of all EVs on the next day, the EVs connected during the peak power consumption period are arranged to be charged at  Figure 14 shows the initial capacity and the capacity after the final optimization of all electric vehicles in aggregator 1. In this paper, the travel scenarios of electric vehicles are divided into three types by analyzing the arrival time and expected travel time of electric vehicles. Figure 14 illustrates that no matter when the electric vehicle is connected, the optimization model in this article can guarantee the travel demand of the electric vehicle the next day. Load level before and after orderly charging Original load Orderly charging Disorderly charging Figure 13. Load level changes before and after EV orderly charging. Figure 14 shows the initial capacity and the capacity after the final optimization of all electric vehicles in aggregator 1. In this paper, the travel scenarios of electric vehicles are divided into three types by analyzing the arrival time and expected travel time of electric vehicles. Figure 14 illustrates that no matter when the electric vehicle is connected, the optimization model in this article can guarantee the travel demand of the electric vehicle the next day. After the aggregator receives the dispatching instruction from the dispatch center, through double-layer optimization iteration, the actual dispatch results of the three aggregators is shown in Figure 15. The low cost of electricity at night and low load levels cause the charging behavior to be more frequent from 0:00 to 10:00 and after 22:00. By formulating a reasonable orderly charging strategy, the original disordered state of "plug and play" is changed. On the premise of meeting the demand of all EVs on the next day, the EVs connected during the peak power consumption period are arranged to be charged at After the aggregator receives the dispatching instruction from the dispatch center, through double-layer optimization iteration, the actual dispatch results of the three aggregators is shown in Figure 15. The low cost of electricity at night and low load levels cause the charging behavior to be more frequent from 0:00 to 10:00 and after 22:00. By formulating a reasonable orderly charging strategy, the original disordered state of "plug and play" is changed. On the premise of meeting the demand of all EVs on the next day, the EVs connected during the peak power consumption period are arranged to be charged at night, which not only improves the load level at night, but also eases the power shortage during the peak power consumption period. night, which not only improves the load level at night, but also eases the power shortage during the peak power consumption period. Figure 15. The actual scheduling results of three aggregators.

Conclusions
With the access of large-scale EVs in the future, it will inevitably increase the network loss of the medium-voltage distribution network and aggravate the imbalance of the distribution network load. In order to improve this situation, this paper proposes a threelayer optimization model from the perspectives of network structure and load itself. Each layer has its own findings with different priorities. The specific conclusions are as follows.
Firstly, at the feeder layer, this paper takes the connection relationship between switching stations as the research object, and establishes the dynamic reconstruction model between stations. By solving this model, it realizes the equalization of the load carried by the substation and avoids the occurrence of continuous heavy load in a certain substation. Secondly, at the branch layer, this paper takes the topology structure under a certain switch station as the research object, and a dynamic reconstruction plan is formulated for the topology structure. By solving this model, the branch layer network loss is effectively reduced, and the loss reduction rate reaches 31.11%. At the same time, this paper adopts the CNPSO algorithm to adapt to the larger branch topology scale in the future. This algorithm avoids the algorithm trapped in local optimum and improves the iterative speed by nearly 20%. Finally, at the load layer, this paper takes the electric vehicles under the switch station as the research object. The first step is to establish an IBDC converter optimal efficiency model, accurately calculating the charging power of electric vehicles in each period. The second step is to establish a double-layer distributed optimization scheduling model, which not only effectively reduces the difficulty of directly dispatching large-scale electric vehicles by dispatch center, but also formulates a reasonable charging strategy, achieving a 19.3% reduction in peak-to-valley difference. The findings of this paper are based on the consideration of all the major links in the medium-voltage distribution network, including branch layer network loss and optimal charging efficiency, which are rarely studied before. All of these should be present when solving the problems of medium-voltage distribution network loss and load fluctuation.

Conclusions
With the access of large-scale EVs in the future, it will inevitably increase the network loss of the medium-voltage distribution network and aggravate the imbalance of the distribution network load. In order to improve this situation, this paper proposes a threelayer optimization model from the perspectives of network structure and load itself. Each layer has its own findings with different priorities. The specific conclusions are as follows.
Firstly, at the feeder layer, this paper takes the connection relationship between switching stations as the research object, and establishes the dynamic reconstruction model between stations. By solving this model, it realizes the equalization of the load carried by the substation and avoids the occurrence of continuous heavy load in a certain substation. Secondly, at the branch layer, this paper takes the topology structure under a certain switch station as the research object, and a dynamic reconstruction plan is formulated for the topology structure. By solving this model, the branch layer network loss is effectively reduced, and the loss reduction rate reaches 31.11%. At the same time, this paper adopts the CNPSO algorithm to adapt to the larger branch topology scale in the future. This algorithm avoids the algorithm trapped in local optimum and improves the iterative speed by nearly 20%. Finally, at the load layer, this paper takes the electric vehicles under the switch station as the research object. The first step is to establish an IBDC converter optimal efficiency model, accurately calculating the charging power of electric vehicles in each period. The second step is to establish a double-layer distributed optimization scheduling model, which not only effectively reduces the difficulty of directly dispatching large-scale electric vehicles by dispatch center, but also formulates a reasonable charging strategy, achieving a 19.3% reduction in peak-to-valley difference. The findings of this paper are based on the consideration of all the major links in the medium-voltage distribution network, including branch layer network loss and optimal charging efficiency, which are rarely studied before. All of these should be present when solving the problems of medium-voltage distribution network loss and load fluctuation.