Optimal Allocation of Intermittent Distributed Generation under Active Management

In recent years, distributed generation (DG) has developed rapidly. Renewable energy, represented by wind energy and solar energy, has been widely studied and utilized. At present, most distributed generators follow the principle of “installation is forgetting” after they are connected to a distribution network. This principle limits the popularization and benefit of distributed generation to a great extent. In order to solve these problems, this paper presents a two-tier model for optimal allocation of distributed power sources in active distribution networks (ADN). The objective of upper level planning is to minimize the annual comprehensive cost of distribution networks, and the objective of lower level planning is to minimize the active power cut-off of distributed generation through active management mode. Taking into account the time series characteristics of load and distributed power output, the improved K-means clustering method is used to cluster wind power and the photovoltaic output in different scenarios to get the daily curves in typical scenarios, and a bilevel programming model of distributed generation based on multiscenario analysis is established under active management mode. The upper level programming model is solved by Quantum genetic algorithm (QGA), and the lower level programming model is solved by the primal dual interior point method (PDIPM). The rationality of the model and the effectiveness of the algorithm are verified by simulation and analysis of a 33-bus distribution network.


Introduction
With the increasing demand for electricity, the deepening of the traditional energy shortage situation, and increasingly prominent environmental problems, the development of distributed generation (DG), especially renewable energy generation technology, has been widely supported.DG has the advantages of high energy efficiency, clean environmental protection, flexible installation position, and so on [1][2][3].It can effectively solve many potential problems, such as high cost, difficult operation, and so on.It is an inevitable trend for Distributed Renewable Energy with high permeability to be connected to a distribution network, but it puts forward new requirements for a distribution network planning method with a large number of DG connections [4][5][6].
In most of the existing studies, distributed power generation is planned from two aspects of economy and technology [7][8][9][10][11].In the DG planning process, most of them assume that the output of DG is constant [7,8], but there is a gap between this assumption and the actual situation.Especially for intermittent DG, such as wind power generation, photovoltaic power generation, the size of its processing, depends on its geographical location and climate environment.DG is planned by considering the load level, but only some specific load levels are considered, without considering the time series characteristics of DG output and load [9,10].DG with different capacities is distinguished.Small capacity DG is considered a constant negative load, whereas large capacity DG behaves as a voltage dependent current source [11].The planning results without considering the time series characteristics will lead to the following deviations: The maximum load and the maximum output of DG often do not occur at the same time, so the obtained DG capacity allocation results are not reasonable; the technical indicators calculated based on a certain value or several load levels are quite different from the actual situation, resulting in the planning.The technical index of the grid in the model is inaccurate, and the complementarity of wind power generation and photovoltaic power generation is not considered, resulting in the waste of energy and investment.
When uncertainties are considered in active distribution networks (AND), a large number of uncertainties in the planning process are described and simulated with corresponding random variables, using chance constrained programming [12][13][14].Another way is to use the multiscene technology planning method [15][16][17].Multiscenario technology transforms uncertain factors into deterministic factors, and then models are solved.However, when there are too many uncertainties, it is important and difficult to analyze large-scale scenes and improve computational efficiency.Therefore, it is very important and meaningful to reduce the large-scale scene in the planning process on the premise of ensuring the accuracy of the model.
There are two kinds of DG programming methods considering uncertainty in ADN: One is the DG single-level programming method, and the other is the DG bi-level programming method based on Bi-level theory.Generally, the DG single-level programming method is used, and the multiperiod optimal power flow method based on the interior point method is used to solve this kind of model.The other is the DG bilevel programming method, based on bilevel programming theory, which belongs to a very complex mixed integer nonlinear bilevel programming model [18][19][20][21].Considering the demand response, a two-level solution model is established [18].A stochastic programming bilevel model is established through stochastic programming [19].A bilevel optimization model is presented for the risk assessment of transmission systems [20].Generally, an intelligent algorithm or intelligent algorithm is used to solve the problem.This kind of algorithm is better in small-scale systems, but when the scale of the problem increases, and its computational efficiency and convergence are affected.
Active management measures, including active fault level management, active voltage control, and active power flow management, are the main manifestations of active distribution network initiative [22,23].Most DGs still follow the so-called "installation is forgetting" principle when they are connected to a distribution network, which is still a passive power grid management mode [24,25].The existing research methods have little research on the optimal allocation of distributed generation under active management mode.In order to give full play to the role of active distribution networks, the influence of active management mode must be considered in the planning process.
This paper discusses the possible impact of the assumption of the DG output model in the process of distributed generation planning.In view of the possible errors caused by the assumption of constant power output, Weibull distribution with two parameters is widely used for wind speed uncertainty.For light intensity, beta distribution is used to express its uncertainty.On the basis of considering uncertainty, this paper considers that the distributed generation planning method based on multiscenario technology can reasonably transform the uncertain model into the deterministic programming model, which can effectively reduce the difficulty of modeling and solving, and can fully consider its time on the basis of uncertain modeling of distributed generation.The difficulty of multiscene technology has been pointed out.The improved K-means clustering method can effectively solve this problem.Compared to the Monte Carlo/Latin hypercube sampling method, the scene tree method, and the non-parametric probability prediction method, this method causes less damage to data characteristics and can accurately describe the data changes of the original scene.The results are not conservative, and can be effectively reduced.A hybrid algorithm of the quantum genetic algorithm (QGA) and the dual interior point method is proposed to solve the bilayer model.Compared to the single intelligent algorithm and its improved algorithm, the hybrid algorithm can effectively reduce power system coordination and optimization.It also has low iteration times, and can improve computing efficiency.Compared to other planning methods, this paper focuses on the active characteristics of the active distribution network, and through a large number of comparative analyses shows that active management mode may affect distributed power planning.
Based on the above analysis, the uncertainties of wind power and photovoltaic system are firstly established considering the characteristics of distributed generation and load timing.A typical daily output curve is obtained through the annual output curve of wind power and PV.Combined with active management mode, a bilevel programming model of intermittent distributed generation based on multiscenario analysis is established.The upper-level programming model aims to minimize the annual comprehensive cost of distribution networks, and the lower-level model aims to minimize the amount of DG active power cut-off.The planning model fully influences active management mode.The quantum evolutionary algorithm and primal dual interior point method are used to solve the upper and lower layers of the proposed model.It is verified by the Institute of Electrical and Electronics Engineers (IEEE) 33-bus distribution network system.The results show that the two-layer model is reasonable and the algorithm is effective.

