A method, apparatus and system for power flow solution quality assessment of a power system
By analytically calculating the network-wide predicted voltage of the neural network power flow solver and combining it with the AC power flow equations to calculate the branch power flow and node power imbalance residuals, the numerical accuracy and physical consistency are comprehensively evaluated. This solves the problem of imperfect evaluation by the neural network power flow solver and enables cross-system comparison and multi-dimensional evaluation of power flow solution quality.
Patent Information
- Application Number
- CN202611418569.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-17
AI Technical Summary
The evaluation methods of existing neural network power flow solvers are imperfect, lack cross-system comparison capabilities, make it difficult to objectively measure their engineering usability, and lack a unified analytical derivation framework, making it impossible to automatically complete the full verification of power flow solutions.
By obtaining the network-wide predicted voltage from the neural network output, the residuals of branch power flow and node power imbalance are analytically calculated using AC power flow equations. The numerical accuracy and physical consistency indices are comprehensively calculated, including mean square error, mean absolute percentage error, absolute physical consistency index power balance loss, and normalized physical consistency index relative power balance loss, thereby achieving a multi-dimensional power flow solution quality assessment.
It realizes a multi-dimensional objective evaluation of the neural network power flow solver, which can measure the numerical deviation between the prediction results and the true value, reflect the degree to which the power flow solution satisfies Kirchhoff's laws, support horizontal comparison under different scales and working conditions, and provide an evaluation of the engineering usability of the neural network power flow solver.
Smart Images

