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

By constructing a hybrid integer nonlinear model in power system scheduling, and using neural network to extract and linearize AC current constraints, embedded in the model for online solution, the problem of difficulty in effectively considering AC current constraints in the existing technology is solved, and the solution accuracy and efficiency of power system scheduling are improved.

CN119647653AActive Publication Date: 2025-03-18HUAZHONG UNIV OF SCI & TECH +1

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to effectively consider AC current constraints in power system scheduling, which makes it difficult to meet the voltage amplitude constraints and the safety and economic operation requirements of the spot power market.

Method used

By constructing a hybrid integer nonlinear model, using neural networks for offline learning, extracting the features of the communication trend constraints, and linearizing them into the model, replacing the original communication trend constraints, and then solving them online to improve the solution efficiency and accuracy.

Benefits of technology

It improves the resolution accuracy and efficiency of AC trend SCUC problems, reduces the difficulty of strong nonlinear constraints, avoids the problem of iterative solution time-consuming, and meets the time requirements for clearing out the power market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647653A_ABST
    Figure CN119647653A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power system dispatching, and discloses a constraint learning embedded optimization method and system for an AC security constraint unit committee, and the method comprises the steps: constructing a mixed integer nonlinear model of an AC power flow-considered SCUC problem of a to-be-optimized power system; constructing a data set by taking the input data of the alternating current power flow constraint as a sample and taking the output data of the corresponding alternating current power flow constraint as a label; adopting the data set to train a neural network in an off-line manner to obtain a trained neural network representing the alternating current power flow constraint; linearizing a neural network representing the alternating current power flow constraint, and embedding 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 solving the embedded model on line by adopting an optimization algorithm to obtain an optimal solution of the security constraint unit commitment problem of the to-be-optimized power system considering the alternating current power flow. According to the method, the solving precision and solving efficiency of the AC power flow SCUC problem can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power system dispatching, and more specifically, relates to a constraint learning embedded optimization method and system for AC safety constraint unit combination. Background Art

[0002] In the optimal dispatching of power systems, unit commitment (UC) refers to how to determine the start-stop status and output level of each generator set while meeting the power system demand and constraints. The optimization goal of UC is to minimize the total system cost, including startup cost, no-load cost and power generation cost; the constraints are mainly divided into unit and system constraints. With the development of power systems, the security of power systems has become increasingly important, and thus security-constrained unit commitment (SCUC) has been developed. SCUC is an extension of UC. On the basis of UC, it adds consideration of power system security, that is, it adds security constraints to achieve more comprehensive and reliable power system dispatching.

[0003] At present, SCUC has become the core technology for the power industry to formulate power generation plans and clear the power spot market. In traditional power systems, the safety constraints of SCUC are usually based on direct current (DC) power flow. DC power flow linearizes the active power flow constraints on the basis of ignoring reactive power and voltage to simplify the model construction and solution process. However, this model does not consider the impact of unit start and stop on reactive power and then on voltage, and does not necessarily meet the voltage amplitude constraint. In practical applications, it is often necessary to reserve a large safety margin or conduct post-inspection, which is difficult to meet the requirements of safe and economical operation of the power spot market. Therefore, it is becoming increasingly important to study the SCUC problem considering alternating current (AC) power flow.

[0004] The AC safety-constrained unit commitment problem is large-scale, discrete, and strongly nonlinear, making it difficult to solve directly. One way to consider AC power flow is to simplify the model by approximating the original AC power flow constraints through piecewise linear functions; however, piecewise linearization has errors and it is difficult to determine the appropriate number of segments. In addition, AC constraints can also be considered through the iterative method of SCUC and safety check; however, since the number of iterations may be large, each solution to SCUC takes a long time, resulting in the entire process being difficult to meet the requirements of the electricity market clearing time. Summary of the invention

[0005] In view of the above defects or improvement needs of the prior art, the present invention provides a constraint learning embedded optimization method and system for AC safety constraint unit combination, which aims to improve the solution accuracy and solution efficiency of AC power flow SCUC problem.

[0006] To achieve the above object, according to a first aspect of the present invention, a constraint learning embedded optimization method for AC safety constraint unit commitment is provided, comprising:

