Constraint learning embedded optimization method and system for alternating current security constrained unit commitment

By constructing a mixed-integer nonlinear model and utilizing a neural network to learn AC power flow constraints offline, the linearized model is embedded into the model. Combined with Latin hypercube sampling and the branch-cut method for online solution, the problem of solving the AC safety constraint unit combination problem is solved, thereby improving the accuracy and efficiency of power system dispatching.

CN119647653BActive Publication Date: 2025-10-17HUAZHONG UNIV OF SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411635681.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-10-17
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

In the optimization and dispatching of power systems, existing technologies cannot directly solve the AC safety constraint unit combination problem, and traditional DC power flow models fail to effectively consider the effects of reactive power and voltage, making it difficult to meet the requirements for safe and economical operation of the electricity spot market.

Method used

A mixed-integer nonlinear model is constructed, and the power flow constraints are learned offline through a neural network. After linearization, the model is embedded into the model. The model is then solved online by combining Latin hypercube sampling and the branch-cut method to improve the accuracy and efficiency of the solution.

Benefits of technology

It improves the accuracy and efficiency of solving the AC power flow SCUC problem, meets the power market clearing time requirements, and reduces the nonlinearity of the model and the time required for iterative solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647653B_ABST
    Figure CN119647653B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of power system dispatching, and discloses a constraint learning embedded optimization method and system for alternating current security constrained unit commitment, which comprises the following steps: a mixed integer nonlinear model of an SCUC problem of an alternating current flow is constructed for an optimized power system; input data of the alternating current flow constraint is taken as a sample, and output data of the corresponding alternating current flow constraint is taken as a label to construct a data set; a neural network is trained offline by using the data set to obtain a trained neural network representing the alternating current flow constraint; the neural network representing the alternating current flow constraint is linearized and then embedded into the mixed integer nonlinear model to replace the alternating current flow constraint in the mixed integer nonlinear model; and an optimization algorithm is used to solve the embedded model online to obtain an optimal solution of the security constrained unit commitment problem of the alternating current flow for the optimized power system. The application can improve the solution accuracy and efficiency of the alternating current flow SCUC problem.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of power system dispatching, and more particularly relates to a constraint learning embedded optimization method and system for alternating current security constrained unit commitment. BACKGROUND

[0002] In power system optimization dispatching, unit commitment (UC) refers to determining the start-stop state and output level of each generator set under the conditions of meeting the power system demand and constraints. The optimization objective of UC is to minimize the total system cost, including start-up cost, idle cost and power generation cost; the constraint conditions are mainly divided into unit and system constraints. With the development of the power system, the safety of the power system becomes more and more important, and thus the security constrained unit commitment (SCUC) is developed. SCUC is an extension of UC, which adds consideration of the safety of the power system on the basis of UC, that is, adds security constraints to achieve more comprehensive and reliable power system dispatching.

[0003] At present, SCUC has become the core technology for formulating power generation plans and clearing power spot markets in the power industry. In traditional power systems, the security constraints of SCUC are usually based on direct current (DC) power flow. The direct current power flow linearizes the active power flow constraint on the basis of ignoring reactive power and voltage, to simplify the model construction and solving process. However, this model does not consider the influence of unit start-stop on reactive power and then on voltage, and may not meet the voltage amplitude constraint, so it is often necessary to reserve a large safety margin or conduct post-inspection in actual application, which is difficult to meet the requirements of safe and economic operation of power spot markets. Therefore, it becomes more and more important to study the SCUC problem considering alternating current (AC) power flow.

[0004] The alternating current security constrained unit commitment problem has the characteristics of large scale, discreteness and strong nonlinearity, and is difficult to solve directly. One method of considering alternating current power flow is to approximate the original alternating current power flow constraint by piecewise linear function, thereby simplifying the model; however, piecewise linearization has errors, and it is difficult to determine the appropriate number of segments. In addition, the alternating current constraint can also be considered by the iterative method of SCUC and security check; however, due to the possible large number of iterations, each time solving SCUC takes a long time, which leads to the whole process may be difficult to meet the requirements of power market clearing time. SUMMARY

[0005] In view of the above defects or improvement needs of the prior art, the present application provides a constraint learning embedded optimization method and system for alternating current security constrained unit commitment, which aims to improve the solution accuracy and efficiency of the alternating current power flow SCUC problem.

[0006] To achieve the above-mentioned purpose, according to the first aspect of the present application, a constraint learning embedded optimization method for alternating current security constrained unit commitment is provided, comprising:

[0007] Constructing a mixed integer nonlinear model of the security constrained unit commitment problem considering alternating current power flow for the to-be-optimized power system;

