CN116154779A - Optimal power flow calculation method and device based on pre-training model - Google Patents

Optimal power flow calculation method and device based on pre-training model Download PDF

Info

Publication number
CN116154779A
CN116154779A CN202310439438.9A CN202310439438A CN116154779A CN 116154779 A CN116154779 A CN 116154779A CN 202310439438 A CN202310439438 A CN 202310439438A CN 116154779 A CN116154779 A CN 116154779A
Authority
CN
China
Prior art keywords
flow calculation
power
power flow
training
predicted value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310439438.9A
Other languages
Chinese (zh)
Other versions
CN116154779B (en
Inventor
黄刚
廖龙飞
华炜
韩佳易
周舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202310439438.9A priority Critical patent/CN116154779B/en
Publication of CN116154779A publication Critical patent/CN116154779A/en
Application granted granted Critical
Publication of CN116154779B publication Critical patent/CN116154779B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J3/00Circuit arrangements for ac mains or ac distribution networks
    • H02J3/04Circuit arrangements for ac mains or ac distribution networks for connecting networks of the same frequency but supplied from different sources
    • H02J3/06Controlling transfer of power between connected networks; Controlling sharing of load between connected networks
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2203/00Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
    • H02J2203/20Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Abstract

The invention discloses an optimal power flow calculation method and device based on a pre-training model, which belong to the technical field of combination of intelligent power grids and artificial intelligence, and comprise the following steps: on the basis of parameter optimization of a pre-training model for predicting reactive power and voltage phase angles according to active power and voltage amplitude values, an optimized pre-training model is utilized to construct an optimal power flow calculation model, namely, the optimized pre-training model is used for constraining the training process of the optimal power flow calculation model based on load power samples and an optimal power flow calculation label, so that the optimal power flow calculation model can rapidly perform optimal power flow calculation solving while solving effectiveness is ensured, and requirements of a novel power system are better met.

Description

Optimal power flow calculation method and device based on pre-training model
Technical Field
The invention belongs to the technical field of combination of intelligent power grids and artificial intelligence, and particularly relates to an optimal power flow calculation method and device based on a pre-training model.
Background
Optimal power flow calculation supports various applications of the power system, including economic dispatch, unit combination, demand response, reliability evaluation and the like, and is a core problem of the operation of the power system. By solving the optimal power flow calculation, the power system can realize optimal power generation scheduling and energy transmission.
As a mathematical programming problem, the common forms of optimal power flow calculation include direct current optimal power flow calculation and alternating current optimal power flow calculation. Generally, the optimal solution can be better obtained by using the traditional numerical method, so that the requirements of part of the power system are met; however, since the time complexity of the numerical algorithm based on the optimization theory is often high, the calculation process is long, and it is difficult to meet the requirements of the novel power system on the algorithm.
In order to solve the problems of the traditional numerical solution method, the solution method based on deep learning becomes one of research hotspots, and the solution speed can be greatly accelerated by using a deep learning model to replace the traditional solution model. However, the end-to-end deep learning model is not strong in interpretability, and the solving speed is ensured, and meanwhile the solving effectiveness cannot be ensured. How to ensure the optimal power flow calculation solving effect and reduce the time spent in the solving process at the same time is one of the main problems concerned in the field of smart power grids at present.
The patent document CN107317338A discloses a method and a device for calculating the optimal power flow of a power system, which comprise the steps of establishing an optimal mathematical model which meets the operation constraint conditions and enables the coal consumption cost of a unit to be the lowest according to the parameters of each generator and the operation constraint conditions, and solving the optimal mathematical model by adopting a quantum particle swarm algorithm to obtain a global optimal power flow solution.
Patent document CN113283547a discloses an optimal power flow calculation method based on multi-task deep learning, and by training the feasibility and the optimal solution of the optimal power flow calculation problem simultaneously, a feasibility judgment result of a scheduling scheme and the optimal scheduling scheme can be output simultaneously.
Disclosure of Invention
In view of the above, the present invention aims to provide an optimal power flow calculation method and device based on a pre-training model, which can improve the solving speed and the solving effectiveness.
To achieve the above object, an embodiment provides an optimal power flow calculation method based on a pre-training model, including the following steps:
acquiring the load power of a power grid, and sampling and amplifying the load power to obtain a load power sample;
solving based on load power samples by adopting an optimal power flow solver to obtain a scheduling scheme corresponding to each load power sample, wherein the scheduling scheme comprises active power and reactive power of a generator, voltage amplitude and voltage phase angle of a node, extracting the active power and the voltage amplitude of the node of the generator as pre-training samples, extracting the reactive power of the generator and the voltage phase angle of the node as pre-training labels, and simultaneously taking the scheduling scheme as an optimal power flow calculation label;
performing supervised learning of relative pre-training labels on the pre-training model by adopting a pre-training sample so as to optimize parameters of the pre-training model;
constructing an optimal power flow calculation model based on the optimized pre-training model, and performing supervised learning relative to an optimal power flow calculation label on the optimal power flow calculation model by utilizing a load power sample so as to optimize parameters of the optimal power flow calculation model;
and performing optimal power flow calculation by using the optimized optimal power flow calculation model.
In one embodiment, the load power comprises load active power, load reactive power;
the step of sampling and amplifying the load power to obtain a load power sample comprises the following steps: and sampling the load active power and the load reactive power in a uniform sampling mode respectively, wherein the load active power and the load reactive power obtained by sampling each time form a load power sample.
In one embodiment, the pre-training model is constructed based on a deep neural network and is used for calculating and outputting a reactive power predicted value of the generator and a voltage phase angle predicted value of the node according to the active power of the generator and the voltage amplitude of the node contained in the pre-training sample;
when the pre-training model is subjected to supervised learning, a pre-training loss function is constructed according to the difference between the reactive power predicted value and the reactive power contained in the pre-training label and the difference between the voltage phase angle predicted value and the voltage phase angle contained in the pre-training label, and the parameters of the pre-training model are optimized by taking the minimized pre-training loss function as a target.
In one embodiment, the constructing an optimal power flow calculation model based on the optimized pre-training model includes:
a first-stage power flow calculation unit is constructed based on the deep neural network and is used for calculating and outputting an active power predicted value of the generator and a voltage amplitude predicted value of the node according to the load power sample;
and the optimized pre-training model is used as a two-stage power flow calculation unit and is used for calculating and outputting a reactive power predicted value of the generator and a voltage phase angle predicted value of a node according to the active power predicted value and the voltage amplitude predicted value output by the one-stage power flow calculation unit.
In one embodiment, when the optimal power flow calculation model is subjected to supervised learning, a first loss function is constructed according to the difference between the active power predicted value and the active power contained in the optimal power flow calculation label and the difference between the voltage amplitude predicted value and the voltage amplitude contained in the optimal power flow calculation label;
constructing a second loss function according to the difference between the reactive power predicted value and the reactive power contained in the optimal power flow calculation tag and the difference between the voltage phase angle predicted value and the voltage phase angle contained in the optimal power flow calculation tag;
and optimizing parameters of the optimal power flow calculation model by taking the minimum weighted summation of the first loss function and the second loss function as a target.
In one embodiment, the method further comprises: and carrying out normalization processing on the pre-training sample and the pre-training label, and carrying out supervised learning on the pre-training model relative to the pre-training label after normalization by utilizing the pre-training sample after normalization.
In one embodiment, the method further comprises: and carrying out normalization processing on the load power sample and the optimal power flow calculation label, and carrying out supervised learning on the optimal power flow calculation model relative to the normalized optimal power flow calculation label by utilizing the normalized load power sample.
In one embodiment, the performing the optimal power flow calculation by using the optimized optimal power flow calculation model includes:
the load power collected from the power grid is input into an optimized optimal power flow calculation model, a one-stage power flow calculation unit calculates and outputs an active power predicted value of the generator and a voltage amplitude predicted value of a node according to the load power, and a two-stage power flow calculation unit calculates and outputs a reactive power predicted value of the generator and a voltage phase angle predicted value of the node according to the active power predicted value and the voltage amplitude predicted value which are output by the one-stage power flow calculation unit;
the active power predicted value and the reactive power predicted value of the motor, the voltage amplitude predicted value and the voltage phase angle predicted value of the node form an optimal power flow calculation result.
In order to achieve the above object, the embodiment also provides an optimal power flow calculation device based on a pre-training model, which comprises a load power sample construction module, a training sample and label construction module, a pre-training module, a retraining module and an application module,
the load power sample construction module is used for acquiring load power of a power grid, and sampling and amplifying the load power to obtain a load power sample;
the training sample and label construction module is used for solving based on load power samples by adopting an optimal power flow solver to obtain a scheduling scheme corresponding to each load power sample, wherein the scheduling scheme comprises active power and reactive power of a generator, voltage amplitude and voltage phase angle of a node, the active power and the voltage amplitude of the node of the generator are extracted to serve as pre-training samples, the reactive power of the generator and the voltage phase angle of the node of the generator are extracted to serve as pre-training labels, and the scheduling scheme is simultaneously taken as an optimal power flow calculation label;
the pre-training module is used for performing supervised learning of relative pre-training labels on the pre-training model by adopting the pre-training sample so as to optimize parameters of the pre-training module;
the retraining module is used for constructing an optimal power flow calculation model based on the optimized pre-training model, and performing supervised learning relative to an optimal power flow calculation label on the optimal power flow calculation model by utilizing a load power sample so as to optimize parameters of the optimal power flow calculation model;
and the application module is used for carrying out optimal power flow calculation by utilizing the optimized optimal power flow calculation model.
To achieve the above object, an embodiment of the present invention further provides an optimal power flow calculation device based on a pre-training model, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the memory stores an optimized optimal power flow calculation model constructed by the above method, and the processor implements the following steps when executing the computer program:
acquiring load power acquired from a power grid;
inputting load power into an optimized optimal power flow calculation model, calculating and outputting an active power predicted value of a generator and a voltage amplitude predicted value of a node by a one-stage power flow calculation unit according to the load power, calculating and outputting a reactive power predicted value of the generator and a voltage phase angle predicted value of the node by the two-stage power flow calculation unit according to the active power predicted value and the voltage amplitude predicted value which are output by the one-stage power flow calculation unit;
and forming an optimal power flow calculation result by the active power predicted value and the reactive power predicted value of the motor, the voltage amplitude predicted value and the voltage phase angle predicted value of the node.
To achieve the above object, an embodiment further provides a computer readable storage medium having stored thereon a computer program which, when processed and executed, implements the steps of the above-described optimal power flow calculation method based on a pre-training model.
Compared with the prior art, the invention has the beneficial effects that at least the following steps are included:
on the basis of parameter optimization of a pre-training model for predicting reactive power and voltage phase angles according to active power and voltage amplitude values, an optimized pre-training model is utilized to construct an optimal power flow calculation model, namely, the optimized pre-training model is used for constraining the training process of the optimal power flow calculation model based on load power samples and an optimal power flow calculation label, so that the optimal power flow calculation model can rapidly perform optimal power flow calculation solving while solving effectiveness is ensured, and requirements of a novel power system are better met.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an optimal power flow calculation method based on a pre-training model provided by an embodiment;
FIG. 2 is a schematic diagram of the structure of a pre-training model provided by an embodiment;
FIG. 3 is a schematic structural diagram of an optimal power flow calculation model provided in an embodiment;
FIG. 4 is a flowchart of an embodiment of performing optimal power flow calculation using an optimal power flow calculation model;
fig. 5 is a schematic structural diagram of an optimal power flow calculation device based on a pre-training model according to an embodiment.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the detailed description is presented by way of example only and is not intended to limit the scope of the invention.
Aiming at the problems that the traditional optimization method consumes long time when solving the optimal power flow calculation problem, the end-to-end deep learning model solves the problem that the effectiveness cannot be guaranteed, and the like, the embodiment provides the optimal power flow calculation method and the device based on the pre-training model, so that the solving speed is improved, and meanwhile the solving effectiveness is improved.
Fig. 1 is a flowchart of an optimal power flow calculation method based on a pre-training model according to an embodiment. As shown in fig. 1, the method for calculating the optimal power flow provided in the embodiment includes the following steps:
s110, obtaining the load power of the power grid, and sampling and amplifying the load power to obtain a load power sample.
In an embodiment, status data of a certain scheduling moment is collected from a node grid such as IEEE 30, the status data comprising the number of nodes N bus Generator data N gen Number of lines N branch The reactance between nodes, and the load power, the load power is extracted from the state data for use in constructing the load power samples. Wherein the load power includesiLoad active power of node
Figure SMS_1
And is responsible for reactive power +.>
Figure SMS_2
iHas a value of 1-N bus
In an embodiment, performing sampling amplification on load power to obtain a load power sample includes: respectively applying uniform sampling mode to load active power
Figure SMS_3
And load reactive power +.>
Figure SMS_4
Sampling, wherein the load active power obtained by sampling each time is +.>
Figure SMS_5
And load reactive power +.>
Figure SMS_6
Form a load power sample->
Figure SMS_7
N load power samples can be obtained after n times of uniform sampling, for example, n has a value of 1000, that is, 1000 times of uniform sampling are performed to obtain 1000 load power samples.
In one embodiment, the load power samples may be uniformly sampled using the following formula
Figure SMS_8
Figure SMS_9
Figure SMS_10
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_11
is the firstiThe sampling parameter of each node is preferably 0.5.
And S120, solving by adopting an optimal power flow solver based on the load power samples to obtain a scheduling scheme corresponding to each load power sample, and constructing a pre-training sample, a pre-training label and an optimal power flow calculation label according to the scheduling scheme.
In an embodiment, each load power sample is
Figure SMS_12
As an input of an optimal power flow solver based on an optimization method, calculating an output load power sample ++>
Figure SMS_13
Corresponding scheduling scheme comprising the active power of the generator +.>
Figure SMS_14
And reactive power->
Figure SMS_15
Voltage amplitude of node->
Figure SMS_16
And voltage phase angle>
Figure SMS_17
In an embodiment, active power of the generator is extracted
Figure SMS_18
And the voltage amplitude of the node +.>
Figure SMS_19
As a pre-training sample, the reactive power of the generator is extracted +.>
Figure SMS_20
And voltage phase angle of node>
Figure SMS_21
And taking the scheduling scheme as an optimal power flow calculation tag as a pre-training tag.
S130, performing supervised learning of relative pre-training labels on the pre-training model by adopting the pre-training sample so as to optimize parameters of the pre-training model.
In an embodiment, a pre-training model is constructed based on a deep neural network, and the pre-training model is used for calculating and outputting a reactive power predicted value of a generator and a voltage phase angle predicted value of a node according to active power of the generator and voltage amplitude values of the node contained in the pre-training sample.
In one embodiment, as shown in FIG. 2, the pre-training model includes an input layer for inputting the active power of a generator contained in the pre-training sample, at least 1 hidden layer, and an output layer
Figure SMS_22
And the voltage amplitude of the node +.>
Figure SMS_23
. Each hidden layer is used for weighting input features, and outputting the hidden features through activation after linear calculation, wherein the input features comprise the hidden features output by the previous hidden layer or +.>
Figure SMS_24
And->
Figure SMS_25
Activation may employ a ReLU activation function. The output layer is used for carrying out logistic regression according to hidden layer characteristics to output reactive power predicted value ++of the generator>
Figure SMS_26
And voltage phase angle predictive value of node +.>
Figure SMS_27
When the pre-training model is supervised and learned, the reactive power prediction value is used
Figure SMS_28
Reactive power +.>
Figure SMS_29
Difference, and voltage phase angle prediction value +.>
Figure SMS_30
Difference between the phase angle of the voltage contained in the pre-training label +.>
Figure SMS_31
And constructing a pre-training loss function, optimizing by taking the minimized pre-training loss function as a target, and continuously reducing the pre-training loss function by adopting a gradient descent algorithm to optimize parameters of a pre-training model. Preferably, the pre-training loss function may employ a mean square error loss function.
In order to reduce the influence of the amplitude range of the sample data on the training result, the pre-training sample and the pre-training label are subjected to normalization treatment before being input into the pre-training model so as to normalize the amplitude between 0 and 1, and the normalized pre-training sample is utilized
Figure SMS_32
And post-normalization pretraining tag->
Figure SMS_33
And performing supervised learning on the pre-training model.
And S140, constructing an optimal power flow calculation model based on the optimized pre-training model, and performing supervised learning relative to an optimal power flow calculation label on the optimal power flow calculation model by using a load power sample so as to optimize parameters of the optimal power flow calculation model.
In an embodiment, after the optimized pre-training model is obtained, as shown in fig. 3, the optimal power flow calculation model constructed based on the optimized pre-training model includes a one-stage power flow calculation unit and a two-stage power flow calculation unit, where the one-stage power flow calculation unit is constructed by using a deep neural network, and the deep neural network structure may be the same as the pre-training model structure and is used for sampling according to load power
Figure SMS_34
Calculating and outputting active power predictive value +.>
Figure SMS_35
And voltage amplitude predictive value of node +.>
Figure SMS_36
The two-stage power flow calculation unit adopts an optimized pre-training model, namely the optimized pre-training model is used as the two-stage power flow calculation unit and is used for outputting an active power predicted value according to the one-stage power flow calculation unit
Figure SMS_37
And voltage amplitude prediction value +.>
Figure SMS_38
Calculating and outputting a reactive power predictive value of the generator>
Figure SMS_39
And voltage phase angle predictive value of node +.>
Figure SMS_40
。/>
When the optimal power flow calculation model is supervised and learned, the active power prediction value is used for carrying out prediction
Figure SMS_43
Active power +.>
Figure SMS_44
Difference, and voltage amplitude prediction value +>
Figure SMS_46
Voltage amplitude +.>
Figure SMS_42
Constructing a first loss function by the difference; according to reactive power predictive value->
Figure SMS_45
Reactive power +.>
Figure SMS_47
Difference, and voltage phase angle prediction value +.>
Figure SMS_48
Voltage phase angle +.included with optimal power flow calculation tag>
Figure SMS_41
Constructing a second loss function by the difference; and optimizing parameters of the optimal power flow calculation model by adopting a gradient descent algorithm by taking the weighted sum of the first loss function and the second loss function as a target. Preferably, both the first and second loss functions may employ a mean square error loss function.
In order to reduce the influence of the sample data amplitude range on the training result, the load power sample and the optimal power flow calculation label are subjected to normalization processing before being input into the optimal power flow calculation model so as to normalize the amplitude between 0 and 1, and the normalized load power sample is utilized
Figure SMS_49
And normalized mostOptimal tide calculation tag->
Figure SMS_50
And performing supervised learning on the optimal power flow calculation model.
And S150, performing optimal power flow calculation by using the optimized optimal power flow calculation model.
In an embodiment, after obtaining the optimized optimal power flow calculation model, the optimal power flow calculation is performed by using the optimized optimal power flow calculation model, as shown in fig. 4, including the following steps:
s410, acquiring load power acquired from a power grid;
s420, inputting the load power into the optimized optimal power flow calculation model to perform optimal power flow calculation;
in the optimized optimal power flow calculation model, a one-stage power flow calculation unit calculates and outputs an active power predicted value of the generator and a voltage amplitude predicted value of a node according to load power, and a two-stage power flow calculation unit calculates and outputs a reactive power predicted value of the generator and a voltage phase angle predicted value of the node according to the active power predicted value and the voltage amplitude predicted value which are output by the one-stage power flow calculation unit;
s430, forming an optimal power flow calculation result by the active power predicted value and the reactive power predicted value of the motor which are predicted and output, the voltage amplitude predicted value and the voltage phase angle predicted value of the node.
Based on the same inventive concept, as shown in fig. 5, an embodiment further provides an optimal power flow calculation device 500 based on a pre-training model, which includes a load power sample construction module 510, a training sample and tag construction module 520, a pre-training module 530, a retraining module 540, and an application module 550,
the load power sample construction module 510 is configured to obtain load power of the power grid, and sample and amplify the load power to obtain a load power sample.
The training sample and label construction module 520 is configured to obtain a scheduling scheme corresponding to each load power sample by adopting an optimal power flow solver to solve the load power samples, and construct a pre-training sample, a pre-training label, and an optimal power flow calculation label according to the scheduling scheme. The dispatching scheme comprises active power and reactive power of the generator, voltage amplitude and voltage phase angle of the node, the active power and the voltage amplitude of the node of the generator are extracted to serve as pre-training samples, the reactive power and the voltage phase angle of the node of the generator are extracted to serve as pre-training labels, and meanwhile the dispatching scheme serves as an optimal power flow calculation label.
The pre-training module 530 is configured to perform supervised learning of the pre-training model with respect to the pre-training label using the pre-training sample to optimize the pre-training model parameters.
The retraining module 540 is configured to construct an optimal power flow calculation model based on the optimized pre-training model, and perform supervised learning on the optimal power flow calculation model relative to an optimal power flow calculation label by using the load power sample, so as to optimize parameters of the optimal power flow calculation model.
The application module 550 is configured to perform optimal power flow calculation by using the optimized optimal power flow calculation model.
It should be noted that, when the optimal power flow calculation device provided in the foregoing embodiment performs optimal power flow calculation, the division of the foregoing functional modules should be used to illustrate, and the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the terminal or the server is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the optimal power flow calculation device and the optimal power flow calculation method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the optimal power flow calculation device and the optimal power flow calculation method are detailed in the embodiments of the optimal power flow calculation method, which are not described herein again.
Based on the same inventive concept, the embodiment further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is processed and executed to implement the steps of the method for calculating the optimal power flow based on the pre-training model, and the method comprises the following steps:
s110, acquiring the load power of a power grid, and sampling and amplifying the load power to obtain a load power sample;
s120, solving by adopting an optimal power flow solver based on the load power samples to obtain a scheduling scheme corresponding to each load power sample, and constructing a pre-training sample, a pre-training label and an optimal power flow calculation label according to the scheduling scheme;
s130, performing supervised learning of relative pre-training labels on the pre-training model by adopting the pre-training sample so as to optimize parameters of the pre-training model;
s140, an optimal power flow calculation model is built based on the optimized pre-training model, and supervision learning relative to an optimal power flow calculation label is carried out on the optimal power flow calculation model by utilizing a load power sample so as to optimize parameters of the optimal power flow calculation model;
and S150, performing optimal power flow calculation by using the optimized optimal power flow calculation model.
In an embodiment, the computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Based on the same inventive concept, the embodiment also provides an optimal power flow calculation device based on a pre-training model, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the memory stores an optimized optimal power flow calculation model constructed by adopting the optimal power flow calculation method, and the processor realizes the following steps when executing the computer program:
s410, acquiring load power acquired from a power grid;
s420, inputting the load power into the optimized optimal power flow calculation model to perform optimal power flow calculation;
in the optimized optimal power flow calculation model, a one-stage power flow calculation unit calculates and outputs an active power predicted value of the generator and a voltage amplitude predicted value of a node according to load power, and a two-stage power flow calculation unit calculates and outputs a reactive power predicted value of the generator and a voltage phase angle predicted value of the node according to the active power predicted value and the voltage amplitude predicted value which are output by the one-stage power flow calculation unit;
s430, forming an optimal power flow calculation result by the active power predicted value and the reactive power predicted value of the motor which are predicted and output, the voltage amplitude predicted value and the voltage phase angle predicted value of the node.
In an embodiment, the memory may be a volatile memory at a near end, such as a RAM, or a nonvolatile memory, such as a ROM, a FLASH, a floppy disk, a mechanical hard disk, or a remote storage cloud. The processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), or a Field Programmable Gate Array (FPGA), i.e. the step of performing optimal power flow calculation according to the load power may be implemented by these processors.
The foregoing detailed description of the preferred embodiments and advantages of the invention will be appreciated that the foregoing description is merely illustrative of the presently preferred embodiments of the invention, and that no changes, additions, substitutions and equivalents of those embodiments are intended to be included within the scope of the invention.