Figure CN123117555A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of power system technology, specifically relating to a power system power flow solution quality assessment method, apparatus and system. Background Technology
[0002] Power flow calculation is a fundamental task in power system analysis, providing basic calculation results for grid operation and safety analysis. In recent years, neural network power flow solvers have been extensively studied. These methods directly learn the mapping of input power flow solutions through data-driven learning, and can quickly output the predicted voltage of the entire network during the inference phase, significantly reducing the solution time.
[0003] Current performance evaluations of neural network power flow solvers primarily use mean square error (MSE) and mean absolute percentage error (MAS) to measure the accuracy of predicted numerical values. These methods only reflect the deviation between predicted and true values and cannot determine whether the power flow solution satisfies Kirchhoff's law of power conservation. Power balance loss can characterize the degree of violation of Kirchhoff's law, but this indicator is significantly affected by grid size and load levels, and lacks direct cross-sectional comparison capabilities between examples with different node sizes and operating conditions. Furthermore, some neural networks only output node voltages; branch power flow and balancing node injected power require manual calculation, lacking a unified analytical derivation framework and hindering automated verification of complete power flow solutions. Therefore, the lack of a comprehensive evaluation scheme that balances numerical accuracy and allows for cross-system comparison of physical consistency is detrimental to objectively assessing the engineering usability of neural network power flow solvers. Summary of the Invention
[0004] This application provides a power flow solution quality assessment method, device, and system for power systems. The purpose is to solve the technical problems of existing neural network power flow solvers having imperfect assessment methods, being unable to compare power balance losses across systems, lacking a unified analytical derivation and multi-dimensional verification framework, and being unable to objectively evaluate the engineering usability of power flow solutions. The application aims to achieve a comprehensive quality assessment of power flow solutions that balances numerical accuracy and allows for cross-example comparison.
[0005] In a first aspect, embodiments of this application provide a method for evaluating the power flow solution quality of a power system, the method comprising: S1, obtain the full network predicted voltage output by the neural network power flow solver to be evaluated, wherein the full network predicted voltage includes the predicted voltage amplitude and predicted voltage phase angle of each node; S2, based on the predicted voltage of the entire network and the branch parameters of the power system, the active power flow and reactive power flow of all branches are analytically calculated according to the AC power flow equation; and the active power imbalance residual and reactive power imbalance residual of each bus node are calculated. S3, calculate numerical accuracy indicators, including mean square error and mean absolute percentage error; wherein the mean square error is the average of the squared errors between the predicted values and the true values of all unknown physical quantities, and the mean absolute percentage error is obtained by calculating the relative percentage error for physical quantities whose true values are greater than a preset threshold and then averaging the results. S4, calculate physical consistency indicators, including absolute physical consistency indicator power balance loss and normalized physical consistency indicator relative power balance loss. S5, based on the mean square error, the mean absolute percentage error, the power balance loss, and the relative power balance loss, output the evaluation results of the neural network power flow solver to be evaluated from the dimensions of numerical prediction accuracy and physical consistency.
[0006] Furthermore, in step S1, the voltage amplitude of the PV node is multiplexed with the input given value, and the voltage amplitude and voltage phase angle of the Slack balancing node are multiplexed with the input given value. Accordingly, step S2 includes the following sub-steps: For each branch, the active power flow and reactive power flow of the branch are analytically solved by algebraic operations of the AC power flow equations, by substituting the branch parameters and the predicted voltage amplitude and predicted voltage phase angle of the nodes at both ends of the branch. For the Slack balancing node, the active and reactive power flows of all connected branches of the node are aggregated, and the injected power of the Slack balancing node is obtained analytically by combining the node's parallel admittance parameters. For each bus node, by substituting the given injected power of the node, the calculated branch power flow, and the node parallel admittance, the active power imbalance residual and reactive power imbalance residual corresponding to each bus node are obtained respectively.
[0007] Furthermore, in step S3, the calculation process of the mean absolute percentage error includes: Set a preset threshold for the absolute value of the true value; Unknown physical quantities whose absolute true value is greater than a preset threshold are selected for calculation, while unknown physical quantities whose absolute true value is less than or equal to the preset threshold are discarded, in order to suppress the calculation distortion caused by the denominator approaching zero. The calculation process for the power balance loss includes: For each bus node, the node power imbalance amplitude is obtained based on the active power imbalance residual and reactive power imbalance residual of that node. The average value of the node power imbalance amplitude of all bus nodes is then calculated to obtain the power balance loss.
[0008] Furthermore, the calculation process for the relative power balance loss includes: For each bus node, sum the apparent power of all incoming edge branches and the apparent power of all outgoing edge branches of that node. The maximum value of the sum of the apparent power of the incoming edges and the sum of the apparent power of the outgoing edges of the same node is determined as the apparent power throughput benchmark of that node. Divide the node power imbalance magnitude by the corresponding node's apparent power throughput reference and multiply by 100% to obtain the node-level relative power balance loss. By traversing all bus nodes, the relative power balance loss at all node levels is obtained. The arithmetic mean of the relative power balance loss at all node levels is then calculated to obtain the relative power balance loss at the system level.
[0009] Furthermore, the calculation process for the relative power balance loss also includes: When traversing bus nodes, if a bus node is determined to be an isolated node with no connected branches, then the node-level relative power balance loss corresponding to the isolated node is assigned a value of 0.
[0010] Furthermore, the active power imbalance residual at the nodes Reactive power imbalance residual Calculate according to the following formula: = ; = ; In the formula, i is the bus node number; Let i be the set of adjacent nodes of the bus node i; , The active power injection and reactive power injection are given for bus node i; , The active power flow and reactive power flow of the branch (i,j) are calculated from the predicted voltage. The predicted voltage amplitude for bus node i; , These are the parallel conductance and parallel susceptance of bus node i, respectively; The amplitude of node power imbalance is .
[0011] Furthermore, the apparent power of the branch circuit ; Node-level relative power balance loss: ; System-level relative power balance loss ; In the formula: Let (j, i) be the apparent power of the branch; j→i represents the incoming edge branch from node j to node i; This represents the sum of the apparent power of all incoming edge branches of node i; i→k represents the outgoing edge branches from node i to node k. This represents the sum of the apparent power of all outgoing branches of node i; N is the total number of bus nodes in the power system.
[0012] Secondly, embodiments of this application provide a power flow solution quality assessment device for a power system, the device comprising: The prediction solution acquisition module is used to acquire the whole network predicted voltage output by the neural network power flow solver to be evaluated. The whole network predicted voltage includes the predicted voltage amplitude and predicted voltage phase angle of each node. The physical derivation and residual calculation module is used to analyze the active power flow and reactive power flow of all branches based on the predicted voltage of the entire network and the branch parameters of the power system, according to the AC power flow equation; and to calculate the active power imbalance residual and reactive power imbalance residual of each bus node. The accuracy index calculation module is used to calculate numerical accuracy indexes, including mean square error and mean absolute percentage error. The mean square error is the average of the squared errors between the predicted values and the true values of all unknown physical quantities, and the mean absolute percentage error is obtained by calculating the relative percentage error for physical quantities whose true values are greater than a preset threshold and then averaging the results. The physical consistency index calculation module is used to calculate physical consistency indexes, including absolute physical consistency index power balance loss and normalized physical consistency index relative power balance loss. The comprehensive evaluation output module is used to output the evaluation results of the neural network power flow solver to be evaluated from the dimensions of numerical prediction accuracy and physical consistency, based on the mean square error, the mean absolute percentage error, the power balance loss, and the relative power balance loss.
[0013] Thirdly, embodiments of this application provide a power flow solution quality assessment system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the power flow solution quality assessment method for the power system as described above.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0015] The technical solution provided in this application obtains the predicted voltage of the entire network output by a neural network, analyzes the branch power flow and the power imbalance residuals of each node based on the AC power flow equation, and simultaneously calculates two types of indicators: numerical accuracy and physical consistency, and comprehensively outputs the power flow solver evaluation results. This can measure the numerical deviation between the predicted results and the true values, and also reflect the degree to which the power flow solution satisfies Kirchhoff's laws through power balance loss and relative power balance loss. It supports horizontal comparisons under different scales and operating conditions, and achieves a multi-dimensional objective evaluation of the engineering usability of the neural network power flow solver. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the power flow solution quality assessment method for power systems provided in this application embodiment; Figure 2 This is a schematic diagram of the power flow solution quality assessment device for a power system provided in an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.
[0018] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0019] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0020] The following detailed description, in conjunction with the accompanying drawings, of the power flow solution quality assessment method, apparatus, equipment, and medium for power systems provided in this application, through specific embodiments and application scenarios, will be provided in detail.
[0021] Example 1 Figure 1 This is a flowchart illustrating the power flow solution quality assessment method for a power system provided in Embodiment 1 of this application. Figure 1 As shown, the specific steps include the following: S1, obtain the network-wide predicted voltage output by the neural network power flow solver to be evaluated. The network-wide predicted voltage includes the predicted voltage amplitude and predicted voltage phase angle of each node.
[0022] The neural network power flow solver to be evaluated can be a power flow calculation model based on a graph neural network, such as FlowCAN or CANOS, used to output power flow prediction results.
[0023] The predicted voltage across the entire network can be the output of all bus voltages from a neural network power flow solver. For example, it can be a dataset containing the predicted voltage magnitudes and phase angles of all buses, stored in a vector format.
[0024] The predicted voltage amplitude can be the bus voltage output by the neural network, for example, it can be a voltage value in per-unit form, such as the voltage amplitude output by the PQ node.
[0025] The predicted voltage phase angle can be the phase of the bus voltage predicted by the neural network, or it can be a phase value in radians, such as the voltage phase angle output by the PV node.
[0026] This scheme can read the output data of the neural network power flow solver to be evaluated and extract the predicted voltage of the entire network. The predicted voltage of the entire network includes the predicted voltage amplitude and predicted voltage phase angle of each node.
[0027] S2, based on the predicted voltage of the entire network and the branch parameters of the power system, the active power flow and reactive power flow of all branches are analytically calculated according to the AC power flow equation; and the active power imbalance residual and reactive power imbalance residual of each bus node are calculated.
[0028] Branch parameters can be a set of electrical parameters corresponding to the transmission branch, such as conductance, susceptance, transformer ratio, and parallel admittance, which can be used in the branch power flow calculation.
[0029] AC power flow equations can be a set of power system equations describing the relationship between bus voltage and node injected power. For example, they can be a set of active and reactive power balance equations, which can be used for algebraic analytical calculations.
[0030] Active power flow can be the active power transmitted on a transmission branch, such as the active power of a single transmission line, which can be obtained by substituting voltage into the equation.
[0031] Reactive power flow can be the reactive power transmitted on a transmission branch, such as the reactive power of a single transmission line, which can be obtained by substituting voltage into the equation.
[0032] Active power imbalance residuals can be the deviation between the theoretical and calculated values of active power at bus nodes. For example, they can be a deviation that characterizes whether the active power at a node meets the power conservation requirement, such as in physical consistency calculations.
[0033] The reactive power imbalance residual can be the deviation between the theoretical and calculated values of reactive power at the bus node. For example, it can be a deviation that characterizes whether the reactive power at the node meets the power conservation requirement, such as in physical consistency calculations.
[0034] Specifically, after reading in the predicted voltage of the entire network and the parameters of the power system branches, the active power flow and reactive power flow of all branches are calculated analytically by substituting them into the AC power flow equation. Then, the active power imbalance residual and reactive power imbalance residual of each bus node are solved.
[0035] S3, calculate numerical accuracy indicators, including mean square error and mean absolute percentage error; wherein the mean square error is the average of the squared errors between the predicted values and the true values of all unknown physical quantities, and the mean absolute percentage error is obtained by calculating the relative percentage error for physical quantities whose true values are greater than a preset threshold and then averaging the results.
[0036] Numerical accuracy metrics can be a class of metrics used to measure the numerical deviation between the power flow forecast result and the true value. For example, they can include mean square error and mean absolute percentage error, which are used to evaluate the numerical accuracy of the forecast.
[0037] Mean-squared error (MSE) is an index obtained by averaging the squared errors between the predicted and true values of all unknown physical quantities. For example, it is a commonly used evaluation index in machine learning regression tasks to reflect the overall degree of prediction deviation.
[0038] Mean Absolute Percentage Error (MAPE) can be an index obtained by averaging the relative percentage errors of physical quantities after screening. For example, it can be an index that reflects the magnitude of relative error, such as eliminating the evaluation effect caused by the dimension.
[0039] Unknown physical quantities can be physical parameters that need to be solved in power flow calculations, such as the voltage magnitude and voltage phase angle of PQ nodes, or the reactive power injection and voltage phase angle of PV nodes.
[0040] The preset threshold can be a numerical threshold used to filter out values that are too small, such as 10 to the power of -8, to avoid abnormal calculations where the denominator is close to zero.
[0041] Specifically, numerical accuracy indicators, including mean square error and mean absolute percentage error, can be calculated using true power flow data and prediction results.
[0042] S4, calculate the physical consistency index, which includes the absolute physical consistency index power balance loss and the normalized physical consistency index relative power balance loss.
[0043] Physical consistency metrics can be a class of metrics used to measure how well a power flow solution satisfies Kirchhoff's law of power conservation. For example, they can include power balance loss and relative power balance loss, such as for evaluating the physical validity of a solution.
[0044] Power balance loss can be an absolute evaluation index based on the residual power imbalance at nodes. For example, it can be the average value of the power imbalance amplitude of all nodes, reflecting the level of absolute power imbalance.
[0045] Relative power balance loss can be an evaluation metric after normalizing the node apparent power throughput. For example, it can be a percentage metric that eliminates the influence of system size, such as supporting cross-instance comparisons.
[0046] This scheme can use the active and reactive power imbalance residuals output earlier to calculate physical consistency indicators, including power balance loss and relative power balance loss.
[0047] S5, based on the mean square error, the mean absolute percentage error, the power balance loss, and the relative power balance loss, output the evaluation results of the neural network power flow solver to be evaluated from the dimensions of numerical prediction accuracy and physical consistency.
[0048] Numerical prediction accuracy can be an evaluation perspective for assessing the numerical deviation between predicted and true values. For example, it can focus on the closeness of predicted values, such as using mean squared error or mean absolute percentage error for evaluation.
[0049] The physical consistency dimension can be an evaluation perspective for assessing whether the power flow solution conforms to the laws of electrical physics. For example, it can focus on the degree to which Kirchhoff's power conservation is satisfied, such as by relying on power balance loss and relative power balance loss for evaluation.
[0050] The evaluation results can be a solver quality assessment output formed by combining multiple indicators, such as an evaluation report containing multiple indicator values, which can be used as a reference by engineers.
[0051] Specifically, the four indicators obtained from the aforementioned steps can be integrated to output the evaluation results for the neural network power flow solver to be evaluated from the dimensions of numerical prediction accuracy and physical consistency, respectively.
[0052] The technical solution provided in this embodiment starts from the predicted voltage output by the neural network, analyzes and obtains the branch power flow and node power residuals, calculates two types of indicators, namely numerical accuracy and physical consistency, and realizes multi-dimensional comprehensive evaluation. It can reflect the numerical deviation of the prediction and evaluate the physical compliance level of the power flow solution, providing a complete basic process for the quality evaluation of the neural network power flow solver.
[0053] In one embodiment, optionally, in step S1, the voltage amplitude of the PV node is multiplexed with the input given value, and the voltage amplitude and voltage phase angle of the Slack balancing node are multiplexed with the input given value. Accordingly, step S2 includes the following sub-steps: For each branch, the active power flow and reactive power flow of the branch are analytically solved by algebraic operations of the AC power flow equations, by substituting the branch parameters and the predicted voltage amplitude and predicted voltage phase angle of the nodes at both ends of the branch. For the Slack balancing node, the active and reactive power flows of all connected branches of the node are aggregated, and the injected power of the Slack balancing node is obtained analytically by combining the node's parallel admittance parameters. For each bus node, by substituting the given injected power of the node, the calculated branch power flow, and the node parallel admittance, the active power imbalance residual and reactive power imbalance residual corresponding to each bus node are obtained respectively.
[0054] Among them, PV nodes can be generator buses with given active power injection and voltage amplitude, and reactive power injection and voltage phase angle to be determined. For example, they can be generator buses with voltage regulation capabilities, such as voltage amplitude directly taken from input data.
[0055] Slack balancing nodes can be reference buses that serve as the voltage phase benchmark for the entire network, or buses that are responsible for balancing the power imbalance of the entire network, such as those that directly reuse input values for voltage amplitude and voltage phase angle.
[0056] The input value can be a known physical parameter predetermined by the power flow example, such as the given voltage amplitude of the PV node, if no neural network is required for prediction.
[0057] The parallel admittance parameters of a node can be electrical parameters of the busbar connected in parallel to ground, such as parallel conductance and parallel susceptance, and can be used in the calculation of injected power and residuals at the balancing node.
[0058] The injected power of the Slack balancing node can be the active and reactive power injected from the Slack balancing node. For example, it can be the power value used to make up for the power difference in the entire network, such as the power value calculated by summing the power flow of the connected branches.
[0059] The node is given injected power, which can be the active and reactive power injection of the bus given in advance in the power flow example, such as the load injection power of the PQ node, which is used to solve the power imbalance residual.
[0060] This scheme can reuse the input given value for the voltage amplitude of PV nodes and the input given value for the voltage amplitude and voltage phase angle of Slack balancing nodes when obtaining the predicted voltage of the entire network. When executing S2, the parameters are substituted into the branch to analyze the branch power flow. The power flow of the branches connected to the Slack balancing node is aggregated and combined with the parallel admittance to obtain the injected power of the node. Then, the power imbalance residual of each bus node is solved by combining the given injected power, branch power flow, and parallel admittance.
[0061] This technical solution clarifies the rules for taking the voltage values of different types of busbars, and refines the complete calculation sub-processes for branch power flow, power injection at balancing nodes, and power imbalance residuals, making the analytical calculation process more rigorous and ensuring that the intermediate calculation results conform to the physical definition of power flow.
[0062] In one embodiment, optionally, the calculation process of the mean absolute percentage error in step S3 includes: Set a preset threshold for the absolute value of the true value; Unknown physical quantities whose absolute true value is greater than a preset threshold are selected for calculation, while unknown physical quantities whose absolute true value is less than or equal to the preset threshold are discarded, in order to suppress the calculation distortion caused by the denominator approaching zero. The calculation process for the power balance loss includes: For each bus node, the node power imbalance amplitude is obtained based on the active power imbalance residual and reactive power imbalance residual of that node. The average value of the node power imbalance amplitude of all bus nodes is then calculated to obtain the power balance loss.
[0063] The absolute value of the truth value can be the absolute value of the physical quantity of the power flow truth value, or it can be the absolute value of the reactive power injection truth value of a node, such as when it is used to compare the magnitude with a preset threshold.
[0064] Computational distortion can be a phenomenon in mathematical operations where the denominator is close to 0, causing abnormal distortion of the result. For example, it can be a numerical explosion of percentage error under a very small true value. This phenomenon can be avoided by using threshold screening.
[0065] The magnitude of node power imbalance can be calculated from the combined residuals of active and reactive power imbalance. For example, it can be the square root of the sum of squares of the residuals, which can be used as the basis for calculating power balance loss.
[0066] Specifically, a preset threshold for the absolute value of the true value can be set to filter effective unknown physical quantities to complete the average absolute percentage error calculation. All bus nodes can be traversed, and the node power imbalance amplitude can be obtained from the active and reactive power imbalance residuals. The power balance loss can be obtained by averaging all nodes.
[0067] This technical solution suppresses calculation anomalies caused by near-zero true values through threshold screening, while refining the complete solution steps for power balance loss to ensure stable and reliable calculation results for both indicators.
[0068] In one embodiment, optionally, the calculation process for the relative power balance loss includes: For each bus node, sum the apparent power of all incoming edge branches and the apparent power of all outgoing edge branches of that node. The maximum value of the sum of the apparent power of the incoming edges and the sum of the apparent power of the outgoing edges of the same node is determined as the apparent power throughput benchmark of that node. Divide the node power imbalance magnitude by the corresponding node's apparent power throughput reference and multiply by 100% to obtain the node-level relative power balance loss. By traversing all bus nodes, the relative power balance loss at all node levels is obtained. The arithmetic mean of the relative power balance loss at all node levels is then calculated to obtain the relative power balance loss at the system level.
[0069] An incoming branch can be a branch from which power flows to the current bus node. For example, it can be a transmission line from which power flows into the node, such as for accumulating the apparent power of the incoming branch.
[0070] Outgoing branches can be branches from which power flows out of the current bus node. For example, they can be transmission lines from which power flows out of the node, such as those used to accumulate outgoing apparent power.
[0071] Apparent power can be the magnitude of the complex power on a branch, for example, it can be calculated from the active power flow and reactive power flow of the branch, thus characterizing the magnitude of the power transmitted by the branch.
[0072] The apparent power throughput benchmark can be a normalized denominator obtained by taking the maximum value of the sum of the apparent power of the incoming and outgoing edges of a node. For example, it can be a parameter that reflects the power transmission scale of a node, such as eliminating the power magnitude difference between different nodes.
[0073] Node-level relative power balance loss can be a percentage of power imbalance after normalization of a single bus node, or it can be a representation of the proportion of a single node's power imbalance to its own throughput, such as serving as the basis for calculating system-level indicators.
[0074] The system-level relative power balance loss can be an overall index obtained by averaging the node-level relative power balance losses of all bus nodes. For example, it can be used to evaluate the power flow solution of the entire power system, such as supporting horizontal comparison of different power grid examples.
[0075] This scheme can traverse each bus node, accumulate the apparent power of the incoming and outgoing branches respectively, determine the apparent power throughput benchmark, calculate the node-level relative power balance loss of each node, and then take the arithmetic mean of all nodes to obtain the system-level relative power balance loss.
[0076] This technical solution fully defines the step-by-step calculation process for relative power balance loss, uses node power throughput as the normalization benchmark, eliminates the numerical influence of grid scale and load level, and achieves physical consistency comparison across calculation cases.
[0077] In one embodiment, optionally, the calculation process for the relative power balance loss further includes: When traversing bus nodes, if a bus node is determined to be an isolated node with no connected branches, then the node-level relative power balance loss corresponding to the isolated node is assigned a value of 0.
[0078] An isolated node can be a bus node that has no connected transmission branches in the topology. For example, it can be a virtual bus that is not connected to any line, such as one that has no incoming or outgoing branches.
[0079] This scheme can identify isolated nodes during the traversal of bus nodes and directly assign the node-level relative power balance loss corresponding to the isolated node to 0.
[0080] This technical solution provides special handling for isolated nodes without branch connections, avoiding calculation errors caused by the absence of a denominator and improving the compatibility of the evaluation algorithm with abnormal topology power grids.
[0081] In one embodiment, optionally, the node active power imbalance residual... Reactive power imbalance residual Calculate according to the following formula: = ; = ; In the formula, i is the bus node number; Let i be the set of adjacent nodes of the bus node i; , The active power injection and reactive power injection are given for bus node i; , The active power flow and reactive power flow of the branch (i,j) are calculated from the predicted voltage. The predicted voltage amplitude for bus node i; , These are the parallel conductance and parallel susceptance of bus node i, respectively; The amplitude of node power imbalance is .
[0082] The bus node number can be an identification number used to distinguish different buses in the power grid. For example, it can be the node number from 1 to 30 in the IEEE 30 example, which is used to index the parameters of each node.
[0083] The set of adjacent nodes can be the set of all nodes that are directly connected to the current bus through the transmission branch. For example, it can be all nodes that are connected to node i by a line, such as when traversing the power flow of adjacent branches.
[0084] This scheme solves for the residuals of active power imbalance, reactive power imbalance, and the magnitude of power imbalance at nodes by substituting the parameters into the formula.
[0085] This technical solution clarifies the mathematical expressions for calculating power imbalance residuals and imbalance amplitudes, standardizes residual calculation methods, and ensures consistency of residual calculation results under different test scenarios.
[0086] In one embodiment, optionally, the branch apparent power ; Node-level relative power balance loss: ; System-level relative power balance loss ; In the formula: Let (j, i) be the apparent power of the branch; j→i represents the incoming edge branch from node j to node i; This represents the sum of the apparent power of all incoming edge branches of node i; i→k represents the outgoing edge branches from node i to node k. This represents the sum of the apparent power of all outgoing branches of node i; N is the total number of bus nodes in the power system.
[0087] The total number of bus nodes can be the total number of all buses in the power system to be evaluated, such as the 118 buses in the IEEE 118 example, for example, used to calculate the average value of system-level indicators.
[0088] This approach allows you to substitute the parameters into the formula and solve for the apparent power of the branch, the relative power balance loss at the node level, and the relative power balance loss at the system level in sequence.
[0089] This technical solution fully defines the mathematical expressions for apparent power, node-level and system-level relative power balance loss, unifies the calculation caliber of normalized indices, and ensures the comparability of cross-system evaluation results.
[0090] To enable those skilled in the art to better understand this solution, this application also provides a preferred embodiment.
[0091] The core technical problems to be solved by this technical solution include the following three aspects: First, GNN power flow solvers typically only output some physical quantities (such as predicted voltage). Branch power flow and slack node injected power need to be calculated separately on the engineering side, increasing the barrier to entry for use in scheduling systems. An analytical derivation mechanism that does not rely on additional iterations is needed to automatically expand partial prediction results into a complete power flow solution.
[0092] Second, among existing evaluation metrics, MSE only reflects numerical accuracy, while the absolute PBL value varies with system size and load level, making horizontal comparisons possible across different scales or operating conditions. For example, the PBL of a solver on an IEEE 30 system is... On the IEEE 118 system The numerical difference is approximately The difference is several times, but this difference mainly stems from the difference in system size rather than the difference in method quality, so PBL cannot be directly used for cross-system comparisons.
[0093] Third, the lack of a physical consistency metric with clear physical meaning and comparability across computational examples makes it impossible to objectively and comparablely measure the physical consistency of different GNN solvers on IEEE 30, IEEE 118, and even larger-scale systems, resulting in a lack of a unified benchmark for engineering selection.
[0094] This technical solution comprises three modules: a physics-based derivation layer, a multi-dimensional evaluation index system, and a normalized physical consistency metric (rPBL). These are described below.
[0095] 1. Physics-based derivation layer; Given the bus voltage solution predicted by GNN The physical derivation layer analytically calculates the remaining physical quantities based on the AC power flow equations. For each branch... Using predicted voltage , With branch parameters , Calculate the complex power flow of the branch (including transformer turns ratio, parallel admittance, etc.) , For a saturation node, summing the current flows of all its connected branches according to Kirchhoff's current law yields the following result. , The derivation process involves algebraic operations, contains no learnable parameters, does not disrupt end-to-end training, and ensures that the output solution is self-consistent in the sense of the network equation.
[0096] 2. Multi-dimensional evaluation indicator system; An evaluation index system covering both numerical accuracy and physical consistency is constructed, including four indicators: MSE, MAPE, PBL, and rPBL.
[0097] Mean squared error (MSE). Calculated for all unknown variables: (1) in busbar The set of unknown variables: Node is , Node is The balance node is ; This represents the total number of entries for unknown variables.
[0098] Mean Absolute Percentage Error (MAPE). For true value amplitudes greater than the threshold. Calculate the unknowns element by element: (2) in For the set of valid entries, This represents the number of valid entries. Element-by-element calculation avoids distortion caused by near-zero denominators and assigns equal weight to each unknown variable.
[0099] Power imbalance loss (PBL). Measures the average magnitude of power imbalance across all buses. The active and reactive power balance residuals, i.e., the predicted solution at the busbar The quantity that violates Kirchhoff's laws is: (3) (4) in , The branch power flow is calculated from the predicted voltage using AC equations. , This is the parallel admittance. The system-level power balance loss is: (5) 3. Relative Power Balance Loss (rPBL) – the core innovation of this invention; The absolute value of PBL is related to system size and load level, and PBL values under different sizes or operating conditions cannot be directly compared. rPBL normalizes the imbalance of each node by dividing it by the apparent power throughput of that node, thus eliminating the above effects.
[0100] Apparent power branch road The magnitude of the complex power on each node. Calculate the sum of the apparent power of all its incoming edges. The sum of the apparent power of all outgoing edges The larger of the two values is taken as the apparent power throughput of the node. The node-level relative power balance loss is defined as: (6) For an isolated node with no connected branches, define The system-level relative power balance loss is for all nodes. Average value: (7) rPBL is measured as a percentage, and its physical meaning is: on average, the percentage of the power imbalance magnitude of each node relative to its maximum apparent power throughput. This metric has the same physical dimensions for IEEE 30, IEEE 118, and even larger systems, and can be directly compared.
[0101] The key difference between rPBL and PBL lies in the normalization benchmark. PBL directly averages the absolute values of the power imbalance amplitudes of each node, and its value naturally increases with the system size. rPBL uses the apparent power throughput of each node as a normalization factor, expressing the imbalance as a relative value, eliminating the influence of system size and load level, and enabling meaningful comparisons of physical consistency under different network sizes, load levels, and topologies—a function that PBL cannot provide.
[0102] The method of the present invention will be further described in detail below with reference to specific implementation steps. The described embodiments are merely preferred embodiments of the present invention and do not constitute a limitation on the scope of protection thereof.
[0103] Step (1) Obtain the GNN predicted voltage; Obtain the predicted voltage vector of the entire network from any GNN power flow solver (such as FlowCAN, CANOS, PowerFlowNet, etc.). and .for node, Directly take input For the equilibrium node, , .
[0104] Step (2) Physical derivation – Calculating branch power flow; For each branch road Using predicted voltage , With branch parameters , Transformer turns ratio, parallel admittance, etc., are used to analytically calculate the active power flow of the branch according to the AC power flow equation. With the side road's ineffective trend .
[0105] Step (3) Physical derivation—Calculate the injected power at the equilibrium node; For the equilibrium node, summing the power flows of all its connected branches according to Kirchhoff's current law yields the following result. , .
[0106] Step (4) Calculate MSE; According to formula (1), for Nodes , Nodes Balanced nodes Calculate the squared error between the predicted value and the true value for each node, according to Normalization yields the MSE.
[0107] Step (5) Calculate MAPE; According to equation (2), for true value amplitude greater than The relative percentage error of the unknown quantity is calculated element by element, based on the number of valid entries. Normalization yields MAPE.
[0108] Step (6) Calculate PBL; Calculate the active and reactive power balance residuals of each node according to formulas (3) and (4). , According to equation (5), the power imbalance amplitude of all nodes Take the average to obtain PBL.
[0109] Step (7) Calculate rPBL; The apparent power throughput maximum of each node is calculated using equation (6) as a normalization factor. The node power imbalance amplitude is divided by this normalization factor, and then averaged over all nodes using equation (7) to obtain rPBL. For isolated nodes without connected branches, the following definition is provided. .
[0110] Step (8) Comprehensive evaluation; Combining MSE, MAPE, PBL, and rPBL into a complete evaluation report, the performance of the GNN power flow solver is comprehensively evaluated from two dimensions: numerical accuracy and physical consistency. A lower rPBL value indicates that the solver is less likely to violate Kirchhoff's laws and is more suitable for engineering deployment. In cross-system comparisons, rPBL can directly compare the physical consistency across examples of different sizes and load levels, a feature that PBL cannot provide.
[0111] The above embodiments describe the preferred implementation process of the present invention. Any modifications and improvements made by those skilled in the art to the specific implementation without departing from the concept of the present invention, such as using other power normalization benchmarks (e.g., the sum or maximum value of node injected power) in equation (6), are all within the protection scope of the present invention.
[0112] To verify the effectiveness of the method of this invention in cross-system comparability and ablation analysis, simulation experiments were conducted on the IEEE 30-node and IEEE 118-node systems of the PFΔ benchmark. The GNN model used in the experiments (FlowCAN, a related project method) adopted... Layered message passing, , Attention point, learning rate batch_size ,most The training epochs were configured with early stopping enabled. The model was implemented using PyTorch Geometric and training was performed on an NVIDIA A5000 GPU.
[0113] Experiment 1: Cross-system comparability verification of rPBL; The comparison methods included PowerFlowNet, CANOS, GNS, and FlowCAN, and the evaluation metrics were MSE, PBL, MAPE, and rPBL. The experimental results are shown in Table 1.
[0114] On the IEEE 30-node system, FlowCAN achieved the best values in all four metrics. Compared to the second-best baseline CANOS, rPBL was [missing value]. Down to On the IEEE 118-node system, FlowCAN also achieved optimal values in all four metrics, with its rPBL relative to CANOS being [missing value]. Down to .
[0115] The key advantage of the rPBL metric lies in its cross-system comparability. Taking CANOS as an example, its rPBL on IEEE 30 is [value missing]. On IEEE 118 The numerical differences intuitively reflect a decrease in physical consistency across larger systems, a conclusion consistent with engineering intuition. The absolute value of PBL is within the IEEE 30 standard. In IEEE 118 The difference is approximately The difference in size between the two methods stems primarily from differences in system scale rather than differences in the quality of the methods themselves, making direct comparison difficult.
[0116] In the baseline, GNS showed significantly higher rPBL on both systems (IEEE 30). IEEE 118 is This intuitively shows that its solution seriously violates Kirchhoff's laws, making it difficult to directly adopt in engineering systems. PowerFlowNet's rPBL (IEEE 30) IEEE 118 is The value was also significantly high, and although its MSE performance was moderate, its physical consistency was insufficient.
[0117] Experiment 2: Comparison of rPBL in ablation studies; The three variants FlowCAN, FlowCAN-stdAttn, and FlowCAN-noAttn were compared on the IEEE 118-node system, and the results are shown in Table 2.
[0118] FlowCAN-stdAttn (Standard Attention) is slightly better than FlowCAN (low MSE) in numerical accuracy. MAPE low ), but FlowCAN has low performance on PBL. On rPBL, low This indicates that standard attention sacrifices physical consistency for slightly better point prediction accuracy. The introduction of the rPBL index allows this "accuracy-consistency" trade-off to be quantified, providing an objective basis for making choices between accuracy and physical consistency in engineering selections.
[0119] Experiment 3: Numerical Interpretation and Engineering Significance of rPBL The value of rPBL has direct engineering implications. Taking FlowCAN's rPBL in IEEE 118 as an example... For example, this means that, on average, the power imbalance at each node accounts for a certain percentage of its apparent power throughput. For typical scheduling applications, rPBL is lower than This is generally considered an acceptable level of physical consistency. GNS's rPBL This means that the average power imbalance per node reaches its throughput. Clearly, this solution cannot be used for scheduling decisions. The percentage dimension of rPBL makes it intuitively interpretable for engineers, allowing them to determine the physical availability of the solution without needing to know the specific size or load level of the system.
[0120] The above three sets of experiments verified the effectiveness of the rPBL index of this invention from the perspectives of cross-system comparability, ablation comparison, and engineering interpretability.
[0121] Table 1
[0122] Table 2
[0123] The beneficial effects achieved by this invention include: 1. The physics-based derivation layer makes the obtained solution self-consistent with the network equations. The branch power flow and the injected power of the balancing node are directly deduced analytically from the predicted voltage, without the need for further correction on the engineering side, and can be directly adopted by the dispatch automation system.
[0124] 2. The relative power balance loss (rPBL) is comparable across examples of different scales and load levels, objectively reflecting the quality of a GNN power flow solver in terms of its actual deployability. Taking FlowCAN (a GNN power flow solver proposed in a related project, whose architecture is detailed in relevant patents) as an example, experimental data shows that on the IEEE 30-bus system, FlowCAN's rPBL is... CANOS is PowerFlowNet is GNS is On the IEEE 118-node system, FlowCAN's rPBL is... CANOS is PowerFlowNet is GNS is The rPBL value directly reflects the degree of physical unavailability of each method: GNS's rPBL exceeds... This indicates that its solution severely violates Kirchhoff's laws and cannot be directly deployed; PowerFlowNet's rPBL exceeds... Significant physical inconsistencies also exist; both CANOS and FlowCAN's rPBLs are in The following results show good physical consistency, and FlowCAN consistently outperforms CANOS. These conclusions align with engineering intuition.
[0125] 3. PBL, rPBL, MSE, and MAPE constitute a complete multi-dimensional evaluation system, comprehensively evaluating the performance of GNN power flow solvers from both numerical accuracy and physical consistency dimensions. In ablation studies, rPBL further reveals the accuracy-consistency tradeoff: FlowCAN-stdAttn outperforms FlowCAN by approximately [missing information] in MSE. However, rPBL is approximately This indicates that standard attention sacrifices physical consistency for slightly better point prediction accuracy. The introduction of the rPBL index allows this trade-off to be quantified, providing an objective basis for engineering selection.
[0126] 4. The normalization formula of rPBL (Equation (6)) has a clear physical meaning: the denominator takes the maximum value of the apparent power throughput of the input and output edges, reflecting the "importance" or "scale" of the node in power transmission. Compared with the node injected power or other fixed references, the scheme of the maximum apparent power throughput is more stable - even if the node injected power is zero (such as a pure transmission node), its throughput can still be reflected by the branch power flow, avoiding the problems of division by zero or distortion.
[0127] Example 2 Embodiment 2 of this application provides a power flow solution quality assessment device for power systems. Figure 2 This is a schematic diagram of the power flow analysis and quality assessment device for a power system provided in an embodiment of this application, as shown below. Figure 2 As shown, the device includes: The prediction solution acquisition module 210 is used to acquire the whole network predicted voltage output by the neural network power flow solver to be evaluated. The whole network predicted voltage includes the predicted voltage amplitude and predicted voltage phase angle of each node. The physical derivation and residual calculation module 220 is used to analyze the active power flow and reactive power flow of all branches based on the predicted voltage of the whole network and the branch parameters of the power system, according to the AC power flow equation; and to calculate the active power imbalance residual and reactive power imbalance residual of each bus node. The accuracy index calculation module 230 is used to calculate numerical accuracy indexes, including mean square error and mean absolute percentage error. The mean square error is the average of the squared errors between the predicted values and the true values of all unknown physical quantities, and the mean absolute percentage error is obtained by calculating the relative percentage error for physical quantities whose true values are greater than a preset threshold and then averaging the results. The physical consistency index calculation module 240 is used to calculate physical consistency indexes, including absolute physical consistency index power balance loss and normalized physical consistency index relative power balance loss. The comprehensive evaluation output module 250 is used to output the evaluation results of the neural network power flow solver to be evaluated from the dimensions of numerical prediction accuracy and physical consistency, based on the mean square error, the mean absolute percentage error, the power balance loss, and the relative power balance loss.
[0128] The power flow solution quality assessment device for power systems provided in this application embodiment can realize the various processes and corresponding beneficial effects of the above embodiments, and will not be repeated here to avoid repetition.
[0129] Example 3 This application also provides a power system power flow solution quality assessment system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the power system power flow solution quality assessment method described above.
[0130] It should be noted that the system provided in this application embodiment can execute the power flow solution quality assessment method of the power system as described above, and has corresponding beneficial effects.
[0131] Example 4 This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described power system flow solution quality assessment method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0132] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element. Furthermore, it should be noted that the scope of the methods and systems in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0133] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0134] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above, which are merely illustrative and not restrictive. Those skilled in the art, under the guidance of this application, can make many modifications without departing from the spirit and scope of the claims, all of which fall within the protection scope of this application.
[0135] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.
Claims
1. A method for evaluating the quality of power flow solutions in a power system, characterized in that, The method includes: S1, obtain the full network predicted voltage output by the neural network power flow solver to be evaluated, wherein the full network predicted voltage includes the predicted voltage amplitude and predicted voltage phase angle of each node; S2, based on the predicted voltage of the entire network and the branch parameters of the power system, the active power flow and reactive power flow of all branches are analytically calculated according to the AC power flow equation; and the active power imbalance residual and reactive power imbalance residual of each bus node are calculated. S3, calculate numerical accuracy indicators, including mean square error and mean absolute percentage error; wherein the mean square error is the average of the squared errors between the predicted values and the true values of all unknown physical quantities, and the mean absolute percentage error is obtained by calculating the relative percentage error for physical quantities whose true values are greater than a preset threshold and then averaging the results. S4, calculate physical consistency indicators, including absolute physical consistency indicator power balance loss and normalized physical consistency indicator relative power balance loss. S5, based on the mean square error, the mean absolute percentage error, the power balance loss, and the relative power balance loss, output the evaluation results of the neural network power flow solver to be evaluated from the dimensions of numerical prediction accuracy and physical consistency.
2. The method according to claim 1, characterized in that, In step S1, the voltage amplitude of the PV node is multiplexed with the input given value, and the voltage amplitude and voltage phase angle of the Slack balancing node are multiplexed with the input given value. Accordingly, step S2 includes the following sub-steps: For each branch, the active power flow and reactive power flow of the branch are analytically solved by algebraic operations of the AC power flow equations, by substituting the branch parameters and the predicted voltage amplitude and predicted voltage phase angle of the nodes at both ends of the branch. For the Slack balancing node, the active and reactive power flows of all connected branches of the node are aggregated, and the injected power of the Slack balancing node is obtained analytically by combining the node's parallel admittance parameters. For each bus node, by substituting the given injected power of the node, the calculated branch power flow, and the node parallel admittance, the active power imbalance residual and reactive power imbalance residual corresponding to each bus node are obtained respectively.
3. The method according to claim 1, characterized in that, In step S3, the calculation process of the mean absolute percentage error includes: Set a preset threshold for the absolute value of the true value; Unknown physical quantities whose absolute true value is greater than a preset threshold are selected for calculation, while unknown physical quantities whose absolute true value is less than or equal to the preset threshold are discarded, in order to suppress the calculation distortion caused by the denominator approaching zero. The calculation process for the power balance loss includes: For each bus node, the node power imbalance amplitude is obtained based on the active power imbalance residual and reactive power imbalance residual of that node. The average value of the node power imbalance amplitude of all bus nodes is then calculated to obtain the power balance loss.
4. The method according to claim 1, characterized in that, The calculation process for the relative power balance loss includes: For each bus node, sum the apparent power of all incoming edge branches and the apparent power of all outgoing edge branches of that node. The maximum value of the sum of the apparent power of the incoming edges and the sum of the apparent power of the outgoing edges of the same node is determined as the apparent power throughput benchmark of that node. Divide the node power imbalance magnitude by the corresponding node's apparent power throughput reference and multiply by 100% to obtain the node-level relative power balance loss. By traversing all bus nodes, the relative power balance loss at all node levels is obtained. The arithmetic mean of the relative power balance loss at all node levels is then calculated to obtain the relative power balance loss at the system level.
5. The method according to claim 4, characterized in that, The calculation process for the relative power balance loss also includes: When traversing bus nodes, if a bus node is determined to be an isolated node with no connected branches, then the node-level relative power balance loss corresponding to the isolated node is assigned a value of 0.
6. The method according to claim 2, characterized in that, Node active power imbalance residual Reactive power imbalance residual Calculate according to the following formula: = ; = ; In the formula, i is the bus node number; Let i be the set of adjacent nodes of the bus node i; , The active power injection and reactive power injection are given for bus node i; , The active power flow and reactive power flow of the branch (i,j) are calculated from the predicted voltage. The predicted voltage amplitude for bus node i; , These are the parallel conductance and parallel susceptance of bus node i, respectively; The amplitude of node power imbalance is .
7. The method according to claim 6, characterized in that, Branch apparent power ; Node-level relative power balance loss: ; System-level relative power balance loss ; In the formula: Let (j, i) be the apparent power of the branch; j→i represents the incoming edge branch from node j to node i; This represents the sum of the apparent power of all incoming edge branches of node i; i→k represents the outgoing edge branches from node i to node k. This represents the sum of the apparent power of all outgoing branches of node i; N is the total number of bus nodes in the power system.
8. A power flow solution quality assessment device for a power system, characterized in that, include: The prediction solution acquisition module is used to acquire the whole network predicted voltage output by the neural network power flow solver to be evaluated. The whole network predicted voltage includes the predicted voltage amplitude and predicted voltage phase angle of each node. The physical derivation and residual calculation module is used to analyze the active power flow and reactive power flow of all branches based on the predicted voltage of the entire network and the branch parameters of the power system, according to the AC power flow equation; and to calculate the active power imbalance residual and reactive power imbalance residual of each bus node. The accuracy index calculation module is used to calculate numerical accuracy indexes, including mean square error and mean absolute percentage error. The mean square error is the average of the squared errors between the predicted values and the true values of all unknown physical quantities, and the mean absolute percentage error is the average of the relative percentage errors calculated for physical quantities whose true values are greater than a preset threshold. The physical consistency index calculation module is used to calculate physical consistency indexes, including absolute physical consistency index power balance loss and normalized physical consistency index relative power balance loss. The comprehensive evaluation output module is used to output the evaluation results of the neural network power flow solver to be evaluated from the dimensions of numerical prediction accuracy and physical consistency, based on the mean square error, the mean absolute percentage error, the power balance loss, and the relative power balance loss.
9. The apparatus according to claim 8, characterized in that, The voltage amplitude of the PV node is multiplexed with the input setpoint, and the voltage amplitude and voltage phase angle of the Slack slack node are multiplexed with the input setpoint. Accordingly, the physical derivation and residual calculation module is specifically used for: For each branch, the active power flow and reactive power flow of the branch are analytically solved by algebraic operations of the AC power flow equations, by substituting the branch parameters and the predicted voltage amplitude and predicted voltage phase angle of the nodes at both ends of the branch. For the Slack balancing node, the active and reactive power flows of all connected branches of the node are aggregated, and the injected power of the Slack balancing node is obtained analytically by combining the node's parallel admittance parameters. For each bus node, by substituting the given injected power of the node, the calculated branch power flow, and the node parallel admittance, the active power imbalance residual and reactive power imbalance residual corresponding to each bus node are obtained respectively.
10. A power flow solution quality assessment system for a power system, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the power flow solution quality assessment method for the power system according to any one of claims 1-7.
