Next Article in Journal
Comparative Analysis of Weighting-Factor-Free Predictive Control Strategies for Direct Torque Control in Permanent Magnet Synchronous Machines
Previous Article in Journal
Development Characteristics and Distribution Patterns of Natural Fractures in the Tight Reservoirs of the Ahe Formation in the Dibei Area of the Tarim Basin
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Extended Model Approach to Study the Power Flow Analysis of Complex Power Systems

1
Key Laboratory of Advanced Perception and Intelligent Control of High-End Equipment, Ministry of Education, Wuhu 241000, China
2
College of Electrical Engineering, Anhui Polytechnic University, Wuhu 241000, China
3
School of Electric Power Engineering, Nanjing Institute of Technology, Nanjing 211167, China
*
Author to whom correspondence should be addressed.
Processes 2025, 13(8), 2607; https://doi.org/10.3390/pr13082607
Submission received: 13 July 2025 / Revised: 7 August 2025 / Accepted: 7 August 2025 / Published: 18 August 2025
(This article belongs to the Section Energy Systems)

Abstract

This paper focuses on the reconfigurability of power system extension models and improves the adaptability of radiation distribution network schemes to complex power networks. The existing Newton–Raphson based solutions face difficulties in reconstructing dynamics, often failing to converge or requiring high initial condition settings in extended systems. For the IEEE 30-bus system, based on node-provided data, we optimized the Newton–Raphson algorithm model for practical complex power systems. The novel optimization algorithm leverages multi-radiation power grid reconfiguration, significantly reducing dependencies on optimization time and initial state reconstruction. The results verify the effectiveness of the model and algorithm.

1. Introduction

With the continuous expansion and extension of the power grid system, the analysis and calculation methods of the power grid system is more significant. The continuous extension of the power grid system has different characteristics. The reconstruction of the distribution network is meant to reduce network loss, balance load, eliminate overload, improve voltage distribution, enhance power supply quality, and improve system economy and power supply reliability by changing the opening and closing states of the interconnection switches and section switches in the line, in order to satisfy system constraints. Power system reconstruction refers to isolating faults and recovering power by changing the topology structure of the power grid [1,2]. The paper’s power system reconstruction is aimed at analyzing and comparing the system performance of a new complex system after topology extension on the original system.
The comprehensive power system of ships exhibits complex mixed dynamics during reconstruction, and some equipment in the system is designed to reduce the problem of excessive discrete states caused by the expansion of the system scale. When the ship’s integrated power system fails, reconstruction is a technology that ensures continuous power supply and load balancing by changing the power grid topology and isolating the fault area [3,4], transferring high-quality power to important loads to minimize the threat caused by disturbances or faults [5]. Belkacemi et al. improved system reliability through distribution network reconstruction, but the response time of centralized control is slow. This is not conducive to real-time scheduling, is highly dependent on the central controller, and is prone to single point failures, resulting in relatively poor reliability [6,7]. Distributed control can overcome the above disadvantages in traditional centralized control and has the advantages of less information transmission and high reliability in achieving real-time control of the internal autonomy of the active distribution network [8]. Research on ship power system reconstruction mostly deals with single-point random failure problems by improving the ability to optimize the algorithm under a centralized control structure [9,10,11].
Multi-agent systems are combined with immune algorithms to carry out fault detection, isolation, and power grid reconstruction operations. Wang et al. [10] applied a multi-agent ant colony algorithm to the network reconstruction of a ship integrated power system, and showed that the addition of a multi-agent system to the ant colony algorithm accelerated the convergence speed of the algorithm and improved real-time performance. A multi-agent particle swarm optimization algorithm for a ship integrated power system has been proposed, which improves the optimization ability and speed of the algorithm [11]. A three-layer hierarchical control strategy was designed, which adds a centralized reconstruction layer on the basis of the distributed control layer and combines with the genetic algorithm for optimization calculation [12].
On this basis, probabilistic power flow (PPF) models are commonly constructed using Monte Carlo simulation (MCS) [13,14]. Related research results have been achieved, and the analysis of the characteristics of the structure of the power system after changes has been carried out [15]. Reference [16] proposes a method to eliminate excessive branch power flow in the power system by introducing sensitivity and distribution factors to improve the particle swarm optimization (PSO) algorithm. The proposed algorithm integrates Newton’s iterative process with Wirtinger calculus, enabling linearization of power flow equations directly in the complex plane in reference [17]. These methods improve and enhance power flow analysis in modern distribution systems.
Reconstruction is an important feature for adapting to the integration of new energy into the power grid, and also provides an important reference for the analysis of power system reconstruction. However, in scenarios where the continuous expansion of the power grid faces complex reconfiguration, traditional N-R power flow calculation methods often encounter convergence difficulties and high sensitivity to initial conditions due to the increased system scale, dynamic structural changes, and hybrid characteristics, which severely restrict the analysis efficiency of reconfiguration schemes. To overcome the limitations of the traditional N-R method in expanding complex systems, this study proposes an optimization algorithm based on multi-radial grid reconfiguration technology. The core of this algorithm lies in decomposing complex networks into radial subnets to find rapid solutions, and to achieve global convergence through coordination of tie lines. This method aims to significantly reduce dependence on optimization time and initial state settings, and to enhance the adaptability and computational efficiency of power flow calculation in the analysis of extended system reconfiguration. It has been validated on multiple complex networks including IEEE 30-bus, 57-bus, 118-bus, 162-bus, and 300-bus extended systems.

2. Analyze and Optimize Algorithms

The paper focuses on the power flow analysis and calculation of complex power systems, and iteratively calculates nonlinear equations based on simulation examples of IEEE 30 bus system. Power flow analysis and calculations are performed on various design schemes of the system network to obtain the parameters of each node in different types of power systems, thereby obtaining power flow distribution data of the power system. The Newton–Raphson method can be used to solve nonlinear equations and provide the parameters for system operation [7].
The expansion of the model has resulted in differences in the performance of the system model. Therefore, expanding the existing model topology by adding components such as transmission and distribution should be taken into consideration in order to achieve a regular topology structure, which can reveal the relevant characteristics of the model expansion.
The IEEE 30 bus system wiring diagram is shown in Figure 1.
The flow of distributed power sources connected to the distribution network changes and expands the nodes. The original topology remains unchanged, and the new topology is compared based on the original changes. After the expansion, the system performance changes, and the original system node topology performance tends to converge with the system topology node performance after the expansion.