Claims (10)

1. The optimal power flow calculation method based on the pre-training model is characterized by comprising the following steps of:
acquiring the load power of a power grid, and sampling and amplifying the load power to obtain a load power sample;
solving based on load power samples by adopting an optimal power flow solver to obtain a scheduling scheme corresponding to each load power sample, wherein the scheduling scheme comprises active power and reactive power of a generator, voltage amplitude and voltage phase angle of a node, extracting the active power and the voltage amplitude of the node of the generator as pre-training samples, extracting the reactive power of the generator and the voltage phase angle of the node as pre-training labels, and simultaneously taking the scheduling scheme as an optimal power flow calculation label;
performing supervised learning of relative pre-training labels on the pre-training model by adopting a pre-training sample so as to optimize parameters of the pre-training model;
constructing an optimal power flow calculation model based on the optimized pre-training model, and performing supervised learning relative to an optimal power flow calculation label on the optimal power flow calculation model by utilizing a load power sample so as to optimize parameters of the optimal power flow calculation model;
and performing optimal power flow calculation by using the optimized optimal power flow calculation model.
2. The optimal power flow calculation method based on the pre-training model according to claim 1, wherein the load power comprises load active power and load reactive power;
the step of sampling and amplifying the load power to obtain a load power sample comprises the following steps: and sampling the load active power and the load reactive power in a uniform sampling mode respectively, wherein the load active power and the load reactive power obtained by sampling each time form a load power sample.
3. The optimal power flow calculation method based on the pre-training model according to claim 1, wherein the pre-training model is constructed based on a deep neural network and is used for calculating and outputting a reactive power predicted value of a generator and a voltage phase angle predicted value of a node according to active power of the generator and voltage amplitude of the node contained in a pre-training sample;
when the pre-training model is subjected to supervised learning, a pre-training loss function is constructed according to the difference between the reactive power predicted value and the reactive power contained in the pre-training label and the difference between the voltage phase angle predicted value and the voltage phase angle contained in the pre-training label, and the parameters of the pre-training model are optimized by taking the minimized pre-training loss function as a target.
4. The optimal power flow calculation method based on the pre-training model according to claim 1, wherein the constructing an optimal power flow calculation model based on the optimized pre-training model comprises:
a first-stage power flow calculation unit is constructed based on the deep neural network and is used for calculating and outputting an active power predicted value of the generator and a voltage amplitude predicted value of the node according to the load power sample;
and the optimized pre-training model is used as a two-stage power flow calculation unit and is used for calculating and outputting a reactive power predicted value of the generator and a voltage phase angle predicted value of a node according to the active power predicted value and the voltage amplitude predicted value output by the one-stage power flow calculation unit.
5. The optimal power flow calculation method based on the pre-training model according to claim 4, wherein when the optimal power flow calculation model is subjected to supervised learning, a first loss function is constructed according to the difference between the active power predicted value and the active power contained in the optimal power flow calculation tag and the difference between the voltage amplitude predicted value and the voltage amplitude contained in the optimal power flow calculation tag;
constructing a second loss function according to the difference between the reactive power predicted value and the reactive power contained in the optimal power flow calculation tag and the difference between the voltage phase angle predicted value and the voltage phase angle contained in the optimal power flow calculation tag;
and optimizing parameters of the optimal power flow calculation model by taking the minimum weighted summation of the first loss function and the second loss function as a target.
6. The pretrained model-based optimal power flow calculation method according to claim 1, further comprising: carrying out normalization processing on the pre-training sample and the pre-training label, and carrying out supervised learning on the pre-training model relative to the pre-training label after normalization by utilizing the pre-training sample after normalization;
and carrying out normalization processing on the load power sample and the optimal power flow calculation label, and carrying out supervised learning on the optimal power flow calculation model relative to the normalized optimal power flow calculation label by utilizing the normalized load power sample.
7. The optimal power flow calculation method based on the pre-training model as claimed in claim 4, wherein the optimal power flow calculation is performed by using the optimized optimal power flow calculation model, comprising:
the load power collected from the power grid is input into an optimized optimal power flow calculation model, a one-stage power flow calculation unit calculates and outputs an active power predicted value of the generator and a voltage amplitude predicted value of a node according to the load power, and a two-stage power flow calculation unit calculates and outputs a reactive power predicted value of the generator and a voltage phase angle predicted value of the node according to the active power predicted value and the voltage amplitude predicted value which are output by the one-stage power flow calculation unit;
the active power predicted value and the reactive power predicted value of the motor, the voltage amplitude predicted value and the voltage phase angle predicted value of the node form an optimal power flow calculation result.
8. The optimal power flow calculation device based on the pre-training model is characterized by comprising a load power sample construction module, a training sample and label construction module, a pre-training module, a retraining module and an application module,
the load power sample construction module is used for acquiring load power of a power grid, and sampling and amplifying the load power to obtain a load power sample;
the training sample and label construction module is used for solving based on load power samples by adopting an optimal power flow solver to obtain a scheduling scheme corresponding to each load power sample, wherein the scheduling scheme comprises active power and reactive power of a generator, voltage amplitude and voltage phase angle of a node, the active power and the voltage amplitude of the node of the generator are extracted to serve as pre-training samples, the reactive power of the generator and the voltage phase angle of the node of the generator are extracted to serve as pre-training labels, and the scheduling scheme is simultaneously taken as an optimal power flow calculation label;
the pre-training module is used for performing supervised learning of relative pre-training labels on the pre-training model by adopting the pre-training sample so as to optimize parameters of the pre-training module;
the retraining module is used for constructing an optimal power flow calculation model based on the optimized pre-training model, and performing supervised learning relative to an optimal power flow calculation label on the optimal power flow calculation model by utilizing a load power sample so as to optimize parameters of the optimal power flow calculation model;
and the application module is used for carrying out optimal power flow calculation by utilizing the optimized optimal power flow calculation model.
9. An optimal power flow calculation device based on a pre-training model, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the memory stores an optimized optimal power flow calculation model constructed by the method according to any one of claims 1-6, the processor implementing the following steps when executing the computer program:
acquiring load power acquired from a power grid;
inputting load power into an optimized optimal power flow calculation model, calculating and outputting an active power predicted value of a generator and a voltage amplitude predicted value of a node by a one-stage power flow calculation unit according to the load power, calculating and outputting a reactive power predicted value of the generator and a voltage phase angle predicted value of the node by the two-stage power flow calculation unit according to the active power predicted value and the voltage amplitude predicted value which are output by the one-stage power flow calculation unit;
and forming an optimal power flow calculation result by the active power predicted value and the reactive power predicted value of the motor, the voltage amplitude predicted value and the voltage phase angle predicted value of the node.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being processed and executed, implements the steps of the pre-training model based optimal power flow calculation method according to any one of claims 1-7.
CN202310439438.9A 2023-04-23 2023-04-23 Optimal power flow calculation method and device based on pre-training model Active CN116154779B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310439438.9A CN116154779B (en) 2023-04-23 2023-04-23 Optimal power flow calculation method and device based on pre-training model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310439438.9A CN116154779B (en) 2023-04-23 2023-04-23 Optimal power flow calculation method and device based on pre-training model