[0007] Construct a mixed integer nonlinear model of the unit commitment problem of the power system to be optimized considering the AC power flow;

[0008] The input data of the AC power flow constraint is used as a sample, and the output data of the corresponding AC power flow constraint is used as a label to construct a data set; 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;

[0009] Using the data set to train a neural network offline to obtain a trained neural network that represents the AC power flow constraint; linearizing the neural network that represents the AC power flow constraint, and then embedding it into the mixed integer nonlinear model to replace the AC power flow constraint in the mixed integer nonlinear model;

[0010] The embedded model is solved 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.

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

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

[0013] Furthermore, Latin hypercube sampling is used to sample the input variables of the AC power flow constraint to obtain the input data, which specifically includes:

[0014] The sampling range of each dimension of the sample space is divided into n equal intervals; wherein the sample space includes the amplitude v of the node voltage at both ends of the branch bb' b 、v b' and the phase angle θ b ,θb' 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;

[0015] The n equally divided intervals of each dimension 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.

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

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

[0018] The hidden layer is used to perform nonlinear transformation on the input samples and then input them into the output layer;

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

[0020] 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.

[0021] Furthermore, the neural network representing the AC power flow constraint is linearized, including:

[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] Furthermore, 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 security constraints including AC power flow constraints of the power system to be optimized;

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

[0026] According to a second aspect of the present invention, there is provided a constraint learning embedded optimization system for AC safety constraint unit commitment, comprising:

[0027] Mixed integer nonlinear model building module, used to build a mixed integer nonlinear model of the power system to be optimized considering the safety constraint unit commitment problem of AC power flow;

[0028] A data set construction module, used 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 node voltage at both ends of each branch of the power system to be optimized, and the output data is the corresponding branch power;

[0029] An offline training module, used for offline training of a neural network using the data set to obtain a trained neural network representing the AC power flow constraint;

[0030] 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;

[0031] The online solution module is used to solve the embedded model online using an optimization algorithm to obtain the optimal solution to the safety constraint unit combination problem considering the AC power flow of the power system to be optimized.

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

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

[0034] The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the constraint learning embedded optimization method described in any one of the first aspects.

[0035] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the constrained learning embedded optimization method as described in any one of the first aspects is implemented.

[0036] According to a fifth aspect of the present invention, there is provided a computer program product, comprising a computer program, which, when executed on a computer, enables the computer to execute the constrained learning embedded optimization method described in any one of the first aspects.

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

[0038] (1) The present invention provides a new idea for solving the AC power flow SCUC problem model, combining machine learning with mathematical optimization to solve the AC power flow SCUC problem. Specifically, the constraint learning embedded optimization method framework of the AC safety constraint unit combination of the present invention constructs a data set with the input and output data of the AC power flow constraint at different times, and uses a neural network to perform offline learning on the nonlinear AC power flow constraint in the AC power flow SCUC problem. Since the neural network directly learns the nonlinear mapping relationship between the input and output of the AC power flow constraint, the representation constraint obtained after linearization (the neural network representing the AC power flow constraint after linearization) is closer to the original AC power flow constraint than the direct linearization of the AC power flow constraint. That is, the representation constraint obtained by the present invention has higher accuracy. After embedding it into the AC power flow SCUC problem model and replacing the original AC power flow constraint, the solution accuracy of the model can be improved. In the present invention, the strong nonlinear constraint is converted into a linear constraint by learning the AC power flow constraint offline and replacing the original AC power flow constraint, which reduces the difficulty of online solution of the AC power flow SCUC problem, and there is no problem of time-consuming multiple iterative solutions considering the AC constraint using the existing iterative method, thereby improving the solution efficiency.

[0039] (2) As a preferred embodiment, based on the input data in the present invention, the voltage amplitude v of the nodes at both ends of the system branch bb' is included. b 、v b' and the phase angle θ b ,θ b' Therefore, Latin hypercube sampling is used to sample the AC power flow constraints to obtain the input data of the AC power flow constraints, which is more suitable for the sampling requirements of multi-dimensional parameter space, and can effectively avoid the problem of uneven coverage in random sampling, thus improving the efficiency and coverage of sampling. In the process of adoption, the sample space of each dimension is divided into n equal intervals to ensure that there is a sample point in each interval of each dimension; and the n equal intervals of each dimension are randomly shuffled to avoid the correlation between samples and ensure the independence of samples. In this way, uniform coverage is achieved in all dimensions, ensuring that even a small number of samples can effectively cover the entire parameter space.

[0040] (3) As a preferred method, the AC power flow constraints with strong nonlinearity in the original mixed integer nonlinear model are replaced by a linearized neural network, which greatly reduces the nonlinearity of the model. At this time, the branch-and-cut method is used to solve the SCUC model represented by the embedded constraints, which further improves the solution efficiency of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of a constraint learning embedded optimization method for AC power flow unit combination problem provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of a combined model of an AC power flow unit provided in an embodiment of the present invention;

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

[0044] Figure 4 A schematic diagram of prediction results of active power flow output by a neural network provided in an embodiment of the present invention.

[0045] Figure 5 A schematic diagram of the prediction results of reactive power flow output by a neural network provided in an embodiment of the present invention.

[0046] Figure 6 A flowchart of a specific example of offline learning and online solving of AC power flow unit combination problems based on the method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0048] Example 1

[0049] like Figure 1 As shown, an embodiment of the present invention provides a constraint learning embedded optimization method for AC safety constraint unit combination, including:

[0050] S1. Construct a mixed integer nonlinear model of the unit commitment problem of the power system to be optimized considering the safety constraints of AC power flow;

[0051] S2. Construct a data set using the input data of the AC power flow constraint as a sample and the output data of the corresponding AC power flow constraint as a label; 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; in the embodiment of the present invention, a sample in the data set is the amplitude and phase angle of the node voltage at both ends of each branch of the current power system to be optimized, and the amplitude and phase angle of the voltage are brought into the AC power flow constraint calculation, and the corresponding output data is used as the corresponding label.

[0052] S3, using the above data set to train a neural network offline to obtain a trained neural network that represents AC power flow constraints;

[0053] S4. Linearize the neural network representing the AC power flow constraint, embed the linearized neural network into the mixed integer nonlinear model to replace the AC power flow constraint in the mixed integer nonlinear model, and use the optimization algorithm to solve the embedded model online to obtain the optimal solution to the safety constraint unit combination problem considering the AC power flow of the power system to be optimized.

[0054] like Figure 2 As shown, as a preferred implementation method, in S1, the goal of the mixed integer nonlinear model of the safety-constrained unit commitment problem considering the AC power flow is to minimize the total system cost, including the startup cost, no-load cost and power generation cost, which can be expressed as:

[0055]

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

[0057] Furthermore, the constraints of the model include unit constraints, node constraints and safety constraints including AC power flow constraints.

[0058] Specifically, the unit constraint is a constraint caused by the unit's own characteristic limitations. For example, the unit output constraint means that the unit output must be within a certain range when it is started, which can be expressed as:

[0059]

[0060]

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

[0062] The unit startup constraints can be expressed as:

[0063]

[0064] The unit climbing / slipping constraint is the constraint caused by the limit of the unit output increase and decrease, which can be expressed as:

[0065]

[0066] Among them, Δ g Indicates the climbing rate of unit g.

[0067] The minimum continuous start-stop time constraint is the time constraint that the unit needs to remain in the start-up (or shutdown) state for more than a period of time after starting (or stopping) before it can be shut down (or started up), which can be expressed as:

[0068]

[0069]

[0070] Wherein, formula (6) represents the minimum continuous start time constraint of the unit, t' represents the index of the time period, represents the minimum startup time of unit g; Formula (7) represents the minimum continuous shutdown time constraint of the unit, Indicates the minimum downtime of unit g.

[0071] Node constraints are constraints caused by the characteristics of the circuit nodes of the power system to be optimized. For example, the node voltage and phase angle range constraints can be expressed 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, Indicates the minimum voltage amplitude allowed at node b, represents the maximum voltage amplitude allowed at 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 at node b, Indicates the maximum phase angle allowed for node b. By limiting the node voltage and phase angle range, the node is ensured to operate in a safe state.

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