2.1. Extended System Constraints

The reconstructed distribution network meets the requirements of no “circuits” and no “islands”. In addition to network structure constraints, considering the multi-state switching characteristics of power loads in energy storage systems, the following constraints must be met:
(1)
Equality constraint
f ( M P 1 , M P 2 , M P n ; M Q 1 , M Q 2 , M Q n ; C P Q 1 , C P Q 2 , C P Q n ; L P L 1 , L P L 2 , L P L i ;   L Q L 1 , L Q L 2 L Q L i ) = 0
In Equation (1), M G i and M Qi are the active and reactive power output vectors of different energy sources in the system, respectively; C P Q i is the energy storage state. When it is a power source, the attribute is the same as M Pi / M Q i . When it is a load, the attribute is the same as L P L i / L Q L i . L P L and L Q L are the active and reactive power demand vectors of the load, respectively i = 1 , 2 , n .
(2)
Inequality constraint
g ( M P 1 , M P 2 , M P n ; M Q 1 , M Q 2 , M Q n ; C P Q 1 , C P Q 2 , C P Q n ; V 1 , V 2 , V i ;   S 1 , S 2 S i ) 0
In Equation (2), V i is the node voltage vector; S i is the branch power vector.

2.2. The Power Flow Equation of the System

The following is the basic format of the power flow equation, which is the solution of power imbalance [17]:
Δ P i = P G i P d i U i j = 1 n U j ( G i j cos δ i j + B i j sin δ i j ) , i = 1 , 2 , n Δ Q i = Q G i Q d i U i j = 1 n U j ( G i j sin δ i j B i j cos δ i j ) , i = 1 , 2 , n
As shown in the above equation, there are a total of two equations. However, the number of equations and the unknowns involved in iterative calculations may vary depending on the type of node.
(1) For PQ nodes, since both exist, both function equations can be iterated. For polar coordinate equations, the sum of the state variables needs to be calculated.
(2) Regarding PV nodes, they exist but are unknown, so only the active power equation can be iterated. As the voltage frequency has been determined, the unit of electricity needs to be found.
(3) Regarding the balance node, since both are unknown, it is generally not iterated.
Assuming the number of nodes in the system is n and the number of P V nodes is m , then the number of P Q nodes is n m 1 , and the equation for iteration is m + 2 n m 1 . The state variable to be sought is also m + 2 n m 1 . The specific equation is as follows:
Δ P 1 Δ Q 1 Δ P 2 Δ Q 2 Δ P p Δ P n = H 11 N 11 H 12 N 12 H 1 p H 1 n J 11 L 11 J 12 L 12 J 1 p J 1 n H 21 N 21 H 22 N 22 H 2 p N 2 p J 21 L 21 J 22 L 22 J 2 p N 2 p H p 1 N p 1 H p 2 N p 2 H p p H p n H n 1 N n 1 H n 2 N n 2 H n p H n n Δ δ 1 Δ U 1 / U 1 Δ δ 2 Δ U 2 / U 2 Δ δ p Δ δ n
The optimization equation is as follows:
Δ P Δ Q = H N J L Δ δ Δ U / U
The non-diagonal and diagonal elements of the Jacobian matrix are:
H i i = Δ P i δ i , N i i = Δ P i U i U i , J i i = Δ Q i δ i , L i i = Δ Q i U i U i
The above variables are all Jacobian matrix elements.
After solving, obtain the state variables to be solved, and substitute them as initial values into the node power equation. Form the required coefficient sequence for each iteration step into a matrix, and then use matrix operations to calculate the coefficients required for the next iteration step. Repeat the iterative calculation until the final solution that meets the accuracy is obtained, thus obtaining the power flow distribution. In this way, the power at each node can be obtained from the node power equation, and the power flow distribution of the power system can be obtained through the active power balance equation and reactive power balance equation. The principle is shown in the following diagram in Figure 2.
This method utilizes the local linear approximation of the function at the current point to rapidly update the root estimate. By iteratively approximating the curve with its tangent line and locating the root of this linear approximation, it progressively converges towards the true root of the function, as shown in Figure 2. The green pentagram represents the exact location of the solution.

2.3. Convergence in Newton Raphson Current Calculation

