Electric power transaction online auxiliary decision-making method considering N-1 security constraint and load flow calculation

By embedding N-1 security constraints into the power trading optimization model and combining sensitivity analysis and parallel computing, the computational complexity and time consumption problems in power trading decision-making are solved, enabling real-time online decision-making for grid security and efficient economic dispatch.

CN121684677APending Publication Date: 2026-03-17SHANDONG ZHONGRUI ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511866257.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing power trading decision support systems suffer from high computational complexity, long computation time, and insufficient adjustment timeliness when facing N-1 security checks. They cannot meet the rapid decision-making needs of real-time markets, and economic optimization schemes may lead to power flow concentration, voltage stability issues, and overload risks.

Method used

By embedding N-1 security constraints into the transaction optimization model and combining sensitivity analysis and parallel computing architecture, key failure scenarios are quickly identified through constraint screening technology, power flow calculations are processed in parallel, and visual decision suggestions for security boundaries are generated.

Benefits of technology

It enables real-time online decision-making, ensures that transaction schemes meet power grid safety requirements, reduces computational complexity and time consumption, improves the transparency and scientific nature of decision-making, and reduces decision-making risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121684677A_ABST
    Figure CN121684677A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power systems, in particular to a power transaction online aid decision-making method considering N-1 security constraints and load flow calculation, which comprises the following steps: S1, data acquisition and preprocessing: acquiring a power grid real-time operation state, transaction data, power grid model parameters and equipment operation limit value data; s2, based on the acquired data, establishing an optimization model with the goal of maximizing the social total welfare or minimizing the total electricity purchase cost, the optimization model comprising a ground state operation constraint and an N-1 security constraint; s3, efficiently solving the model based on constraint screening and parallel computing; s4, generating security boundary visualization and decision suggestions; according to the method, the generated transaction scheme is ensured to meet the security requirement of the power grid, the operation reliability of the power grid is improved, the technical bottleneck that an optimization model containing N-1 constraints is complex in calculation and time-consuming in solution is solved, and the real-time requirement of online decision making is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system technology, and more specifically to an online auxiliary decision-making method for power trading that considers N-1 security constraints and power flow calculation. Background Technology

[0002] In the electricity market environment, trading centers organize electricity transactions through various time-scale trading instruments, such as day-ahead and real-time markets, to achieve the economically optimal allocation of resources. However, existing trading decision support systems typically employ a sequential decision-making model of "economic optimization first, security verification later." This model first generates a trading plan driven purely by market forces, aiming to maximize social welfare or minimize electricity purchase costs. This plan is then submitted to an independent dispatch automation system for static security analysis (including N-1 checks). This sequential processing mechanism suffers from the following deep-seated technical flaws: 1. Economically optimal power transfer schemes often tend to utilize transmission channels with the lowest impedance, leading to a high concentration of power flow at certain critical sections. Under normal operating conditions, such schemes may satisfy all safety constraints, but when a anticipated system failure occurs (such as the failure of any single component), the power flow will redistribute according to physical laws, potentially triggering the following cascading technical problems: Overload problems caused by power flow shifting occur when a critical line fails and goes offline, transferring its original power to other parallel channels, potentially causing adjacent lines to exceed their power limits. In a ring network structure, the disconnection of one line leads to a redistribution of power flow, causing the load rate of other lines to rise sharply, even exceeding the thermal stability limit.

[0003] The problem of implicit deterioration in voltage stability means that economic dispatch schemes may cause the system to operate at the edge of the voltage stability domain. After an N-1 fault, the reactive power support capacity of the local area is insufficient, which significantly increases the risk of voltage collapse.

[0004] The inherent contradiction of adjusting timeliness means that when security risks are discovered during verification, manual adjustments need to be made in collaboration between trading and scheduling personnel. This process involves repeated communication and modification of plans across multiple professional positions, typically taking tens of minutes or even longer, which is completely unsuitable for the rapid decision-making needs of real-time markets (with an operating cycle of 5-15 minutes).

[0005] 2. A complete N-1 safety check requires a detailed power flow analysis for each anticipated failure scenario, and its computational complexity is mainly reflected in: The sheer number of scenarios leads to an explosion in the number of fault simulations. For a power grid containing N critical components, N independent fault simulations are required. In real-world large-scale interconnected power grids, the number of critical components can reach hundreds or even thousands, necessitating a corresponding number of power flow calculations.

[0006] The computational overhead of power flow algorithms is significant. Each N-1 check requires solving a set of nonlinear power flow equations, typically using iterative algorithms such as the Newton-Raphson method. Although the computation time for a single power flow is relatively short (on the order of seconds), the serial computation of hundreds of scenarios will result in a total time consumption of up to ten minutes, which cannot meet the real-time requirements of online decision-making (ideally, it should be controlled within 1-3 minutes).

[0007] The iterative cost of optimization and verification is significant. When a violation is detected during verification, the trading plan needs to be modified and a full N-1 verification needs to be performed again. This iterative process, which may involve multiple iterations, further exacerbates the computational burden, leading to decision delays and potentially missing the best trading opportunity.

[0008] Therefore, there is an urgent need in this field for an innovative technological solution. Summary of the Invention

[0009] The technical problem this invention aims to solve is to overcome the shortcomings of existing technologies and provide an online auxiliary decision-making method for power trading that considers N-1 security constraints and power flow calculations. The N-1 security criterion is embedded as a hard constraint into the trading optimization model, ensuring that the generated trading scheme meets the power grid security requirements, thereby improving the reliability of power grid operation from a technical perspective. Simultaneously, this application addresses the technical bottleneck of "computational complexity and time-consuming solution" in optimization models with N-1 constraints by introducing constraint reduction techniques based on sensitivity analysis and a parallel computing architecture, thus meeting the real-time requirements of online decision-making.

[0010] This invention is achieved through the following technical solution: an online auxiliary decision-making method for power trading considering N-1 security constraints and power flow calculation, comprising the following steps: S1. Data acquisition and preprocessing: Acquire real-time power grid operating status, transaction data, power grid model parameters, and equipment operating limit data; S2. Based on the acquired data, establish an optimization model with the goal of maximizing total social welfare or minimizing total electricity purchase cost. The optimization model includes ground state operating constraints and N-1 security constraints. S3. Solve the model efficiently based on constraint filtering and parallel computing; S4. Generate security boundary visualization and decision recommendations.

[0011] The objective function of S2 is to maximize total social welfare, and its expression is as follows: ; in, It is the active load of load j under normal operating conditions. It is the active power output of generator i under normal operating conditions. It is the benefit function of load j. It is the price cost function of generator i. and These are collections of generators and loads, respectively.

[0012] If the objective of S2 is to minimize the total electricity purchase cost, then the objective function expression is: ; in, A collection of generators. It is the active power output of generator i under normal operating conditions. It is the price quote cost function for generator i.

[0013] The ground-state operating constraints in S2 are for the current normal power grid topology and include node power balance constraints and equipment operating limit constraints.

[0014] The N-1 security constraints include the power flow balance equation after a fault, the equipment limit constraints after a fault, and the generator regulation constraints.

[0015] S3 includes the following sub-steps: S3-1. Using constraint screening techniques and based on sensitivity analysis of ground-state power flow, estimate line power under N-1 fault scenarios and screen key fault scenarios. S3-2. A master-slave architecture is adopted as the parallel computing framework for parallel processing.

[0016] S3-1 includes the following sub-steps: S3-1-1. Perform ground-state power flow calculations to solve for the optimal ground-state power flow without considering the N-1 constraint, and obtain an initial ground-state power flow solution, which includes the voltage phase angle of each node and the power of each line. S3-1-2. Calculate the generator output power transfer distribution factor and the line outage distribution factor to achieve sensitivity analysis; S3-1-3. Based on the ground-state power flow solution and sensitivity analysis results, for each anticipated fault scenario, estimate the power of other lines after the fault, select key fault scenarios, and add the N-1 constraint of key fault scenarios to the optimization model.

[0017] The estimated value is set in S3-1-3. The criteria for selecting key failure scenarios are as follows: For each fault scenario, if there exists any line that satisfies... If the estimated power of all lines in the fault scenario is far below the limit, then the fault scenario is considered a critical scenario and its complete N-1 constraints are added to the optimization model; otherwise, if the estimated power of all lines in the fault scenario is far below the limit, then the scenario is considered non-critical and its constraints can be ignored in the current optimization cycle. This represents the safety margin coefficient. This indicates the upper limit of the line's apparent power.

[0018] S3-2 includes the following sub-steps: S3-2-1. The main process is used to solve the ground-state optimal power flow problem and distribute tasks. S3-2-2, The process is used to perform precise power flow calculations and limit checks for specified fault scenarios in parallel.

[0019] In S4, the load rate of each line is displayed on the single-line diagram of the power grid in the form of a heat map. A safety boundary slider is provided for users to manually adjust the safety margin. New transaction costs are recalculated and displayed in real time, decision suggestions are generated, and scheme comparison and execution are supported.

[0020] Compared with the prior art, the beneficial effects of the present invention are: This invention embeds N-1 security constraints mathematically into the source of the optimization model, automatically avoiding all transaction decisions that could lead to equipment exceeding limits in the base state or fault state during the optimization process. This is equivalent to injecting a "security gene" into transaction decisions, achieving inherent security from the algorithmic mechanism, completely eliminating the generation of insecure solutions, and solving the systemic risks caused by the lag in security verification.

[0021] This invention precisely solves this problem by combining "constraint screening" and "parallel computing." The constraint screening technology, based on sensitivity analysis, intelligently and quickly identifies a very small number of key constraints from a massive N-1 scenario pool, reducing the problem size by one to two orders of magnitude and avoiding unnecessary computational waste. Subsequently, a master-slave parallel computing framework distributes the remaining key scenario verification tasks, compressing the originally serially accumulated computation time to almost the computation time of a single scenario. These two technologies work together to make it possible to complete large-scale online safety-constrained economic dispatch of the power grid within the limited few minutes of the trading window, overcoming the technical obstacle of moving from "unfinishable calculations" to "fast calculations."

[0022] This application also innovates the human-computer interaction interface, particularly the dynamic safety boundary slider, which transforms the abstract concept of "safety margin" into a quantifiable and adjustable parameter. Traders can drag the slider to see the changes in electricity purchase costs corresponding to different safety levels in near real-time, achieving visualized quantitative trade-offs. This greatly improves the transparency and scientific nature of decision-making, reduces decision-making risks caused by information asymmetry, realizes a paradigm shift from "humans adapting to the system" to "the system assisting humans," and significantly improves the efficiency and quality of human-machine collaborative decision-making. Attached Figure Description

[0023] Figure 1 This is a flowchart of the method used in this application; Figure 2 This is a schematic diagram of the human-computer interaction interface for visualizing the security boundary of this application; Figure 3 This is a topology diagram of Example 2; Figure 4 This is a visual representation of the results from Example 2; Figure 5 This is a distribution chart of the N-1 scenario screening results in Example 3; Figure 6 This is the timing diagram for parallel computing in Example 3; Figure 7 This is a schematic diagram illustrating the economic analysis of this application and traditional UC in Example 3; Figure 8 This is a visual diagram of the safety margin in Example 3. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0025] Example 1 Reference Figure 1 The online auxiliary decision-making method for power trading, considering N-1 security constraints and power flow calculation, includes the following steps: S1. Data acquisition and preprocessing: Acquire data such as real-time power grid operating status, transaction data, power grid model parameters, and equipment operating limits.

[0026] In S1, the real-time operating status of the power grid includes the voltage of each node, the active and reactive power output of the generators, and the active and reactive loads of each node. The real-time operating status of the power grid can be directly obtained from the SCADA system. Transaction data includes unit price curves, load prices, and LMP (Lower Minimum Price) forecasts. wait; Power grid model parameters include line impedance Transformer turns ratio Earth Admittance wait; Equipment operating limits include upper limits for line power transmission, upper and lower limits for node voltage, upper and lower limits for generator active power output, and upper and lower limits for generator reactive power output.

[0027] S2. Based on the acquired data, form a node admittance matrix Y describing the topology and physical characteristics of the power grid, and establish an optimization model with the goal of maximizing total social welfare or minimizing total electricity purchase cost. This model includes ground state operation (normal conditions) constraints and complete N-1 security constraints.

[0028] Furthermore, transaction data serves as the objective function and boundary conditions for constructing the optimization model.

[0029] The unit price curve and load price act on the objective function of maximizing total social welfare or minimizing total electricity purchase cost.

[0030] Nodal Marginal Price (LMP) Forecast Used to evaluate the economics of a transaction and display it in a visualization interface, it can be obtained from market operators or calculated using well-known predictive models.

[0031] The power grid model parameters are used to construct power flow calculation models under the ground state and N-1 fault scenarios.

[0032] Power grid model parameters line impedance Transformer turns ratio Earth Admittance It is to form the nodal admittance matrix The basic parameters, this matrix is ​​directly used in the power flow balance equations in the ground state and after the N-1 fault, serving as the basis for constructing all power flow constraints and sensitivity analyses.

[0033] If the objective is to maximize total social welfare, the objective function expression is: ; in, It is the active load of load j under normal operating conditions, and the unit is usually megawatt (MW). It is the active power output of generator i under normal operating conditions, usually measured in megawatts (MW). It is the benefit function of load j, and its value is in monetary units, such as yuan (¥), which represents the load consumption. The benefits obtained from megawatts of power are usually determined based on the declared willingness to purchase electricity or the price curve. Therefore, the specific form of this function comes from the load quotation data obtained in S1. This is the quote cost function for generator i, with values ​​in currency units, representing the cost provided by generator i. The compensation required for megawatt-scale power generation is derived from the unit price quotation curve data obtained in S1. and These are collections of generators and loads, respectively.

[0034] Dimensional analysis: The objective function above performs operations between monetary units, and the resulting quantity (total social welfare) is also in monetary units. Since the dimensions are consistent, they can be directly added or subtracted.

[0035] If the objective is to minimize the total electricity purchase cost, then the objective function expression is: ; The objective is to directly minimize the total expenditure on electricity purchases. In the model, load demand is typically presented as a constraint to be satisfied (i.e., Σ). =Σ ).

[0036] This function, together with the previously given social welfare maximization function, constitutes the core optimization objective, which can be selected according to the actual application scenario. All key parameters in the functions are closely dependent on the real-time transaction data obtained in step S1, ensuring the model's practicality and accuracy.

[0037] The ground-state operating constraints in S2 are for the current normal topology of the power grid, and include node power balance constraints (using DC power flow or AC power flow models) and equipment operating limit constraints. The constraint equations for the node power balance constraint are as follows: ; ; in, This represents the active power output of generator i under normal operating conditions. This represents the active load of node i under normal operating conditions (derived from the real-time operating status of the power grid or the transaction plan in S1), and the unit is usually megawatts (MW). , These are the real and imaginary parts of the node admittance matrix, which is calculated from the power grid model parameters (line impedance, transformer ratio, and ground admittance) obtained in S1. This represents the reactive power output of generator i. This represents the reactive load of node i. This represents the voltage at node i. This represents the voltage at node j.

[0038] , These represent the voltage phase angles of node i and node j, respectively, and are usually in radians (rad) or degrees (°).

[0039] This represents the voltage phase angle difference between node i and node j. This difference directly determines the direction and magnitude of active power transmission between nodes.

[0040] These are the real and imaginary parts of the elements in the admittance matrix of a power network node. It represents electrical conductance, which is mainly related to the resistance (R) of the line and reflects the active power loss in power transmission. The unit is Siemens (S). Susceptance is mainly related to the line reactance (X) and ground admittance, reflecting the charging and discharging effects of power grid components (such as inductance and capacitance characteristics). It affects the flow of reactive power and voltage levels, and is measured in Siemens (S).

[0041] Dimensional analysis: using formulas For example, The dimension is MW. , If the dimension is kV, The dimension is S (i.e., ),and Because power system analysis often uses per-unit (pu) values ​​or unified reference values, in actual calculations, voltage is constantized to per-unit values ​​(dimensionless), and conductance / susceptance is also constantized to per-unit values ​​(dimensionless) based on the reference impedance. This unifies the dimensions on both sides of the equation to per-unit power or power with unified dimensions. This is the standard processing method for power system power flow calculation, ensuring dimensional consistency.

[0042] The equipment operating limit constraints are expressed as follows: , , ; ∈ ; These are the active power output and reactive power output of the generator, respectively. , These are the lower and upper limits of the generator's active power output, respectively. , These are the lower and upper limits of the generator's reactive power output, respectively. , These are the lower and upper limits of the node voltage, respectively. All upper and lower limits are directly derived from the device operating limit data obtained in S1. It is the magnitude (amplitude) of the apparent power of line l, which comprehensively reflects the active power flowing through the line. and reactive power The overall effect. It is the upper limit of the apparent power transmission of line l, which is usually determined by the thermal stability limit or stable operation limit of the line, and is a key constraint to prevent line overload. It is the collection of all transmission lines in the system.

[0043] N-1 safety constraints, i.e., for the set of anticipated faults Each fault scenario c (any disconnected line) The system needs to ensure power flow balance after a fault and prevent equipment from exceeding limits.

[0044] N-1 safety constraints include post-fault power flow balance equations, post-fault equipment limit constraints, and generator regulation constraints.

[0045] After a fault and subsequent change in the power grid topology, the admittance matrix of a node is updated to... The complete expression of the node admittance matrix Yc after a fault is a dynamic matrix update algorithm based on specific fault scenarios. It deeply integrates the physical model of the power grid (admittance matrix) with the mathematical optimization model (safety-constrained economic dispatch). By efficiently and accurately calculating Yc and then completing power flow analysis, this method fundamentally ensures that the generated trading scheme can still maintain power grid safety after the failure of any component, thus achieving a technological leap from "lagging verification" to "intrinsic safety".

[0046] Matrix after failure It is derived from the nodal admittance matrix Y of the ground state (normal condition). The ground state matrix Y is the foundation of the entire power flow calculation and the starting point for ground state power flow calculation and sensitivity analysis (such as subsequent calculations of GSDF and LODF).

[0047] When performing N-1 verification to simulate the anticipated fault scenario c (e.g., line lc breaks between the first node m and the last node n), the ground-state admittance matrix Y needs to be updated to the post-fault admittance matrix. Its updates follow a standard and core rule: It is obtained by subtracting the contribution of the faulty element lc from the ground state matrix Y and adding the contribution of any new topology that the fault may cause.

[0048] Once obtained The elements are then directly substituted into the power flow balance equations after the fault, as described in S2, to accurately calculate the system state after the fault. This process is the core of the step "using the process to perform accurate power flow calculations and limit checks for specified fault scenarios in parallel". The check result (whether the limit is exceeded) is returned to the main process to guide the optimization model iteration, ultimately ensuring that the transaction scheme meets all N-1 safety constraints.

[0049] The limit check here is to determine whether all parameters calculated accurately after a fault meet the equipment operation limit constraints defined by S1.

[0050] Post-fault admittance matrix It is a dynamic update process based on the ground state matrix Y and the parameters of the faulty component. This process is a standard operation in N-1 security analysis of power systems, and its accurate calculation is the mathematical basis for implementing the method described in this invention, which embeds N-1 security constraints into the optimization model. In this way, it is essentially ensured that the generated trading scheme can still maintain the safe and stable operation of the power grid after the failure of any single component.

[0051] The admittance matrix Yc in the N-1 fault scenario is the core of achieving safety constraints. When the simulated line lc is disconnected, the nodal admittance matrix of the system needs to be recalculated based on the power grid model parameters in S1 to obtain the post-fault matrix Yc. This matrix will be used for all subsequent post-fault power flow balance equations to ensure that the optimized model can accurately simulate the system state after the fault. Its calculation is a standard procedure in power network analysis, usually achieved by modifying the elements in the original admittance matrix corresponding to the faulted line lc.

[0052] The power flow balance equation after the fault is: ; ; Where c represents the c-th anticipated N-1 fault scenario (e.g., a critical line is disconnected). i,j represent the node numbers in the power grid. i indicates that the equation holds true for every node i in the system. N represents the total number of nodes in the power grid.

[0053] The equipment limit constraints after a fault are: , , ; .

[0054] in, This represents the active power output (variable) of generator i under fault scenario c. These represent the lower and upper limits of the active power output of generator i. This represents the reactive power output of generator i under fault scenario c. These represent the lower and upper limits of the generator's reactive power output. Let be the voltage amplitude at node i under fault scenario c. This represents the lower and upper limits of the voltage that node i is allowed to operate at. This represents the apparent power magnitude of line l under fault scenario c. This represents the upper limit of apparent power transmission (thermal stability limit) for line l. Lines that are disconnected due to a fault are not within the scope of this constraint verification.

[0055] This set of constraints defines a clear "safety red line" for power grid operation and is the mathematical expression of the N-1 safety constraints described in S2. In the parallel computing phase of S3, after the slave process completes the power flow calculation following a fault, its core task is to verify whether these constraints are satisfied. The verification results (if any exceedances are found) are fed back to the main process to guide the iteration of the optimization model, ultimately generating a safe trading scheme.

[0056] The generator adopts participation factor regulation, and the generator regulation constraint expression is as follows: .

[0057] Let be the active power output of generator i under fault scenario c, in MW. This is the dependent variable of the constraint, i.e., the final state to be solved, satisfying the power flow balance and equipment limit constraints after the fault.

[0058] It is the active power output allocated to generator i in the optimal trading scheme determined by the optimization model under the ground state (before the fault occurs), in MW. It comes from the solution obtained by the main process in step S3 of solving the ground state optimal power flow problem. It is the participation factor (allocation coefficient) of generator i, which is a pre-defined dimensionless coefficient that satisfies 0 ≤ ≤1 and This determines the proportion of the system power deficit that the generator will bear.

[0059] This refers to the total active power deficit that the system needs to adjust under fault scenario c, expressed in MW. It is mainly caused by faults (such as power imbalance due to line disconnection). Its precise value is determined as a balance variable when solving for the post-fault state and can be simplified to the ground-state power of the faulted line. This constraint provides a physically reasonable mathematical model for the generator output response of the system after a fault, serving as a bridge between the ground-state optimization scheme and post-fault safety verification. The power system uses this constraint to simulate automatic generator power adjustment (primary frequency regulation) after a fault. (Participation Factors) Achieved system total power deficit The rational allocation among the various frequency regulation units is reasonable because it conforms to the actual regulation and response mechanism of the power grid. Its effect is to ensure that the optimization model can accurately simulate the stable state of the system after a fault, which is the key to the realization of the N-1 safety check.

[0060] S3. Solve the model efficiently based on constraint filtering and parallel computing.

[0061] S3 includes the following sub-steps: S3-1. Use constraint screening technology, namely sensitivity analysis based on ground state power flow, to quickly predict line power under N-1 fault scenarios and screen key fault scenarios.

[0062] Since not all N-1 fault scenarios are critical, and many component failures do not cause other components to exceed limits, this invention employs a sensitivity analysis-based method to quickly identify the "critical few" fault scenarios most likely to trigger limit exceedances. Only the constraints of these scenarios are added to the optimization model, ignoring scenarios that clearly will not exceed limits, thus significantly reducing the number of constraints.

[0063] Specifically, S3-1 includes the following sub-steps: S3-1-1. Perform ground-state power flow calculation; specifically, solve for the ground-state optimal power flow without considering the N-1 constraint (or use the current operating point data) to obtain an initial ground-state power flow solution, which includes the voltage phase angles of each node. and power of each line This serves as a benchmark for subsequent sensitivity analysis.

[0064] S3-1-2. Calculate the generator output power transfer distribution factor and the line outage distribution factor to perform sensitivity analysis. The most commonly used factors in sensitivity analysis are the generator output power transfer distribution factor (GSDF) and the line outage distribution factor (LODF).

[0065] use The change in power on line l when the injected power of generator i increases by 1 unit and the power is reduced by 1 unit by the balancing machine is expressed as: ; This is the generator output power transfer distribution factor, a dimensionless sensitivity coefficient. It quantifies the linear relationship between the power transfer between generator i and the balancing machine and the power of line l. The larger the value, the more significant the impact of the generator's output change on the power of this line.

[0066] This is the change in the active power output of generator i. In the definition, it is usually assumed that it increases by 1 unit (e.g., 1 MW), i.e. =1.

[0067] When the output of generator i changes The change in active power caused by a time event on line l. It can be positive or negative; a positive value indicates an increase in line power, and a negative value indicates a decrease.

[0068] use This indicates the original power of line k after it is disconnected due to a fault. This transfer to the system results in the ratio of the change in power on line l to the original power. Its calculation formula can be approximately expressed as: ; in, It is a function of the elements of the impedance matrix. It is the reactance of line l.

[0069] This is the line outage distribution factor, a dimensionless sensitivity coefficient. It precisely quantifies the proportion of power transferred to other lines when line k is disconnected. The larger the value, the more severe the power impact of a fault in line k on line l, and the more easily line l is overloaded.

[0070] This represents the change in active power on line l caused by the disconnection of line k. This represents the active power of the faulty line k in its ground state. This value is derived from the ground state power flow solution calculated in step S3.

[0071] It is the reactance of line l, which is a physical parameter of the line itself, derived from the power grid model parameters obtained in S1. S3-1-3. Based on the ground state power flow solution and sensitivity analysis results, for each anticipated fault scenario c, estimate the power of other lines l after the fault, select key fault scenarios, and add their complete N-1 constraints to the optimization model.

[0072] For each anticipated failure scenario (i.e., disconnecting line k), this application does not perform a complete power flow calculation, but instead uses the ground-state power flow solution and LODF to quickly estimate the power of other lines l (l≠k) after the fault. The estimation formula is: ; in, It is the power of the faulty line k in its ground state. In fault scenario c (line k is disconnected), line l ( The estimated active power is a direct basis for screening key fault scenarios.

[0073] This represents the active power of line l in its ground state (normal operating condition). This value is derived from solving the ground state optimal power flow in step S3 or from the ground state power flow solution obtained using the current operating point data.

[0074] Let be the active power of faulty line k in its base state. (And...) The same, derived from the ground-state power flow solution calculated in step S3.

[0075] This calculation formula is the core of fast power flow transfer analysis using LODF. Its physical meaning is: the power of line l after a fault equals the ground-state power plus the power transferred due to the interruption of line k. This method avoids complex nonlinear power flow calculations and provides the data foundation for efficient constraint screening. This application is based on estimated values... Determine the severity of fault scenario c. Specifically, it refers to the apparent power magnitude of line l under fault scenario c, in MVA. More specifically, a threshold ε is set (e.g., 80% of the line capacity limit). The selection criteria for critical fault scenarios are then as follows: If there exists any line l that satisfies If the fault scenario c is considered critical, its full N-1 constraints need to be added to the optimization model; conversely, if the estimated power of all lines is far below the limit... If the scenario is deemed non-critical, its constraints can be ignored within the current optimization cycle. This represents the upper limit of the line's apparent power, measured in MVA, derived from the equipment operating limit data obtained in step S1. This is the absolute physical capacity limit (thermal stability limit) of line l, a rigid constraint on the safe operation of the equipment that cannot be exceeded. It is a safety margin coefficient, also known as the threshold scaling factor, which is dimensionless. It is a pre-defined constant between 0 and 1, and is usually 0.8, 0.85, or 0.9. The value of ε directly determines the stringency of the screening, serving as a crucial "regulatory valve" for balancing computational efficiency and accuracy (safety). A larger ε value (e.g., 0.95) results in a warning threshold close to the line limit, more lenient screening conditions, and faster calculation speed, but may miss some risks. A smaller ε value (e.g., 0.8) results in a conservative warning threshold, stricter screening conditions, and safer calculation results, but requires more computation. This is the core innovation of this application's rapid pre-screening based on linear sensitivity analysis. Its rationale lies in the fact that linear estimation using the Line Outage Distribution Factor (LODF) is a mature and universally applicable rapid scanning method in power system safety analysis, capable of identifying potential high-risk scenarios from a large number of faults within seconds. This significantly reduces the number of fault scenarios requiring precise calculation (approximately 70%-90%), breaking through computational bottlenecks and meeting the real-time requirements of online decision-making. S3-2: A master-slave architecture is adopted as the parallel computing framework for parallel processing.

[0076] This application deploys the power flow calculation and limit verification tasks for the remaining N-1 fault scenarios to a high-performance computing cluster for parallel processing. The master node solves the ground state problem, distributes the subtasks of each fault scenario to multiple computing nodes, and finally aggregates the verification results. Even after constraint filtering, the remaining critical N-1 scenarios (assuming there are M) still need to be processed. The traditional serial computing method (solving the ground state problem and then verifying each of the M scenarios) is still time-consuming. Therefore, this application adopts a master-worker parallel computing framework to accelerate this process.

[0077] Furthermore, S3-2 includes the following sub-steps: S3-2-1. The master process is responsible for solving the ground-state optimal power flow problem and distributing tasks. The master process resides on the high-performance computing node and coordinates the entire solution process. Its core task is to solve the ground-state optimal power flow problem. The master process works as follows: S3-2-1-1. Read the power grid data, construct and solve an optimization problem containing only the ground state constraint and the selected key N-1 constraints, and obtain the optimal solution at the current iteration point. (Including generator output, node voltage, etc.); S3-2-1-2, Solution Package the information of all M key fault scenarios that need to be verified, and broadcast it to all slave processes (WorkerProcesses) through a message passing interface (such as MPI), and wait to receive the verification results returned by the slave processes; S3-2-1-3. Perform verification. If all results returned from the process show that none of the verified N-1 scenarios exceed the limit, the calculation ends and the final solution is output. If a process returns information indicating that a certain fault scenario it is responsible for has exceeded the limit, the main process generates one or more FeasibilityCut ​​or Benders cuts based on the limit information, and adds these cuts as new constraints to the ground state optimization problem. Feasibility cutting, or Benders cutting, refers to generating linear constraints for the response based on the limit-crossing information of the sub-problem (fault scenario verification) and feeding them back to the main problem (ground state optimization) to gradually guide the optimization direction and ensure that the final solution meets all safety constraints.

[0078] S3-2-1-4, Jump back to S3-2-1-1, and re-solve the optimization problem using the new constraint set until all N-1 constraints are satisfied.

[0079] S3-2-2, the worker processes are responsible for performing precise power flow calculations and limit checks in parallel for specified fault scenarios. Each worker process is deployed on an independent computing core or node. The worker process works as follows: S3-2-2-1. Receive the ground state solution from the main process. and one or more fault scenarios assigned to it; S3-2-2-2、For each assigned fault scenario c, modify the network topology (disconnect the faulty line). ground state solution Using the initial values, perform a complete AC power flow calculation to obtain the precise state of the system after the fault (voltage at each node, power at each line). Check and verify whether the power of all lines and the voltage of all nodes exceed the limits.

[0080] For each assigned fault scenario c, the process generates a real-time model by modifying the elements in the ground state matrix Y corresponding to the faulty line lc. This allows for accurate simulation of the power grid topology after a fault.

[0081] S3-2-2-3. Return the verification results (whether scenario c is safe; if not safe, what is the maximum over-limit amount, etc.) to the main process.

[0082] The advantage of parallel computing is that a task that originally required M sequential power flow calculations is now evenly distributed across W slave processes for parallel execution. Ideally, the computation time is reduced from... shorten to (in (This is the time required for one power flow calculation). This makes online security analysis of large-scale systems possible.

[0083] S4. Generate safety boundary visualization and decision-making suggestions. Display the load rate of each line on the power grid single-line diagram in the form of a heat map, provide a safety boundary slider for users to manually adjust the safety margin, recalculate and display new transaction costs in real time, generate decision-making suggestions, and support scheme comparison and execution.

[0084] The "real-time recalculation" mentioned in S4 is based on the current optimal solution and sensitivity information such as Lagrange multipliers. It uses fast calculation methods such as linear programming or quadratic programming approximation to estimate the change in electricity purchase cost corresponding to the new safety margin within seconds, thereby achieving interactive feedback. This efficient computing capability is consistent with the acceleration effect of parallel architecture.

[0085] Reference Figure 2 This application outputs the optimal trading scheme and key safety margin information through a solver. The system interface displays the load rate of each line on a single-line diagram of the power grid in the form of a heat map, highlighting the most vulnerable line under N-1 fault conditions (i.e., the line whose load rate is closest to the limit). Simultaneously, a safety boundary slider is provided, allowing users to manually increase the safety margin. The system recalculates and displays the new trading costs in real time, achieving a quantitative trade-off between safety and economy. The solver ultimately outputs the optimal trading scheme that satisfies all N-1 safety constraints and its corresponding system operating state. The innovation of this invention lies in not only outputting a simple "yes / no" safety conclusion, but also presenting the complex power grid safety status and economic trade-offs transparently and intuitively to the trader through an advanced visualization and human-computer interaction interface, assisting them in making the final decision.

[0086] This application enables multi-level visualized security situation awareness. The main view in the system interface primarily displays the power grid geographical wiring diagram and the security heat map.

[0087] Visualization base: Displays a single-line geographical map of the power grid, including electrical components such as nodes, generators, loads, and transmission lines.

[0088] Safety Heatmap Layer: A dynamic heatmap is overlaid on top of the single-line graph to reflect the safety margin of components in real time.

[0089] Coloring scheme: The color of each line is dynamically filled based on its most severe load rate (defined as: load rate = |current power| / rated capacity). The most severe case refers to the highest load rate that the line may experience under the base state and all N-1 fault scenarios.

[0090] For example: Green indicates a safe zone, with a load rate of <60%; Yellow indicates a warning zone; load rate ≤ 60% < 80%. Orange indicates a warning zone, where the load rate is between 80% and 95%. Red indicates a danger zone with a load rate ≥ 95%.

[0091] Special warning labels: For lines that become the weakest link in the system after an N-1 fault (i.e., those with the highest load rate at their most severe stage), in addition to being displayed in red, a flashing warning border and tooltip label will be added to them, such as "Maximum load rate after N-1: 98%".

[0092] The sidebar of the system interface—the list of key information and quantitative analysis—specifically includes the following: The list of the most vulnerable components displays detailed information about the top 5 lines with the highest load rates, including the line name, base load rate, the N-1 fault scenario that caused its most severe load rate, and the specific load rate under that scenario. Safety margin metrics display the key safety indicators of the system as a whole, such as: overall safety margin = minoveralllines(1 - most severe load rate), etc. Number of lines at risk of exceeding limits; Economic indicators, including total electricity purchase cost and total social welfare under the current plan, are displayed simultaneously.

[0093] This application also enables real-time interaction and exploration of dynamic safety boundaries, so that traders no longer passively accept the "optimal solution" given by the algorithm, but can actively explore the Pareto front (i.e., the trade-off) between safety and economy.

[0094] The system interface features a slider with scales (e.g., "Standard," "High," "Extremely High"), which corresponds to a global safety margin coefficient k. k is a coefficient between 0.9 and 1.0, used to tighten power constraints on all lines. By default, the slider is initially in the "Standard" position, i.e., k=1.0, using the original rated capacity of the lines. As a constraint.

[0095] When a trader drags the slider to the right to the "high" safety level (e.g., corresponding to k=0.85), it means that the capacity constraints of all lines in the optimization model are temporarily modified. .

[0096] Once the slider is dragged, the system will not immediately perform a complete optimization solution (because this may still take several seconds to tens of seconds), but will trigger a lightweight and fast computation process to achieve near-real-time recomputation and feedback.

[0097] Its fast calculation process is as follows: First, based on the current optimal solution and sensitivity matrix, we quickly estimate the total power generation output ΔP that needs to be adjusted under the new and more stringent security constraints.

[0098] Secondly, using linear programming or quadratic programming models, the output of each unit is redistributed with the goal of minimizing power generation adjustment costs to meet the tightened constraints. This simplified model can be solved extremely quickly (milliseconds to seconds).

[0099] Furthermore, based on the new power generation plan, the new total cost of electricity purchase can be quickly calculated.

[0100] Once the above calculations are completed, the interface will be updated dynamically immediately, including recoloring the heatmap in the main view according to the new safety boundaries; updating the economic indicators in the sidebar and highlighting the cost increment, for example: "Total cost increase: +¥1,200 / hour".

[0101] The system interface may display a message: "Upgrading the safety margin to the 'High' level will require an additional 0.5% in electricity purchase costs."

[0102] Users can repeatedly drag the slider, and the system will provide the economic costs for different security levels in near real-time. The interface offers a "scheme comparison" function, displaying key indicators (load rate of the most vulnerable line, total cost) for 2-3 different security levels side by side.

[0103] After traders clearly understand the economic cost of improving security by one unit, they can make a comprehensive judgment. Finally, the system will officially output the corresponding trading plan (including unit output plan and node power purchase plan) and allow it to be published to the trading system with one click.

[0104] This application achieves deep perception of power grid safety status through heat maps and key information lists, and creates a new decision-making model through interactive safety boundary sliders and near real-time recalculation technology. It transforms traders from passive recipients to active explorers, quantifying, visualizing, and real-time the trade-off between safety and economy, greatly improving the scientific nature of decision-making and the efficiency of human-machine collaboration. This goes far beyond simple "results display" and represents an innovative interactive method for assisting decision-making.

[0105] Example 2 Building upon Example 1, this example uses a classic 3-node power system to demonstrate the complete technical process of this invention, from data input to result display. The system topology is as follows: Figure 3 As shown, it includes one balancing machine (node ​​1, V=1.05∠0°), one adjustable unit (node ​​2, PV node, V=1.02), and one load node (node ​​3, PQ node, load 200MW).

[0106] The line parameters are as follows: Line 1-2 impedance Z=0.01+j0.1, power limit 100MVA; Line 1-3 impedance Z=0.02+j0.2, power limit 100MVA; Line 2-3 impedance Z=0.03+j0.3, power limit 80MVA; the base power is 100MVA, and a DC power flow model is adopted.

[0107] Data Acquisition: The basic parameters of the power grid are initialized through the InitGridData function. The generator cost coefficient is [30, 25, 0.01]. The predicted marginal electricity price at each node is λ2=28USD / MWh and λ3=32USD / MWh. The real-time market trading window is 5 minutes.

[0108] This embodiment constructs a model with the objective of minimizing the total electricity purchase cost, and the objective function is expressed as follows: .

[0109] Based on the LODF calculated using the EstimateN1Contingency function, the estimated power of line 1-3 after the disconnection of line 1-2 is 85.3MW, which exceeds the 80MW limit, and is therefore classified as a critical scenario.

[0110] Four computing cores were initialized using the Spark parallel architecture, and scenario verification was performed in parallel, resulting in a load rate of 92% for lines 2-3.

[0111] Final reference Figure 4 The interface heatmap shows that line 2-3 is in a red warning state, marked "92% after N-1". Dragging the safety boundary slider to the 85% safety level, the system provides real-time feedback that the total cost has increased by 3.5%. After comprehensive judgment, the trading personnel confirm the plan and publish it to the trading system with one click.

[0112] This embodiment improves computational efficiency by 62% and optimizes economic efficiency by approximately 4% while ensuring 100% N-1 safety.

[0113] Example 3 Based on Example 1, this example uses a provincial power grid as a background to demonstrate the application of the present invention in the day-ahead market unit combination (UC) problem, focusing on solving a large-scale integer programming problem considering network security constraints.

[0114] System Overview: This embodiment targets a 220-node provincial power grid, including 180 transmission lines and 45 generator sets. The optimization cycle is 24 hours (96 15-minute time periods). Traditional unit combinations suffer from significant rework due to neglecting network constraints.

[0115] The objective function is to minimize the total electricity purchase cost, which includes unit start-up cost, variable operating cost, and wind and solar curtailment cost. The objective function is expressed as: ; in, This represents the start / stop status of unit i during time period t (a 0 / 1 variable). This represents the active power output of unit i during time period t. This represents the startup cost of unit i. This represents the variable operating cost of unit i. Let be the cost of wind and solar power curtailment during time period t. This can be further expanded as follows: ,in It is a collection of renewable energy sources. This refers to the power that is discarded. The constraint system uses a DC power flow model to simplify the calculation.

[0116] The renewable energy set refers to the index set of all renewable energy generation units automatically selected through grid model parameters and unit type identifiers (such as 'wind power', 'photovoltaic') in transaction data. It is used to characterize their collective behavior in the optimization model, such as calculating the total curtailment cost. Based on the base-state load factor and LODF sensitivity, key indicators were constructed, with a threshold of 0.7. From 180 N-1 scenarios, 28 key scenarios were selected. The distribution of the N-1 scenario selection results is as follows: Figure 5 As shown. (Refer to...) Figure 6In this embodiment, the Benders decomposition framework is used to achieve parallel solution. The main problem solves the traditional UC problem, and the sub-problems verify the feasibility of the ground state and the critical N-1 scenario.

[0117] Table 1 shows a comparison of the security of this application with that of traditional UC, and the economic analysis is as follows. Figure 7 As shown in Table 2, the computational efficiency comparison is shown in Table 3, and the safety margin visualization is shown in Table 4. Figure 8 As shown.

[0118] Table 1. Comparison of Security between this Application and Traditional UC

[0119] Table 2 Comparison of computational efficiency between this application and traditional UC.

[0120] After implementing this application, the most severe load factor of the power grid decreased from 118% to 89%, eliminating the N-1 safety hazard; compared with the traditional ex post correction method, the total cost was reduced by 5.6%, and the safety cost was reduced by 57%; the solution time was reduced from 45 minutes to 10 minutes, meeting the needs of day-ahead market decision-making.

[0121] The above description is merely an optional embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made using the content of the present invention under the concept of the present invention, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.

Claims

1. An on-line decision making method for electricity trading considering N-1 security constraints and power flow calculation, characterized in that, Comprising the following steps: S1, data acquisition and preprocessing, acquiring real-time operation state of power grid, transaction data, power grid model parameters and equipment operation limit data; S2, based on the acquired data, an optimization model is established with the goal of maximizing the total social welfare or minimizing the total power purchase cost, the optimization model includes base state operation constraints and N-1 safety constraints; S3, efficient solution of the model based on constraint screening and parallel computing; S4, generating safety boundary visualization and decision suggestions. 2.The online auxiliary decision-making method for electricity transaction considering N-1 security constraint and power flow calculation according to claim 1, characterized in that, In the S2, if the goal is to maximize the total social welfare, the objective function expression is: ; wherein, Pij is the active load of load j under normal operating conditions, Pi is the active output of generator i under normal operating conditions, Bj is the benefit function of load j, Ci is the bid cost function of generator i, and G and L are the sets of generators and loads, respectively. 3.The on-line auxiliary decision method of electric power transaction considering N-1 security constraint and power flow calculation according to claim 1, characterized in that, In the S2, if the goal is to minimize the total power purchase cost, the objective function expression is: ; wherein, is a set of generators, is the active power output of generator i under normal operating conditions, is the offered cost function of generator i. 4.The online auxiliary decision-making method for electricity transaction considering N-1 security constraint and power flow calculation according to claim 1, characterized in that, In the S2, the base state operation constraints are for the current power grid normal topology, including node power balance constraints and equipment operation limit constraints.

5. The method for on-line auxiliary decision of electric power transaction considering N-l security constraints and power flow calculation according to claim 1, characterized in that, The N-1 safety constraints in the S2 include post-fault power flow balance equations, post-fault equipment limit constraints and generator regulation constraints.

6. The method for on-line auxiliary decision of electric power transaction considering N-l security constraints and power flow calculation according to claim 1, characterized in that, S3 includes the following sub-steps: S3-1, using constraint screening technology, based on sensitivity analysis of base state power flow, estimating line power under N-1 fault scenarios, screening key fault scenarios; S3-2, using master-slave architecture as parallel computing framework, for parallel processing. 7.The online auxiliary decision-making method for electricity transaction considering N-1 security constraint and power flow calculation according to claim 6, characterized in that, The S3-1 includes the following sub-steps: S3-1-1, base state power flow calculation, solving the base state optimal power flow without considering N-1 constraints, obtaining a set of initial base state power flow solutions, including node voltage phase angle and line power; S3-1-2, calculating generator output power transfer distribution factor and line outage distribution factor, realizing sensitivity analysis; S3-1-3, based on the base state power flow solution and the sensitivity analysis result, for each expected fault scenario, estimating the power of other lines after fault, from which the key fault scenarios are screened out, and the N-1 constraints of the key fault scenarios are added to the optimization model. 8.The online auxiliary decision-making method for electricity transaction considering N-1 security constraint and power flow calculation according to claim 7, characterized in that, The S3-1-3 sets the estimated value The key fault scenario screening basis is: For each fault scenario, if there is any line satisfying then the fault scenario is considered as a critical scenario, and the complete N-1 constraint is added to the optimization model; otherwise, if the estimated power of all lines in the fault scenario is lower than the limit, the scenario is considered as non-critical, and its constraint can be ignored in the current optimization period. denotes a safety margin factor, denotes the line apparent power upper limit. 9.The online auxiliary decision-making method for electric power transaction considering N-1 security constraint and power flow calculation according to claim 6, characterized in that, The S3-2 includes the following sub-steps: S3-2-1, the master process is used to solve the base state optimal power flow problem and distribute tasks; S3-2-2, the slave process is used for parallel precise power flow calculation and limit check of specified fault scenarios.

10. The method for on-line auxiliary decision of electric power transaction considering N-l security constraints and power flow calculation according to claim 1, characterized in that, In the S4, the line load rate of each line is displayed on the power grid single-line diagram in the form of a heat map, the safety boundary slider is provided for the user to manually adjust the safety margin, the new transaction cost is recalculated and displayed in real time, the decision suggestions are generated and the scheme comparison and execution are supported.