[0076]

[0077]

[0078] Where, 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 (t) represents the net active load level of load d at time t, p bb' (t) represents the active power on branch bb'; Formula (11) represents the node reactive power balance constraint, Q d (t) represents the reactive net load level of load d at time t, q bb' (t) represents the reactive power on branch bb'.

[0079] The safety constraint is a constraint that takes into account the circuit safety of the power system to be optimized. In the embodiment of the present invention, the safety constraint is a branch AC power flow constraint, which can be expressed as:

[0080]

[0081]

[0082]

[0083] Where, formula (12) represents the branch active power flow constraint, G bb , B bb , G bb' , B bb' They 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, Indicates the maximum apparent power of branch bb'. By limiting the branch power flow in the system, the branch is ensured to operate in a safe state.

[0084] Based on the above formulas (1) to (14), the AC safety constraint unit commitment problem can be expressed as a mixed integer nonlinear programming model. The model contains both 0-1 variables, such as the start and stop status of the unit, and continuous variables, such as node voltage. Since the AC power flow constraints (12) and (13) in the model contain sin and cos functions, they are strongly nonlinear. 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 to obtain the mixed integer nonlinear model of the power system to be optimized considering the safety constraint unit commitment problem of the AC power flow. The input data of the power system to be optimized includes:

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

[0087] In S2, the input data of the AC power flow constraint can be obtained by sampling the AC power flow constraints of IEEE standard examples (such as IEEE 9-node, IEEE 24-node and IEEE 118-node examples); or, it can be obtained based on the collected historical operation data of actual examples (such as the actual historical operation data of a provincial network).

[0088] As a preferred implementation method, in an embodiment of the present invention, Latin hypercube sampling is used to sample the AC power flow constraint to obtain the input data of the AC power flow constraint, and the corresponding input data is substituted into the AC power flow constraint to obtain the corresponding output data. Latin hypercube sampling is an improved sampling method that aims to improve the efficiency and coverage of sampling. It is more suitable for the sampling requirements 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 equally divided intervals to ensure that there is a sample point in each interval of each dimension, and the sampling points of 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 an embodiment of the present invention, the basic steps of Latin hypercube sampling in a multi-dimensional parameter space include:

[0089] 1) Determine the dimension and number of samples to be extracted. Since the AC power flow constraints (12) and (13) are equations, learning the mapping from input to output can be achieved through regression tasks. Therefore, the input variable of the power flow constraint, i.e., the amplitude v of the voltage at both ends of branch bb', is b 、v b' and the phase angle θ b ,θ b' The sampling space is a four-dimensional multi-parameter space. The sampling range of the voltage amplitude is between its upper and lower limits, that is, The sampling range of the phase angle is between its upper and lower limits, that is,

[0090] 2) Assume the number of samples is n (eg, 50,000). 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 voltage amplitude v b ), randomly shuffle the n equally divided intervals of each dimension to avoid correlation between samples and ensure sample independence.

[0092] 4) A data point is randomly selected in any equally divided interval of each dimension, and the data points sampled in any equally divided interval of the four dimensions constitute a sample as the current input data;

[0093] 5) The current input data, i.e. the amplitude v of a set of node voltages obtained by sampling b 、v b' and phase angle θ b ,θ b' Substitute the power flow constraint to calculate the corresponding output true value, that is, the active power p on the variable branch power branch bb' bb' , reactive power q on branch bb' bb' Because the branch power is divided into active power and reactive power, 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 to perform offline training on the neural network.

[0095] Specifically, a neural network is a computational model that simulates the working mechanism of neurons in the human brain and has a wide range of applications in the field of machine learning. A neural network model consists of multiple simple processing units (called neurons), which are connected to each other through weights to form a network structure that can process complex data. Neural networks can automatically extract features and learn patterns based on input data, and are particularly suitable for dealing with nonlinear problems. Figure 3 As shown, the neural network in the embodiment of the present invention includes:

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