Publications (2)

Publication Number Publication Date
CN116154779A true CN116154779A (en) 2023-05-23
CN116154779B CN116154779B (en) 2023-07-18

Family

ID=86351067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310439438.9A Active CN116154779B (en) 2023-04-23 2023-04-23 Optimal power flow calculation method and device based on pre-training model

Country Status (1)

Country Link
CN (1) CN116154779B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106684857A (en) * 2016-09-05 2017-05-17 国网江苏省电力公司电力科学研究院 Linear optimal power flow model containing unified power flow controller
CN107317338A (en) * 2017-08-30 2017-11-03 广东工业大学 The optimal load flow computational methods and device of a kind of power system
JP2018078712A (en) * 2016-11-09 2018-05-17 富士電機株式会社 Tidal current calculation device, tidal current calculation method, and tidal current calculation program
CN109599872A (en) * 2018-12-29 2019-04-09 重庆大学 Probabilistic optimal load flow calculation method based on storehouse noise reduction autocoder
CN111756043A (en) * 2020-07-30 2020-10-09 广东电网有限责任公司电力科学研究院 Optimal power flow optimization method and system considering reactive power and voltage amplitude
CN112018777A (en) * 2020-10-15 2020-12-01 国网江苏省电力有限公司电力科学研究院 Power flow optimization control method of power system containing IPFC
WO2021077753A1 (en) * 2019-10-22 2021-04-29 国网山东省电力公司电力科学研究院 Comprehensive control method and system that ensure voltage safety in power recovery stage of multiple feed-in dc system
CN113158573A (en) * 2021-04-29 2021-07-23 广西大学 Small hydropower station regional distribution network optimal power flow obtaining method based on deep learning
CN113283547A (en) * 2021-07-21 2021-08-20 之江实验室 Optimal power flow calculation method based on multi-task deep learning
CN114336634A (en) * 2021-12-31 2022-04-12 广东电网有限责任公司 Load flow calculation method, device and equipment of power grid system
CN114491388A (en) * 2022-01-04 2022-05-13 阿里巴巴(中国)有限公司 Data processing method, device, equipment and storage medium of power system
CN115907000A (en) * 2022-09-09 2023-04-04 天津大学 Small sample learning method for optimal power flow prediction of power system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106684857A (en) * 2016-09-05 2017-05-17 国网江苏省电力公司电力科学研究院 Linear optimal power flow model containing unified power flow controller
JP2018078712A (en) * 2016-11-09 2018-05-17 富士電機株式会社 Tidal current calculation device, tidal current calculation method, and tidal current calculation program
CN107317338A (en) * 2017-08-30 2017-11-03 广东工业大学 The optimal load flow computational methods and device of a kind of power system
CN109599872A (en) * 2018-12-29 2019-04-09 重庆大学 Probabilistic optimal load flow calculation method based on storehouse noise reduction autocoder
WO2021077753A1 (en) * 2019-10-22 2021-04-29 国网山东省电力公司电力科学研究院 Comprehensive control method and system that ensure voltage safety in power recovery stage of multiple feed-in dc system
CN111756043A (en) * 2020-07-30 2020-10-09 广东电网有限责任公司电力科学研究院 Optimal power flow optimization method and system considering reactive power and voltage amplitude
CN112018777A (en) * 2020-10-15 2020-12-01 国网江苏省电力有限公司电力科学研究院 Power flow optimization control method of power system containing IPFC
CN113158573A (en) * 2021-04-29 2021-07-23 广西大学 Small hydropower station regional distribution network optimal power flow obtaining method based on deep learning
CN113283547A (en) * 2021-07-21 2021-08-20 之江实验室 Optimal power flow calculation method based on multi-task deep learning
CN114336634A (en) * 2021-12-31 2022-04-12 广东电网有限责任公司 Load flow calculation method, device and equipment of power grid system
CN114491388A (en) * 2022-01-04 2022-05-13 阿里巴巴(中国)有限公司 Data processing method, device, equipment and storage medium of power system
CN115907000A (en) * 2022-09-09 2023-04-04 天津大学 Small sample learning method for optimal power flow prediction of power system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GANG HUANG等: "Cyber-Constrained Optimal Power Flow Model for Smart Grid Resilience Enhancement", 《IEEE TRANSACTIONS ON SMART GRID》 *
冯斌等: "基于深度强化学习的新型电力系统调度优化方法综述", 《电力系统自动化》 *