Through the principle analysis of the Newton-Raphson power flow algorithm above, it can be seen that the theory of this method is relatively simple and the calculation process is also relatively simple. However, in practical numerical simulations, convergence difficulties often occur.
Generally speaking, when using the Newton–Raphson algorithm for power flow calculation, only seven or more iterations are needed to achieve high accuracy. Although the number of iterations is proportional to the system size, the increase in iteration times is not significant as the power grid size increases. In the IEEE 30 bus example presented in this paper, the solution results that meet the error accuracy requirements were obtained. In theory, if the initial parameters given are accurate enough, then when using this algorithm for calculation, the error will decrease squared at the iteration point, exhibiting quadratic convergence.
However, if we choose inappropriate initial values with given parameters, we may experience non0convergence, or converge to a solution that does not match the actual situation. The non-convergence situation may result in the model not being able to accurately fit the data, and may even affect the performance of the model. Therefore, when selecting initial values, special attention should be paid to ensuring that the selected initial values are correct, to ensure that the model can accurately fit the data.
In general, we can assume that each effective initial value of a node is the rated voltage of the P Q network, and after standardization, the initial voltage value is set to 1, and the initial values of the voltage phase angle is set to 0. This is because during normal system operation, the voltage at each node will not differ significantly from the rated voltage, and the voltage phase angle at each node is relatively close, which will not have a significant impact on the iteration results.
When conducting power flow calculations, attention should be paid to the multi-value nature of the power flow; that is, the results obtained for a given initial value are inconsistent. The reason for this situation is that the dynamic equation of the power system is a non-linear system, so theoretically it is impossible to have only one solution. However, the premise is that in the calculation of the power system, all non-real solutions must be eliminated.
In the above situations, there may be some solutions (or non-stationary solutions) that are not present in reality. There may also be some reasonable solutions that can be obtained in reality, but the operating voltage and power loss of these solutions may vary.
In contrast to the above situation, due to various reasons, the calculation of power flow may not converge, which can be referred to as “non-convergence”. We need to further analyze this situation to determine if it is due to the following reasons:
(a)
Improper network parameter settings;
(b)
Inaccurate parameters;
(c)
The algorithm is incorrect;
(d)
Initial value selection error;
(e)
The algorithm itself has flaws;
(f)
Other reasons.
It is worth noting that sometimes power flow calculations can converge and obtain real number solutions, but this does not mean that all of these solutions can be used as actual power flow results, for example in the following situations:
(a)
When the current flowing through the component exceeds its allowable value;
(b)
When the effective value of the node voltage exceeds the rated maximum value or falls below the minimum value;
(c)
When the power of a node exceeds its allowable value.
When the above situations occur, we need to adjust the following two points: ① the active power of the generator; ② the initial value of node voltage for node P V . In fact, when the reactive power of node P V exceeds the allowable range of the generator, changing it to node P Q can also improve the power flow calculation results.
Of course, improving the trend results requires vast experience and sufficient patience to constantly repeat and explore the process.

2.4. The Principle of P-Q Decomposition Method

The principle of P-Q decomposition method for the power system flow calculation is to transform the power system flow calculation problem into a solution problem in a linear equation system, and then use the solution method of the linear equation system to perform the power system flow calculation. The basic idea of P-Q decomposition method is to divide the power flow calculation problem into multiple parts and then solve them separately. Specifically, the first step of the P-Q decomposition method is to divide the power system into multiple linear equation systems, each of which contains several node voltage and power equations. The second step is to decompose each linear equation system into multiple independent sub-equation systems, each containing several node voltage and power equations. The third step is to use the solution method for the linear equation system to solve the power flow calculation problem in the power system; that is, to determine the solutions for the node voltage and power equations in each sub-equation system through iterative calculation. The advantages of the P-Q decomposition method are that it can greatly simplify the process of power flow calculation in power systems, and it can be widely applied in large-scale power flow calculation. However, the P-Q decomposition method also has some limitations, such as the need to handle non-linear systems and the long computation time, making it less practical in power system flow calculations that require fast computation.
The commonly used P-Q decomposition method in power systems is derived from the Newton–Raphson method represented in polar coordinates. Considering the characteristics of the power grid, the P-Q decomposition method is a simplification of the Newton–Raphson method for modifying equations [17]. Firstly, in the power grid, the reactance of each component is generally much greater than the resistance (X>>R), so the phase angle change of each node voltage has the greatest impact on the active power flow, while the amplitude change of each node voltage has the greatest impact on the reactive power flow. Therefore, subarrays N , M can be omitted, and the modified equation becomes:
Δ P Δ Q = H L Δ θ Δ U / U
The second simplification is based on the constraint condition | θ i θ j | < | θ i θ j | max on state variable θ i , which means that | θ i θ j | = θ i j should not be too large. Considering G i j < < B i j , it can be considered as cos θ i j 1 , G i j sin θ i j < < B i j , and U i 2 B i i > > Q i . Therefore, H i j , L i j can be simplified as:
H i j = U i U j B i j
L i j = U i U j B i j
So H and L can be expressed as:
H = U B U
L = U B U
B and B are constant matrices of order n − 1 and m − 1, respectively. Substitute the above equation into the equation and organize it to obtain
Δ P / U = B ( U Δ θ )
Δ Q / U = B Δ U
In order to reduce the influence of reactive power and the node voltage modulus on active iteration during the iteration process, the elements in the right-hand end of the equation are set to a unit value of 1.0; that is, U is the unit matrix.
The corrected equation for the commonly used fast decoupling algorithm can be written as:
Δ P / U = B Δ θ
Δ Q / U = B Δ U
Node power is represented as a polar coordinate equation of the voltage vector. The active power error is used as the basis for correcting the angle of voltage vector, and the reactive power error as the basis for correcting voltage amplitude, iteratively separating active and reactive power. The main content of the P-Q decomposition method is to calculate the imbalance of node power using a formula, solve for correction factors Δ θ and Δ ν using a correction equation, and iterate until the power errors Δ P i and Δ ν of each node satisfy the convergence condition.
Its characteristics are:
-
Replace the original 2 n m 1 linear equation system with a system of n 1 and n m 1 linear equations;
-
The coefficient matrices B and B of the modified equation are symmetric constant matrices that remain unchanged during the iteration process;
-
It has linear convergence and requires more iterations to converge to the same accuracy compared to the Newton–Raphson method;
-
It is generally only applicable to the calculation of power grids with voltage levels of 110 KV and above. Due to the large ratio of lines with voltage levels of 35 KV and below, which does not meet the simplified conditions mentioned above, iterative calculations may not converge.

3. Simulation Operation and Its Results