[0097] 2) Hidden layer: A neural network can have one or more hidden layers. In the embodiment of the present invention, 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 data and extracting features. The neurons in each hidden layer are connected to the neurons in the previous layer through weights. Through the activation function, the hidden layer converts the input data into a new feature representation. The activation function determines the output form of each neuron, converting the linearly transformed input into a nonlinear output. In the embodiment of the present invention, the activation function of the neural network is set to the ReLU function, which can be expressed as:

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

[0099] Among them, y represents the output value, 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 a positive input value, 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 in the output layer corresponds to a category; in the regression task, each neuron in the output layer represents the predicted value for each dimensional output variable. In the embodiment of the present invention, the neural network is a regression task, and the output is two-dimensional, so the output layer is set to two neurons, and the outputs are respectively the active power and reactive power corresponding to the input data.

[0101] Set the parameters of the neural network and pass the sampled data set into the neural network for learning. The learning process of the neural network includes:

[0102] 1) Input data starts from the input layer and is passed forward layer by layer, processed through the hidden layers until it reaches the output layer.

[0103] 2) Each neuron receives input from the neurons in the previous layer and performs a nonlinear transformation on the input through an activation function.

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

[0105] 4) Use the loss function 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, and 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 ends.

[0108] After learning is completed, the node voltage v is obtained b 、v b' , phase angle θ b ,θ b' With branch power p bb' ,q bb' The mapping relationship between and is realized, achieving the purpose of extracting AC power flow characteristics.

[0109] Analyze the prediction results of the neural network: Specifically, accuracy analysis can be used to determine the effect of learning. For example, the active power flow and reactive power flow of a branch are as follows: 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 size, loss function, momentum parameter, etc.) and retraining to finally obtain a trained neural network that represents the AC power flow constraints.

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

[0111] The trained neural network representing the AC power 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 methods such as the big M method. The linearized model can be expressed as:

[0112] y≥f, (16)

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

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

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

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

[0117] Furthermore, the ReLU function (activation function) in the neural network is replaced by its linear representation, and the input and output of each layer in the neural network are represented using a linear transformation formula to obtain a linearized neural network, that is, a mixed integer linear representation constraint.

[0118] Furthermore, the representation constraints are embedded into the original mixed integer nonlinear model in S1 to replace the AC power flow constraints in the original mixed integer nonlinear model, that is, to replace the branch AC power flow constraints (12) and (13), while keeping the objective and other constraints of the model unchanged, thus obtaining the SCUC mixed integer linear programming model with embedded representation constraints.

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

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

