1. Network Connectivity, Load Flow and State Estimation Network connectivity analysis is carried out using an augmented incidence matrix and augmented bus admittance matrix operations. The standard bus incidence matrix and bus admittance matrix based Jacobi analysis is used for the load flow calculations and State Estimation. Anyhow, if it is planned to develop the total network from the beginning, then it is most appropriate to use the bus impedance matrix and the step-by-step development process of the bus impedance matrix. It shall be noted that, unless the network building is carried out from the beginning it is impossible to develop the bus impedance matrix from the bus admittance matrix through matrix inversion. 1.1 Network Connectivity, Load Flow and Power System State Estimation Design. This is the core of the ADMS which needs detailed design analysis. The advanced network analysis techniques are used in this process to develop a connectivity model, load flow model and state estimation model. 1.1.1 Network Connectivity Module The network connectivity are identified into tree cut-sets and extracted from the network in the usual connectivity analysis process. In this analysis a different approach is used as the minimum cut set calculation is lengthy as well as must be carried out every time when a switch status is changed. Therefore, traditional calculation is resource intensive. In this Network connectivity analysis, a modified version of the network incidence matrix is used. This is an innovation in this development. In this methodology, the Modified Incidence Matrix, which represents the connectivity of network branches to nodes as shown below is developed. ๐ด๐×๐ ๐11 =[ โฎ ๐๐1 โฏ ๐1๐ โฑ โฎ ] โฏ ๐๐๐ 1, 0, element ๐ is connected to node ๐ element ๐ is not connected to node ๐ (1) Where ๐๐๐ = { ๐ =number of elements ๐ = number of nodes This differs from the standard incidence matrix as in the standard network incidence matrix, the orientation of each branch is represented by the sign of the connectivity index. In this matrix if the network element is connected to the branch, matrix holds a value of 1 in the corresponding position and otherwise zero. The modified bus impedance matrix for the connectivity analysis is developed in the form of a identity matrix of the size of the elements as shown below. ๐ฆ = ๐ผ๐×๐ (2) Now the modified network bus admittance matrix, ๐๐๐ข๐ is developed as, ๐๐๐ข๐ (๐×๐) = ๐ด๐×๐ โ ๐ฆ๐×๐ โ ๐ด๐๐×๐ (3) In this matrix, the off-diagonal element which are either 1 or 0 and when 1 represent connectivity of the node to the other node. If the two nodes are not connected, then the corresponding off-diagonal element is 0. The diagonal elements which hold a positive non-zero number represent the number of elements connected to the particular node. Now, the modified power injection matrix is developed such as to hold the power feeding nodes with number 1 and all the other nodes with 0. ๐1 ๐=[ โฎ ] ๐๐ ๐×1 (4) Where ๐๐ = { 1, 0, if branch ๐ is energised if branch ๐ is not energised Now the energized element matrix can be developed as [๐ต]๐×1 = [๐๐๐ข๐ ]๐×๐ [๐]๐×1 (5) Matrix ๐ต is modified by a recursive process to make all the positive integers in the matrix 1 and all the zeros to remain as it is. There are no negative integers as both ๐ and ๐are positive. If the recursive equation is developed at the nth recursion, then, Say [๐ต]๐×1 ๐1 โฎ = ๐๐ โฎ [๐๐ ]๐×1 (6) Then 1, (๐๐ )๐+1 = { 0, if (๐๐ )๐ > 0 if (๐๐ )๐ < 0 (7) Equation (2) and equation (3) are recursively used until matrix P stabilizes. Once the matrix stabilizes it gives the elements which are energized. For example, the network which is shown in Figure 2 below will result in an incidence matrix as shown in the Table 1 below. When this incidence matrix is recursively iterated as described above, the resulting column vector indicating the energized elements is as shown in table 3. The recursive operation is carried out using the MATLAB code as shown in table 2. The elements energized as shown in table 3 when graphically represented looks as shown in Figure 3. Figure 2 Single Line Diagram of the example netwrok for connectivity analysis- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 1 2 1 1 3 0 0 4 5 1 1 1 1 6 7 8 1 1 1 1 1 1 1 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 Table 1 – Modified Incidence Matrix for the example network used for connectivity analysis The calculation is as shown in the table below done in MATLAB. while 1 y=eye(size(A,2)); Ybus=A*y*A'; B=Ybus*P; for i=1:size(A,1) if B(i)>0 B(i)=1; else B(i)=0; end end sum(P) if sum(P)==sum(B) break; end Table 2 – Program Code of the Network Analysis Branch ID 1 Energised or not 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 Table 3 – Branch Connectivity Vector Figure 3 – Results of the connectivity Analysis shown in the single line diagram This particular algorithm developed by the design team is coded into the ADMS through an above discussed outsourced coding contractor with proper testing and verification cycle. 1.1.2 Load-flow calculation[2], [3]. The data measurements are obtained from the R-LBS and ARs installed in the network. All the primary substation busbar voltages are also assumed to be available. All the loads of the transformers ๐ฟ๐ก๐๐ are calculated by the equation shown below using the customer mix and the individual customer category load curves organized in to load curve matrix ๐ฟ๐ถ and customer participation matrix ๐ถ๐ for the transformers. Load curve of the family of transformers is calculated as, [๐ฟ๐ก๐๐ ]๐_๐ก๐๐×24 = [๐ถ๐]๐_๐ก๐๐×๐๐ข๐ _๐๐๐ก [๐ฟ๐ถ]๐๐ข๐ _๐๐๐ก×24 (8) Where, ๐ฟ๐ก๐๐ = Transformer Load matrix where each row represents the load curve of each transformer; [๐ถ๐]๐_๐ก๐๐×๐๐ข๐ _๐๐๐ก = Customer participation matrix where each row represent the percentage of load of each customer category in each transformer. [๐ฟ๐ถ]๐๐ข๐ _๐๐๐ก×24 = Load Curve matrix where each row represents the load curve of each customer category ๐๐ก๐๐ = Number of transformers ๐๐ข๐ ๐๐๐ก = Number of customer categories (Usually 9) such as General Purpose, Domestic 0-30, Domestic 60-90, Domestic 90-120, Domestic 120-180, Domestic>180, Industrial, Hotel, Government, Religious, etc The standard load flow is carried out for the radial network using the dc load flow equations coupled with the incident matrix where in this instance the directionality is incorporated as shown below. ๐ด๐×๐ ๐11 =[ โฎ ๐๐1 โฏ ๐1๐ โฑ โฎ ] โฏ ๐๐๐ (9) Where 1, ๐๐๐ = { 0, −1, element ๐ direction is towards node ๐ element ๐ is not connected to node ๐ element ๐ direction is away from node ๐ ๐ =number of elements ๐ = number of nodes Standard load flow equations are developed for this purpose and incorporated to the ADMS as a separate module. These calculations are indicated here for completion. Here the straightforward process of calculating load flow using standard Jacobi method is described. In the distribution load flow problem, all the busbars are load busbars and therefore the issue of the inclusion of generator busbars and voltage control busbars will not occur. Here, the calculation starts from assuming a set of voltages from the busbars at which the complex power injections are known. Iteratives the next set of voltages are calculated from the present set of voltages until the set of bus voltages converge. The ith row of the matrix equation ๐ผ = ๐๐๐ข๐ ๐ can be written as ๐ ๐ผ๐ = ∑ ๐๐๐ ๐๐ ๐=1 Now from the definition of complex power injection at ith row ๐๐ = ๐๐ ๐ผ๐∗ we can write, ๐ผ๐ = ๐๐∗ ๐๐∗ Gives ๐ ๐๐∗ = ∑ ๐๐๐ ๐๐ ๐๐∗ ๐=1 Now this can be expanded in extracting the diagonal items ๐ ๐๐∗ = ๐๐๐ ๐๐ + ∑ ๐๐๐ ๐๐ ๐๐∗ ๐=1 ๐≠๐ Which can be rearranged as ๐ 1 ๐๐∗ ๐๐ = − ∑ ๐๐๐ ๐๐ ๐๐๐ ๐๐∗ { ๐=1 ๐≠๐ (10) } Equation (10) can be used to form an iterative solution so that the new voltages can be calculated from the know voltages as, ๐ ๐๐๐๐๐ค 1 ๐๐∗ ๐๐๐๐ฃ๐๐๐ข๐ = − ∑ ๐๐๐ ๐๐ ๐๐๐ ๐๐∗ { ๐=1 ๐≠๐ (11) } Therefore, the process of calculating the bus voltages is as below. ๐∗ 1. Calculate the currents of each node by using ๐ผ๐ = ๐๐∗ for all buses. 2. Now calculate ∑๐๐=1 ๐๐๐ ๐๐ ๐ ๐≠๐ 3. Calculate the new bus voltage by using, ๐๐๐๐๐ค = 1 ๐๐∗ { ๐๐๐๐ฃ๐๐๐ข๐ ∗ ๐๐๐ ๐ ๐ ๐๐๐๐ฃ๐๐๐ข๐ − ∑๐๐=1 ๐๐๐ ๐๐ } ๐≠๐ 4. Compare the voltage values calculated from the iteration with the previous values to check whether the solution is converged. 1.1.3 Estimation of states[1], [4], [5] The states of this system can be considered as the bus voltages. Unlike in HV networks, the bus voltages are not measured by voltage transformers. In distribution network, the buses are not well formed busbar connection points in grid substations. Busses are the network nodes identifying the equipment connection points and the network branching points and hence, the measurement of voltages in all these network nodes is costly and not practical. There are two equipment installed for other purposes which got voltage measurements. The Remote Operation Load Break Switches (R-LBS) which are installed for load breaking and network isolation purposes and Auto-Reclosures (AR) which are installed for the network switching purposes have voltage measurement incorporated. Further the boundary metering points equipped with CT-PT units have the voltage reading of the node. Usually, the number of buses where the voltages are measured is much lesser in number than the total number of nodes. In power system state estimation equation is given as. ๐ฅ ๐๐ ๐ก = [[๐ป ๐ ๐ −1 ๐ป]−1 ๐ป๐ ๐ −1 ]๐ง ๐๐๐๐ (10) Where ๐ฅ = Power system states ๐ง ๐๐๐๐ = Measurements, ๐ป = Mapping function of measurements to each state ๐ = Covariance matrix of measurement error The mapping function of ๐๐ states to ๐ ๐กโ measurement, if expressed as, ๐๐ (๐ฅ1 , ๐ฅ2 , โฏ , ๐ฅ๐๐ ) = ๐๐ (๐) = โ๐1 ๐ฅ1 + โ๐2 ๐ฅ2 + โฏ + โ๐๐๐ ๐ฅ๐๐ Then we can say the ๐๐ states can be mapped to ๐๐ measurements as, ๐1 (๐ฅ) ๐ (๐ฅ) ๐(๐) = [ 1 โฎ ] ๐๐๐ (๐ฅ) = [๐ป]๐๐ ×๐๐ [๐ฅ]๐๐ ×1 (11) ๐๐ ×1 Where [๐ป] = ๐๐ × ๐๐ matrix ๐๐ = Number of measurements ๐๐ = Number of states The measurements are arranged as a column vector as, ๐๐๐๐๐ ๐ง1๐๐๐๐ ๐ง ๐๐๐๐ = 2 โฎ ๐๐๐๐ [๐ง๐๐ ] (12) ๐๐ ×1 And, the covariance matrix can be written as, ๐12 ๐22 ๐ = (13) โฑ [ ๐๐2๐ ] It shall be noted that if the number of measuremets is more than the numebr of states then the maximum likelyhood function as defined above can be used. In the case if the number of states and number of measurements are the same then a reduced version of the maximum likelyhood function as shown below can be used. ๐ฅ ๐๐ ๐ก = [๐ป]−1 ๐ง ๐๐๐๐ (14) In the case of actual number of measurements is lesser than the states, which is the most likey case for distribution system estimates, the estimate equation become undterministic. In this case a set of pseudo set of measurements are created to make the number of measurements equal to the number of states. The measurements of the LECO network are the voltages and the pseudo measurements are the current injections at nodes. Therefore the load flow equation which related current and voltage can be rewritten for the estimation purposes as, ๐ผ = ๐๐๐ข๐ ๐ Which gives ๐ = [๐๐๐ข๐ ]−1 ๐ผ (15) If the voltage vector is split for measured and unmeasured voltages, then ๐ ๐ [ ๐] = [ ๐ ๐ ๐ ๐ผ ][ ] ๐ ๐ผ๐ (16) This can be re-arranged using the matrix partition to derive a function between the measurement voltages and pseudo currents and the unmeasured voltages and unassumed currents as; ๐๐ −1 ๐ [ ] = [ −1 ๐ผ ๐ −1 ๐ − ๐๐ −1 ๐ ] −๐ −1 ๐ ๐๐ [๐ผ ] ๐ (17) This is similar to equation ๐ฅ ๐๐ ๐ก = [๐ป]−1 ๐ง ๐๐๐๐ where ๐๐ −1 ๐ − ๐๐ −1 ๐ (18) ] ๐ −1 −๐ −1 ๐ This equation can be used to do the state estimation. The covariances for the assumption can be used as the covariance of the data set used for the transformer load estimation. [๐ป] = [ An alternative solution to this exists as, the direct determination of the bus impedance matrix through the sequential development of the network. This is used as the modality of network modification in order to eliminate the burden of determining the ๐ −1 every time the network is modified. This is also used for the state estimation in the networks to create an overdetermined situation where the power of all the buses are known and the voltages of several buses are known. In such situation the bus impedance matrix needs to be built using the step by step method and the state to measurement mapping function as in equation (11) can be used as the impedance bus matrix. ๐ = ๐๐ผ Which can be expanded as ๐ ๐๐ = ๐๐1 ๐ผ1 + ๐๐2 ๐ผ2 + โฏ + ๐๐๐ ๐ผ๐ = ๐๐๐ ๐ผ๐ + ∑ ๐๐๐ ๐ผ๐ ๐=1 ๐≠๐ And by the definition of complex power, ๐๐ = ๐๐ ๐ผ๐∗ Gives ๐๐∗ ๐ผ๐ = ∗ ๐๐ Substituting in the above equation we get ๐ ๐๐∗ ๐๐∗ ๐๐ [1 − ๐๐๐ ] = ∑ ๐ ๐๐ ∗ |๐๐ |2 ๐๐ ๐=1 ๐≠๐ If we assume that for the |๐๐ | we use the steady state load flow value, then 1 ๐๐ = [1 − ๐๐๐ ๐ ๐๐∗ ∑ ๐๐๐ ∗ ๐๐∗ ๐๐ ๐=1 ] |๐๐ |2 ๐≠๐ This function is used as the mapping function of the state estimation process. The covariance matrix is also required to be developed, if the number of measurements are greater than the states in any of the above circumstances ( ๐๐ > ๐๐ ). From equation (8) we can write the load value of the ith transformer at nth hour as ๐๐ข๐ _๐๐๐ก ๐ฟ๐ก๐๐,๐,๐ = ∑ ๐ถ๐๐,๐ ๐ฟ๐ถ๐,๐ ๐=1 Now if the standard deviation of customer category percentages of the ๐๐กโ customer category is ๐๐ถ๐,๐ and the standard deviation of the Load Curve of ๐๐กโ customer category for all hours is ๐๐ฟ๐ถ,๐ Then the standard deviation of the Load of the ๐ ๐กโ transformer at ๐๐กโ hour is, ๐๐ข๐ _๐๐๐ก ๐๐ฟ๐ก๐๐ ,๐ = √ ∑ ๐=1 2 2 ๐๐ฟ๐ถ,๐ ๐๐ถ๐,๐ 2 2 ๐๐ฟ๐ถ,๐ + ๐๐ถ๐,๐ (19) We can assume that this is the standard deviation of pseudo currents used for the state estimation. The standard deviation of the measured voltages can be extracted from the measurement equipment error data. Therefore, the covariance matrix can be calculated from equation 13 as, ๐2๐๐ ๐น๐๐ [๐น ] = [ ๐ผ๐ ๐ ๐2๐ฟ๐ก๐๐,๐ ] (20) Therefore, in an over determined situation the state estimation can be done by using equation (10), (18) and (20). These are the mathematical algorithms used for the connectivity analysis, load flow and the state estimation of the network. These algorithms are coded as Operational Procedures on the SQL database, which can be invoked by the APIs coded in the API platform or otherwise the procedures on the software. 1.1.4 Standard Theory of the development of Bus Impedance Matrix in step-by-step method. The development of the bus impedance matrix starts from connecting an impedance (say ๐๐ ) to the reference bus, creating bus no โ . As the reference bus is considered as the ‘zero’ bus the matrix will look as, [๐1 ] = [๐๐ ][๐ผ1 ] Now we can connect impedance ๐๐ to bus โ by creating bus โก. This will introduce a column and row to the matrix as, ๐ ๐ [ 1] = [ ๐ ๐2 0 0 ๐ผ1 ][ ] ๐๐ ๐ผ2 This matrix is considered as the elementary bus impedance matrix. There are four cases of the modification of the above elementary ๐๐๐ข๐ matrix. Case 1 – Adding ๐๐ connected between a new bus P and the reference bus Case 1-Addition of a bus connected to the reference bus The bus impedance matrix will be inserted with a new row and a column as shown below ๐๐๐๐๐๐๐๐๐ ๐๐๐๐ = [ โฏ ๐๐ ] โฏ [0 โฏ .. โฏ 0 โฎ 0 โฎ .. โฎ 0 โ โฏ โฎ ๐๐ ] Case 2 – Adding ๐๐ connected between existing bus K and new bus P. Case 2 - Addition of a bus connected to an existing bus A new row and a column is appended to the matrix with the kth row vector and kth column vector of the original impedance matrix. The diagonal element is inserted with the value of ๐๐๐ + ๐๐ . Case 3 – Adding an impedance ๐๐ between the reference bus an existing bus K. Case 3 – Addition of a branch between existing bus and reference bus Insert bus P as case 2 and short circuit bus P and bus 0 by making ๐๐ = 0. This can now be rewritten by matrix partitioning as; And can be expanded to apply Kron’s Reduction as, [๐1−๐ ]๐×1 = [๐๐๐๐ ] [๐ผ ] ๐×๐ 1−๐ ๐×1 + [๐๐๐๐−๐ ]๐×1 โ ๐ผ๐ 0 = [๐๐๐๐ค−๐ ]1×๐ [๐ผ1−๐ ]๐×1 + (๐๐๐ + ๐๐ )๐ผ๐ Form the second equation ๐ผ๐ = − 1 [๐ ][๐ผ ] ๐๐๐ + ๐๐ ๐๐๐ค−๐ 1−๐ And substitution of this result in the first equation gives [๐1−๐ ] = [๐๐๐๐ ][๐ผ1−๐ ] − [๐1−๐ ] = {[๐๐๐๐ ] − 1 [๐ ][๐ ][๐ผ ] ๐๐๐ + ๐๐ ๐๐๐−๐ ๐๐๐ค−๐ 1−๐ 1 [๐ ][๐ ]} [๐ผ1−๐ ] ๐๐๐ + ๐๐ ๐๐๐−๐ ๐๐๐ค−๐ Which gives [๐๐๐๐ค ] = [๐๐๐๐ ] − 1 [๐ ][๐ ] ๐๐๐ + ๐๐ ๐๐๐−๐ ๐๐๐ค−๐ This can be expanded to result ๐11 [๐๐๐๐ค ] = [ โฎ ๐๐1 โฏ โฑ โฏ ๐1(๐+1) ๐1๐ 1 โฎ ]− [ โฎ ] [๐(๐+1)1 ๐ + ๐ ๐๐ ๐ ๐๐๐ ๐๐(๐+1) The general element of row h and column i can be written as, ๐๐๐๐ค(โ,๐) = ๐โ,๐ − ๐โ(๐+1) ๐(๐+1)๐ ๐๐๐ + ๐๐ โฏ ๐(๐+1)๐ ] Case 4 – Adding an impedance ๐๐ between an existing bus K and existing bus J Case 4 – Addition of a branch between two existing buses First a Row and Column is inserted to the bus impedance matrix as shown below. Where ๐๐ฝ = ๐๐๐ + ๐๐๐ − 2๐๐๐ + ๐๐ Now the newly added row and column is eliminated by the above-described Kron’s reduction as ๐๐๐๐ค(โ,๐) = ๐โ,๐ − ๐โ(๐+1) ๐(๐+1)๐ ๐๐๐ + ๐๐๐ − 2๐๐๐ + ๐๐ Sequential application of these four cases any network can be built.