A. 
Trend analysis operating environment
This trend analysis was run entirely in the Matlab2022b program environment. Figure 3 is a brief introduction to the simulation and use of this software. The figure shows the sub process analysis, and a further optimization matrix analysis is obtained by distinguishing the transformer branch and error boundary values.
Basic area: After opening the software, the software interface is divided into several areas, including the command function area at the top, the command line input bar on the right, and the currently opened folder and its path on the left. The middle is the workspace, which is also the area where our program design is located. We need to write the source code for the trend analysis and design program in this area. The specific implementation flowchart is as follows:
B. 
Comparison of Trend Analysis and Simulation Results
Import the results of the P-Q decomposition method and the Newton–Raphson method power flow calculation into an Excel spreadsheet and use Origin to draw a line graph. Visualize the node voltage amplitude, node voltage phase angle, node power, line power loss, branch injection power, and branch output power separately.
(1)
Analysis of Newton–Raphson Method Results
The reference capacity is 100 MVA and the reference voltage is Uav. The following data are all standard values. The calculation results for the Newton–Raphson method are as follows:
The first to fifth columns of Table 1 are the node count, voltage amplitude (per unit value) of each node, phase angle (angle system) of the node voltage, active power inflow (per unit value) of each node, and reactive power inflow (per unit value) of each node, respectively. The first and second columns of the data in Appendix A, Table A1 represent two nodes with a connection relationship, the third and fourth columns show the power flow between the two nodes, and the fifth and fourth columns show the loss of active and reactive power in the line between the two nodes.
The first to fifth columns of Table 1 are the node count, voltage amplitude (per unit value) of each node, phase angle (angle system) of the node voltage, active power inflow (per unit value) of each node, and reactive power inflow (per unit value) of each node, respectively. The first and second columns of the data in Appendix A, Table A1 represent two nodes with a connection relationship, the third and fourth columns show the power flow between the two nodes, and the fifth and sixth columns show the loss of active and reactive power in the line between the two nodes.
(2)
Analysis of P-Q Decomposition Method Results
The reference capacity is 100 MVA and the reference voltage is Uav. The following data are all standard values. The calculation results for the P-Q decomposition method are as follows:
According to Appendix A, Table A2, the results of calculating the power flow distribution of the IEEE 30 bus using the program ieee30-PQ.m include the number of nodes and node types, where 1 represents the balance node, 2 represents the PV node, and 3 represents the PQ node. It also includes the active and reactive power generated by the generator and the active and reactive power required by the load, as well as the phase angle of each node.
According to Appendix A, Table A3, the line related parameters of the IEEE 30 bus power flow distribution include the active and reactive power flowing into the line, the active and reactive power flowing out of the line, and the part that includes reactive power compensation for the system by the ground branch.
(3)
Comparison of Calculation Time
The P-Q decomposition method took 0.066287 s to calculate the 30 node power flow distribution results in Table 2. The Newton–Raphson method took 0.143574 s to calculate the distribution of 30 node currents.
After comprehensively comparing the power flow calculation results of the ex- tended model and the basic model in Table 3, the following conclusions can be drawn: The basic model performs better in terms of voltage quality, with a lower sum of squares of voltage deviation (0.039896) compared to the extended model (0.040799), indicating that the node voltage is closer to the ideal value. The extended model exhibits significant advantages in system efficiency, with a substantial reduction in total active power loss (52.5%) from the basic model (0.176331 pu) to 0.083778 pu. This model reduces the total active power loss to 0.083778 pu, achieving a 52.5% improvement in energy efficiency compared to the basic model (0.176331 pu). This breakthrough improvement directly translates into savings in grid operation costs.
The Newton–Raphson method is easy to understand and implement. The advantage of this method is that it has a fast calculation speed, can calculate a large number of numerical solutions in a very short time, and has high accuracy. It can obtain accurate calculation results through mathematical derivation. The disadvantage of the Newton–Raphson method is that it requires a significant amount of computational resources, but in practical engineering, the relevant parameters of each node in the power system can be measured in reality. Compared to the P-Q decomposition method, although it has a faster calculation speed, its calculation accuracy is not as good as the Newton–Raphson method. In comparison, the Newton–Raphson method has stronger practicality.
C. 
Visualization of trend analysis simulation results
Based on the Origin software, the trend distribution results are visualized. Origin is a mathematical analysis software mainly used for data processing, statistical analysis, and plotting. It integrates many advanced technologies, such as relational databases, graph data representation, algebraic operations, numerical computation, and data visualization. Origin also supports multiple languages, making it easy to integrate with other software to complete complex analysis tasks.
This section compares the visualization of power flow distribution obtained using the Newton–Raphson method and the P-Q decomposition method, and explores which algorithm is more in line with the actual situation.
(1)
Node data comparison
The following trend visualization is obtained by processing the voltage amplitudes of the nodes in Table 1 and Appendix A Table A1 through Origin2022. All data are per unit values.
Figure 4 shows the voltage amplitude calculated by the Newton–Raphson method, The P-Q decomposition method is optimized by the Newton–Raphson method, and the node voltage amplitude results are consistent.
Therefore, both the Newton–Raphson method and the P-Q decomposition method can be used to solve the voltage amplitude in the power flow distribution of the power system network.
The voltage phase angles of the above nodes are all in radians. The Figure 5a shows the voltage phase angle calculated by the Newton–Raphson method, and Figure 5b shows the voltage phase angle calculated by the P-Q decomposition method, with local amplification processing applied to the highly differentiated intervals.
The above node powers are all per unit values. The Figure 6a shows the node power calculated by the Newton–Raphson method, and Figure 6b shows the node power calculated by the P-Q decomposition method.
It can be seen that the difference in node power calculated by the two currents is not significant.
(2)
Comparison of branch data
The above branch powers are all standard values. Figure 7a shows the branch injection power calculated by the Newton–Raphson method, and Figure 7b shows the branch injection power calculated by the P-Q decomposition method.
It can be seen that the difference in line power results calculated by the two power flow algorithms is not significant.
The above branch powers are all standard values. Figure 8a shows the branch output power calculated by the Newton–Raphson method, and Figure 8b shows the branch output power calculated by the P-Q decomposition method.
It can be seen that the difference in line power results is not significant.
Figure 9a shows the branch power loss calculated by the Newton–Raphson method, and Figure 9b shows the branch power loss calculated by the P-Q decomposition method. It can be seen that the difference in the power loss results for the transmission lines is not significant, but there are still some subtle differences, because the P-Q decomposition method is only applicable to high-voltage transmission networks.
Due to the impedance X>>R of the transmission lines, active power and the voltage phase angles are strongly correlated, and reactive power and voltage amplitude are strongly correlated. Therefore, it can be simplified to consider only the bias of active power on the phase angle (active power has little effect on amplitude bias, simplified as a zero matrix), and the bias of reactive power on amplitude (reactive power has little effect on phase angle bias, simplified as a zero matrix). Neglecting the impact of resistance on line power and node voltage resulted in differences between the visualization of the power flow distribution and the Newton–Raphson method.
The voltage of the 30 node power system network flow distribution data visualization system is relatively stable, and there is basically no reactive power shortage. However, with the expansion of the power system and the significant increase in the number of nodes, combined with the flow distribution visualization results, it can be seen that a reactive power shortage has occurred. The phenomenon of reactive power loss control in multiple nodes requires the addition of reactive power compensation equipment. The location of the reactive power compensation device can be optimized and reconstructed based on the particle swarm optimization algorithm for the power system network.
Therefore, the calculation of power flow distribution in the power system is the basis for selecting appropriate reactive power compensation devices and reasonably planning the power grid structure.

4. Expansion of Trend Computing Model

With the widespread use of electricity, the scale of the power grid is constantly expanding and becoming increasingly complex. Therefore, considering the complex power flow distribution of large-scale power networks has become particularly important. This paper is based on the programming of example 030iee.dat to calculate its power flow distribution, and considers the complexity of the actual power system to extend the power flow calculation model to multiple nodes.
Change the 030ieee.dat data read from text read in the main program Untitled11.m to 057ieee.dat, 118ieee.dat, 162ieee.dat, and 300ieee.dat, respectively, to obtain different power flow distribution results. Use the openpyxl library in Python 3.11 to import the power flow calculation results into an Excel spreadsheet, and then use Origin 2022 drawing software to visualize the power flow distribution results.
A. 
IEEE 57 bus power flow distribution
Change the 030iee.dat data read from text read in the main program Untitled11.m to 057iee.dat, run and visualize the power flow distribution. The results of the system operation are shown in Figure 10a–c and Figure 11a–c.
(1)
Node Data
Here is the final trend visualization:
Figure 10. (a) 57 bus voltage phase angle. (b) 57 bus voltage amplitude. (c) 57 bus node power.
Figure 10. (a) 57 bus voltage phase angle. (b) 57 bus voltage amplitude. (c) 57 bus node power.
Processes 13 02607 g010
(2)
Branch Data
Figure 11. (a) 57 bus branch inflow power. (b) 57 bus branch output power. (c) 57 bus branch power loss.
Figure 11. (a) 57 bus branch inflow power. (b) 57 bus branch output power. (c) 57 bus branch power loss.
Processes 13 02607 g011
B. 
ieee118bus power current distribution
Change the 030iee.dat data read by textread in the main program Untitled11.m to 118iee.dat, and run and visualize the power flow distribution. The results of the system operation are shown in Figure 12a–c and Figure 13a–c.
(1)
Node Data
Due to space limitations, only the final trend visualization is provided here.
Figure 12. (a) 118 bus voltage phase angle. (b) 118 bus voltage amplitude. (c) 118 bus node power.
Figure 12. (a) 118 bus voltage phase angle. (b) 118 bus voltage amplitude. (c) 118 bus node power.
Processes 13 02607 g012
(2)
Branch Data
Figure 13. (a) 118 bus branch inflow power. (b) 118 bus branch output power. (c) 118 bus branch power loss.
Figure 13. (a) 118 bus branch inflow power. (b) 118 bus branch output power. (c) 118 bus branch power loss.
Processes 13 02607 g013
C. 
IEEE 162bus power flow distribution
Change the 030iee.dat data read by textread in the main program Untitled11.m to 162iee.dat, and run and visualize the power flow distribution. The results of the system operation are shown in Figure 14a–c and Figure 15a–c.
(1)
Node Data
Due to space limitations, only the final trend visualization is provided here.
Figure 14. (a) 162 bus voltage phase angle. (b) 162 bus voltage amplitude. (c) 162 bus node power.
Figure 14. (a) 162 bus voltage phase angle. (b) 162 bus voltage amplitude. (c) 162 bus node power.
Processes 13 02607 g014
(2)
Branch Data
Figure 15. (a) 162 bus branch inflow power. (b) 162 bus branch output power. (c) 162 bus branch power loss.
Figure 15. (a) 162 bus branch inflow power. (b) 162 bus branch output power. (c) 162 bus branch power loss.
Processes 13 02607 g015
D. 
IEEE 300 bus power flow distribution
Change the 030iee.dat data read by textread in the main program Untitled11.m to 300iee.dat, and run and visualize the power flow distribution. The results of the system operation are shown in Figure 16a–c and Figure 17a–c.
(1)
Node Data
Here is the final trend visualization:
Figure 16. (a) 300 bus voltage phase angle. (b) 300 bus voltage amplitude. (c) 300 bus node power.
Figure 16. (a) 300 bus voltage phase angle. (b) 300 bus voltage amplitude. (c) 300 bus node power.
Processes 13 02607 g016
(2)
Branch Data
Figure 17. (a) 300 bus branch inflow power. (b) 300 bus branch output power. (c) 300 bus branch power loss.
Figure 17. (a) 300 bus branch inflow power. (b) 300 bus branch output power. (c) 300 bus branch power loss.
Processes 13 02607 g017
The voltage of the 30 node power system network flow distribution data visualization system is relatively stable, and there is basically no reactive power shortage in Figure 16a–c and Figure 17a–c. With the expansion of the power system and the significant increase in the number of nodes, combined with the flow distribution visualization results, it can be seen that a reactive power shortage has occurred. The phenomenon of reactive power loss control in multiple nodes requires the addition of reactive power compensation equipment. The location of the reactive power compensation device can be optimized and reconstructed based on the particle swarm optimization algorithm for the power system network.
Therefore, the calculation of power flow distribution in the power system is the basis for selecting appropriate reactive power compensation devices and reasonably planning the power grid structure.

5. Conclusions

