CN108879691B  Largescale continuous power flow calculation method and device  Google Patents
Largescale continuous power flow calculation method and device Download PDFInfo
 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
Links
 238000004364 calculation method Methods 0.000 title claims abstract description 131
 230000000875 corresponding Effects 0.000 claims abstract description 83
 238000000034 method Methods 0.000 claims abstract description 54
 238000010248 power generation Methods 0.000 claims description 30
 239000011159 matrix material Substances 0.000 claims description 23
 238000006467 substitution reaction Methods 0.000 claims description 7
 238000010586 diagram Methods 0.000 description 12
 238000004422 calculation algorithm Methods 0.000 description 11
 238000000354 decomposition reaction Methods 0.000 description 5
 239000000969 carrier Substances 0.000 description 3
 238000004590 computer program Methods 0.000 description 3
 HPTJABJPZMULFHUHFFFAOYSAN 12(cyclohexylcarbamoylamino)dodecanoic acid Chemical compound OC(=O)CCCCCCCCCCCNC(=O)NC1CCCCC1 HPTJABJPZMULFHUHFFFAOYSAN 0.000 description 2
 238000004891 communication Methods 0.000 description 2
 230000005283 ground state Effects 0.000 description 2
 230000003287 optical Effects 0.000 description 2
 125000004122 cyclic group Chemical group 0.000 description 1
 230000004048 modification Effects 0.000 description 1
 238000006011 modification reaction Methods 0.000 description 1
 238000010606 normalization Methods 0.000 description 1
 230000001575 pathological Effects 0.000 description 1
 230000003068 static Effects 0.000 description 1
Images
Classifications

 H—ELECTRICITY
 H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
 H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
 H02J3/00—Circuit arrangements for ac mains or ac distribution networks
 H02J3/04—Circuit arrangements for ac mains or ac distribution networks for connecting networks of the same frequency but supplied from different sources
 H02J3/06—Controlling transfer of power between connected networks; Controlling sharing of load between connected networks

 H—ELECTRICITY
 H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
 H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
 H02J2203/00—Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
 H02J2203/20—Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]