[0121] Furthermore, the SCUC model with embedded representation constraints is solved online using a branch-and-cut method (e.g., calling a commercial optimization solver Gurobi or COPT); wherein the input of the model includes the node admittance matrix parameters (G bb , B bb , G bb' , B bb' ), input variable range limit parameter etc.), the power generation cost parameter of unit g (S g , C g ) and the net load of the power system to be solved (P d , Q d The final output (the optimal solution to the safety constraint unit combination problem of the power system to be optimized considering the AC power flow) includes the power generation level of unit g (P g , Q g ), branch power (p bb' ,q bb' ), the decision variables of unit g (u g 、x g ), as well as node voltages and phase angles (v b 、vb' ,θ b ,θ b' ), where the node voltages and phase angles are outputs for the entire model of the AC power flow SCUC problem.

[0122] In summary of the above steps, an example process of offline learning and online solving of the AC power flow unit combination problem based on the method provided in the embodiment of the present invention is as follows: Figure 5 shown.

[0123] In an embodiment of the present invention, a constraint learning embedded optimization algorithm framework is proposed, which reduces the difficulty of online problem solving by learning AC power flow constraints offline and replacing the original power flow constraints. In the offline training stage, an offline training data set is constructed by sampling or historical operation data based on data such as node voltage and phase angle. Using the constructed data set, the characteristics of the AC power flow constraints are extracted and summarized, and the characteristics of the AC power flow constraints are extracted through offline training to obtain the characterization constraints of the AC power flow constraints (the neural network that characterizes the AC power flow constraints after linearization). Then, in the online solution stage, the characterization constraints are embedded in the unit combination problem to approximate the feasible domain of the original problem, and the problem solving is accelerated by reducing the nonlinearity of the model.

[0124] Example 2

[0125] The embodiment of the present invention provides a constraint learning embedded optimization system for AC safety constraint unit combination, including:

[0126] Mixed integer nonlinear model building module, used to build a mixed integer nonlinear model of the power system to be optimized considering the safety constraint unit commitment problem of AC power flow;

[0127] A data set construction module is used to construct a data set using the input data of the AC power flow constraint as samples and the output data of the corresponding AC power 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 offline training module is used to train a neural network offline using a data set to obtain a trained neural network that represents AC power flow constraints;

[0129] An embedded model building 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;

[0130] The online solution module is used to solve the embedded model online using an optimization algorithm to obtain the optimal solution to the safety constraint unit combination problem considering the AC power flow of the power system to be optimized.

[0131] The specific implementation method of each of the above modules refers to the corresponding steps of the method in the above embodiment 1, which will not be repeated here.

[0132] Example 3

[0133] An embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above-mentioned embodiment 1 when executing the computer program.

[0134] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The memory may be used to store computer programs and / or modules, and the processor may perform various functions of the electronic device by running or executing computer programs and / or modules stored in the memory, and calling data stored in the memory.

[0135] The relevant technical solutions are the same as above and will not be described in detail here.

[0136] Example 4

[0137] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above-mentioned embodiment 1 are implemented.

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

[0139] The relevant technical solutions are the same as above and will not be described in detail here.

[0140] Example 5

[0141] An embodiment of the present application provides a computer program product, including a computer program. When the computer program is run on a computer, the computer executes the steps of the method in the above-mentioned embodiment 1.

[0142] The relevant technical solutions are the same as above and will not be described in detail here.

[0143] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A constraint learning embedded optimization method for AC safety constraint unit commitment, characterized in that: include: Construct a mixed integer nonlinear model of the unit commitment problem of the power system to be optimized considering the AC power flow; The input data of the AC power flow constraint is used as a sample, and the output data of the corresponding AC power flow constraint is used as a label to construct a data set; 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; Using the data set to train a neural network offline to obtain a trained neural network that represents the AC power flow constraint; linearizing the neural network that represents the AC power flow constraint, and then embedding it into the mixed integer nonlinear model to replace the AC power flow constraint in the mixed integer nonlinear model; The embedded model is solved 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.

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 based on the historical operation data of the power system to be optimized; wherein the input variables include the amplitude v of the node voltage at both ends of the branch bb' of the power system to be optimized b 、v b' and the phase angle θ b ,θ b' ; The output data is calculated by substituting the input data into the AC power flow constraint formula; the output data includes the active power and reactive power on the branch bb'.

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, which specifically includes: The sampling range of each dimension of the sample space is divided into n equal intervals; wherein the sample space includes the amplitude v of the node voltage at both ends of the branch bb' b 、v b' and the phase angle θ b ,θ b' 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; The n equally divided intervals of each dimension 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 3, characterized in that: 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 for outputting 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.

5. The constraint learning embedded optimization method according to claim 1, characterized in that: Linearizing a neural network representing the AC power flow constraint includes: 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.

6. 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 the AC power flow.

7. A constraint learning embedded optimization system for AC safety constraint unit combination, characterized in that: include: Mixed integer nonlinear model building module, used to build a mixed integer nonlinear model of the power system to be optimized considering the safety constraint unit commitment problem of AC power flow; A data set construction module, used 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 node 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, used for offline training of a neural network using the data set to obtain a trained neural network representing 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 constraint unit combination problem considering the AC power flow of the power system to be optimized.

8. 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 used 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 6.

9. 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 as described in any one of claims 1 to 6 is implemented.

10. 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 6.

Citation Information

Patent Citations

  • Distributed power supply participated active power distribution network power supply recovery optimization method

    CN112152255A

  • Wind power-pumped storage complementary system short-term optimization scheduling method considering wind power uncertainty

    CN116667433A

  • 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

Cited By

  • Generalized unit commitment calculation method and system considering low-voltage resource and power grid constraint

    CN121935461A