Research on Optimal D-PMU Placement Technology to Improve the Observability of Smart Distribution Networks

: With the continuous development of smart distribution networks, their observable problems have become more serious. Research on the optimal placement of the distribution phasor measurement unit (D-PMU) is an important way to improve the measurability, observability and controllability of a smart distribution network. In this paper, the optimal D-PMU placement methods and implementation technology were studied to determine the optimal D-PMU placement scheme. Considering the bus vulnerability index and the di ﬀ erent operating states of the system, the more practical one-time optimal placement methods to ensure complete system observability was proposed. On this basis, the system’s measurement redundancy and unobservable depth were considered to realize the multistage optimal D-PMU placement. The corresponding mathematical model and solution ﬂow were given. Then the implementation technology of the methods was studied and the optimal D-PMU placement assistant decision-making software for smart distribution network was developed. Thereby, the structure and requirements of di ﬀ erent distribution networks can be satisﬁed. The application analysis, functional architecture and the overall design process were given. Finally, the methods and software were analyzed by using the IEEE 33 bus system and an actual project, the Guangzhou Nansha Yuan’an Substation. The veriﬁcation results showed that the method and software mentioned in this paper can provide convenient and quick operation for optimal D-PMU placement, improve the e ﬃ ciency of smart distribution network planning work, and promote the theoretical application level of smart distribution network planning results.

improving the measurability, observability and controllability of smart distribution networks has become an important problem to be solved urgently.
To accommodate the DGs and flexible loads, the need for monitoring and analysis of distribution system behavior in real time is growing. However, the existing supervisory control and data acquisition (SCADA) systems cannot readily meet the need for precision and real-time performance [3]. The sampling period of SCADA is longer and it cannot provide the phase angle data directly [4]. The emergence of phasor measurement units (PMUs) solves this problem. PMUs have become the most effective technical means for observing and recording the dynamic process of systems because of their synchronism and speed. They have been rapidly developed around the world [5]. However, traditional PMUs are only installed in high-voltage substations and main power plants, their optimized placement algorithms are only for high-voltage transmission systems and are no longer suitable in the complex and harsh operating environments of smart distribution networks. Carrying out research on the optimal placement of the distribution phasor measurement units (D-PMUs) to improve the observability of smart distribution networks is an important way to solve the above problems [6].
Compared with traditional PMUs, D-PMUs are mainly improved in the aspect of high-precision synchronous phasor measurement under high noise and strong transient environment conditions, time synchronization technology under weak communication conditions and information security technology [7]. They can realize high-precision measurements under the characteristic environment conditions of strong noise, strong time-variance, and high-frequency transients of power distribution networks caused by strong transient sources and load access such as large-scale distributed power supplies and electric vehicles. For the weak communication environment of the smart distribution network, the hybrid network with wired and wireless combination is used for synchronous timing, which effectively solves the problem of time-to-network synchronization of large-scale D-PMU applications in complex smart distribution network environments. D-PMUs reduce the security risks of satellite timing and communication methods in smart distribution networks, improve the problem of phasor measurement and communication vulnerability to soft attacks, and enhance the security of measurement information. Compared with SCADA, the D-PMU devices based on a wide area measurement system (WAMS) will greatly improve the observability of smart distribution networks and the technology improves the performance of various on-line applications, including overcurrent protection [8], model parameter calibration [9], fault detection and location [10,11], stability assessment [12], system damping control [13], wide-area protection [14], etc.
As a part of the digital power system, the D-PMU provides fast, accurate and reliable measurement data such as voltage and current phasors with higher sample rates [15]. When the voltage phasor of a bus can be measured directly or calculated indirectly, the bus is called an observable bus, otherwise it is an unobservable bus. When all the buses of the distribution network are observable, the network is called an observable network [16]. If a D-PMU is installed on each bus, the network is fully observable. However, it is unnecessary to install D-PMU at each bus in the power system since a D-PMU can make more than one bus observable. Besides, a full deployment of D-PMUs in the network is not feasible and realistic considering the redundancy of system measurement data and the cost of investment operation and maintenance [17]. Optimal D-PMU placement refers to finding out the most representative location and placing a PMU on it. Around the theme of improving the level of observability, the main goals of OPP include minimizing the number of PMUs required, maximizing measurement redundancy and handing contingency constraints [17,18]. The minimum number of PMUs can guarantee the economics of the scheme. The main purpose of improving network measurement redundancy is to improve the accuracy of state estimation.
Taking into account the constraints in the actual project, the optimal D-PMU placement is divided into one-time optimal placement and multistage optimal placement. In the existing literature, the one-time optimal PMU placement model is divided into two types. One that is to realize complete observability of the distribution network only by configuring the PMU [19]. Although the number of configured D-PMUs may increase, the system is guaranteed to be observable in real time and the observed power grids [33][34][35], and the corresponding planning assistant decision-making software has not been used to optimize the placement of D-PMUs.
In this paper, the optimal D-PMU placement method and the implementation technology of software in smart distribution network are studied, and a basic mathematical model and solution method of a one-time and multistage optimal placement algorithm are proposed. Combined with the development and implementation of the optimal D-PMU placement assistant decision-making software for smart distribution networks, the functional architecture, design ideas and specific module design of the software system are given. The corresponding case analysis is carried out.
The main objectives of this paper are as follows: (1) Aiming at solving the problem of equivalent processing of each bus in the current optimal D-PMU placement research, the one-time optimal D-PMU placement method considering bus differences is proposed. This paper uses entropy method, analytic hierarchy process, TOPSIS and grey correlation degree algorithm to calculate the comprehensive vulnerability index of different buses in the smart distribution network as the bus weight in the optimal D-PMU placement model. On this basis, the zero injection bus information, the system's observability and operating status are considered to realize one-time optimal D-PMU placement. (2) On the basis of the one-time optimal D-PMU placement, taking into account the constraints of funds or construction progress in the actual construction of the power grid, a multistage optimal D-PMU placement method based on reducing the unobservable depth of the system step by step is proposed The depth-first search algorithm is used to calculate the unobservable depth of the system. At the same time, the measurement redundancy of the system is considered, the optimal D-PMU placement sequence is obtained to make D-PMU work best at every stage. This method is more suitable for large-scale distribution network systems that cannot be observable completely at one time. (3) Based on the methods proposed in this paper, an optimal D-PMU placement assistant decision-making software adapted to the current different smart distribution network levels is designed and developed. The one-time and multistage D-PMU placement schemes with different placement requirements can be generated and the effect is demonstrated, providing a more convenient and practical operating platform for optimal D-PMU placement.