(1)
Considering the complexity of actual power systems, a non-linear equation analysis is conducted to calculate the complex power flow iteration of multi-node power systems. The Newton–Raphson power flow calculation model is optimized and the power flow distribution of each complex power network is obtained, thus verifying the universality of the program.
(2)
The phenomenon of reactive power loss control occurs in multiple nodes, and it is necessary to add reactive power compensation equipment. Based on the particle swarm optimization algorithm, the optimal reconstruction of the power system network should be carried out for the location of the reactive power compensation device.
(3)
For the new optimization algorithm based on multi-radiation power grid optimization in the evolution process, it greatly reduces dependence on optimization time and initial state reconstruction, which provides novel ideas and references for complex non-linear systems.
When using Newton–Raphson power flow to calculate complex power systems, it is found that this method has a fast iteration speed and good convergence in power flow calculation. However, it is worth noting that when the determinant of the Jacobian matrix is small and the system parameters are low, it may lead to the inability of power flow calculation iterations to converge. In this case, we can use multiple power flow calculation methods to compare or combine two or more power flow methods to calculate the power grid.
The extended model exhibits significant advantages in system efficiency. This is a breakthrough improvement that directly translates into savings in grid operation costs.
With the development of technology and research into problems, the prospects for the development of reconstruction technology for complex power systems will be even broader. The current problems will be easily solved, thereby ensuring the continuity, reliability, and stability of the system.

Author Contributions

J.X.: writing—original draft preparation. J.X. and H.Z.: investigation supervision, validation. S.W.: reviewing and validation, funding acquisition. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported by Anhui province Key Projects of Natural Science Research in Colleges and Universities (KJ2021A0491), Collaborative Innovation Project of Anhui Universities (GXXT-2020-070), National Natural Science Foundation of China (U21A20146).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
IEEEInstitute of Electrical and Electronics Engineers
PPFProbabilistic power flow
MCSMonte Carlo simulation

Appendix A

Table A1. IEEE 30 bus branch power.
Table A1. IEEE 30 bus branch power.
Node INode JActive Power BranchReactive Power BranchActive Loss BranchReactive Loss Branch
21−1.0478880.0789810.019511−0.000062
31−0.587609−0.0551810.0149710.017085
42−0.396089−0.0586500.008787−0.012229
43−0.559571−0.0402980.0040380.002883
52−0.312549−0.1173010.004946−0.023363
62−0.494609−0.0300980.0139080.002664
64−0.4548140.0645550.002463−0.000657
75−0.2161910.0085350.002158−0.015202
76−0.011809−0.1175350.000320−0.016241
86−0.2951430.0539950.001065−0.005464
690.287389−0.3040000.0000000.035603
6100.164241−0.1178390.0000000.022220
1190.0000000.1578390.0000000.004426
109−0.287389−0.0471980.0000000.008523
4120.422383−0.4591370.0000000.096933
13120.0000000.1021390.0000000.001273
1412−0.075893−0.0234550.0007140.001485
1512−0.168652−0.0662360.0020150.003970
1612−0.062665−0.0346040.0004430.000932
1514−0.013843−0.0074090.0000510.000046
1716−0.027615−0.0164210.0000500.000183
1815−0.055018−0.0168970.0003360.000683
1918−0.022982−0.0078250.0000360.000072
20190.0722070.0265540.0001890.000379
2010−0.094207−0.0335540.0008810.001967
1710−0.062385−0.0415790.0001680.000438
2110−0.157915−0.0973790.0011210.002412
2210−0.076420−0.0446840.0005320.001098
22210.0170910.0146320.0000050.000011
2315−0.044863−0.0305020.0002780.000562
2422−0.058854−0.0293120.0004750.000740
2423−0.012816−0.0144060.0000470.000096
25240.015457−0.0214630.0001270.000222
2625−0.035000−0.0230000.0004450.000665
27250.0511760.0027250.0002740.000522
28270.183990−0.1229850.0000000.019107
2927−0.061036−0.0150570.0008610.001626
3027−0.069298−0.0135750.0016190.003047
3029−0.036702−0.0054250.0003350.000633
2880.004871−0.0357870.000014−0.043509
286−0.188861−0.0135060.000595−0.011136
1000.000000−0.2079860.000000−0.207986
2400.000000−0.0449670.000000−0.044967
Table A2. IEEE 30 bus power flow distribution (P-Q decomposition method).
Table A2. IEEE 30 bus power flow distribution (P-Q decomposition method).
NodeTypeGenerator ActiveGenerator ReactiveLoad ActiveLoad ReactiveVoltage AmplitudeVoltage Phase
112.609518−0.1652650.0000000.0000001.0600000.000000
220.4000000.4956480.2170000.1270001.043000−0.093375
330.0000000.0000000.0240000.0120001.020710−0.131463
430.0000000.0000000.0760000.0160001.011726−0.162045
520.0000000.3693600.9420000.1900001.010000−0.247263
630.0000000.0000000.0000000.0000001.010231−0.193127
730.0000000.0000000.2280000.1090001.002361−0.224556
820.0000000.3721860.3000000.3000001.010000−0.206203
930.0000000.0000000.0000000.0000001.050896−0.246263
1030.0000000.0000000.0580000.0200001.045109−0.274027
1120.0000000.1617980.0000000.0000001.082000−0.246263
1230.0000000.0000000.1120000.0750001.057104−0.260824
1320.0000000.1063060.0000000.0000001.071000−0.260824
1430.0000000.0000000.0620000.0160001.042265−0.276396
1530.0000000.0000000.0820000.0250001.037665−0.278000
1630.0000000.0000000.0350000.0180001.044373−0.271001
1730.0000000.0000000.0900000.0580001.039885−0.276849
1830.0000000.0000000.0320000.0090001.028136−0.288723
1930.0000000.0000000.0950000.0340001.025634−0.291755
2030.0000000.0000000.0220000.0070001.029720−0.288325
2130.0000000.0000000.1750000.1120001.032708−0.281754
2230.0000000.0000000.0000000.0000001.033239−0.281505
2330.0000000.0000000.0320000.0160001.027164−0.284820
2430.0000000.0000000.0870000.0670001.021564−0.287902
2530.0000000.0000000.0000000.0000001.017318−0.280435
2630.0000000.0000000.0350000.0230000.999640−0.287760
2730.0000000.0000000.0000000.0000001.023228−0.271283
2830.0000000.0000000.0000000.0000001.006797−0.204017
2930.0000000.0000000.0240000.0090001.003389−0.292750
3030.0000000.0000000.1060000.0190000.991914−0.308159
Table A3. IEEE 30 bus branch power (P-Q decomposition method).
Table A3. IEEE 30 bus branch power (P-Q decomposition method).
InputOutputInput ActiveInput ReactiveInput ChargingOutput ActiveOutput ReactiveOutput Charging
121.7322321−0.18126330.02966301.6803961−0.33650120.0282199
130.87728600.06858260.02292140.8461362−0.04526580.0205233
240.43619600.05896760.01966840.42604440.02803190.0178536
340.8221362−0.03163630.00422540.8135599−0.05626060.0040753
250.82385610.04025090.02234070.7943364−0.08376920.0187658
260.60334400.02474230.01998910.5838694−0.03435170.0176786
460.7215428−0.15893360.00436640.7151965−0.18101240.0042542
57−0.14766360.12731560.0091584−0.14937770.12299290.0092319
670.3811909−0.02107060.00803570.3773777−0.03278130.0076933
680.2956783−0.07685410.00425420.2945809−0.08069500.0042056
690.2771755−0.19458600.00000000.2771755−0.21744660.0000000
6100.1583628−0.05899100.00000000.1583628−0.07406730.0000000
9110.0000000−0.15714710.00000000.0000000−0.16179820.0000000
9100.27717550.05913790.00000000.27717550.05113740.0000000
4120.4420616−0.17056910.00000000.4420616−0.22290150.0000000
12130.0000000−0.10492670.00000000.0000000−0.10630600.0000000
12140.07859100.02401220.00000000.07784710.02246570.0000000
12150.17897840.06795860.00000000.17680710.06368160.0000000
12160.07249210.03353890.00000000.07195250.03240440.0000000
14150.01585280.00647140.00000000.01579310.00641750.0000000
16170.03695250.01440440.00000000.03687690.01412700.0000000
15180.06019780.01597560.00000000.05981120.01518840.0000000
18190.02781130.00618840.00000000.02776220.00608920.0000000
1920−0.0672377−0.02791080.0000000−0.0674090−0.02825340.0000000
10200.09022430.03707400.00000000.08940900.03525340.0000000
10170.05326530.04424390.00000000.05312310.04387290.0000000
10210.15786200.10012020.00000000.15674860.09772400.0000000
10220.07618690.04600760.00000000.07565970.04492050.0000000
2122−0.0182513−0.01427600.0000000−0.0182572−0.01428790.0000000
15230.05039640.02911760.00000000.05008180.02848210.0000000