[0008] Taking the input data of the alternating current power flow constraint as samples and the output data of the corresponding alternating current power flow constraint as labels, a data set is constructed; wherein the input data includes the amplitude and phase angle of the voltage at each branch bb' of the to-be-optimized power system, and the output data is the corresponding branch power;

[0009] Training a neural network offline using the data set to obtain a trained neural network representing the alternating current power flow constraint; and linearizing the neural network representing the alternating current power flow constraint, and then embedding it into the mixed integer nonlinear model to replace the alternating current power flow constraint in the mixed integer nonlinear model;

[0010] Solving the embedded model online using an optimization algorithm to obtain the optimal solution of the security constrained unit commitment problem considering alternating current power flow for the to-be-optimized power system.

[0011] Further, the input data of the alternating current power flow constraint is obtained by sampling the input variables of the alternating current power flow constraint, or based on the historical operation data of the to-be-optimized power system; wherein the input variables include the amplitude v b , v b' and phase angle θ b , θ b' of the voltage at both ends of the branch bb' of the to-be-optimized power system;

[0012] The output data is calculated by substituting the input data into the alternating current power flow constraint formula; the output data includes the active power and reactive power on the branch bb'.

[0013] Further, the input variables of the alternating current power flow constraint are sampled using Latin hypercube sampling to obtain the input data, specifically including:

[0014] Divide the sampling range of each dimension of the sample space into n equal intervals; wherein the sample space includes the amplitude v b , v b' and phase angle θ b , θb' each dimension is a corresponding dimension upper and lower limit interval; n is a preset total number of samples;

[0015] Randomly shuffle the n equal intervals of each dimension, and randomly sample a data point in any equal interval of each dimension. The data points sampled in any equal interval of the four dimensions form a sample, which is used as the current input data.

[0016] Further, the neural network includes an input layer, an output layer, and a hidden layer between the input layer and the output layer;

[0017] The input layer includes four neurons to adapt to the input four-dimensional sample;

[0018] The hidden layer is used to perform nonlinear transformation on the input sample and input the transformed sample to the output layer;

[0019] The output layer includes two neurons for outputting the predicted branch active and reactive power;

[0020] When the neural network is trained offline, the error between the branch power predicted by the output layer and the corresponding label is minimized, and the network weight of the neural network is adjusted in reverse until the error is less than a preset threshold. If the prediction accuracy of the neural network does not reach the preset accuracy at this time, the hyperparameters of the neural network are adjusted until the preset accuracy is reached, the training is completed, and the trained neural network representing the alternating current power flow constraint is obtained.

[0021] Further, the linearization of the neural network representing the alternating current power flow constraint includes:

[0022] The activation function of the neural network is linearized, and the input and output of each layer of the neural network are represented using linear transformation to obtain the linearized neural network.

[0023] Further, the objective function of the mixed integer nonlinear model is to minimize the total cost of the power system to be optimized, including startup cost, no-load cost and power generation cost;

[0024] The constraints of the mixed integer nonlinear model include unit constraints, node constraints, and safety constraints including alternating current power flow constraints of the power system to be optimized;

[0025] The embedded model is solved online using a branch-cut method to obtain the optimal solution of the security constrained unit commitment problem of the power system to be optimized considering alternating current power flow.

[0026] According to the second aspect of the present application, an alternating current security constrained unit commitment constraint learning embedded optimization system is provided, comprising:

[0027] a mixed integer nonlinear model construction module configured to construct a mixed integer nonlinear model of a security constrained unit commitment problem of the power system to be optimized considering alternating current power flow;

[0028] a data set construction module configured to construct a data set by taking input data of the alternating current power flow constraint as samples and taking corresponding output data of the alternating current power flow constraint as labels, wherein the input data comprises magnitudes and phase angles of voltages at both ends of each branch of the power system to be optimized, and the output data comprises corresponding branch power;

[0029] an offline training module configured to train a neural network offline using the data set to obtain a trained neural network representing the alternating current power flow constraint;

[0030] an embedded model construction module configured to linearize the neural network representing the alternating current power flow constraint and embed the linearized neural network into the mixed integer nonlinear model to replace the alternating current power flow constraint in the mixed integer nonlinear model;

[0031] an online solution module configured to solve the embedded model online using an optimization algorithm to obtain an optimal solution of the security constrained unit commitment problem of the power system to be optimized considering the alternating current power flow.

[0032] According to a third aspect of the present application, an electronic device is provided, comprising a computer readable storage medium and a processor;

[0033] The computer readable storage medium is configured to store executable instructions;

[0034] The processor is configured to read the executable instructions stored in the computer readable storage medium to execute the constraint learning and embedding optimization method according to any one of the first aspect.