Optimal D-PMU Placement Model and Solving Algorithm
The core of the optimal D-PMU placement problem is to find the scheme with the minimum number of D-PMUs needed to obtain the maximum measurement redundancy. At present, for the optimal D-PMU placement based on topology information, most scholars only consider the one-time optimal placement during normal operation of the system and treat each bus equally in the optimization process. Such a method is not suitable for practical engineering. This paper considers the bus vulnerability index and different operating conditions of the system, realizes the one-time optimal D-PMU placement, and the multistage placement is implemented by reducing the unobservable depth of the system step by step.

One-Time Optimal D-PMU Placement
For a distribution network system with n buses, the core of the one-time optimal D-PMU placement problem is to determine the minimum number of D-PMU and the optimal placement location to achieve completely observable of system, which is: where: ω i is the bus weight, which is the comprehensive vulnerability index of the bus, its detailed definition is as in Section 2.2. x i is a binary coded formal variable, which is defined as shown in formula (2). X n×1 = [x 1 , x 2 , . . . , x n ] T represents the column vector formed by all buses of the system, f is the observability vector of each bus of the system, and matrix A n×n is the system bus association matrix, where a ij is defined as shown in Equation (3): When the D-PMU placement concerns zero injection buses and existing measurements, the number of configured D-PMUs can be reduced. If a D-PMU is already configured in the network, one only needs to set the decision variable of the bus to 1 before optimization. For a zero injection bus, if bus 5 is a zero injection bus, and its associated buses are 1, 2, 3, 4, the set of zero injection bus and its connected buses can be set to M = {1, 2, 3, 4} ∪ {5}. As long as one of the buses is unobservable, an unobservable bus can be made observable by calculation under the condition that other buses are observable, so when considering the effects of zero injection buses, the model constraint f is modified to the following form: where y ij is a binary variable. When it is equal to 1, it means the bus j can be made observable according to the measured data of the adjacent zero injection bus i. When it is equal to 0, it indicates that the bus j cannot be made observable. Where z i is also a binary variable, a value of 1 indicates that the bus i is a zero injection bus, and a value of 0 indicates that the bus i is a non-zero injection bus. Because smart distribution network systems have different wide-area and complexity characteristics and a large number of buses, each bus has different features, so different constraints will occur in the optimal D-PMU placement process. Some buses are important and must be monitored. Such buses need to be configured with D-PMUs, some buses cannot be configured with D-PMUs due to their inherent communication or engineering problems. If a D-PMU is configured only based on the system topology map, it may lead to bus configuration locations that cannot be installed in the actual project. Therefore, it is necessary to add certain constraints to the optimal D-PMU placement model. The set O 0 represents the set of all buses for which a D-PMU cannot be configured, and O 1 represents the set of all buses that must or have configured D-PMUs. The constraints can be expressed as: In the operation of the smart distribution network system, some buses have lower requirements and only need to be observable during normal operation, but some buses play a key role in grid security, and these buses must still be observable in the condition of the line N-1 or the D-PMU N-1.
(1) The system is running normally When the power system is in normal operation, the set of D-PMU buses is H 1 , and the set of buses associated with bus i is P i . According to the definition of bus observability, the constraints are as follows: Energies 2019, 12, 4297 6 of 23 (2) Line N-1 When line N-1, the set of buses that are required to be observable is H 2 , the set of buses connected to only one line of bus i is P 1 , and the set of buses connected with two or more lines of bus i is P 2 . It can be known from the definition of bus observability that one of the following conditions must be met for bus i to satisfy line N-1 observable: 1 Bus i has D-PMU installed. 2 At least two buses in the P 1 are installed with D-PMU. 3 At least one bus in the P 2 is equipped with a D-PMU.
The constraints can be expressed as follows: (3) D-PMU device N-1 When any D-PMU in the system fails, it is required that the system still be observable at this time. This problem is a device N-1 problem. Let H 3 be the set of buses that need to be observable when any D-PMU in the system fails. P is the set of buses associated with bus i. It can be known from the definition of bus observability that one of the following conditions must be met for bus i to satisfy D-PMU device N-1 observable: 1 At least bus i and one bus in P are installed with D-PMU. 2 At least two buses in P are installed with D-PMU.
The constraints can be expressed as follows: It can be seen from the above analysis that when the bus i is observable in the case of the D-PMU device N-1, it is inevitably observable in the case of the line N-1.
In summary, the mathematical model of the one-time optimal D-PMU placement is as shown in Equation (9): where Ω 1 is the constraints of the operating state of the system, which is composed of the Equations (6)- (8), and the corresponding constraints can be selected according to different requirements.

Bus Vulnerability Index
The bus vulnerability index is used to characterize the importance of the bus in the system and is used as the bus weight in the model of optimal D-PMU placement. When the bus vulnerability index is set for the distribution network, it should be analyzed from the perspective of the static angle of the distribution network. The four degrees of bus degree, cohesion, mediation, tightness are used to measure the bus vulnerability index in this paper: (1) Bus degree d 1 . The bus degree indicator reflects the strength of the connection between the bus and other buses through the number of edges connected to the bus. The greater the degree, the greater the impact on nearby buses and the more vulnerable the bus. Due to the radial structural characteristics of the distribution network, many buses have the same degree, so the description of the degree is not comprehensive enough: where d i1 represents the degree of bus i and L is the total number of branches. (2) Bus cohesion d 2 . In the weighting model of the distribution network, the bus cohesion is defined as: where C = 1/(np) is the degree of cohesion before the contraction of the bus i, n is the number of buses, p is the average shortest path of the network, and C i is the degree of cohesion after the contraction of the bus i, which can be calculated similarly to C. d i2 can reflect the degree to which the bus is located at the center of the distribution network structure. The larger the d i2 , the closer the bus i is to the center of the distribution network, and the more vulnerable the bus.
where j is the equivalent power supply bus, k is the equivalent load bus, n jk is the total number of shortest paths between buses j, k, n jk (i) is the number of passing bus i in n jk . The median index can reflect the direction of tidal current flow in the distribution network. When the median is large, the position of the bus in the tidal current flow of the current state is more important. (4) Bus tightness d 4 . In the weighted network model of distribution network, the bus tightness reflects the interaction between the bus and other buses. The tightness index of bus i is defined as: where V and V * respectively represent the set of all buses and the set of neighbors with bus i, d 1 is the average value of the distribution network, and p mk is the shortest path length between buses m and k in the distribution network. This definition combines the global and local vulnerability of buses in the distribution network, which can better describe the difficulty of the bus reaching all other buses and the role of the bus adjacent to it.
All of the above indicators can reflect the vulnerability of buses in the distribution network, but they are only described from a single angle and have a certain one-sidedness. Therefore, for the actual power grid, comprehensive consideration should be made from multiple angles to measure bus vulnerability. Using the above four indicators as attributes, the problem can be transformed into a multi-attribute decision problem [36]. This paper combines the entropy method [37] and the analytic hierarchy process (AHP) [38] from the objective and subjective perspectives to weight each indicator to measure the role of each indicator in assessing bus vulnerability. This not only reflects the objective risks existing in the distribution network structure, but also can take into account the judge ability of the expert experience, and can avoid the shortcomings in the evaluation only from subjective or objective aspects.
Entropy can be used to measure the disorder state of the system. The larger the disorder state, the more obvious the difference between the states of the system, and the more unstable the system. So entropy can be used to measure how well an indicator works in describing a bus. The entropy value of indicator j is defined as: where n is the number of buses and h ij is derived from the normalized decision matrix T. The row vector of T is the bus of the smart distribution network topology, and the column vector is the vulnerability index of the bus. If r ij is an element of the decision matrix, then h ij = r ij / n k=1 r k j . The larger the entropy value, the more stable the system, and the smaller the role of the indicator in the evaluation. Based on this, the entropy value of the index j is processed as follows to obtain the objective weight δ 1j as: where m is the number of single indicators. The greater the objective weight, the greater the difference between the buses under the corresponding indicators, and the greater the role of the indicators in the assessment. It can be seen that the entropy weight measures the difference between the buses under each index from an objective point of view, but from this point of view, the importance of the indicator cannot be fully described. Here, the AHP method is used for evaluation. The AHP method combines qualitative and quantitative analysis to quantify the actual understanding of each indicator. The calculation process of AHP [39] is: First, compare the evaluation indicators in pairs and establish a comparison matrix C. Different from the A.L. Saaty1-9 scale method used in the reference, the comparison of this paper adopts the (0,1,2) three-scale method. That is, the element c ij in C can take three values of 0, 1 and 2, and the meanings are that the importance of the index i is smaller, the same, and larger than the index j. Secondly, using the method of [39], the comparison matrix is transformed into a judgment matrix, and the corresponding weights are obtained by consistency test. The subjective weight δ 2j of the index j is obtained by standardization processing. The description of the importance of indicators should be combined with the objective and subjective weights. This paper calculates the comprehensive weight δ j of each indicator by the following formula: The comprehensive weight can combine objective and subjective weights, not only reflect the inherent structural information of the smart distribution network, but also measure the quality of the indicators to make the evaluation more reasonable.
After obtaining the index weights, the combination of TOPSIS algorithm and gray relational analysis algorithm are used to solve the bus comprehensive vulnerability index and use it as the bus weight of the optimal D-PMU placement problem (ω i ). The solution steps are as follows: (1) Normalize the indicator matrix D n×m containing n buses and m indicators to obtain matrix B: (2) Use the entropy method and the AHP method to obtain the index weights column vector δ: (3) Weighted normalization of matrix B to obtain matrix U: (4) Determine the maximum and minimum values for each indicator set. The positive ideal solution is formed by the maximum value of the forward indicator j + and the minimum value of the negative indicator j − . The negative ideal solution is formed by the minimum value of the forward indicator j + and the maximum value of the negative indicator j − : (5) Calculate the Euclidean distance (ED) of the sample to the positive ideal solution and the negative ideal solution: (6) Based on the matrix U, calculate the grey correlation coefficient (ε ij ) between the i-th sample and the ideal sample with respect to the j-th index: (7) Calculate the grey relational degree (W) between the i-th sample and the ideal sample: (8) Process the Euclidean distance and the grey correlation degree dimensionlessly: where Calculate the proximity of the sample to the ideal solution: where α and β reflect the favor degree of the decision maker for location and shape, and α + β = 1. (10) Calculate the comprehensive vulnerability index of bus i: The calculation flow chart of the bus comprehensive vulnerability index is shown in Figure 1.
9) Calculate the proximity of the sample to the ideal solution: , 1,2, , , 1,2, , where α and β reflect the favor degree of the decision maker for location and shape, and 10) Calculate the comprehensive vulnerability index of bus i: The calculation flow chart of the bus comprehensive vulnerability index is shown in Figure 1.
Use the formula (17)

Multistage Optimal D-PMU Placement
When the power company plans the placement of D-PMUs, it is usually necessary to adopt a multistage placement strategy due to the constraints of funding or grid construction progress. In the case of the same number and locations of D-PMUs, the placement schemes of different placement sequences have different improvements in measurement redundancy. The multistage optimal D-PMU placement needs to consider the D-PMUs that have been configured in the previous stage and the D-PMUs that need to be configured in this stage to work together to maximize their effectiveness.
At each stage, the placement problem of the D-PMUs can be described as determining the minimum number of D-PMUs under certain constraints and making the system measurement redundancy as large as possible. The mathematical basic model is as follows:

Multistage Optimal D-PMU Placement
When the power company plans the placement of D-PMUs, it is usually necessary to adopt a multistage placement strategy due to the constraints of funding or grid construction progress. In the case of the same number and locations of D-PMUs, the placement schemes of different placement sequences have different improvements in measurement redundancy. The multistage optimal D-PMU placement needs to consider the D-PMUs that have been configured in the previous stage and the D-PMUs that need to be configured in this stage to work together to maximize their effectiveness.
At each stage, the placement problem of the D-PMUs can be described as determining the minimum number of D-PMUs under certain constraints and making the system measurement redundancy as large as possible. The mathematical basic model is as follows: where p is the number of stages for optimal D-PMU placement. S k is the state variable of observable condition. When the bus is observable, it takes the value 1, otherwise it takes 0. X k is the decision variable for configuring the D-PMU in a single phase. When the D-PMU is configured, it takes the value 1, if it is not configured, it takes 0. S p+1 is the termination state boundary condition of the optimized placement. Ω is a constraint of the model, and its definition is as shown in Equation (30).
The optimal placement scheme at each stage needs to achieve the maximum measurement redundancy. The redundancy of the system represents the number of buses that can be observed by measurement under this placement. The definition of the redundancy indicator R is as follows: where m is the number of current independent measurements. In the constraint of the multistage placement algorithm, firstly, according to the importance degree of the bus we determine the bus that must be configured. However, some buses are unconditionally configured with D-PMUs due to various factors (such as communication conditions, plant station conditions, engineering construction, etc.), and we also need to add the constraint of unobservable depth. Unobservable depth is a concept proposed for unobservable buses. It refers to the minimum number of branches (the minimum number of edges in the topology map) required for the unobservable bus i to reach the nearest observable bus in the system with the configured D-PMU, denoted as η. If the bus i is observable, then η(i) = 0. The unobservable depth of the system η s is the maximum value of η of all buses of the system, expressed as: (29) In this paper, the depth-first search algorithm combined with the Dijkstra algorithm is used to calculate the unobservable depth of the system. The input of the algorithm is the state variable S k and the decision variable X k , and the output is the unobservable depth η. The detailed calculation process is shown in Figure 2.  The system constraints that consider unobservable depth are: The system constraints that consider unobservable depth are: where O 0 is a set of D-PMU buses that are not allowed to be configured; O 1 is a set of D-PMU buses that must or have been configured, and Z i is a set of buses that can be connected to bus i only by no more than η + 1 edges. It can be seen from the constraint that as long as there is one bus in which Z i is configured with a D-PMU, the unobservable depth of the bus i does not exceed η.
When multistage D-PMU placement is configured based on unobservable depth, the first stage should make the unobservable depth of the system not more than 2, the second stage should make it not more than 1, and the third stage should make the system is observable completely, the unobservable depth is 0. The flow chart of the optimal D-PMU placement is shown in Figure 3. When multistage D-PMU placement is configured based on unobservable depth, the first stage should make the unobservable depth of the system not more than 2, the second stage should make it not more than 1, and the third stage should make the system is observable completely, the unobservable depth is 0. The flow chart of the optimal D-PMU placement is shown in Figure 3. Using entropy method to determine objective weight δ1j Using AHP method to determine subjective weight δ2j Use formula (16) Figure 3. Flow chart of the optimal D-PMU placement process.

Solving Algorithm
In this paper, the improved genetic algorithm is used to solve the optimal D-PMU placement problem. Based on the model of optimal D-PMU placement, the fitness function designed to meet the genetic algorithm is: where n is the total number of system buses and

Solving Algorithm
In this paper, the improved genetic algorithm is used to solve the optimal D-PMU placement problem. Based on the model of optimal D-PMU placement, the fitness function designed to meet the genetic algorithm is: where n is the total number of system buses and n i=1 x i is the total number of D-PMUs installed in the system.
The genetic algorithm mainly includes the operations of selection crossover and mutation. This paper uses the roulette method to perform the selection operation. The choice of crossover probability P c and mutation probability P m is a key factor affecting the performance of genetic algorithm. P c determines the global search ability of the genetic algorithm, and P m determines the local search ability. This paper uses adaptive P c and P m , and its calculation formula is: other cases other cases (32) P c1 and P c2 are the upper and lower limits of the crossover probability. P c1 = 0.9, P c2 = 0.6. f b is the larger fitness value of the two individuals involved in the crossover operation, f av is the average fitness value of the group, f max is the maximum fitness value in the group. P m1 , P m2 , and P m3 are the upper, lower, and intermediate values of the mutation probability. P m1 = 0.1, P m2 = 0.01, P m3 = 0.07.
In the calculation formula of the crossover probability, when f max = f av , the crossover probability takes its upper limit, although the crossover operation cannot change the genetic composition of the individual at this time, which does not help the evolution of the population, but facilitates the mathematical calculation. In the calculation formula of the mutation probability. When f max = f av , the probability of mutation takes the intermediate value, which ensures the population still maintains a certain probability of mutation when all individual genetic composition is consistent, prevents evolution from stagnating, and also facilitates mathematical calculations. The solution process of improved genetic algorithm is shown in Figure 4.

Application Requirements Analysis
The requirements analysis lays the foundation for the system. This paper adopts a structured analysis method of top-down, layer-by-layer decomposition to comprehensively analyze the related technologies and functions of the system. Combined with the specific analysis of the actual situation, the system is required to have the following functions: (1) Dynamic electrical topology generation and editing functions. According to the bus adjacency matrix corresponding to the electrical wiring diagram of the smart distribution network, an editable

Application Requirements Analysis
The requirements analysis lays the foundation for the system. This paper adopts a structured analysis method of top-down, layer-by-layer decomposition to comprehensively analyze the related technologies and functions of the system. Combined with the specific analysis of the actual situation, the system is required to have the following functions: (1) Dynamic electrical topology generation and editing functions. According to the bus adjacency matrix corresponding to the electrical wiring diagram of the smart distribution network, an editable topology map is generated, which can implement functions such as non-critical bus compression, configured D-PMU bus lighting, and network reconstruction. (2) Import and modify functions of system parameters and existing measurement data information. Input data includes: line parameters, tie switch information, zero injection bus information, initial parameters of different algorithms, existing D-PMU measurement data. (3) Optimal D-PMU placement function. Implement one-time and multistage optimal D-PMU placement scheme calculation that meets the needs of various business needs and balances the measurement redundancy and economy.
The optimal D-PMU placement assistant decision-making software system for the smart distribution network includes three modules: electrical topology map generation and editing module, optimal D-PMU placement module and optimized placement scheme comparison export module. The specific application and function of the module are shown in Table 1. Compare and select the optimal scheme and export this scheme (1) Scheme display (2) Scheme comparison (3) Scheme export The system adopts the client/server mode (C/S). The client issues a task request to the server, the server processes the client's request and returns the corresponding result. This reduces the requirements on the client hardware, and it is easier to convert and update the system while preserving the existing investment in the client computer system. Therefore, this development mode has better openness and scalability. This system uses Anaconda 3 as the development platform, uses Python language and Tkinter module library to realize interface design and development. The algorithm uses MATLAB package embedding. From the foregoing requirements analysis and development mode, it can be seen that the system is feasible in design, development, and operation.

System Functional Architecture
In order to improve the flexibility and maintainability of the entire software system, the software system adopts the three-level application architecture, including a data access layer, a software logic layer and a software application layer. The architecture of the software system is shown in Figure 5. The software application layer is located at the top of the system and is closest to the user. It is a specific combination of specific functions in the software logic layer according to specific goals, provides an interface between the software system and the user for displaying data and accepting data input by the user. The final access of the system, that is, the end user is the power company, which can be directly operated through the human-computer interaction interface to realize the optimal D-PMU placement scheme determination and document output that meets the specific target needs. Visualization interface of optimal D-PMU placement software system for smart distribution network User Figure 5. System functional architecture diagram.  The data access layer implements data storage and read operations, receives software logic layer requests, and accesses the data required for a specific stage from the database. The accessed data mainly includes core network data sources such as electrical network parameter information data, measurement information data, document data, and access control data.

Transaction Flow and Data Flow Analysis
The software logic layer is in the middle of the data access layer and the application layer. It is the part that reflects the core value in the system architecture and brings together the operational function logic of the entire software system. It mainly includes electrical topology drawing editing, data conversion fusion, interface calling, output calling, exporting planning scheme text and so on. For the data access layer, the logical layer is the caller; for the presentation layer, the logical layer is the callee, so the location of the software logic layer in the architecture is critical.
The software application layer is located at the top of the system and is closest to the user. It is a specific combination of specific functions in the software logic layer according to specific goals, provides an interface between the software system and the user for displaying data and accepting data input by the user. The final access of the system, that is, the end user is the power company, which can be directly operated through the human-computer interaction interface to realize the optimal D-PMU placement scheme determination and document output that meets the specific target needs.

Transaction Flow and Data Flow Analysis
(1) Transaction flow analysis When analyzing the organizational structure and functions of the system, it is necessary to string together the data about the transaction flow in the system survey from the perspective of an actual transaction flow for further analysis. Transaction flow analysis can help us understand the specific processing of the transaction, identify and handle errors and omissions in the system's investigation work, modify and delete the unreasonable parts of the system, and optimize the transaction flow.
Based on the application requirements analysis and system functional architecture, the transaction flow diagram of the whole software system is shown in Figure 6. Based on the application requirements analysis and system functional architecture, the transaction flow diagram of the whole software system is shown in Figure 6.
Generate electrical topology based on network topology information Dynamic editing of electrical topology maps, such as initial configuration, network reconstruction, etc.

Topology map generation editing module
Select a one-time optimal D-PMU placement algorithm Topology map cascading import, input zero injection bus and algorithm parameters, etc. (2) Transaction flow analysis Data flow analysis mainly includes information analysis of the flow, transmission, processing and storage. The purpose of data flow analysis is to identify and resolve problems in data flow. The data flow is then represented by a data flow diagram. The data flow diagram is a graphical technique that depicts the transformation of information flow and data from input to output and is the basic tool for structured system analysis. The data flow diagram of the software system is shown in Figure 7. (2) Transaction flow analysis Data flow analysis mainly includes information analysis of the flow, transmission, processing and storage. The purpose of data flow analysis is to identify and resolve problems in data flow. The data flow is then represented by a data flow diagram. The data flow diagram is a graphical technique that depicts the transformation of information flow and data from input to output and is the basic tool for structured system analysis. The data flow diagram of the software system is shown in Figure 7.

Application Effect Display and Case Analysis
The method proposed in this paper and the developed software are applied to the IEEE 33 bus system and the actual engineering of the Guangzhou Nansha Yuan'an Station, respectively, and the effectiveness of the algorithm and the practicability of the software are verified.

IEEE 33 Bus System
The topology of the IEEE 33 bus system is shown in Figure 8. 1-33 are the bus numbers. In the case of this paper, bus 1 is a balanced bus, buses 5, 6, 13, 21 are zero injection buses, and other buses are PQ buses. 29

Application Effect Display and Case Analysis
The method proposed in this paper and the developed software are applied to the IEEE 33 bus system and the actual engineering of the Guangzhou Nansha Yuan'an Station, respectively, and the effectiveness of the algorithm and the practicability of the software are verified.

IEEE 33 Bus System
The topology of the IEEE 33 bus system is shown in Figure 8. 1-33 are the bus numbers. In the case of this paper, bus 1 is a balanced bus, buses 5, 6, 13, 21 are zero injection buses, and other buses are PQ buses.

Application Effect Display and Case Analysis
The method proposed in this paper and the developed software are applied to the IEEE 33 bus system and the actual engineering of the Guangzhou Nansha Yuan'an Station, respectively, and the effectiveness of the algorithm and the practicability of the software are verified.

IEEE 33 Bus System
The topology of the IEEE 33 bus system is shown in Figure 8. 1-33 are the bus numbers. In the case of this paper, bus 1 is a balanced bus, buses 5, 6, 13, 21 are zero injection buses, and other buses are PQ buses. 29   According to the bus vulnerability index determined in the previous section, the objective weights of the four indicators D1~D4 are obtained by entropy method: δ11 = 0.0588, δ12 = 0.4702, δ13 = 0.4127, δ14 = 0.0712, the subjective weights are obtained by analytic hierarchy process method: δ21 = 0.0675, δ22 = 0.5645, δ23 = 0.1845, δ24 = 0.1845. Based on the combination of objective weight and subjective weight, the combined weights of the four indicators are δ1 = 0.0627, δ2 = 0.5138, δ3 = 0.2965, δ4 = 0.1270. Then use TOPSIS algorithm and gray relational analysis algorithm to solve the bus comprehensive vulnerability index. The vulnerability index of each bus is shown in Figure 9. In order to reflect the effect of the bus vulnerability index on optimal D-PMU placement in the normal operation of the system without considering the zero injection bus, we use the one-time optimal D-PMU placement method proposed in this paper to compare the two cases of considering or not considering bus weight in the model. The result of the comparison is shown in Table 2. As can be seen from the table, considering the bus vulnerability index does not increase the number of D-PMU required and can get better measurement redundancy. In order to test the impact of zero injection buses on the optimal D-PMU placement, in the case that the other conditions are the same, we only change whether the zero injection buses are considered in the model. The result of the comparison is shown in Table 3. It can be intuitively seen that considering zero injection buses in the model can effectively reduce the number of D-PMU.

Optimal Placement Model
No. of D-PMU D-PMU Locations Consider zero injection buses 10 2, 8, 11, 14, 17, 21, 24, 26, 29, 32 Does not consider zero injection buses 11 2, 4, 8, 11, 14, 17, 21, 24, 26, 29, 32 The optimal D-PMU placement scheme that makes the system full observable under the N-1 fault condition of the smart distribution network system is shown in Table 4. It can be intuitively seen from the placement result that when the bus i is observable in the case of the D-PMU device N-1, it is inevitably observable in the case of the line N-1.

System status D-PMU locations (No.)
Line N-1 1, 2, 3, 4, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 24, 26, 27, 29, 31, 32(21) D-PMU device N-1 1, 2, 3, 4, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 24, 26, 27, 29, 31, 32(22) On the basis of the one-time optimal D-PMU placement scheme, the multistage optimal D-PMU placement without considering zero injection buses is realized. The details of the placement scheme are shown in Table 5. The unobservable depth and observable degree of each stage are shown in Figure 10, and the change of the unobservable depth and measurement redundancy of the system with the number of D-PMU placement are shown in Figure 11.  In order to reflect the effect of the bus vulnerability index on optimal D-PMU placement in the normal operation of the system without considering the zero injection bus, we use the one-time optimal D-PMU placement method proposed in this paper to compare the two cases of considering or not considering bus weight in the model. The result of the comparison is shown in Table 2. As can be seen from the table, considering the bus vulnerability index does not increase the number of D-PMU required and can get better measurement redundancy. In order to test the impact of zero injection buses on the optimal D-PMU placement, in the case that the other conditions are the same, we only change whether the zero injection buses are considered in the model. The result of the comparison is shown in Table 3. It can be intuitively seen that considering zero injection buses in the model can effectively reduce the number of D-PMU. Table 3. Effect of zero injection buses on placement results.

Optimal Placement Model No. of D-PMU D-PMU Locations
Consider zero injection buses 10 2, 8, 11, 14, 17, 21, 24, 26, 29, 32 Does not consider zero injection buses 11 2, 4, 8, 11, 14, 17, 21, 24, 26, 29, 32 The optimal D-PMU placement scheme that makes the system full observable under the N-1 fault condition of the smart distribution network system is shown in Table 4. It can be intuitively seen from the placement result that when the bus i is observable in the case of the D-PMU device N-1, it is inevitably observable in the case of the line N-1.

Distribution System of Yuan'an Substation
In order to verify the significance of the optimal D-PMU placement method proposed in this paper to a practical project, we apply the developed software to the actual project of the Yuan'an substation. There is no zero injection bus in this system. The corresponding electrical topology diagram is generated for the given electrical wiring diagram adjacency matrix. The entropy method and analytic hierarchy process are used to obtain the weights of the four indicators of bus vulnerability. δ1 = 0.0732, δ2 = 0.5361, δ3 = 0.2775, δ4 = 0.1458. The vulnerability index of each bus is shown in Figure 12. The specific conditions in the actual project are considered to ensure the communication of the Yuan'an substation: D-PMUs are initially placed at buses 3, 4, 7, 8, 20, 22. After the initial placement is completed, the number of observable buses in the system is 14, and the unobservable depth is 8. Using the method proposed in this paper to perform optimal D-PMU placement, the placement scheme and the placement effect of each stage are shown in Table 6. The unobservable depth and observability of each stage are shown in Figure 13, and the change of the unobservable depth and

Distribution System of Yuan'an Substation
In order to verify the significance of the optimal D-PMU placement method proposed in this paper to a practical project, we apply the developed software to the actual project of the Yuan'an substation. There is no zero injection bus in this system. The corresponding electrical topology diagram is generated for the given electrical wiring diagram adjacency matrix. The entropy method and analytic hierarchy process are used to obtain the weights of the four indicators of bus vulnerability. δ1 = 0.0732, δ2 = 0.5361, δ3 = 0.2775, δ4 = 0.1458. The vulnerability index of each bus is shown in Figure 12. The specific conditions in the actual project are considered to ensure the communication of the Yuan'an substation: D-PMUs are initially placed at buses 3, 4, 7, 8, 20, 22. After the initial placement is completed, the number of observable buses in the system is 14, and the unobservable depth is 8. Using the method proposed in this paper to perform optimal D-PMU placement, the placement scheme and the placement effect of each stage are shown in Table 6. The unobservable depth and observability of each stage are shown in Figure 13, and the change of the unobservable depth and  Figure 11. Unobservable depth and measurement redundancy of the IEEE 33 bus system.

Distribution System of Yuan'an Substation
In order to verify the significance of the optimal D-PMU placement method proposed in this paper to a practical project, we apply the developed software to the actual project of the Yuan'an substation. There is no zero injection bus in this system. The corresponding electrical topology diagram is generated for the given electrical wiring diagram adjacency matrix. The entropy method and analytic hierarchy process are used to obtain the weights of the four indicators of bus vulnerability. δ 1 = 0.0732, δ 2 = 0.5361, δ 3 = 0.2775, δ 4 = 0.1458. The vulnerability index of each bus is shown in Figure 12.

Distribution System of Yuan'an Substation
In order to verify the significance of the optimal D-PMU placement method proposed in this paper to a practical project, we apply the developed software to the actual project of the Yuan'an substation. There is no zero injection bus in this system. The corresponding electrical topology diagram is generated for the given electrical wiring diagram adjacency matrix. The entropy method and analytic hierarchy process are used to obtain the weights of the four indicators of bus vulnerability. δ1 = 0.0732, δ2 = 0.5361, δ3 = 0.2775, δ4 = 0.1458. The vulnerability index of each bus is shown in Figure 12. The specific conditions in the actual project are considered to ensure the communication of the Yuan'an substation: D-PMUs are initially placed at buses 3, 4, 7, 8, 20, 22. After the initial placement is completed, the number of observable buses in the system is 14, and the unobservable depth is 8. Using the method proposed in this paper to perform optimal D-PMU placement, the placement scheme and the placement effect of each stage are shown in Table 6. The unobservable depth and observability of each stage are shown in Figure 13, and the change of the unobservable depth and The specific conditions in the actual project are considered to ensure the communication of the Yuan'an substation: D-PMUs are initially placed at buses 3, 4, 7, 8, 20, 22. After the initial placement is completed, the number of observable buses in the system is 14, and the unobservable depth is 8. Using the method proposed in this paper to perform optimal D-PMU placement, the placement scheme and the placement effect of each stage are shown in Table 6. The unobservable depth and observability  Figure 13, and the change of the unobservable depth and measurement redundancy of the system with the number of D-PMU placement is shown in Figure 14. The D-PMU placement topology are shown in Figure 15. measurement redundancy of the system with the number of D-PMU placement is shown in Figure  14. The D-PMU placement topology are shown in Figure 15.     Figure  14. The D-PMU placement topology are shown in Figure 15.    In order to further analyze the performance of the proposed method, the simulation results of the proposed method in IEEE 33 system and Yuan'an substation system are compared with those of other methods in [28,32]. The comparison results are shown in Table 7.  In order to further analyze the performance of the proposed method, the simulation results of the proposed method in IEEE 33 system and Yuan'an substation system are compared with those of other methods in [28,32]. The comparison results are shown in Table 7. Table 7. Comparison of optimal solutions in the IEEE 33 system and the Yuan'an substation systems. As shown in Table 7, compared with the methods in references [28,32], in terms of the effect of the solution, the optimal D-PMU placement method proposed in this paper can provide the optimal solution with the minimum number of D-PMU required for complete observability. It shows that the proposed method is practical. In terms of the speed of the solution, the computational complexity is increased because the bus vulnerability index is considered in the optimal placement, so the calculation time is slightly longer than the ordinary genetic algorithm, but still within an acceptable range.

Conclusions
A one-time and multistage optimal D-PMU placement method for smart distribution networks and software implementation technology are studied in this paper. Taking the bus differences into consideration, the one-time optimal D-PMU placement method considering bus vulnerability index As shown in Table 7, compared with the methods in references [28,32], in terms of the effect of the solution, the optimal D-PMU placement method proposed in this paper can provide the optimal solution with the minimum number of D-PMU required for complete observability. It shows that the proposed method is practical. In terms of the speed of the solution, the computational complexity is increased because the bus vulnerability index is considered in the optimal placement, so the calculation time is slightly longer than the ordinary genetic algorithm, but still within an acceptable range.

Conclusions
A one-time and multistage optimal D-PMU placement method for smart distribution networks and software implementation technology are studied in this paper. Taking the bus differences into consideration, the one-time optimal D-PMU placement method considering bus vulnerability index and zero injection bus is proposed. The constraints in the different operating states of the system are considered in the method. The proposed method can provide the most economical solution with the minimum number of D-PMUs required to ensure complete observability Even if the number of D-PMUs is the same, under the constraint of the bus weights, the optimal locations can be determined to obtain the maximum measurement redundancy, thereby improving the state estimation accuracy. On the basis of the one-time method, the multistage optimal D-PMU placement method based on reducing the unobservable depth of the system step by step is proposed. It can obtain the optimal D-PMU placement sequence to make D-PMUs work best at every stage. An optimal D-PMU placement assistant decision-making software for smart distribution network is designed and developed to provide a more convenient operating platform. The example verification analysis is carried out on the EEE 33 bus system and the Yuan'an substation system, which proves the validity and practicability of the proposed method and developed software. Compared with other methods, the proposed method has better performance in solving effect and solving speed. The expected future work will take the influence of existing conventional measuring equipment and network reconfiguration into consideration.
Author Contributions: X.K. and X.Y. conceived the idea of the study and conducted the research. X.Y. and Y.W. analyzed most of the data and wrote the initial draft of the paper. Y.X. and L.Y. contributed to finalizing this paper.