Probabilistic Model of Wind Power
Wind power output is mainly affected by wind speed.Wind speed is uncertain, so wind power output is uncertain.The uncertainty of wind speed can be expressed by its probability model [26][27][28][29][30][31].In this paper, the two-parameter Weibull model is used to model wind speed uncertainty.Its probability density function is: where v is the wind speed at the hub of a wind turbine impeller.k and c are the shape parameters and scale parameters of Weibull distribution, respectively.
where σ w and v are standard deviation and average value of v, respectively, E w is power generation, and Γ is Gamma function.
The piecewise function of active power of wind turbines can be expressed as: where v ci as cutting wind speed, v co is the cutting speed, v cr is rated wind speed, P r is the rated output power of wind turbines.Distributed wind turbines in distribution networks generally use asynchronous generators, which need to absorb reactive power from the system during operation.Assuming that wind turbines are controlled by constant power factor, the reactive power output of wind turbines is: where θ is the power factor of wind turbine generators.

Probabilistic Model of Photovoltaic Generator
Photovoltaic power output is affected by many factors, which are mainly divided into two aspects: Lighting conditions and PV modules.Light intensity has the greatest impact on PV output [5].The intensity of illumination is also uncertain.Its uncertainty can also be expressed by the probability model [5,15,[32][33][34].In this paper, the most widely used Beta distribution is used to model the uncertainty of illumination intensity.Its probability density function is: where S is light intensity, S max is the maximum value of light intensity.α and β are two shape parameters of Beta distribution, which are calculated by the expected µ and variance σ 2 of illumination intensity in a certain period of time.
The function of active power of photovoltaic generator is expressed as: where P PVG,r is Photovoltaic generator rated output power and S r is rated light intensity.

Seasonal Scene Reduction
The output of wind and photovoltaic power generation is uncertain and random, and most of the time the output cannot reach the rated value [35].Without considering the timing characteristics of wind and photovoltaic power, the output characteristics of different distributed generators cannot be fully reflected, and there is no difference between different distributed generators.Therefore, when the distribution network is connected to both wind and photovoltaic power, the timing characteristics of distributed generation output must be considered.There are significant differences in wind speed in different seasons.According to the meteorological data, the wind speed time series curves of different regions in the region to be planned can be obtained, and the time series characteristic curves of wind power output can be calculated.Light intensity is affected by weather and season at the same time, so the photovoltaic output time series characteristic curve, on the basis of seasonal division, can be calculated at the same time, according to weather conditions for each season division.
If the time interval between the sample data of wind speed, illumination intensity, and load is one hour, there are 8760 data samples a year, or 8760 scenes.In the process of model solving, scenario data need to be calculated for each scenario.The scene selection methods mainly include the full cycle time series scenario [11] and the periodic reduction scenario method [36].Continuous multitime scenarios can cause "Curse of dimensionality".Therefore, it is very necessary to reduce the uncertainty scene.In this paper, the improved K-means clustering algorithm is used to cluster the scenes with similar features before the hybrid algorithm is used to solve the model.After scene clustering, the original data are simplified, and the computation amount and time are reduced.After clustering, the output of wind turbine generators (WTG) and photovoltaic generators (PVG) in each scene can be calculated according to the method of Sections 2.1 and 2.2.

Improved K-Means Clustering Algorithm
The K-means clustering algorithm [37] assigns the data objects to the nearest class according to the minimum distance principle of the pre-selected K initial clustering centers, and divides the datasets into different classes through the iterative process, so that the algorithm using the criterion Fu to evaluate the clustering performance is optimal.However, the traditional clustering algorithm cannot give the optimal number of clusters.This paper improves the traditional K-means clustering algorithm by selecting the appropriate clustering validity index [38].In the range of clustering numbers, the clustering results are analyzed to determine the optimal number of clusters.

Selection of Calinski-Harabasz Validity Index and Optimal Cluster Number
The search range is integer number in [2, √ N] [39].N is the total number of samples in the dataset.Searching clustering space can output a series of clustering results with different numbers of clusters.The clustering validity index is used to evaluate the quality of clustering results and the optimal number of clusters corresponding to the optimal clustering results is taken as the optimal number of clusters.In this paper, the CH + index suitable for K-means clustering is selected as an effective index.The definition of a CH + index is: T k and P k are the sum of squares of classes and intra class deviations at k, respectively.T k and P k respectively reflect inter class separability and intra class compactness.With the increase of k value, P k tends to decrease, and T k tends to increase, while the CH + index value may reach the maximum value at a certain k, which corresponds to the optimal number of clusters.Finding the best clustering number k is equivalent to finding the largest number.We should selcect the clustering results with large CH + index and small class number.

The Steps of the Improved K-Means Clustering Algorithm
The steps of the improved K-means clustering algorithm are as follow: 1.
The search scope for setting the cluster number is The initial clustering center is selected according to the principle of maximum and minimum distance in the search range.The K-means clustering algorithm is used to update the clustering center until the convergence of the distance criterion function.The CH + index is calculated according to the clustering results.Turn to 2; 3.
Comparing the CH + index under different k values, the corresponding k value is the best cluster number when the CH + index reaches the maximum value; 4.
Output best clustering results.

Seasonal Scene Reduction
The annual wind power output curve of a region is shown in the Figure 1.
From the annual output curve of wind power, it can be observed that the sustained output time characteristics of the wind power generator are directly related to wind resources, and the variation of wind speed in different seasons is quite different.Wind power output at all times of the year is uncertain, which can be described by the probability distribution of wind power output, and is approximately subordinate to Weibull distribution.Wind power is a kind of intermittent energy.Wind speed has a strong intermittent, and for any period of time from the measuring point of wind, speed change does not have continuity.The intermittent performance of wind power is larger or smaller wind speed when its output is zero, as in Figure 1, where there is part of the wind power output which is zero.Affected by the fluctuation of wind speed, the output of wind power fluctuates obviously in a short time.In a short time, the output curve of wind power rises and falls sharply, and the data of adjacent time becomes larger, even appears larger jump.
distance in the search range.The K-means clustering algorithm is used to update the clustering center until the convergence of the distance criterion function.The CH + index is calculated according to the clustering results.Turn to 2; 3. Comparing the CH + index under different k values, the corresponding k value is the best cluster number when the CH + index reaches the maximum value; 4. Output best clustering results.

Seasonal Scene Reduction
The annual wind power output curve of a region is shown in the Figure 1.From the annual output curve of wind power, it can be observed that the sustained output time characteristics of the wind power generator are directly related to wind resources, and the variation According to the Section 3.1, the wind power output fluctuation curve after the seasonal scene is reduced is shown in Figure 2. Wind speed has a strong intermittent, and for any period of time from the measuring point of wind, speed change does not have continuity.The intermittent performance of wind power is larger or smaller wind speed when its output is zero, as in Figure 1, where there is part of the wind power output which is zero.Affected by the fluctuation of wind speed, the output of wind power fluctuates obviously in a short time.In a short time, the output curve of wind power rises and falls sharply, and the data of adjacent time becomes larger, even appears larger jump.
According to the Section 3.1, the wind power output fluctuation curve after the seasonal scene is reduced is shown in Figure 2.  The wind power output in Figure 2a,c,d fluctuates greatly, which shows a certain inverse peak characteristic.The wind power output in Figure 2b is small and stable.The wind power output curve after clustering can better reflect the change characteristics of the original scene and is representative.The variation characteristics, stochastic characteristics, and inverse peak shaving characteristics of wind power output in different seasons are reflected in the power fluctuation curves in different scenarios.
The PV output curve of a region in all seasons is shown in Figure 3.The wind power output in Figure 2a,c,d fluctuates greatly, which shows a certain inverse peak characteristic.The wind power output in Figure 2b is small and stable.The wind power output curve after clustering can better reflect the change characteristics of the original scene and is representative.The variation characteristics, stochastic characteristics, and inverse peak shaving characteristics of wind power output in different seasons are reflected in the power fluctuation curves in different scenarios.
The PV output curve of a region in all seasons is shown in Figure 3.The diurnal fluctuation curve of PV output on typical sunny, cloudy, and rainy days after seasonal scenario reduction using the same method is shown in Figure 4.The photovoltaic output characteristics of the reduced seasonal typical weather are obvious, and the variation of light intensity and sunlight is consistent.The photovoltaic output is largest near noon.The influence of weather is obvious, and the maximum output of PV is on sunny days.The photovoltaic output curve after clustering can better reflect the variation characteristics of the original scene.The variation characteristics and volatility of photovoltaic output in different seasons and different weather conditions are reflected in the output fluctuation curve.
According to the law of large numbers, when the sample size is large enough, the occurrence frequency of the event is almost close to its occurrence probability [40].The typical weather probability of the seasonal reduction is shown in Table 1.The diurnal fluctuation curve of PV output on typical sunny, cloudy, and rainy days after seasonal scenario reduction using the same method is shown in Figure 4.The photovoltaic output characteristics of the reduced seasonal typical weather are obvious, and the variation of light intensity and sunlight is consistent.The photovoltaic output is largest near noon.The influence of weather is obvious, and the maximum output of PV is on sunny days.The photovoltaic output curve after clustering can better reflect the variation characteristics of the original scene.The variation characteristics and volatility of photovoltaic output in different seasons and different weather conditions are reflected in the output fluctuation curve.
According to the law of large numbers, when the sample size is large enough, the occurrence frequency of the event is almost close to its occurrence probability [40].The typical weather probability of the seasonal reduction is shown in Table 1.The photovoltaic output characteristics of the reduced seasonal typical weather are obvious, and the variation of light intensity and sunlight is consistent.The photovoltaic output is largest near noon.The influence of weather is obvious, and the maximum output of PV is on sunny days.The photovoltaic output curve after clustering can better reflect the variation characteristics of the original scene.The variation characteristics and volatility of photovoltaic output in different seasons and different weather conditions are reflected in the output fluctuation curve.
According to the law of large numbers, when the sample size is large enough, the occurrence frequency of the event is almost close to its occurrence probability [40].The typical weather probability of the seasonal reduction is shown in Table 1.At present, in the power planning and power industry statistics, power load is often divided into four types of typical load, such as industrial, agricultural, commercial, municipal life.The load is obviously affected by the season.According to the specific circumstances of the planning area, the load is divided into two categories: The civil load and the commercial load.The time series characteristic curves of these two loads are shown in Figures 5 and 6.
Energies 2018, 11, x 8 of 20 At present, in the power planning and power industry statistics, power load is often divided into four types of typical load, such as industrial, agricultural, commercial, municipal life.The load is obviously affected by the season.According to the specific circumstances of the planning area, the load is divided into two categories: The civil load and the commercial load.The time series characteristic curves of these two loads are shown in Figures 5 and 6.  Figure 5 shows the time-dependent persistence curve of residential users during the four typical days of spring, summer, autumn, and winter.In terms of electricity consumption, the residential load in summer, with the use of air conditioning, or other refrigeration equipment, the load required is the highest.The maximum load will be around 8 p.m. and a small peak will appear around 12 p.m. and the minimum load will be around 3 a.m. Figure 6 shows the temporal persistence characteristics of commercial users over time over the four typical days of spring, summer, autumn, and winter.The four typical power consumption patterns of commercial users in spring, summer, autumn, and winter are relatively small, and the time series characteristics tend to be consistent.The power consumption periods are relatively concentrated between 12 p.m. and 11 p.m.At present, in the power planning and power industry statistics, power load is often divided into four types of typical load, such as industrial, agricultural, commercial, municipal life.The load is obviously affected by the season.According to the specific circumstances of the planning area, the load is divided into two categories: The civil load and the commercial load.The time series characteristic curves of these two loads are shown in Figures 5 and 6.  Figure 5 shows the time-dependent persistence curve of residential users during the four typical days of spring, summer, autumn, and winter.In terms of electricity consumption, the residential load in summer, with the use of air conditioning, or other refrigeration equipment, the load required is the highest.The maximum load will be around 8 p.m. and a small peak will appear around 12 p.m. and the minimum load will be around 3 a.m. Figure 6 shows the temporal persistence characteristics of commercial users over time over the four typical days of spring, summer, autumn, and winter.The four typical power consumption patterns of commercial users in spring, summer, autumn, and winter are relatively small, and the time series characteristics tend to be consistent.The power consumption periods are relatively concentrated between 12 p.m. and 11 p.m. Figure 5 shows the time-dependent persistence curve of residential users during the four typical days of spring, summer, autumn, and winter.In terms of electricity consumption, the residential load in summer, with the use of air conditioning, or other refrigeration equipment, the load required is the highest.The maximum load will be around 8 p.m. and a small peak will appear around 12 p.m. and the minimum load will be around 3 a.m. Figure 6 shows the temporal persistence characteristics of commercial users over time over the four typical days of spring, summer, autumn, and winter.The four typical power consumption patterns of commercial users in spring, summer, autumn, and winter are Energies 2018, 11, 2608 9 of 19 relatively small, and the time series characteristics tend to be consistent.The power consumption periods are relatively concentrated between 12 p.m. and 11 p.m.

Bilevel Programming Model of Distributed Generation Based on Multiscenario Analysis under Active Management Mode
As an important part of ADN, active management can effectively overcome the drawbacks of passive management mode, and actively play the positive role of DG in improving distribution network operation mode, energy saving, and emission reduction.Active management is to achieve optimal control of DG and distribution equipment on the basis of effective measurement of distribution network operation parameters [41].Active management mode can effectively solve this problem and give DG friendly access to distribution networks.It is unable to give full play to the positive role of DG in improving branch power flow, network loss, and node voltage.This paper adopts the following three kinds of active management measures [42].
Switching of reactive power compensation; 3.
Adjustment of on load transformer.

Upper Planning Mathematical Model
The objective function of the upper planning objective function is the minimum annual comprehensive cost of the distribution network.The objective function can be expressed as: Annual equivalent investment cost of distributed generation: where N bus is the number of nodes in the distribution network, r is the discount rate, y is the life span of DG for 20 years,C WTG,i and C PVG,i are fixed investment costs of unit capacity of wind power and PV installed at the i node, respectively, S WTG,i and S PVG,i are the rated capacity of wind power and PV installed at the i node, respectively.2.
Operation and maintenance fee: where P n is the scenario probability of the n scenario, C WTG,i and C PVG,i are the operation and maintenance costs of the wind power and the photovoltaic unit electricity received by the i node, and E WTG,in (t) and E PVG,in (t) are the wind power received by the i node and the photovoltaic unit electricity generated during the t period of the n typical day, respectively.Distributed generator output control 3.
Operators purchasing electricity from higher authorities: where E nt is the t time of n typical days to buy electricity from a higher power grid.P t is the unit cost of operators purchasing electricity from a higher power grid.

4.
Environmental subsidy: where C EWTG,i and C EPVG,i are environmental subsidies for unit capacity of wind power generation and environmental subsidies for unit power consumption of photovoltaic units.E EWTG,in (t) and E EPVG,in (t) are, respectively, the output of wind power and photovoltaic in the i period of the n typical day.

5.
Loss of net loss: where Q ntL is the net loss of the n typical day t period, P ntL is the unit network loss cost.
The constraints are: 1. DG installation capacity constraint: where R WTGi and R PVGi are the wind capacity and PV capacity node i, respectively.R WTGmax and R PVGmax correspond to the maximum access capacity of DG, respectively.2.
DG total installed capacity constraint: where R DGmax is the maximum installed capacity.

Lower Level Programming Mathematical Model
The lower level planning model aims at minimizing the amount of DG active output.The expression is: where P cnt is the amount of excision amount of active output in the t period of the n scenario The constraints are: 1. Node power balance constraint: where P WTG,i,t,n and P PVG,i,t,n are the active output of the t time of the n scenario, respectively.P ci,i,t,n and P co,i,t,n are the active power of residential and commercial loads at the first time of t in the first n scenario, respectively.Q WTG,i,t,n and Q PVG,i,t,n are the reactive power of DG at the t time of the n scenario, respectively.Q ci,i,t,n and Q co,i,t,n are the reactive power of resident load reactive power and commercial load at the t time of the n scenario, respectively.Q c,i,t,n is reactive power supplied by reactive power compensation device.U i,t,n and U j,t,n are the voltage amplitude of node i and the voltage amplitude of node j at the t time node of the n scenario, respectively.θ t,n,ij is the phase difference between node i and node j of t in the n scenario, respectively.2.
Node voltage constraint: where V i is node voltage.V imin and V imax are the minimum voltage values and maximum voltage values allowed by node i, respectively.

3.
Branch flow constraint: where S i is the apparent power of branch L. S imax is the limit of branch transmission capacity. 4.
Distributed generator output control constraint: where P imin and P imax are the minimum active power output of node i and the maximum active power output of distributed generation, respectively.5.
Reactive power compensation device constraint: where Q imin and Q imax are the minimum value of reactive power compensation device of node I and the maximum value of reactive power compensation device.6.
Transformer tap constraint: where T i is the tap position of transformer i. T imin and T imax are the tap values of transformer i and the maximum tap value of i, respectively.

Quantum Evolutionary Algorithm
The genetic algorithm (GA) [43] is a kind of method to deal with complex optimization problems by simulating the rules of survival of the fittest and the mechanism of chromosome information exchange within the population.The quantum genetic algorithm (QGA) [44][45][46][47] is based on the state vector representation of quantum.It refers the probability amplitude representation of quantum bits to the coding of chromosomes, so that a chromosome can express the superposition of multiple states, and uses quantum revolving gate and quantum non-gate to realize the finer operation of chromosomes, thus achieving the optimal solution of the goal.

Qubit Representation
In QGA, chromosomes are represented not by deterministic values (such as binary numbers, floating-point numbers, symbols, etc.) but by quantum bits, or by random probabilities.A qubit represents not only a state of 0 or 1, but also any intermediate state between the two states.Subbits can represent 2 n states simultaneously, so the population size of QGA is much smaller than that of traditional GA for the same optimization problem.
In QGA, a qubit may be in the intermediate state between |1 and |0 , that is, different superposition states of |1 and |0 , so the state of a qubit can be expressed as: α and β can be plural, which indicates the probability amplitude of the corresponding state and satisfies the following normalization conditions: where |α| 2 indicates the probability of |0 , and |β| 2 indicates the probability of |1 .

Quantum Genetic Manipulation
In QGA, the state of chromosome is superimposed or entangled, so the genetic operation of QGA cannot adopt the traditional GA selection, crossover, and mutation, but the way of quantum gate acting on each superimposed state or entangled state, respectively.The probability amplitude of an individual and its state is determined by the probability amplitude of the individual.The genetic operation is mainly to act as the constructed quantum gate on the ground state of a quantum superposition state or an entangled state to interfere with each other and change the phase, thus changing the probability amplitude of each ground state.Quantum gate construction is a major problem in quantum genetic manipulation.In QGA, the quantum revolving door is used mainly.
where θ is the rotation angle.

QGA Algorithm
Based on the representation of qubit and the superposition principle of quantum mechanics, the concrete algorithm of QGA is as follows: 1.
Initialization.The population containing N individuals is P(t) = P t 1 , P t 2 , . . ., P t n where P t j (j = 1, 2, . . ., n) is the individual of the T generation in the population, and there are: where m is the quantum dot number, that is, the length of the quantum chromosome.At the beginning, all α i , β i took 1 √ 2 ; 2.
According to the value of probability amplitude in P(t), R(t) is constructed.R(t) = {a t 1 , a t 2 , . . ., a t n , a t j (j = 1, 2, . . ., n) is a binary string of m length; 3.
Each individual in R(t) is evaluated by fitness evaluation function, and the optimal individual in this generation is retained.If a satisfactory solution is obtained, the algorithm terminates; otherwise, it is transferred to (4) to continue; 4.
Update P(t) with appropriate quantum gate U(t); 5.

Two-Level Model Solving Algorithm
In the bilevel programming model, the upper level programming model determines the planning scheme of the distributed generation, including the installation type, location, and capacity of the distributed generation.The scheme determined by the upper-level programming model is transferred to the lower-level programming model, and the original dual interior point method is used to determine the optimal operation mode of the active distribution network in different scenarios, and the optimal value is fed back to the upper-level programming model.The process of the bilevel optimal allocation model is shown in Figure 7. Primal dual interior point method(PDIPM)

Distributed power output data in typical scenarios
The result of power flow calculation is returned to the upper planning model to calculate the annual operation cost of distribution network.

Satisfying the convergence condition
Obtain the type, location and capacity of the optimal individual corresponding distributed generation.
Get the optimal planning plan.
. Process of the bilevel optimal allocation model.QGA: quantum genetic algorithm.

Examples
In this paper, the IEEE-33 node distribution network [48] is taken as an example, as shown in the Figure 8.

Examples
In this paper, the IEEE-33 node distribution network [48] is taken as an example, as shown in the Figure 8.
The system voltage is 12.66 kV, the total active load is 3.715 MW, the total reactive load is 2.300 MW, and the system parameters are listed in Appendix A, Table A1.The parameters of Weibull distribution are k = 2.30, c = 8.92, the wind power access cost is 6500 yuan/kW, the operation and maintenance cost is 0.3 yuan/kW•h, the environmental protection subsidy is 0.1 yuan/kW•h, the rated illumination intensity of the photovoltaic generator is 1 kW/m 2 , the shape parameter of beta distribution is 0.85, b = 0.85, the photovoltaic access cost is 10,000 yuan/kW, the operation and maintenance cost is 0.2 yuan/kW•h, and the environmental protection subsidy is 0.36/kW•h.The rated capacity of a single distributed power supply is 125 kW.The economic life of equipment is 20 years, and the discount rate is 0.1.Business load nodes are 1, 3,4,7,11,12,20,22,24,25,32,33 9, 13, 14, 15, 16, 17, 18, 19, 21, 23, 26, 27, 30, 31, 32, 33.The installed node for wind power installation is 5, 7, 11, 12.The installed node for wind power installation is 20, 23.The optimal configuration schemes of distributed generation considering active management mode and not considering active management mode are compared.The system voltage is 12.66 kV, the total active load is 3.715 MW, the total reactive load is 2.300 MW, and the system parameters are listed in Appendix A, Table A1.The parameters of Weibull distribution are k = 2.30, c = 8.92, the wind power access cost is 6500 yuan/kW, the operation and maintenance cost is 0.3 yuan/kW•h, the environmental protection subsidy is 0.1 yuan/kW•h, the rated illumination intensity of the photovoltaic generator is 1 kW/m 2 , the shape parameter of beta distribution is 0.85, b = 0.85, the photovoltaic access cost is 10,000 yuan/kW, the operation and maintenance cost is 0.2 yuan/kW•h, and the environmental protection subsidy is 0.36/kW•h.The rated capacity of a single distributed power supply is 125 kW.The economic life of equipment is 20 years, and the discount rate is 0.1.Business load nodes are 1, 3,4,7,11,12,20,22,24,25,32,33.Residential load nodes are 2, 5, 6, 8, 9, 13, 14, 15, 16, 17, 18, 19, 21, 23, 26, 27, 30, 31, 32, 33.The installed node for wind power installation is 5, 7, 11, 12.The installed node for wind power installation is 20, 23.The optimal configuration schemes of distributed generation considering active management mode and not considering active management mode are compared.

Result Analysis
Under the above conditions, the distributed power supply is optimized.The installation types, capacities, and costs of distributed generators under active and non-active management modes are shown in Table 2.The active power cut-off amount under active and non-active management modes is shown in Table 3.The node voltage expectation curve is shown in Figure 9.

Result Analysis
Under the above conditions, the distributed power supply is optimized.The installation types, capacities, and costs of distributed generators under active and non-active management modes are shown in Table 2.The active power cut-off amount under active and non-active management modes is shown in Table 3.The node voltage expectation curve is shown in Figure 9.When active management mode is considered, the optimal configuration scheme can utilize 1375 kW, which is 250 kW higher than 1125 kW when active management mode is not considered.At the same time, the application of active management mode in an active distribution network can reduce the operation and maintenance cost of a power grid and the purchase cost from the superior power grid.It can be seen that active management mode can give full play to the ability of an active distribution network to utilize distributed power and reduce the annual operation cost of a power grid.As for the installation capacity of distributed generation, the installed capacity of wind turbines under active management mode accounts for 76.9% of the total connected capacity of distributed generation.From the output curve obtained after scene reduction, it can be seen that the output timing characteristics of wind turbines can be well matched with the load timing characteristics curve, so the installed capacity of wind turbines is far greater than PV installed capacity.At this stage, the investment and operation and maintenance costs of DG are higher, and even after subsidization, the price of electricity is still higher than that of purchasing electricity from a superior power grid.However, the proper use of distributed generation can significantly reduce the probability of voltage overrun, improve the power flow, and reduce the overall operation and maintenance costs and purchase costs of power grid, so as to achieve the purpose of reducing the annual operating costs of distribution network.
From the node voltage curve Figure 9, it can be seen that the voltage rise effect of distributed generation access point 5,7,11,12,20,23, under active management mode, or 5, 7, 11, 20, 23, under non-active management mode, is obvious.Relevant optimal allocation cases have shown that the maximum and maximum voltage of nodes in distribution networks are all over-the-limit constraints [49].Comparing the two management modes, it can be found that the voltage unit value of a distribution network is 0.017 higher than that of non-active management mode because of the introduction of active management mode, and the overall voltage of the network is 0.017 higher than that of non-active management mode.This is closer to the reference voltage, effectively preventing the occurrence of voltage limits.
Considering the installation location, under the assumption of the access point in this paper, most of the distributed generators are installed in the nodes 11, 12, 23, which are closer to the end of the network under active management mode, and most of the distributed generators are installed in the nodes 11, 23, which are closer to the end of the network under non-active management mode.DG can improve the distribution of network power flow and reduce active power and power of feeder, but the closer the access point is to the end of the network, the more obvious the voltage rise will be, When active management mode is considered, the optimal configuration scheme can utilize 1375 kW, which is 250 kW higher than 1125 kW when active management mode is not considered.At the same time, the application of active management mode in an active distribution network can reduce the operation and maintenance cost of a power grid and the purchase cost from the superior power grid.It can be seen that active management mode can give full play to the ability of an active distribution network to utilize distributed power and reduce the annual operation cost of a power grid.As for the installation capacity of distributed generation, the installed capacity of wind turbines under active management mode accounts for 76.9% of the total connected capacity of distributed generation.From the output curve obtained after scene reduction, it can be seen that the output timing characteristics of wind turbines can be well matched with the load timing characteristics curve, so the installed capacity of wind turbines is far greater than PV installed capacity.At this stage, the investment and operation and maintenance costs of DG are higher, and even after subsidization, the price of electricity is still higher than that of purchasing electricity from a superior power grid.However, the proper use of distributed generation can significantly reduce the probability of voltage overrun, improve the power flow, and reduce the overall operation and maintenance costs and purchase costs of power grid, so as to achieve the purpose of reducing the annual operating costs of distribution network.
From the node voltage curve Figure 9, it can be seen that the voltage rise effect of distributed generation access point 5, 7, 11, 12, 20, 23, under active management mode, or 5, 7, 11, 20, 23, under non-active management mode, is obvious.Relevant optimal allocation cases have shown that the maximum and maximum voltage of nodes in distribution networks are all over-the-limit constraints [49].Comparing the two management modes, it can be found that the voltage unit value of a distribution network is 0.017 higher than that of non-active management mode because of the introduction of active management mode, and the overall voltage of the network is 0.017 higher than that of non-active management mode.This is closer to the reference voltage, effectively preventing the occurrence of voltage limits.
Considering the installation location, under the assumption of the access point in this paper, most of the distributed generators are installed in the nodes 11, 12, 23, which are closer to the end of the network under active management mode, and most of the distributed generators are installed in the nodes 11, 23, which are closer to the end of the network under non-active management mode.DG can improve the distribution of network power flow and reduce active power and power of feeder, but the closer the access point is to the end of the network, the more obvious the voltage rise will be, which may lead to the voltage of distributed generation exceeding the upper limit constraint.To prevent this from happening, we can see that, in Table 2, the total amount of distributed generation access decreases under non-active management mode, and the node 12 closer to the end of the network is no longer connected to the distributed generation.
The distribution network with distributed photovoltaic power is one of the main factors limiting the capacity and permeability of distributed photovoltaic power.The problem of overvoltage in a distribution network is usually caused by the higher output power of distributed generators.At this time, the grid-connected active power is larger.Because the line impedance ratio X/R is larger, the load power factor is higher, the reactive power required to suppress overvoltage is also larger, and the current carrying capacity of distribution network line is limited, while the capacity of inverter is larger.Power factor limits may also lead to failure of control scheme.Especially in the case of high permeability of distributed power supply in this paper, according to the above analysis, it is easier for it to lead to voltage overrun.Table 3 shows that in spring and winter, when load demand is less, the removal of active power under non-active management mode is 42.70 MW•h and 45.20 MW•h, respectively.The removal of large-scale distributed generation reduces the utilization of distributed generation, and cannot give full play to the role of distributed generation, while "wind abandonment" and "light abandonment" will lead to an increase in annual operation and maintenance costs.Under active management mode, in summer and autumn, when the electricity load is the largest, the active power output is only 1.78 MW•h and 7.19 MW•h, respectively, which basically makes full use of the electric energy.In spring and autumn, the removal of active power decreases by 72.4% and 70.5%, respectively, compared to that without active management.Thus, the "active" measures in an active distribution network play an obvious role in a high permeability distribution network.

Conclusions
The main work of this paper was to optimize the configuration of the active distribution network intermittence distributed generators under active management mode.Active management mode is the most important feature of an active distribution network, and it must be considered when planning a distributed power supply.Based on the uncertainty modeling and multiscenario reduction of distributed generation, a bilevel programming model of distributed generation based on multiscenario analysis under active management mode is proposed in this paper.
Through this model, the types, quantity, and cost of distributed generation installation under active management mode and non-active management mode are compared.The case results show that the capacity of distributed power supply in active mode is increased from 1125 kW to 1375 kW by 22%, the operation and maintenance cost is reduced from 1,126,400 to 609,200 by 45.9%, and the comprehensive cost is reduced from 5,037,600 to 469,000.High permeability access of distributed generation to a power grid is the current development trend, and the reduction of annual comprehensive costs reduces the access threshold of distributed generation.
Compared to economic indicators, it is more important to optimize the technical indicators of a distribution network.The benchmark voltage of a distribution network is increased from 1 to 1.017, and the whole voltage value is closer to the benchmark voltage.The active power cut-off amount in each season is also reduced significantly, and it is close to full utilization in the summer with a heavy load.Most of the existing articles focus on the economic indicators of optimal allocation of distributed energy.However, distributed generation is not only a kind of clean energy, but at this stage it plays an important role in improving power flow distribution, enhancing the voltage level of each node and reducing the network, and comprehensively improving the power quality of the grid.Therefore, it is very necessary to consider active management mode in the process of optimal allocation of distributed power.
It is difficult to solve the bi-level model under multiscene technology.The intelligent algorithm and its improved algorithm are generally used in existing papers.However, when system planning increases, the computation time of the algorithm will increase significantly, and the convergence speed is slow and the precision is low.In order to reduce the computation load, this paper reduces the multiscene and uses hybrid algorithm to solve the problem.The example proves that the solution is effective.The algorithm is effective.
Although uncertain load modeling is carried out in this paper, the correlation between uncertain loads is not taken into account.Establishing a mathematical model considering uncertainties is a subject that needs further study.At the same time, when the size of the system increases and the constraint conditions increase, more efficient algorithms are needed to solve them.

Figure 1 .
Figure 1.Annual fluctuation of wind power output.

Figure 1 .
Figure 1.Annual fluctuation of wind power output.

Energies 2018 ,
11, x 6 of 20of wind speed in different seasons is quite different.Wind power output at all times of the year is uncertain, which can be described by the probability distribution of wind power output, and is approximately subordinate to Weibull distribution.Wind power is a kind of intermittent energy.

Figure 2 .
Figure 2. Wind power output fluctuation curve: (a) Wind power fluctuation curve in spring; (b) Wind power fluctuation curve in summer; (c) Wind power fluctuation curve in autumn; (d) Wind power fluctuation curve in winter.

Figure 2 .
Figure 2. Wind power output fluctuation curve: (a) Wind power fluctuation curve in spring; (b) Wind power fluctuation curve in summer; (c) Wind power fluctuation curve in autumn; (d) Wind power fluctuation curve in winter.

Figure 4 .
Figure 4. PV fluctuation curve: (a) PV fluctuation curve in spring; (b) PV fluctuation curve in summer; (c) PV fluctuation curve in autumn; (d) PV fluctuation curve in winter.

Figure 4 .
Figure 4. PV fluctuation curve: (a) PV fluctuation curve in spring; (b) PV fluctuation curve in summer; (c) PV fluctuation curve in autumn; (d) PV fluctuation curve in winter.

Figure 5 .
Figure 5. Civil load time series characteristic curve.

Figure 6 .
Figure 6.Commercial load time series characteristic curve.

Figure 5 .
Figure 5. Civil load time series characteristic curve.

Figure 5 .
Figure 5. Civil load time series characteristic curve.

Figure 6 .
Figure 6.Commercial load time series characteristic curve.

Figure 6 .
Figure 6.Commercial load time series characteristic curve.
output data of typical scenes are obtained.

Figure 7 .
Figure 7. Process of the bilevel optimal allocation model.QGA: quantum genetic algorithm.

Figure 8 .
Figure 8. Institute of Electrical and Electronics Engineers (IEEE)33-bus distribution network system.

Table 1 .
The probability of typical temperatures throughout one year.

Table 1 .
The probability of typical temperatures throughout one year.

Table 1 .
The probability of typical temperatures throughout one year.

Table 2 .
Optimal allocation schemes with and without active management.WG: Wind generator Institute of Electrical and Electronics Engineers (IEEE)33-bus distribution network system.

Table 2 .
Optimal allocation schemes with and without active management.WG: Wind generator

Table 3 .
The excision amount of active output (MW• h).

Table 3 .
The excision amount of active output (MW•h).

Table A1 .
Parameters of 33-bus distribution network.