[0035] According to a fourth aspect of the present application, a computer readable storage medium is provided, which stores a computer program, and the program is executed by a processor to implement the constraint learning and embedding optimization method according to any one of the first aspect.

[0036] According to a fifth aspect of the present application, a computer program product is provided, which comprises a computer program, and when the computer program is executed on a computer, the computer program causes the computer to execute the constraint learning and embedding optimization method according to any one of the first aspect.

[0037] In general, the above technical solutions conceived by the present application can achieve the following beneficial effects:

[0038] (1) The application provides a new idea for solving an alternating current power flow SCUC problem model, and combines machine learning and mathematical optimization to solve the alternating current power flow SCUC problem. Specifically, the constraint learning embedded optimization method framework of the alternating current security constrained unit commitment is used, input and output data at different times are used to construct a data set, a neural network is used to learn the nonlinear alternating current power flow constraint in the alternating current power flow SCUC problem offline, and since the neural network directly learns the nonlinear mapping relationship between the alternating current power flow constraint input and output, the constraint (the neural network for representing the linearized alternating current power flow constraint) obtained after linearization is closer to the original alternating current power flow constraint, that is, the constraint obtained by the application has higher precision, and after the constraint is embedded into the alternating current power flow SCUC problem model and replaces the original alternating current power flow constraint, the solving precision of the model is improved. In the application, the strong nonlinear constraint is converted into a linear constraint by learning the alternating current power flow constraint offline and replacing the original alternating current power flow constraint, the online solving difficulty of the alternating current power flow SCUC problem is reduced, and the time-consuming problem of multiple iterations for considering the alternating current constraint by using an iterative method is eliminated, and the solving efficiency is improved.

[0039] (2) As a preferred, the input data in the application is four-dimensional multi-parameter sample space containing the amplitude v b , v b' and phase angle θ b , θ b' of the node voltage at both ends of the system branch bb', therefore, the Latin hypercube sampling is used to sample the alternating current power flow constraint to obtain the input data of the alternating current power flow constraint, which is more suitable for the sampling demand of multi-dimensional parameter space, can effectively avoid the problem of uneven coverage in random sampling, and improves the efficiency and coverage rate of sampling. In the process, the sample space of each dimension is divided into n equal intervals, so that there is a sample point in each interval of each dimension; and the n equal intervals of each dimension are randomly shuffled, the correlation between samples is avoided, the sample independence is ensured, and uniform coverage is achieved on all dimensions, so that even a small number of samples can effectively cover the entire parameter space.

[0040] (3) As a preferred, after the strong nonlinear alternating current power flow constraint in the original mixed integer nonlinear model is replaced by the linearized neural network, the nonlinearity of the model is greatly reduced, and the branch-cut method is used to solve the SCUC model after the constraint representation is embedded, and the solving efficiency of the model is further improved. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 The constraint learning embedded optimization method schematic diagram for the alternating current power flow unit commitment problem provided by the embodiment of the application.

[0042] Figure 2 An alternating current power flow unit combination model schematic diagram provided by the embodiment of the present application;

[0043] Figure 3 A neural network model schematic diagram provided by the embodiment of the present application;

[0044] Figure 4 A prediction result schematic diagram of active power flow output by the neural network.

[0045] Figure 5 A prediction result schematic diagram of reactive power flow output by the neural network.

[0046] Figure 6 A flowchart of one specific example of off-line learning and on-line solving of the alternating current power flow unit combination problem based on the method provided by the embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0048] Embodiment 1

[0049] As shown in the figure, the embodiment of the present application provides a constraint learning embedded optimization method for alternating current security constrained unit combination, which comprises: Figure 1

[0050] S1, a mixed integer nonlinear model of the security constrained unit combination problem considering alternating current power flow of the to-be-optimized power system is constructed;

[0051] S2, the input data of the alternating current power flow constraint is taken as a sample, and the output data corresponding to the alternating current power flow constraint is taken as a label to construct a data set; wherein the input data includes the amplitude and phase angle of the voltage at both ends of each branch of the to-be-optimized power system, and the output data is the corresponding branch power; in the embodiment of the present application, one sample in the data set is the amplitude and phase angle of the voltage at both ends of each branch of the current to-be-optimized power system, which is brought into the alternating current power flow constraint calculation, and the corresponding output data is taken as the corresponding label.

[0052] S3, the neural network is trained off-line by using the above data set to obtain a trained neural network representing the alternating current power flow constraint;

[0053] ​S4, linearize the neural network characterizing the alternating current power flow constraint, embed the linearized neural network into the mixed integer nonlinear model to replace the alternating current power flow constraint in the mixed integer nonlinear model, and solve the embedded model online using an optimization algorithm to obtain an optimal solution of the security constrained unit commitment problem of the power system to be optimized considering the alternating current power flow.

[0054] As shown in Figure 2 , as a preferred implementation, in S1, the objective of the constructed mixed integer nonlinear model of the security constrained unit commitment problem considering the alternating current power flow is to minimize the total cost of the system, including three parts of start-up cost, no-load cost and power generation cost, which can be represented as:

[0055]

[0056] Wherein, T represents a set of operation time of the power system to be optimized, t represents a time index, G represents a set of units in the power system to be optimized, and g represents an index of the unit; 0-1 variable u g (t) represents the start-up operation of the unit g at time t, and "1" represents that the unit is started, otherwise "0"; 0-1 variable x g (t) represents the start-stop state of the unit g at time t, and "1" represents the start state, and "0" represents the stop state; S g represents the start-up cost of the unit g, represents the no-load cost of the unit g, and C g represents the power generation cost function (piecewise linear non-decreasing) of the unit g, p g (t) represents the active power generation level of the unit g at time t.

[0057] Further, the constraints of the model include unit constraints, node constraints and security constraints including alternating current power flow constraints.

[0058] Specifically, the unit constraint is a constraint generated due to the limitation of the characteristics of the unit itself. For example, the unit output constraint means that the output of the unit must be within a certain range when the unit is started, which can be represented as:

[0059]

[0060]

[0061] Wherein, formula (2) represents the active power generation level range constraint of the unit, represents the minimum active power generation level of the unit g, represents the maximum active power generation level of the unit g; formula (3) represents the reactive power generation level range constraint of the unit, q g (t) represents the reactive power generation level of the unit g at time t, a minimum reactive power generation level of the unit g, a maximum reactive power generation level of the unit g.

[0062] The unit startup constraint can be represented as:

[0063]

[0064] The unit ramping / sliding constraint is a constraint caused by the unit output increase and decrease limit, which can be represented as:

[0065]

[0066] wherein, Δ g represents the ramping rate of the unit g.

[0067] The minimum continuous start-stop time constraint is a time constraint that the unit needs to keep the start-up (or shut-down) state for a period of time after starting up (or shutting down) before it can be shut down (or started up), which can be represented as:

[0068]

[0069]

[0070] wherein, formula (6) represents the minimum continuous start-up time constraint of the unit, t' represents the index of the time period, represents the minimum start-up time of the unit g; formula (7) represents the minimum continuous shut-down time constraint of the unit, represents the minimum shut-down time of the unit g.

[0071] The node constraint is a constraint caused by the circuit node characteristic limit of the power system to be optimized. For example, the node voltage and phase angle range constraints can be represented as:

[0072]

[0073]

[0074] wherein, formula (8) represents the node voltage amplitude range constraint in the power system to be optimized, B represents the set of nodes, b represents the index of the node, v b (t) represents the voltage amplitude of node b at time t, represents the minimum voltage amplitude allowed by node b, represents the maximum voltage amplitude allowed by node b; formula (9) represents the node phase angle range constraint, θ b (t) represents the phase angle of node b at time t, represents the minimum phase angle allowed by node b, represents the maximum phase angle allowed by node b. By limiting the node voltage and phase angle range, it is ensured that the node is operating in a safe state.

[0075] The node power balance constraint is the sum of the unit outputs at each node b at each time t minus the net load equal to the net outflow power flow, which can be expressed as:

[0076]

[0077]

[0078] wherein formula (10) represents the node active power balance constraint, G b represents the set of units located at node b, D b represents the set of loads located at node b, d represents the index of the load, B b represents the set of other nodes connected to node b, P d represents the active net load level of load d at time t, p bb' represents the active power on branch bb'; formula (11) represents the node reactive power balance constraint, Q d represents the reactive net load level of load d at time t, q bb' represents the reactive power on branch bb'.

[0079] The security constraint is a constraint that takes into account the circuit security of the power system to be optimized. In the embodiments of the present application, the security constraint is the branch alternating current power flow constraint, which can be expressed as:

[0080]

[0081]

[0082]

[0083] wherein formula (12) represents the branch active power flow constraint, G bb , B bb , G bb' , B bb' respectively represent the parameters of the given admittance matrix of node b in the power system to be optimized; formula (13) represents the branch reactive power flow constraint; formula (14) represents the branch apparent power range constraint, represents the maximum apparent power of branch bb'. By limiting the branch power flow in the system, it is ensured that the branch is operating in a safe state.

[0084] Based on the above formula (1) - formula (14), the alternating current safety constraint unit combination problem can be represented as a mixed integer nonlinear programming model. The model has both 0-1 variables, such as unit start-stop state, and continuous variables, such as node voltage. Because the alternating current flow constraints (12) and (13) in the model contain sin and cos functions, it has strong nonlinearity. The model cannot be directly solved using commercial mixed integer optimization solvers (such as Gurobi or COPT) or nonlinear solvers (such as Ipopt).

[0085] The input data of the power system to be optimized is imported into the mixed integer nonlinear model constructed above, and the mixed integer nonlinear model of the safety constraint unit combination problem considering the alternating current flow of the power system to be optimized is obtained. The input data of the power system to be optimized includes:

[0086] The admittance matrix parameters (G bb , B bb , G bb' , B bb' ) of the nodes in the power system to be optimized, the range limit parameters of the input variables , etc.), the generation cost parameters (S g , C g ) of the unit g, and the net load (P d , Q d ) of the power system to be solved.

[0087] In S2, the input data of the alternating current flow constraint can be obtained by sampling the alternating current flow constraint of the IEEE standard example (such as IEEE 9 node, IEEE 24 node and IEEE 118 node example, etc.); or based on the collected actual example historical operation data (such as a certain province network actual historical operation data).

[0088] As a preferred implementation manner, in the embodiment of the application, the Latin hypercube sampling is used to sample the alternating current flow constraint to obtain the input data of the alternating current flow constraint, and the corresponding input data is substituted into the alternating current flow constraint to obtain the corresponding output data. The Latin hypercube sampling is an improved sampling method, which aims to improve the efficiency and coverage rate of sampling, and is more suitable for the sampling demand of multi-dimensional parameter space, and can effectively avoid the problem of uneven coverage in random sampling. The core idea of Latin hypercube sampling is to divide the sample space of each dimension into multiple equal intervals, ensure that there is a sample point in each interval of each dimension, and the sampling points in each dimension are independent of each other, so that uniform coverage is achieved in all dimensions, ensuring that even a small number of samples can effectively cover the entire parameter space. In the embodiment of the application, the basic steps of Latin hypercube sampling in multi-dimensional parameter space include:

[0089] 1) Determine the dimension and number of samples needed for extraction. Because the alternating current flow constraints (12) and (13) are equations, learning the mapping of its input to output can be achieved by a regression task, so the input variables of the flow constraints, i.e. the amplitude v b , v b' and the phase angle θ b , θ b' of the node voltage at both ends of the branch bb' are sampled, and the sample space is a four-dimensional multi-parameter space. The sampling range of the voltage amplitude is between its upper and lower limits, i.e. The sampling range of the phase angle is between its upper and lower limits, i.e.

[0090] 2) Let the number of samples be n (e.g. 50000). For each dimension of the sample space, divide the sampling range of each dimension (voltage amplitude or phase angle) into n equal intervals.

[0091] 3) For each dimension of the sample space (such as the amplitude v b of the voltage), randomly shuffle the n equal intervals of each dimension to avoid correlation between samples and ensure sample independence.

[0092] 4) In any equal interval of each dimension, a data point is selected by random sampling, and the data points sampled in any equal interval of the four dimensions constitute a sample as the current input data.

[0093] 5) Substitute the current input data, i.e. the amplitude v b , v b' and the phase angle θ b , θ b' of the sampled set of node voltages into the flow constraints to obtain the corresponding output true value, i.e. the active power p bb' on the branch bb' and the reactive power q bb' on the branch bb'. Because the branch power is divided into active power and reactive power, i.e. the output is two-dimensional. The active power and reactive power are the labels corresponding to the current sample.

[0094] 6) Each four-dimensional sample and the corresponding two-dimensional label constitute a six-dimensional data, and multiple six-dimensional data constitute a data set for offline training of the neural network.

[0095] Specifically, a neural network is a computational model that simulates the working mechanism of human brain neurons and has a wide range of applications in the field of machine learning. The neural network model is composed of multiple simple processing units (called neurons), which are connected to each other through weights, forming a network structure that can perform complex data processing. Neural networks can automatically extract features and learn patterns from input data, making them particularly suitable for handling nonlinear problems. For example,Figure 3 As shown, the neural network in the embodiment of the present application includes:

[0096] 1) Input layer: The input layer is responsible for receiving input data, and each neuron usually represents each dimension of the input data. In the embodiment of the present application, the input data of the neural network is four-dimensional, so the input layer is set to four neurons.

[0097] 2) Hidden layer: The neural network can have one or more hidden layers. In the embodiment of the present application, the hidden layer of the neural network is set to two layers. The hidden layer is between the input layer and the output layer and is responsible for processing and feature extraction of the data. The neurons of each hidden layer are connected to the neurons of the previous layer through weights. Through an activation function, the hidden layer converts the input data into new feature representation. The activation function determines the output form of each neuron, which converts the linearly transformed input into a nonlinear output. In the embodiment of the present application, the activation function of the neural network is set to the ReLU function, which can be represented as:

[0098] y = max(0, f) (15)

[0099] where y represents the output value, the function max represents the maximum value function, and f represents the linear transformation of the current neuron. The output value of the ReLU function is 0 or the input value of a positive number, which is suitable for complex multi-layer neural networks.

[0100] 3) Output layer: The output layer is responsible for outputting the final prediction result. In the classification task, each neuron of the output layer corresponds to a class; in the regression task, each neuron of the output layer represents the predicted value for each dimension of the output variable. In the embodiment of the present application, the neural network is for the regression task, and the output is two-dimensional, so the output layer is set to two neurons, and the outputs are the active power and the reactive power corresponding to the input data, respectively.

[0101] After setting the parameters of the neural network and inputting the data set obtained by sampling into the neural network for learning, the learning process of the neural network includes:

[0102] 1) The input data starts from the input layer, is passed forward layer by layer, is processed by the hidden layer, and reaches the output layer.

[0103] 2) Each neuron receives the input transmitted by the previous layer of neurons and performs nonlinear transformation on the input through an activation function.

[0104] 3) The output layer outputs the prediction result.

[0105] 4) A loss function is used to measure the size of the error between the prediction result of the neural network and the true value (label).

[0106] 5) Calculate the gradient of the loss function with respect to each weight, adjust the weights in the network layer by layer, so that the neural network can reduce the error in the next prediction.

[0107] 6) Repeat the above process until the error is less than the threshold, and the learning is completed.

[0108] After learning is completed, the mapping relationship of node voltage v b , v b' , phase angle θ b , θ b' and branch power p bb' , q bb' is obtained, and the purpose of extracting alternating current flow characteristics is achieved.

[0109] Analyze the prediction results of the neural network: specifically, accuracy analysis and the like can be used to judge the learning effect. For example, the active power and reactive power of a branch are shown in Figure 4 and Figure 5 . If the learning effect is not ideal, the learning effect can be improved by adjusting the neural network structure (such as the number of hidden layers, the number of neurons in each hidden layer, etc.) or other hyperparameters (such as learning rate, batch sample size, loss function, momentum parameter, etc.) and retraining, and finally obtaining a trained neural network representing alternating current flow constraints.

[0110] As a preferred implementation, in S4, based on the trained neural network representing alternating current flow constraints, a SCUC mixed integer linear programming model embedded with representation constraints is constructed, specifically including:

[0111] The trained neural network representing alternating current flow constraints is represented as a mixed integer linear representation constraint. Specifically, the nonlinearity of the neural network mainly comes from its nonlinear activation function. Taking the ReLU activation function as an example, ReLU is essentially a max function, and the max function can be linearized by the big M method, and the linearized model can be represented as:

[0112] y≥f, (16)

[0113] y≤f-M - [f]·(1-z), (17)

[0114] y≤M + [f]·z, (18)

[0115] z∈{0,1}.(19)

[0116] Where M - is the lower bound of the function f, M + is the upper bound of the function f, and the 0-1 variable z is an auxiliary variable.

[0117] Further, the ReLU function (activation function) in the neural network is replaced by its linearized representation, and the input and output of each layer in the neural network is represented using a linear transformation, obtaining a linearized neural network, i.e., a mixed-integer linear representation constraint.

[0118] Further, the representation constraint is embedded into the original mixed-integer nonlinear model in S1, replacing the alternating current power flow constraints (12) and (13) in the original mixed-integer nonlinear model, while keeping the objective and other constraints of the model unchanged, obtaining a SCUC mixed-integer linear programming model embedded with the representation constraint.

[0119] As a preferred implementation, the branch-and-cut method is used in the embodiment of the application to solve the SCUC mixed-integer linear programming model embedded with the representation constraint online.

[0120] Specifically, after the linearized neural network model is used to replace the alternating current power flow constraint in the model, the model can be solved directly by solving the mixed-integer programming model. The basic idea of the branch-and-cut method is as follows: first, try to solve the linear relaxation of the original problem, then check whether the obtained solution meets the integer requirement; if not, use the cutting plane method to find a cut to clip the linear relaxation, if a cut can be found, continue to try to solve the linear relaxation, otherwise, branch the variables. Repeat the process until an integer solution that meets all the constraints is found.

[0121] Further, the branch-and-cut method (such as calling commercial optimization solvers Gurobi or COPT) is used online to solve the SCUC model embedded with the representation constraint; wherein the input of the model includes the admittance matrix parameters (G bb , B bb , G bb' , B bb' ) of the nodes, the range limit parameters of the input variables g , C g , and the net load (P d , Q d ) of the power system to be solved. The final output (the optimal solution of the alternating current power flow considering security constraint unit commitment problem of the power system to be optimized) includes the generation level of the unit g (P g , Q g ), the branch power (p bb' , q bb' ), the decision variables of the unit g (u g , x g ), and the node voltage and phase angle (v b , vb' , θ b , θ b' ), wherein, for the entire model of the alternating current flow SCUC problem, the node voltage and the phase angle are outputs.

[0122] Based on the above steps, the example process of learning off-line and solving on-line the alternating current flow unit commitment problem based on the method provided in the embodiment of the application is as shown in FIG. 2. Figure 5

[0123] The embodiment of the application proposes a constraint learning embedded optimization algorithm framework, which reduces the difficulty of on-line solving of the problem by learning off-line the alternating current flow constraint and replacing the original flow constraint. In the off-line training phase, based on the node voltage and the phase angle and other data, the off-line training data set is constructed by sampling or historical operation data. The alternating current flow constraint features are extracted and summarized by using the constructed data set, the features of the alternating current flow constraint are extracted by off-line training, and the representation constraint of the alternating current flow constraint (the linearized representation neural network of the alternating current flow constraint) is obtained. Then, in the on-line solving phase, the representation constraint is embedded into the unit commitment problem to approximate the feasible region of the original problem, and the nonlinearity of the model is reduced to accelerate the solving of the problem.

[0124] Embodiment 2

[0125] The embodiment of the application provides a constraint learning embedded optimization system for alternating current security constrained unit commitment, comprising:

[0126] A mixed integer nonlinear model construction module is configured to construct a mixed integer nonlinear model of a security constrained unit commitment problem of a power system to be optimized considering alternating current flow.

[0127] A data set construction module is configured to construct a data set by taking input data of the alternating current flow constraint as samples and taking output data of the corresponding alternating current flow constraint as labels, wherein the input data includes the amplitude and phase angle of the node voltage at both ends of each branch of the power system to be optimized, and the output data is the corresponding branch power.

[0128] An off-line training module is configured to train a neural network off-line by using the data set to obtain a trained neural network representing the alternating current flow constraint.

[0129] An embedded model construction module is configured to linearize the neural network representing the alternating current flow constraint and then embed it into the mixed integer nonlinear model to replace the alternating current flow constraint in the mixed integer nonlinear model.

[0130] An on-line solving module is configured to solve the embedded model on-line by using an optimization algorithm to obtain an optimal solution to the security constrained unit commitment problem of the power system to be optimized considering the alternating current flow.

[0131] ​The specific implementation of each module is described in the corresponding steps of the method in Embodiment 1 above, and will not be repeated here.

[0132] Embodiment 3

[0133] The embodiment of the present application provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method in Embodiment 1 above when executing the computer program.

[0134] The electronic device can be a desktop computer, a notebook computer, a palm computer, a cloud server and the like. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The memory can be used to store computer programs and / or modules, and the processor can execute the computer programs and / or modules stored in the memory, and call data stored in the memory, to realize various functions of the electronic device.

[0135] The related technical solutions are the same as above, and will not be repeated here.

[0136] Embodiment 4

[0137] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the method in Embodiment 1 above.

[0138] Specifically, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory devices.

[0139] The related technical solutions are the same as above, and will not be repeated here.

[0140] Embodiment 5

[0141] The embodiment of the application provides a computer program product, comprising a computer program, when the computer program runs on a computer, the computer program causes the computer to execute the steps of the method in the above-mentioned embodiment 1.

[0142] The related technical solutions are the same as above, and will not be repeated here.

[0143] Those skilled in the art can easily understand that the above description is only the preferred embodiment of the present application, and is not intended to limit the present application, and any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A constraint learning embedded optimization method for AC safety constraint unit commitment, characterized by: include: Construct a mixed integer nonlinear model for the power system to be optimized, considering the safety constraints of the AC power flow and the unit commitment problem; A dataset is constructed using the input data of AC power flow constraints as samples and the output data of the corresponding AC power flow constraints as labels; wherein the input data includes the amplitude and phase angle of the node voltage at both ends of each branch of the power system to be optimized, and the output data is the corresponding branch power; Offline training of a neural network using the data set to obtain a trained neural network representing the AC power flow constraint; linearizing the neural network representing the AC power flow constraint and then embedding the neural network into the mixed integer nonlinear model to replace the AC power flow constraint in the mixed integer nonlinear model; An optimization algorithm is used to solve the embedded model online to obtain the optimal solution to the safety-constrained unit commitment problem of the power system to be optimized, taking into account the AC power flow. The neural network includes an input layer, an output layer, and a hidden layer located between the input layer and the output layer; the input layer includes four neurons to adapt to the input four-dimensional samples; the hidden layer is used to perform nonlinear transformation on the input samples and then input them into the output layer; the output layer includes two neurons to output the predicted branch active and reactive power; When the neural network is trained offline, the network weights of the neural network are reversely adjusted with the goal of minimizing the error between the branch power predicted by the output layer and the corresponding label until the error is less than a preset threshold; if the prediction accuracy of the neural network does not reach the preset accuracy at this time, the hyperparameters of the neural network are adjusted until the preset accuracy is reached, and the training is completed to obtain the trained neural network that represents the AC power flow constraint.

2. The constraint learning embedded optimization method according to claim 1, characterized in that: The input data of the AC power flow constraint is obtained by sampling the input variables of the AC power flow constraint, or is obtained based on the historical operation data of the power system to be optimized; wherein, the input variables include the branches of the power system to be optimized The magnitude of the voltage at the two nodes 、 and phase angle 、 ; The output data is calculated by substituting the input data into the AC power flow constraint formula; the output data includes branch The active power and reactive power on the .

3. The constraint learning embedded optimization method according to claim 2, characterized in that: The input variables of the AC power flow constraint are sampled using Latin hypercube sampling to obtain the input data, specifically including: Divide the sampling range of each dimension of the sample space into n equally divided intervals; wherein the sample space includes branches The magnitude of the voltage at the two nodes 、 and phase angle 、 The sampling range of each dimension is the upper and lower limit interval of the corresponding dimension; n is the preset total number of samples; Each dimension n The equally divided intervals are randomly shuffled, and a data point is randomly sampled in any equally divided interval of each dimension. The data points sampled in any equally divided interval of the four dimensions constitute a sample as the current input data.

4. The constraint learning embedded optimization method according to claim 1, characterized in that: Linearizing the neural network representing the AC power flow constraint includes: Linearize the activation function of the neural network, and represent the input and output of each layer of the neural network using linear transformation to obtain the linearized neural network.

5. The constraint learning embedded optimization method according to claim 1, characterized in that: The objective function of the mixed integer nonlinear model is to minimize the total cost of the power system to be optimized, including startup cost, no-load cost and power generation cost; The constraints of the mixed integer nonlinear model include: unit constraints, node constraints, and security constraints including AC power flow constraints of the power system to be optimized; The embedded model is solved online using the branch-and-cut method to obtain the optimal solution to the security-constrained unit commitment problem of the power system to be optimized, considering AC power flow.

6. A constraint learning embedded optimization system for AC safety constraint unit commitment, characterized by: include: A mixed-integer nonlinear model building module is used to construct a mixed-integer nonlinear model of the power system to be optimized considering the safety-constrained unit commitment problem of AC power flow; a data set construction module, configured to construct a data set using input data of AC power flow constraints as samples and output data of corresponding AC power flow constraints as labels; wherein the input data includes the amplitude and phase angle of the voltage at both ends of each branch of the power system to be optimized, and the output data is the corresponding branch power; An offline training module is used to use the data set to train a neural network offline to obtain a trained neural network that represents the AC power flow constraint; wherein the neural network includes an input layer, an output layer, and a hidden layer located between the input layer and the output layer; the input layer includes four neurons to adapt to the input four-dimensional sample; the hidden layer is used to input the input sample into the output layer after performing a nonlinear transformation; the output layer includes two neurons to output the predicted branch active and reactive power; when the neural network is trained offline, the network weights of the neural network are reversely adjusted with the goal of minimizing the error between the branch power predicted by the output layer and the corresponding label until the error is less than a preset threshold; if the prediction accuracy of the neural network does not reach the preset accuracy at this time, the hyperparameters of the neural network are adjusted until the preset accuracy is reached, and the training is completed to obtain the trained neural network that represents the AC power flow constraint; An embedded model construction module is used to linearize the neural network representing the AC power flow constraint and then embed it into the mixed integer nonlinear model to replace the AC power flow constraint in the mixed integer nonlinear model; The online solution module is used to solve the embedded model online using an optimization algorithm to obtain the optimal solution to the safety-constrained unit commitment problem of the power system to be optimized considering the AC power flow.

7. An electronic device, characterized in that: comprising a computer-readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is configured to read the executable instructions stored in the computer-readable storage medium to execute the constraint learning embedded optimization method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the constrained learning embedded optimization method according to any one of claims 1 to 5 is implemented.

9. A computer program product, characterized in that The invention comprises a computer program, which, when running on a computer, enables the computer to execute the constraint learning embedded optimization method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Novel power system power grid recovery method and device based on second-order cone transformation

    CN117878898A

  • Data enhancement state estimation method and system for low observability power distribution network

    CN118336729A