References

  1. Tong, H.Q.; Xu, J.B.; Li, X.; Zhang, L.Q. Cyber-attack research for integrated energy systems by the correlated matrix based object-oriented modeling method. Front. Energy Res. 2022, 10, 774645. [Google Scholar] [CrossRef]
  2. Choi, J.H.; Kim, J.C. Network reconfiguration at the power distribution system with dispersed generations for loss reduction. In Proceedings of the 2000 IEEE Power Engineering Society Winter Meeting, Singapore, 23–27 January 2000; pp. 2363–2367. [Google Scholar]
  3. Duan, C.; Zhang, C.K.; Jiang, L.; Fang, W.; Yao, W. Structure-exploiting delay-dependent stability analysis applied to power system load frequency control. IEEE Trans. Power Syst. 2017, 32, 4528–4540. [Google Scholar] [CrossRef]
  4. Zhou, J.; Shi, P.; Gan, D.; Xu, Y.; Xin, H.; Jiang, C.; Xie, H.; Tao, W. Large-scale power system robust stability analysis based on value set approach. IEEE Trans. Power Syst. 2017, 32, 4012–4023. [Google Scholar] [CrossRef]
  5. Feijó, A.E.; Cidrás, J. Modeling of wind farms in the load flow analysis. IEEE Trans. Power Syst. 2000, 15, 110–115. [Google Scholar] [CrossRef]
  6. Babaei, M.; Shi, J.; Abdelwahed, S. A survey on fault detection, isolation, and reconfiguration methods in electric ship power systems. IEEE Access 2018, 6, 9430–9441. [Google Scholar] [CrossRef]
  7. Xu, L.; Guerrero, J.M.; Lashab, A.; Wei, B.; Bazmohammadi, N.; Vasquez, J.C. A review of DC shipboard microgrids—Part II: Control architectures, stability analysis, and protection schemes. IEEE Trans. Power Electron. 2022, 37, 4105–4120. [Google Scholar] [CrossRef]
  8. Ding, T.; Qu, M.; Wu, X.; Qin, B.; Yang, Y.; Blaabjerg, F. Defense strategy for resilient shipboard power systems considering sequential attacks. IEEE Trans. Inf. Forensics Secur. 2020, 15, 3443–3453. [Google Scholar] [CrossRef]
  9. Zohrabi, N.; Abdelwahed, S.; Shi, J. Reconfiguration of MVDC shipboard power systems: A model predictive control approach. In Proceedings of the 2017 IEEE Electric Ship Technologies Symposium (ESTS), Arlington, VA, USA, 14–17 August 2017; pp. 253–258. [Google Scholar]
  10. Wang, Z.; Xia, L.; Wang, Y.; Liu, L.; Yan, H. Multiagent and particle swarm optimization for ship integrated power system network reconfiguration. Math. Probl. Eng. 2014, 2014, 280345. [Google Scholar] [CrossRef]
  11. Panasetsky, D.; Sidorov, D.; Li, Y.; Ouyang, L.; Xiong, J.; He, L. Centralized emergency control for multi-terminal VSC-based shipboard power systems. Int. J. Electr. Power Energy Syst. 2019, 104, 205–214. [Google Scholar] [CrossRef]
  12. Zhu, W.; Shi, J.; Zhi, P.; Yang, Y.; Wei, X.; Lim, G.J. Mission based recon-figuration for hybrid shipboard power systems considering threats. In Proceedings of the 2020 IEEE 18th International Conference on Industrial Informatics (INDIN), Warwick, UK, 20–23 July 2020; pp. 833–838. [Google Scholar]
  13. Gu, J.; Zhao, L.; Zhu, C. Quasi-Monte Carlo method for probabilistic power flow considering uncertainty of heat loads. In Proceedings of the 2020 IEEE 3rd Student Conference on Electrical Machines and Systems (SCEMS), Jinan, China, 4–6 December 2020; pp. 808–812. [Google Scholar]
  14. Constante-Flores, G.E.; Illindala, M.S. Data-driven probabilistic power flow analysis for a distribution system with renewable energy sources using Monte Carlo simulation. IEEE Trans. Ind. Appl. 2019, 55, 174–181. [Google Scholar] [CrossRef]
  15. Choi, J.-H.; Kim, J.-C.; Moon, S.-I. Integration operation of dispersed generations to automated distribution networks for network reconfiguration. In Proceedings of the 2003 IEEE Bologna Power Tech Conference Proceedings, Bologna, Italy, 23–26 June 2003; p. 5. [Google Scholar]
  16. Sun, S.; Yuan, Z.; Liang, W.; Qi, X.; Zhou, G. Sensitivity Analysis and Distribution Factor Calculation under Power Network Branch Power Flow Exceedance. Energies 2024, 17, 4374. [Google Scholar] [CrossRef]
  17. Torres-Ladino, J.; Gil-González, W.; Garces-Ruiz, A. An efficient Wirtinger calculus-based algorithm for quasi-dynamic power flow analysis in distribution grids. Electr. Power Syst. Res. 2025, 243, 111506. [Google Scholar] [CrossRef]