Also Published As

Publication number Publication date
CN116154779B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
Wu et al. A novel hybrid system based on multi-objective optimization for wind speed forecasting
Santhosh et al. Short-term wind speed forecasting approach using ensemble empirical mode decomposition and deep Boltzmann machine
Li et al. Short-term nacelle orientation forecasting using bilinear transformation and ICEEMDAN framework
Liu et al. Smart multi-step deep learning model for wind speed forecasting based on variational mode decomposition, singular spectrum analysis, LSTM network and ELM
Rafiq et al. Regularized LSTM based deep learning model: first step towards real-time non-intrusive load monitoring
Liang et al. A multi-variable stacked long-short term memory network for wind speed forecasting
Li et al. An integrated missing-data tolerant model for probabilistic PV power generation forecasting
Islam et al. LSTM-based electrical load forecasting for Chattogram city of Bangladesh
Chen et al. A review of ultra-short-term forecasting of wind power based on data decomposition-forecasting technology combination model
He et al. A hybrid data-driven method for rapid prediction of lithium-ion battery capacity
Hurry Optimizing Power Electronics with Machine Learning Algorithms and Data Science
CN116154779B (en) Optimal power flow calculation method and device based on pre-training model
Bahrami et al. Review of Machine Learning Techniques for Power Electronics Control and Optimization
Yang Comparison of the LS-SVM based load forecasting models
Naoui et al. Integrating iot devices and deep learning for renewable energy in big data system
KAV et al. Hybrid Deep Learning Technique for Optimal Wind Mill Speed Estimation
Liu et al. Recent advances in data-driven prediction for wind power
CN116415147A (en) Pre-training method for photovoltaic system equipment operation data based on self-learning
Chen et al. Wind turbine blade icing diagnosis using convolutional LSTM-GRU with improved African vultures optimization
Goui et al. A Comparative Study of LSTM/GRU Models for Energy Long-Term Forecasting in IoT Networks
Prashanthi et al. A comparative study of the performance of machine learning based load forecasting methods
Li et al. Model-informed generative adversarial network (mi-gan) for learning optimal power flow
CN107526316B (en) Guide display equipment monitoring system based on internet communication engine
Guo et al. Short-Term Photovoltaic Power-Forecasting based on Machine Learning
Yu et al. Look-Ahead Power Grid Dispatch Method Based on A2C Algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant