CN108879691B - Large-scale continuous power flow calculation method and device - Google Patents

Large-scale continuous power flow calculation method and device Download PDF

Info

Publication number
CN108879691B
CN108879691B CN201810646054.3A CN201810646054A CN108879691B CN 108879691 B CN108879691 B CN 108879691B CN 201810646054 A CN201810646054 A CN 201810646054A CN 108879691 B CN108879691 B CN 108879691B
Authority
CN
China
Prior art keywords
load
parallel
parallel thread
working condition
preset
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.)
Active
Application number
CN201810646054.3A
Other languages
Chinese (zh)
Other versions
CN108879691A (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.)
Tsinghua University
State Grid Corp of China SGCC
State Grid Beijing Electric Power Co Ltd
Original Assignee
Tsinghua University
State Grid Corp of China SGCC
State Grid Beijing Electric Power Co Ltd
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 Tsinghua University, State Grid Corp of China SGCC, State Grid Beijing Electric Power Co Ltd filed Critical Tsinghua University
Priority to CN201810646054.3A priority Critical patent/CN108879691B/en
Publication of CN108879691A publication Critical patent/CN108879691A/en
Application granted granted Critical
Publication of CN108879691B publication Critical patent/CN108879691B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The embodiment of the invention provides a method and a device for large-scale continuous power flow calculation, wherein the method comprises the following steps: distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel; according to a predetermined load factor, distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources to calculate the preset load level in parallel; and in the process of calculating the preset load level or the load level each time, acquiring the calculated fine granularity, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the calculation process with the same fine granularity so as to execute the parallel calculation process corresponding to the same fine granularity. The device performs the above method. The method and the device provided by the embodiment of the invention can improve the calculation efficiency of the continuous power flow calculation.

Description

Large-scale continuous power flow calculation method and device
Technical Field
The embodiment of the invention relates to the technical field of power systems, in particular to a method and a device for large-scale continuous power flow calculation.
Background
With the access of new energy power sources and new loads and the continuous expansion of the scale of power grids, the static voltage stability analysis of power systems faces new challenges.
The conventional continuous power flow calculation method is low in efficiency and poor in applicability, and particularly cannot meet the analysis requirements of a large-scale system. The GPU has an ultra-strong floating point computing capability due to the characteristics of massive concurrent threads, and is widely applied to accelerated computing in various fields as a carrier of parallel computing. However, the prediction-correction method adopted by the conventional continuous power flow calculation has relatively complex control logic, and special processing such as dimension expansion parameterization is adopted at a heavy load level, so that the overall calculation is not suitable for a unified instruction parallel architecture of a GPU, and the calculation efficiency is low.
Therefore, how to avoid the above-mentioned defects and improve the calculation efficiency of the continuous power flow calculation, so as to improve the efficiency and accuracy of the voltage stability analysis of the large-scale system becomes a problem to be solved urgently.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a method and a device for large-scale continuous power flow calculation.
In a first aspect, an embodiment of the present invention provides a method for large-scale continuous power flow calculation, where the method includes:
distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel;
according to a predetermined load factor, distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources to calculate the preset load level in parallel;
and in the process of calculating the preset load level or the load level each time, acquiring the calculated fine granularity, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the calculation process with the same fine granularity so as to execute the parallel calculation process corresponding to the same fine granularity.
In a second aspect, an embodiment of the present invention provides an apparatus for large-scale continuous power flow calculation, where the apparatus includes:
the first parallel computing unit is used for distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to compute the load level corresponding to each working condition in parallel;
the second parallel computing unit is used for distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources according to a predetermined load factor so as to compute the preset load level in parallel;
and the third parallel computing unit is used for acquiring the computed fine granularity in the process of computing the preset load level or the load level each time, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the computing processes with the same fine granularity so as to execute the parallel computing processes corresponding to the same fine granularity.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein,
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform a method comprising:
distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel;
according to a predetermined load factor, distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources to calculate the preset load level in parallel;
and in the process of calculating the preset load level or the load level each time, acquiring the calculated fine granularity, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the calculation process with the same fine granularity so as to execute the parallel calculation process corresponding to the same fine granularity.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, including:
the non-transitory computer readable storage medium stores computer instructions that cause the computer to perform a method comprising:
distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel;
according to a predetermined load factor, distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources to calculate the preset load level in parallel;
and in the process of calculating the preset load level or the load level each time, acquiring the calculated fine granularity, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the calculation process with the same fine granularity so as to execute the parallel calculation process corresponding to the same fine granularity.
According to the method and the device for large-scale continuous power flow calculation, provided by the embodiment of the invention, multi-level parallel thread resources are distributed to perform large-scale continuous power flow parallel calculation, so that the calculation efficiency of continuous power flow calculation can be improved, and the efficiency and the accuracy of large-scale system voltage stability analysis are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for large-scale continuous power flow calculation according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a multi-level parallel algorithm for large-scale continuous power flow calculation according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a prior art continuous power flow calculation method;
FIG. 4 is a schematic diagram of a continuous power flow calculation method according to an embodiment of the invention;
fig. 5 is a view of a multi-power flow calculation scenario provided by level 1 and level 2 parallel calculations according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating LDAG-based batch push-back calculation according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a large-scale continuous power flow calculation apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
To facilitate understanding of the embodiments of the present invention, the following explanation of related terms is provided:
1. continuous tide: continuous Power Flow (CPF), also called Continuation Power Flow, is a powerful tool for analyzing voltage stability of Power systems.
GPU: the Graphics Processing Unit is a Graphics processor, has a large number of concurrent threads, and is widely applied to accelerated computing in various fields as a parallel computing carrier.
3, CUDA: the computer Unified Device Architecture is a general parallel computing Architecture introduced by NVIDIA corporation, and provides a multi-level programming model that can be developed using C language.
Fig. 1 is a schematic flow chart of a method for large-scale continuous power flow calculation according to an embodiment of the present invention, and as shown in fig. 1, the method for large-scale continuous power flow calculation according to the embodiment of the present invention includes the following steps:
s101: and distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel.
Specifically, the device allocates corresponding parallel thread resources to each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel. The device can be a carrier carrying a GPU (graphics processing unit) such as a server and a terminal, and the method is executed in the GPU. Fig. 2 is a schematic diagram of a multi-level parallel algorithm of large-scale continuous power flow calculation according to an embodiment of the present invention, and the multi-level shown in fig. 2 is divided into three levels, i.e., multi-condition parallel, multi-power-flow section parallel, and single-power-flow fine-granularity parallel.
The description for level 1 is as follows:
i.e. taking into account the paralleling in case of generator and load fluctuations. The wind-solar grid connection enables the output of the generator to have certain uncertainty, and the active output of the power generation node often fluctuates randomly within a certain range; and the access of new loads such as electric vehicles and the like causes the disturbance condition of the power load in a short time. These all make electric power system actual running state can appear multiple operating mode in short time, need carry out more comprehensive continuous load flow calculation to multiple operating mode, just can have comprehensive and accurate judgement to the voltage stability under the current operating state to avoid the emergence of voltage collapse accident. The continuous power flow calculation under different working conditions brings about the calculation amount which is multiplied by the previous calculation amount, and is unacceptable for a large-scale system. Through analysis, the continuous power flow calculation among all working conditions has no data dependence under the condition that the system topology is not changed, so that a parallel algorithm can be designed for accelerated calculation.
The following describes a method for acquiring the operating condition information in advance:
the embodiment of the invention adopts a method of randomly setting fluctuation factors to simulate the possible fluctuation of the generator and the load. Assuming that r generator nodes and s load nodes exist in the node system, the active output of the generator nodes and the active and reactive of the load nodes can be arranged into a (r +2 × s) dimensional vector k according to the node numbers, which is called as a power generation load vector.
An (r +2 s) -dimensional fluctuation factor vector α is constructed, wherein the first r elements represent the fluctuation factors of the active power output of r power plants, and the last 2 s elements represent the active and reactive fluctuation factors of s loads(0)Based on the generated load vector, the values of some fluctuation factors α i corresponding to the new energy power plant and the fluctuable load can be changed within a certain range, different fluctuation factor vectors are generated, and the fluctuation factor vectors respectively correspond to different working conditions, and if m working conditions are considered, m different vectors α form a (r +2 s) m-dimensional fluctuation factor matrix A ═ aijIn which aijIndicating the ith (i) under the jth working condition<R) generator node or (i-r) th (r)<i<R + s) the ripple factor of the load node is [ a [min,amax]Random number in between, aminAnd amaxIs a preset constant and represents the upper and lower bounds of the fluctuation factor.
Different working condition information can be obtained by the formula (1), wherein k(0) iIs the i-th element, k, of the base power generation load vector(j) iAnd the ith element of the power generation load vector for the obtained j working condition.
k(j) i=aij·k(0) i(1)
The matrix form can be expressed as formula (2), wherein K is the final (r +2 × s) × m dimensional initial power generation load matrix containing all working conditions, wherein the jth column vector is the initial power generation load vector of the working condition j; k(0)=diag(k(0)) Is a diagonal matrix formed by the base power generation load vectors.
K=K(0)*A (2)
Each column of the matrix K corresponds to each kind of working condition information, and continuous power flow calculation under m kinds of working conditions can be carried out by using each column of data as initial values of active power and load active power and reactive power of the generator. Under the CUDA architecture, the matrix K can be obtained by pre-calculating the data of the power system, then each line of data is distributed to a certain parallel thread resource which can comprise a thread block and a thread, and the continuous power flow calculation among different lines can be started at the same time, namely the parallel calculation among multiple working conditions.
S102: and distributing a first target parallel thread resource for a preset load level corresponding to each working condition in the parallel thread resources according to a predetermined load factor so as to calculate the preset load level in parallel.
Specifically, the device allocates a first target parallel thread resource to a preset load level corresponding to each of the working conditions in the parallel thread resources according to a predetermined load factor, so as to calculate the preset load level in parallel.
Layer 2 is described below with reference to fig. 2:
and the level 2 is the parallelism of multiple power flow sections, namely the parallelism of power flow calculation under the preset load level corresponding to each working condition. The hierarchy changes the mode of sequential and continuous calculation from a low load level to a high load level in the traditional continuous power flow calculation, directly solves the power flow sections under different load levels, judges the limit point which can be reached by the load level by convergence, and embodies the fundamental difference between the algorithm of the embodiment of the invention and the traditional continuous power flow algorithm. Fig. 3 is a schematic diagram of a continuous power flow calculation method in the prior art, and as shown in fig. 3, the method in the prior art calculates a point a of the ground state level to a point E of the pathological state level in series in sequence, and the abscissa (i.e., the load level) of each point is calculated from the last point. Fig. 4 is a schematic diagram of a continuous power flow calculation method according to an embodiment of the present invention, and as shown in fig. 4, the method according to the embodiment of the present invention performs power flow calculation on points a-F at the same time directly according to a given series of load levels, where the point a-E can converge and the point F cannot, and then the highest load level that can converge is taken as a load limit point.
Need to explainThe method comprises the following steps: fig. 4 uses the same PV curve (power-voltage curve) and reference points (i.e., a-F in the figure) as fig. 3 for ease of illustration only. In fact, the parallel method does not completely coincide with the prior art method in calculating the data points, since the abscissa is given in advance. A set of load factor sequences lambda can be given in a generally evenly distributed manner1~λLWherein the x-th load factor λxComprises the following steps:
Figure BDA0001703539370000071
wherein λ isxIs the x-th load factor, wherein x is more than 0 and less than or equal to L; lambda [ alpha ]lowThe initial point load factor can be calculated for presetting, and 1.0 can be generally selected; lambda [ alpha ]upThe load level is a preset maximum load level, generally estimated to be equal to 3.0, 4.0, 5.0 and the like according to the actual system condition, and is required to be greater than the load limit point at the actual limit point of the system (namely, the load limit point determined by referring to fig. 4); l is the number of preset load factors (corresponding to 5 in total to a to E in the example in fig. 2), the larger the value is, the denser the data point distribution is, the higher the accuracy is, but the calculation amount is also correspondingly increased, and a suitable value can be selected according to hardware resources and accuracy requirements.
Different power flow sections correspond to different load levels, and each load level is obtained by multiplying the load factor on the basis of the power generation load vector. Thus, given a set of load factor sequences λ1~λLUnder the condition of (i), all the power generation load vectors which need to be applied to the power flow calculation under m working conditions and L preset load levels can be obtained according to the initial power generation load matrix K, and the total number of the power generation load vectors is m, L, wherein the power generation load vector K of the (i, m + x) th preset load level* (i*m+x)Calculated from formula (4), wherein k* (i*m+x)A power generation load vector, λ, for the (i × m + x) th preset load levelxIs the x-th load factor, kiIs the ith in the (r +2 × s) dimensional vector k.
k* (i*m+x)=λxki(4)
Fig. 5 is a view of a multi-power flow calculation scenario provided by level 1 and level 2 parallel calculations in the embodiment of the present invention, and as shown in fig. 5, the design of the first two layers of parallel calculation methods actually provides a series of unrelated power flow calculation scenarios, in which the system network structures are the same, but the active power output and the load of the generator are different, so that the power flow calculation results are also different. Aiming at the characteristic that the GPU has massive concurrent threads, computing resources are reasonably distributed to carry out batch parallel solution on the load flow scenes, PV curves, load limit points and load margins under different working conditions can be obtained, and therefore voltage stability analysis of the system is completed.
The parallel computing method of the multi-load flow section abandons some important logics in the existing method for adapting to a parallel framework, such as the connection between an iteration initial value and the last load level computation, the parameterization processing adopted for avoiding matrix singularity and the like, and the single load flow computing method is required to be capable of processing the special conditions, so that the load flow computing method of the continuous Newton method is adopted in the embodiment of the invention. The method can be simultaneously suitable for solving the ground state and the ill-conditioned power flow under the condition of zero starting, and therefore the successful implementation of the level 2 parallel computation is guaranteed.
S103: and in the process of calculating the preset load level or the load level each time, acquiring the calculated fine granularity, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the calculation process with the same fine granularity so as to execute the parallel calculation process corresponding to the same fine granularity.
Specifically, the device obtains the calculated fine granularity in each calculation process of the preset load level or the load level, and allocates a second target parallel thread resource in the first target parallel thread resource or the parallel thread resource for the calculation process of the same fine granularity, so as to execute the parallel calculation process corresponding to the same fine granularity.
The following is explained for level 3 with reference to fig. 2 (the case in each calculation of the load level is not shown, and similarly, the case in each calculation of the preset load level can be referred to):
and the layer 3 is fine-grained parallelism of single power flow calculation. The first two layers of parallel algorithms divide continuous load flow calculation under multiple working conditions into multiple independent common load flow calculation, and are coarse-grained parallel at a task level. By combining massive thread computing resources on a high-performance computing GPU, a fine-grained parallel algorithm is designed aiming at a single load flow computing process, and a thread structure is reasonably adjusted inside a GPU computing Kernel, so that the communication time is reduced, and the efficiency is maximized.
The embodiment of the invention adopts a continuous Newton method load flow solving method of Seattle for solving the load flow equation, analyzes the main calculation steps and designs a corresponding batch parallel algorithm. The main calculation comprises Jacobian matrix LU decomposition, flow imbalance power quantity f (x) solution, forward-backward substitution calculation and state variable updating. The LU decomposition is carried out only once on the fixed operation example, so that the LU decomposition can be completed in advance and a factor table is formed for application in iteration, the calculated amount is small in the whole calculation, and meanwhile, because the LU decomposition process contains complex logic, a parallel algorithm is not designed for the LU decomposition and is completed in advance in series in the calculation. The other three parts of calculation need to be carried out for a plurality of times in iteration, and are changed according to different calculation scenes, and a fine-grained parallel algorithm is designed to complete the calculation.
For power flow imbalance power solution, the product of a series of voltage quantities, the real part and the imaginary part of an admittance matrix and the sine cosine value of a phase angle is actually added circularly. By combining the sparsity of the admittance matrix of the power system, the summation process can be split into multiple addition processes without data dependence according to non-zero elements in the admittance matrix, and related computing resources are configured to design a fine-grained parallel algorithm. It should be noted that, this algorithm involves operations of adding and writing to a uniform memory address by different computing resources, and a race phenomenon occurs, so that the cyclic summation can be implemented by using an atomic adding operation.
For forward-backward substitution calculation, the sparse linear equation system solving process with the coefficient matrix being the upper triangular matrix and the lower triangular matrix can be unified and reduced into updating and normalization of the element values corresponding to the nodes. The process has obvious serial sequential computing characteristic, the values of the node elements updated later depend on the nodes updated first, and complete parallelism cannot be realized. But this order dependency is still sparse, i.e. each calculation depends only on the results of the previous calculation or calculations, which enables a large number of non-correlation calculations to be performed in parallel. Aiming at the problem, the calculation process is divided into a hierarchical directed graph consisting of basic calculation elements, and fine-grained calculation is completed in parallel at the same layer.
In addition, the updated content of the state variable is an addition operation of each element therein. Due to the fact that the updates of different state variables are not related, parallel implementation of the updates of the state variables is simple, corresponding computing resources are distributed to each element in the state variables, and the updates of the state variables are completed in parallel.
Fig. 6 is a schematic diagram of batch forward-backward substitution calculation based on an LDAG in the embodiment of the present invention, where the LDAG is a Directed Acyclic Graph (layerd Directed Acyclic Graph), and as shown in fig. 6, the description is not repeated for the case where the Layered Directed Graph is m, and the Layered Directed Graph is L. Scenes 1 to m in fig. 6 correspond to the serial threads corresponding to the operating conditions 1 to m and Thread1 to Thread, for example: serial computing threads are arranged among a basic computing element 2, a basic computing element 3, a basic computing element 8, a basic computing element 10 and a basic computing element 11 corresponding to Thread1, parallel Thread resources are corresponding to blocks 1-Blockm, each layer of a hierarchical directed graph is corresponding to Lever 1-Lever h, h second target parallel Thread resources are distributed in the parallel Thread resources corresponding to the blocks 1 by taking the blocks 1 as an example, namely the second target parallel Thread resources Y1 are occupied by the first layers (m in total) in the blocks 1-Blockm, and the basic computing element 2, the basic computing element 5, the basic computing element 1 and the basic computing element 4 are synchronously and parallelly computed; and a second layer (m in total) of blocks 1-Blockm occupies a second target parallel thread resource Y2, synchronously calculates the basic computing element 3 and the basic computing element 6 in parallel, and the like. Referring to the above example, the same fine granularity corresponds to the same layer in m scenes.
According to the method for large-scale continuous load flow calculation, the multi-level parallel thread resources are distributed to perform large-scale continuous load flow parallel calculation, the calculation efficiency of continuous load flow calculation can be improved, and therefore the efficiency and accuracy of large-scale system voltage stability analysis are improved.
On the basis of the above embodiment, the obtaining of the operating condition information in advance includes:
acquiring a power generation load vector; the power generation load vector comprises a (r +2 x s) -dimensional vector k consisting of active output of r generator nodes and active and reactive power of s load nodes.
Specifically, the device obtains a power generation load vector; the power generation load vector comprises a (r +2 x s) -dimensional vector k consisting of active output of r generator nodes and active and reactive power of s load nodes. Reference may be made to the above embodiments, which are not described in detail.
Constructing a (r +2 s) m dimensional fluctuation factor matrix A according to preset m working conditions; wherein (r +2 × s) represents the number of rows of A, m represents the number of columns of A, and the element in A is aij;aijIs [ a ]min,amax]Random number in between, aminAnd amaxIs a preset constant.
Specifically, the device constructs a (r +2 × s) × m dimensional fluctuation factor matrix A according to preset m working conditions; wherein (r +2 × s) represents the number of rows of A, m represents the number of columns of A, and the element in A is aij;aijIs [ a ]min,amax]Random number in between, aminAnd amaxIs a preset constant. Reference may be made to the above embodiments, which are not described in detail.
And acquiring an initial power generation load matrix K according to the K and the A, wherein each column of the K corresponds to each type of working condition information.
Specifically, the device obtains an initial power generation load matrix K according to the K and the A, wherein each column of the K corresponds to each type of working condition information. Reference may be made to the above embodiments, which are not described in detail.
The method for calculating the large-scale continuous power flow provided by the embodiment of the invention can reasonably and effectively obtain the working condition information.
On the basis of the above embodiment, the allocating corresponding parallel thread resources to each operating condition in the operating condition information according to the pre-obtained operating condition information includes:
and distributing m parallel thread resources which are in one-to-one correspondence with the working conditions according to the number m of the working condition types of the working condition information.
Specifically, the device allocates m parallel thread resources corresponding to the working conditions one by one according to the number m of the working condition types of the working condition information. Reference may be made to the above embodiments, which are not described in detail.
According to the method for large-scale continuous load flow calculation, parallel thread resources corresponding to all working conditions one by one are distributed, normal operation of multi-working condition level parallel calculation is guaranteed, the calculation efficiency of continuous load flow calculation can be further improved, and therefore the efficiency and accuracy of voltage stability analysis of a large-scale system are improved.
On the basis of the above embodiment, the predetermining of the load factor includes:
calculating the load factor according to the following formula:
Figure BDA0001703539370000111
wherein λ isxIs the x-th load factor, wherein x is more than 0 and less than or equal to L; lambda [ alpha ]lowCalculating a load factor of a preset starting point; lambda [ alpha ]upIs a preset maximum load level; l is the number of preset load factors.
Specifically, the device calculates the load factor according to the following formula:
Figure BDA0001703539370000112
wherein λ isxIs the x-th load factor, wherein x is more than 0 and less than or equal to L; lambda [ alpha ]lowCalculating a load factor of a preset starting point; lambda [ alpha ]upIs a preset maximum load level; l is the number of preset load factors. Reference may be made to the above embodiments, which are not described in detail.
The method for calculating the large-scale continuous power flow provided by the embodiment of the invention can reasonably and effectively determine the load factor.
On the basis of the foregoing embodiment, the allocating, according to a predetermined load factor, a first target parallel thread resource to a preset load level corresponding to each of the operating conditions in the parallel thread resources includes:
and distributing L first target parallel thread resources corresponding to the preset load level one by one in the parallel thread resources according to the L.
Specifically, the device allocates L first target parallel thread resources corresponding to the preset load level one to one in the parallel thread resources according to the L. Reference may be made to the above embodiments, which are not described in detail.
According to the method for large-scale continuous load flow calculation, the first target parallel thread resources which correspond to the preset load levels one by one are distributed, normal operation of parallel calculation of the multiple load flow sections is guaranteed, the calculation efficiency of continuous load flow calculation can be further improved, and therefore the efficiency and accuracy of voltage stability analysis of a large-scale system are improved.
On the basis of the above embodiment, the calculating the preset load level in parallel includes:
calculating the preset load levels in parallel according to the following formula:
k* (i*m+x)=λxki
wherein k is* (i*m+x)A power generation load vector, λ, for the (i × m + x) th preset load levelxIs the x-th load factor, kiIs the ith in the (r +2 × s) dimensional vector k.
Specifically, the device calculates the preset load level in parallel according to the following formula:
k* (i*m+x)=λxki
wherein k is* (i*m+x)A power generation load vector, λ, for the (i × m + x) th preset load levelxIs the x-th load factor, kiIs a (r +2 s) -dimensional vectorThe ith of k. Reference may be made to the above embodiments, which are not described in detail.
The large-scale continuous load flow calculation method provided by the embodiment of the invention can accurately and quickly calculate the preset load level through a specific formula.
On the basis of the embodiment, the preset load level or the load level is calculated by adopting a forward-backward flow calculation method; correspondingly, the allocating a second target parallel thread resource in the first target parallel thread resource or the parallel thread resource for the same fine-grained computation process includes:
splitting the forward-backward substitution load flow calculation process into a hierarchical directed graph comprising basic calculation elements; wherein the hierarchical directed graph is m or L.
Specifically, the device splits the forward-backward substitution load flow calculation process into a hierarchical directed graph comprising basic calculation elements; wherein the hierarchical directed graph is m or L. Reference may be made to the above embodiments, which are not described in detail.
If the number of the layered directed graphs is m, h second target parallel thread resources are distributed in the parallel thread resources, so that each identical layer in the m layered directed graphs occupies each corresponding second target parallel thread resource; and h is the number of layers of the layered directed graph.
Specifically, if the device determines that the hierarchical digraphs are m, h second target parallel thread resources are allocated in the parallel thread resources, so that each identical layer in the m hierarchical digraphs occupies each corresponding second target parallel thread resource; and h is the number of layers of the layered directed graph. Reference may be made to the above embodiments, which are not described in detail.
Or the like, or, alternatively,
if the number of the layered directed graphs is L, h second target parallel thread resources are distributed in the first target parallel thread resources, so that each identical layer in the L layered directed graphs occupies each corresponding second target parallel thread resource; and h is the number of layers of the layered directed graph.
Specifically, if the device determines that the number of the layered directed graphs is L, h second target parallel thread resources are allocated in the first target parallel thread resources, so that each identical layer in the L layered directed graphs occupies each corresponding second target parallel thread resource; and h is the number of layers of the layered directed graph. Reference may be made to the above embodiments, which are not described in detail.
According to the large-scale continuous power flow calculation method provided by the embodiment of the invention, the second target parallel thread resources are distributed to each same layer in the layered digraph, the single power flow fine granularity is determined to be the same layer in the layered digraph, and parallel calculation is carried out, so that the calculation efficiency of continuous power flow calculation can be further improved, and the efficiency and the accuracy of voltage stability analysis of a large-scale system are improved.
Fig. 7 is a schematic structural diagram of a large-scale continuous power flow calculation apparatus according to an embodiment of the present invention, and as shown in fig. 7, an embodiment of the present invention provides a large-scale continuous power flow calculation apparatus including a first parallel calculation unit 701, a first parallel calculation unit 702, and a first parallel calculation unit 703, where:
the first parallel computing unit 701 is configured to allocate, according to pre-obtained operating condition information, corresponding parallel thread resources to each operating condition in the operating condition information, so as to compute load levels corresponding to the operating conditions in parallel; the second parallel computing unit 702 is configured to allocate, in the parallel thread resources, a first target parallel thread resource to a preset load level corresponding to each of the operating conditions according to a predetermined load factor, so as to compute the preset load level in parallel; the third parallel computing unit 703 is configured to obtain a fine granularity of the computation in each process of computing the preset load level or the load level, and allocate a second target parallel thread resource in the first target parallel thread resource or the parallel thread resource for a computing process with the same fine granularity, so as to execute a parallel computing process corresponding to the same fine granularity.
Specifically, the first parallel computing unit 701 is configured to allocate, according to pre-obtained operating condition information, corresponding parallel thread resources to each operating condition in the operating condition information, so as to compute load levels corresponding to the operating conditions in parallel; the second parallel computing unit 702 is configured to allocate, in the parallel thread resources, a first target parallel thread resource to a preset load level corresponding to each of the operating conditions according to a predetermined load factor, so as to compute the preset load level in parallel; the third parallel computing unit 703 is configured to obtain a fine granularity of the computation in each process of computing the preset load level or the load level, and allocate a second target parallel thread resource in the first target parallel thread resource or the parallel thread resource for a computing process with the same fine granularity, so as to execute a parallel computing process corresponding to the same fine granularity.
The device for large-scale continuous load flow calculation provided by the embodiment of the invention can improve the calculation efficiency of continuous load flow calculation by distributing multi-level parallel thread resources to perform large-scale continuous load flow parallel calculation, thereby improving the efficiency and accuracy of large-scale system voltage stability analysis.
The device for large-scale continuous power flow calculation according to the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the device are not described herein again, and reference may be made to the detailed description of the method embodiments.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 8, the electronic device includes: a processor (processor)801, a memory (memory)802, and a bus 803;
the processor 801 and the memory 802 complete communication with each other through a bus 803;
the processor 801 is configured to call program instructions in the memory 802 to perform the methods provided by the above-described method embodiments, including for example: distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel; according to a predetermined load factor, distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources to calculate the preset load level in parallel; and in the process of calculating the preset load level or the load level each time, acquiring the calculated fine granularity, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the calculation process with the same fine granularity so as to execute the parallel calculation process corresponding to the same fine granularity.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel; according to a predetermined load factor, distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources to calculate the preset load level in parallel; and in the process of calculating the preset load level or the load level each time, acquiring the calculated fine granularity, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the calculation process with the same fine granularity so as to execute the parallel calculation process corresponding to the same fine granularity.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel; according to a predetermined load factor, distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources to calculate the preset load level in parallel; and in the process of calculating the preset load level or the load level each time, acquiring the calculated fine granularity, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the calculation process with the same fine granularity so as to execute the parallel calculation process corresponding to the same fine granularity.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the electronic device and the like are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for large-scale continuous power flow calculation is characterized by comprising the following steps:
distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to calculate the load level corresponding to each working condition in parallel;
according to a predetermined load factor, distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources to calculate the preset load level in parallel;
in the process of calculating the preset load level or the load level each time, obtaining calculated fine granularity, and distributing second target parallel thread resources in the first target parallel thread resources or the parallel thread resources for the calculation processes with the same fine granularity so as to execute the parallel calculation processes corresponding to the same fine granularity;
the pre-obtaining of the working condition information comprises the following steps:
acquiring a power generation load vector; the power generation load vector comprises a (r +2 x s) dimensional vector k consisting of active output of r generator nodes and active and reactive power of s load nodes;
constructing a (r +2 s) m dimensional fluctuation factor matrix A according to preset m working conditions; wherein (r +2 × s) represents the number of rows of A, m represents the number of columns of A, and the element in A is aij;aijIs [ a ]min,amax]Random number in between, aminAnd amaxIs a preset constant;
acquiring an initial power generation load matrix K according to the K and the A, wherein each column of the K corresponds to each type of working condition information;
wherein different power flow sections correspond to different load levels, each load level being obtained by multiplying a load factor on the basis of the power generation load vector.
2. The method according to claim 1, wherein the allocating corresponding parallel thread resources to each condition in the condition information according to the pre-obtained condition information comprises:
and distributing m parallel thread resources which are in one-to-one correspondence with the working conditions according to the number m of the working condition types of the working condition information.
3. The method of claim 2, wherein the predetermination of the load factor comprises:
calculating the load factor according to the following formula:
Figure FDA0002461288040000021
wherein λ isxIs the x-th load factor, wherein x is more than 0 and less than or equal to L; lambda [ alpha ]lowCalculating a load factor of a preset starting point; lambda [ alpha ]upIs a preset maximum load level; l is the number of preset load factors.
4. The method of claim 3, wherein the allocating, according to a predetermined load factor, a first target parallel thread resource in the parallel thread resources for a preset load level corresponding to each of the operating conditions comprises:
and distributing L first target parallel thread resources corresponding to the preset load level one by one in the parallel thread resources according to the L.
5. The method of claim 3, wherein said calculating in parallel said preset load level comprises:
calculating the preset load levels in parallel according to the following formula:
k* (i*m+x)=λxki
wherein k is* (i*m+x)A power generation load vector, λ, for the (i × m + x) th preset load levelxIs the x-th load factor, kiIs the ith in the (r +2 × s) dimensional vector k.
6. The method according to claim 3, wherein the preset load level or the load level is calculated using a push-back flow calculation method; correspondingly, the allocating a second target parallel thread resource in the first target parallel thread resource or the parallel thread resource for the same fine-grained computation process includes:
splitting the forward-backward substitution load flow calculation process into a hierarchical directed graph comprising basic calculation elements; wherein the hierarchical directed graph is m or L;
if the number of the layered directed graphs is m, h second target parallel thread resources are distributed in the parallel thread resources, so that each identical layer in the m layered directed graphs occupies each corresponding second target parallel thread resource; wherein h is the number of layers of the layered directed graph;
or the like, or, alternatively,
if the number of the layered directed graphs is L, h second target parallel thread resources are distributed in the first target parallel thread resources, so that each identical layer in the L layered directed graphs occupies each corresponding second target parallel thread resource; and h is the number of layers of the layered directed graph.
7. An apparatus for large-scale continuous power flow calculation, comprising:
the first parallel computing unit is used for distributing corresponding parallel thread resources for each working condition in the working condition information according to the pre-obtained working condition information so as to compute the load level corresponding to each working condition in parallel;
the second parallel computing unit is used for distributing a first target parallel thread resource to a preset load level corresponding to each working condition in the parallel thread resources according to a predetermined load factor so as to compute the preset load level in parallel;
a third parallel computing unit, configured to obtain a computed fine granularity in each process of computing the preset load level or the load level, and allocate a second target parallel thread resource in the first target parallel thread resource or the parallel thread resource for a computing process with the same fine granularity, so as to execute a parallel computing process corresponding to the same fine granularity;
the apparatus is further configured to:
acquiring a power generation load vector; the power generation load vector comprises a (r +2 x s) dimensional vector k consisting of active output of r generator nodes and active and reactive power of s load nodes;
constructing a (r +2 s) m dimensional fluctuation factor matrix A according to preset m working conditions; wherein (r +2 × s) represents the number of rows of A, m represents the number of columns of A, and the element in A is aij;aijIs [ a ]min,amax]Random number in between, aminAnd amaxIs a preset constant;
acquiring an initial power generation load matrix K according to the K and the A, wherein each column of the K corresponds to each type of working condition information;
wherein different power flow sections correspond to different load levels, each load level being obtained by multiplying a load factor on the basis of the power generation load vector.
8. An electronic device, comprising: a processor, a memory, and a bus, wherein,
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 6.
CN201810646054.3A 2018-06-21 2018-06-21 Large-scale continuous power flow calculation method and device Active CN108879691B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810646054.3A CN108879691B (en) 2018-06-21 2018-06-21 Large-scale continuous power flow calculation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810646054.3A CN108879691B (en) 2018-06-21 2018-06-21 Large-scale continuous power flow calculation method and device

Publications (2)

Publication Number Publication Date
CN108879691A CN108879691A (en) 2018-11-23
CN108879691B true CN108879691B (en) 2020-09-04

Family

ID=64340173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810646054.3A Active CN108879691B (en) 2018-06-21 2018-06-21 Large-scale continuous power flow calculation method and device

Country Status (1)

Country Link
CN (1) CN108879691B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704023B (en) * 2019-09-26 2021-10-22 北京华大九天科技股份有限公司 Matrix block division method and device based on topological sorting
CN113672775A (en) * 2021-08-06 2021-11-19 南方电网数字电网研究院有限公司 Parallel computing method for real-time graph of power grid
CN115827227A (en) * 2022-11-28 2023-03-21 中国华能集团清洁能源技术研究院有限公司 Serial-parallel resource optimal allocation method and system for simulation system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391057A (en) * 2015-11-20 2016-03-09 国家电网公司 GPU thread design method of power flow Jacobian matrix calculation
CN105576648A (en) * 2015-11-23 2016-05-11 中国电力科学研究院 Static security analysis double-layer parallel method based on GPU-CUP heterogeneous computing platform
CN106874113A (en) * 2017-01-19 2017-06-20 国电南瑞科技股份有限公司 A kind of many GPU heterogeneous schemas static security analysis computational methods of CPU+

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102593820B (en) * 2011-12-22 2014-01-22 河海大学 Continuation power flow algorithm considering field current constraint and armature current constraint of power generator
CN104156609B (en) * 2014-08-19 2017-02-15 河海大学 Power grid flow solvability identification and initial value generating method based on continuous power flow

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391057A (en) * 2015-11-20 2016-03-09 国家电网公司 GPU thread design method of power flow Jacobian matrix calculation
CN105576648A (en) * 2015-11-23 2016-05-11 中国电力科学研究院 Static security analysis double-layer parallel method based on GPU-CUP heterogeneous computing platform
CN106874113A (en) * 2017-01-19 2017-06-20 国电南瑞科技股份有限公司 A kind of many GPU heterogeneous schemas static security analysis computational methods of CPU+

Also Published As

Publication number Publication date
CN108879691A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
Aristidou et al. Power system dynamic simulations using a parallel two-level schur-complement decomposition
CN108879691B (en) Large-scale continuous power flow calculation method and device
CN109066710B (en) Multi-target reactive power optimization method and device, computer equipment and storage medium
Roberge et al. Parallel power flow on graphics processing units for concurrent evaluation of many networks
Kardoš et al. Two-level parallel augmented schur complement interior-point algorithms for the solution of security constrained optimal power flow problems
Chen et al. A two-layered parallel static security assessment for large-scale grids based on GPU
Li et al. An ADMM based distributed finite-time algorithm for economic dispatch problems
CN111062610B (en) Power system state estimation method and system based on information matrix sparse solution
Munawar et al. Advanced genetic algorithm to solve MINLP problems over GPU
Huang et al. Real-time contingency analysis on massively parallel architectures with compensation method
Razik et al. A comparative analysis of LU decomposition methods for power system simulations
CN111900716A (en) Random power flow uncertainty quantification method based on sparse chaotic polynomial approximation
Yoshizawa et al. Automatic tuning of sparse matrix-vector multiplication for CRS format on GPUs
Lastovetsky et al. Data distribution for dense factorization on computers with memory heterogeneity
CN113328467A (en) Probability voltage stability evaluation method, system, terminal device and medium
CN108599173B (en) Method and device for solving batch power flows
Alam et al. GPU-based parallel algorithm for generating massive scale-free networks using the preferential attachment model
Gnanavignesh et al. Gpu-accelerated sparse lu factorization for power system simulation
Peplinski et al. Parallel performance of h-type adaptive mesh refinement for Nek5000
CN115718986A (en) Multi-core parallel time domain simulation method based on distributed memory architecture
Low et al. Linear algebraic Louvain method in python
Korch et al. Parallelization of particle-in-cell codes for nonlinear kinetic models from mathematical physics
Riesinger et al. Gpu optimization of pseudo random number generators for random ordinary differential equations
Sebastian et al. Gpu accelerated three dimensional unstructured geometric multigrid solver
Yu et al. Comparison of parallel implementations of controls on GPU for transient simulation of power system

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