Abstract
The embodiment of the invention provides a method and a device for largescale 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 preobtained 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
Technical Field
The embodiment of the invention relates to the technical field of power systems, in particular to a method and a device for largescale 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 largescale system. The GPU has an ultrastrong 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 predictioncorrection 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 abovementioned 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 largescale 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 largescale continuous power flow calculation.
In a first aspect, an embodiment of the present invention provides a method for largescale 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 preobtained 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 largescale 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 preobtained 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 preobtained 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 nontransitory computerreadable storage medium, including:
the nontransitory 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 preobtained 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 largescale continuous power flow calculation, provided by the embodiment of the invention, multilevel parallel thread resources are distributed to perform largescale 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 largescale 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 largescale continuous power flow calculation according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a multilevel parallel algorithm for largescale 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 multipower 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 LDAGbased batch pushback calculation according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a largescale 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 multilevel programming model that can be developed using C language.
Fig. 1 is a schematic flow chart of a method for largescale continuous power flow calculation according to an embodiment of the present invention, and as shown in fig. 1, the method for largescale 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 preobtained 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 preobtained 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 multilevel parallel algorithm of largescale continuous power flow calculation according to an embodiment of the present invention, and the multilevel shown in fig. 2 is divided into three levels, i.e., multicondition parallel, multipowerflow section parallel, and singlepowerflow finegranularity parallel.
The description for level 1 is as follows:
i.e. taking into account the paralleling in case of generator and load fluctuations. The windsolar 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 largescale 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) mdimensional fluctuation factor matrix A ═ a_{ij}In which a_{ij}Indicating the ith (i) under the jth working condition<R) generator node or (ir) th (r)<i<R + s) the ripple factor of the load node is [ a [_{min},a_{max}]Random number in between, a_{min}And a_{max}Is 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)} _{i}Is the ith element, k, of the base power generation load vector^{(j)} _{i}And the ith element of the power generation load vector for the obtained j working condition.
k^{(j)} _{i}＝a_{ij}·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 precalculating 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 aF at the same time directly according to a given series of load levels, where the point aE 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 (powervoltage curve) and reference points (i.e., aF 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 manner_{1}～λ_{L}Wherein the xth load factor λ_{x}Comprises the following steps:
wherein λ is_{x}Is the xth load factor, wherein x is more than 0 and less than or equal to L; lambda [ alpha ]_{low}The initial point load factor can be calculated for presetting, and 1.0 can be generally selected; lambda [ alpha ]_{up}The 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}～λ_{L}Under 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 level_{x}Is the xth load factor, k_{i}Is the ith in the (r +2 × s) dimensional vector k.
k^{*} _{(i*m+x)}＝λ_{x}k_{i}(4)
Fig. 5 is a view of a multipower 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 multiload 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 illconditioned 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 finegrained 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 coarsegrained parallel at a task level. By combining massive thread computing resources on a highperformance computing GPU, a finegrained 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, forwardbackward 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 finegrained 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 nonzero elements in the admittance matrix, and related computing resources are configured to design a finegrained 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 forwardbackward 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 noncorrelation 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 finegrained 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 forwardbackward 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 1Blockm, each layer of a hierarchical directed graph is corresponding to Lever 1Lever 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 1Blockm, 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 1Blockm 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 largescale continuous load flow calculation, the multilevel parallel thread resources are distributed to perform largescale continuous load flow parallel calculation, the calculation efficiency of continuous load flow calculation can be improved, and therefore the efficiency and accuracy of largescale 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 a_{ij}；a_{ij}Is [ a ]_{min},a_{max}]Random number in between, a_{min}And a_{max}Is 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 a_{ij}；a_{ij}Is [ a ]_{min},a_{max}]Random number in between, a_{min}And a_{max}Is 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 largescale 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 preobtained operating condition information includes:
and distributing m parallel thread resources which are in onetoone 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 largescale continuous load flow calculation, parallel thread resources corresponding to all working conditions one by one are distributed, normal operation of multiworking 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 largescale 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:
wherein λ is_{x}Is the xth load factor, wherein x is more than 0 and less than or equal to L; lambda [ alpha ]_{low}Calculating a load factor of a preset starting point; lambda [ alpha ]_{up}Is 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:
wherein λ is_{x}Is the xth load factor, wherein x is more than 0 and less than or equal to L; lambda [ alpha ]_{low}Calculating a load factor of a preset starting point; lambda [ alpha ]_{up}Is 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 largescale 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 largescale 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 largescale 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)}＝λ_{x}k_{i}
wherein k is^{*} _{(i*m+x)}A power generation load vector, λ, for the (i × m + x) th preset load level_{x}Is the xth load factor, k_{i}Is 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)}＝λ_{x}k_{i}
wherein k is^{*} _{(i*m+x)}A power generation load vector, λ, for the (i × m + x) th preset load level_{x}Is the xth load factor, k_{i}Is a (r +2 s) dimensional vectorThe ith of k. Reference may be made to the above embodiments, which are not described in detail.
The largescale 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 forwardbackward 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 finegrained computation process includes:
splitting the forwardbackward 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 forwardbackward 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 largescale 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 largescale system are improved.
Fig. 7 is a schematic structural diagram of a largescale 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 largescale 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 preobtained 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 preobtained 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 largescale continuous load flow calculation provided by the embodiment of the invention can improve the calculation efficiency of continuous load flow calculation by distributing multilevel parallel thread resources to perform largescale continuous load flow parallel calculation, thereby improving the efficiency and accuracy of largescale system voltage stability analysis.
The device for largescale 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 abovedescribed method embodiments, including for example: distributing corresponding parallel thread resources for each working condition in the working condition information according to the preobtained 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 nontransitory 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 abovementioned method embodiments, for example, comprising: distributing corresponding parallel thread resources for each working condition in the working condition information according to the preobtained 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 nontransitory computerreadable 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 preobtained 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 abovedescribed 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 abovedescribed technical solutions may be embodied in the form of a software product, which can be stored in a computerreadable 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 largescale 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 preobtained 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 preobtaining 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 a_{ij}；a_{ij}Is [ a ]_{min},a_{max}]Random number in between, a_{min}And a_{max}Is 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 preobtained condition information comprises:
and distributing m parallel thread resources which are in onetoone 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:
wherein λ is_{x}Is the xth load factor, wherein x is more than 0 and less than or equal to L; lambda [ alpha ]_{low}Calculating a load factor of a preset starting point; lambda [ alpha ]_{up}Is 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)}＝λ_{x}k_{i}
wherein k is^{*} _{(i*m+x)}A power generation load vector, λ, for the (i × m + x) th preset load level_{x}Is the xth load factor, k_{i}Is 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 pushback 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 finegrained computation process includes:
splitting the forwardbackward 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 largescale 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 preobtained 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 a_{ij}；a_{ij}Is [ a ]_{min},a_{max}]Random number in between, a_{min}And a_{max}Is 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 nontransitory computerreadable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number  Priority Date  Filing Date  Title 

CN201810646054.3A CN108879691B (en)  20180621  20180621  Largescale continuous power flow calculation method and device 
Applications Claiming Priority (1)
Application Number  Priority Date  Filing Date  Title 

CN201810646054.3A CN108879691B (en)  20180621  20180621  Largescale continuous power flow calculation method and device 
Publications (2)
Publication Number  Publication Date 

CN108879691A CN108879691A (en)  20181123 
CN108879691B true CN108879691B (en)  20200904 
Family
ID=64340173
Family Applications (1)
Application Number  Title  Priority Date  Filing Date 

CN201810646054.3A Active CN108879691B (en)  20180621  20180621  Largescale continuous power flow calculation method and device 
Country Status (1)
Country  Link 

CN (1)  CN108879691B (en) 
Families Citing this family (1)
Publication number  Priority date  Publication date  Assignee  Title 

CN110704023B (en) *  20190926  20211022  北京华大九天科技股份有限公司  Matrix block division method and device based on topological sorting 
Citations (3)
Publication number  Priority date  Publication date  Assignee  Title 

CN105391057A (en) *  20151120  20160309  国家电网公司  GPU thread design method of power flow Jacobian matrix calculation 
CN105576648A (en) *  20151123  20160511  中国电力科学研究院  Static security analysis doublelayer parallel method based on GPUCUP heterogeneous computing platform 
CN106874113A (en) *  20170119  20170620  国电南瑞科技股份有限公司  A kind of many GPU heterogeneous schemas static security analysis computational methods of CPU+ 
Family Cites Families (2)
Publication number  Priority date  Publication date  Assignee  Title 

CN102593820B (en) *  20111222  20140122  河海大学  Continuation power flow algorithm considering field current constraint and armature current constraint of power generator 
CN104156609B (en) *  20140819  20170215  河海大学  Power grid flow solvability identification and initial value generating method based on continuous power flow 

2018
 20180621 CN CN201810646054.3A patent/CN108879691B/en active Active
Patent Citations (3)
Publication number  Priority date  Publication date  Assignee  Title 

CN105391057A (en) *  20151120  20160309  国家电网公司  GPU thread design method of power flow Jacobian matrix calculation 
CN105576648A (en) *  20151123  20160511  中国电力科学研究院  Static security analysis doublelayer parallel method based on GPUCUP heterogeneous computing platform 
CN106874113A (en) *  20170119  20170620  国电南瑞科技股份有限公司  A kind of many GPU heterogeneous schemas static security analysis computational methods of CPU+ 
Also Published As
Publication number  Publication date 

CN108879691A (en)  20181123 
Similar Documents
Publication  Publication Date  Title 

Young et al.  A numerical technique for solving stiff ordinary differential equations associated with the chemical kinetics of reactiveflow problems  
Yang et al.  Robust $ H_ {\infty} $ Control With Missing Measurements and Time Delays  
Aristidou et al.  Power system dynamic simulations using a parallel twolevel schurcomplement decomposition  
Al Bahrani et al.  Orthogonal PSO algorithm for economic dispatch of thermal generating units under various power constraints in smart power grid  
Li et al.  An ADMM based distributed finitetime algorithm for economic dispatch problems  
CN109066710B (en)  Multitarget reactive power optimization method and device, computer equipment and storage medium  
Song et al.  Fully GPU‐based electromagnetic transient simulation considering large‐scale control systems for system‐level studies  
Chen et al.  A twolayered parallel static security assessment for largescale grids based on GPU  
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  
Deng et al.  A data and task coscheduling algorithm for scientific cloud workflows  
Alam et al.  Novel parallel algorithms for fast multigpubased generation of massive scalefree networks  
Razik et al.  A comparative analysis of LU decomposition methods for power system simulations  
CN108879691B (en)  Largescale continuous power flow calculation method and device  
Huang et al.  Realtime contingency analysis on massively parallel architectures with compensation method  
CN111900716A (en)  Random power flow uncertainty quantification method based on sparse chaotic polynomial approximation  
Yamashita et al.  Algorithm 925: Parallel solver for semidefinite programming problem having sparse Schur complement matrix  
Yoshizawa et al.  Automatic tuning of sparse matrixvector multiplication for CRS format on GPUs  
CN108599173B (en)  Method and device for solving batch power flows  
Alam et al.  GPUbased parallel algorithm for generating massive scalefree networks using the preferential attachment model  
Gnanavignesh et al.  GPUaccelerated sparse LU factorization for power system simulation  
Peplinski et al.  Parallel performance of htype adaptive mesh refinement for Nek5000  
CN110516316B (en)  GPU acceleration method for solving Euler equation by interrupted Galerkin method  
Daisaka et al.  Application of GRAPE9MPX for high precision calculation in particle physics and performance results  
RicoHernandez et al.  Analysis of electrical networks using finegrained techniques of parallel processing based on OpenMP 
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 