Figure 1. IEEE-30 Node System Wiring Diagram.
Figure 1. IEEE-30 Node System Wiring Diagram.
Processes 13 02607 g001
Figure 2. Schematic diagram.
Figure 2. Schematic diagram.
Processes 13 02607 g002
Figure 3. Flow chart.
Figure 3. Flow chart.
Processes 13 02607 g003
Figure 4. Node voltage amplitude.
Figure 4. Node voltage amplitude.
Processes 13 02607 g004
Figure 5. (a). Node voltage phase angle. (b). Node voltage phase angle.
Figure 5. (a). Node voltage phase angle. (b). Node voltage phase angle.
Processes 13 02607 g005aProcesses 13 02607 g005b
Figure 6. (a). Node power-a. (b). Node power-b.
Figure 6. (a). Node power-a. (b). Node power-b.
Processes 13 02607 g006
Figure 7. (a) Branch injection power-a. (b) Branch injection power-b.
Figure 7. (a) Branch injection power-a. (b) Branch injection power-b.
Processes 13 02607 g007
Figure 8. (a) Branch output power-a. (b) Branch output power-b.
Figure 8. (a) Branch output power-a. (b) Branch output power-b.
Processes 13 02607 g008aProcesses 13 02607 g008b
Figure 9. (a) Branch power loss-a. (b) Branch power loss-b.
Figure 9. (a) Branch power loss-a. (b) Branch power loss-b.
Processes 13 02607 g009
Table 1. IEEE 30 bus power flow distribution.
Table 1. IEEE 30 bus power flow distribution.
NodeVoltage NodePhase Angle NodeActive Power NodeNode Reactive Power
11.0600000.0000001.669979−0.006778
21.045000−3.2253870.1830000.252103
31.022696−5.680193−0.024000−0.012000
41.013861−6.825930−0.076000−0.016000
51.010000−6.345533−0.094200−0.141039
61.011154−7.9243440.0000000.000000
71.001916−7.814514−0.228000−0.109000
81.010000−8.659255−0.3000000.046273
91.051657−11.0758830.0000000.000000
101.046261−12.722266−0.058000−0.020000
111.082000−11.0758830.0000000.157839
121.057649−12.218629−0.112000−0.075000
131.071000−12.2186290.0000000.102139
141.042815−13.077570−0.062000−0.016000
151.038444−13.137198−0.082000−0.025000
161.045370−12.694425−0.035000−0.018000
171.040937−12.928725−0.090000−0.058000
181.029072−13.684535−0.032000−0.009000
191.026654−13.818447−0.095000−0.034000
201.030780−13.601486−0.022000−0.007000
211.033859−13.169275−0.175000−0.112000
221.034384−13.1567590.0000000.000000
231.028070−13.459859−0.032000−0.016000
241.022611−13.544808−0.087000−0.067000
251.018495−13.0423170.0000000.000000
261.000839−13.461004−0.035000−0.023000
271.024460−12.4721770.0000000.000000
281.007514−8.5540360.0000000.000000
291.004647−13.699154−0.024000−0.009000
300.993188−14.5797831.669979−0.019000
Table 2. Comparison of calculation time.
Table 2. Comparison of calculation time.
ContentN-RP-Q
Estimated time/s0.1435740.066287
Table 3. Index analysis.
Table 3. Index analysis.
ContentBase ModelsExtended Models
Sum of squares of voltage deviations0.0398960.040799
Active power loss /pu0.1763310.083778
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xu, J.; Zhang, H.; Wang, S. An Extended Model Approach to Study the Power Flow Analysis of Complex Power Systems. Processes 2025, 13, 2607. https://doi.org/10.3390/pr13082607

AMA Style

Xu J, Zhang H, Wang S. An Extended Model Approach to Study the Power Flow Analysis of Complex Power Systems. Processes. 2025; 13(8):2607. https://doi.org/10.3390/pr13082607

Chicago/Turabian Style

Xu, Jie, He Zhang, and Shinong Wang. 2025. "An Extended Model Approach to Study the Power Flow Analysis of Complex Power Systems" Processes 13, no. 8: 2607. https://doi.org/10.3390/pr13082607

APA Style

Xu, J., Zhang, H., & Wang, S. (2025). An Extended Model Approach to Study the Power Flow Analysis of Complex Power Systems. Processes, 13(8), 2607. https://doi.org/10.3390/pr13082607

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop