Large power grid security check calculation method suitable for multiple time scales
By evaluating the complexity of the power grid safety verification calculation, selecting the parallel computing mode, and using parallel algorithms with load balancing and CPU + GPU hybrid architecture, the problem of long-term and low resource utilization of large-scale power grid safety verification calculation is solved, and efficient computing resource utilization and fast security verification task processing is achieved.
Patent Information
- Application Number
- CN202510405414.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-02
AI Technical Summary
Large-scale power grid safety verification and calculation takes time and low resource utilization. Especially in multi-user concurrency scenarios, traditional stand-alone or homogeneous clusters are difficult to meet the timeliness requirements.
By evaluating the complexity of the calculation content, selecting suitable parallel computing modes, and dynamically allocating computing subtasks based on the load balancing mechanism, using a parallel algorithm with a hybrid CPU + GPU architecture, combining shared memory optimization and mixed precision computing, significantly improving computing efficiency.
It improves the utilization rate of computing resources, significantly improves the efficiency of large-scale power grid security verification, and can quickly complete the concurrent security verification tasks of multiple users, avoiding the problems of resource waste and inefficient computing in traditional methods.
Smart Images

Figure CN119917290A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a large power grid security verification calculation method applicable to multiple time scales. Background Art
[0002] With the rapid development of UHV power grid, the expansion of power grid scale has led to the complication of electrical connections. Safety and stability analysis needs to cover multiple time scales such as medium- and long-term, monthly, day-ahead, intraday and real-time. In the existing technology, large-scale power grid safety verification has problems such as long calculation time and low resource utilization. Especially in the multi-user concurrent scenario, traditional single machines or homogeneous clusters are difficult to meet the timeliness requirements. Therefore, there is an urgent need for an efficient and scalable parallel computing method to improve the efficiency of multi-threaded task processing.
[0003] The above information disclosed in the Background section is only for enhancement of understanding of the background of the present application and therefore it may contain information that does not constitute the prior art that is already known to a person of ordinary skill in the art. Summary of the invention
[0004] The purpose of the present invention is to address the problem of low efficiency in multi-threaded task processing. This application proposes a large-scale power grid security verification calculation method suitable for multiple time scales. The parallel computing mode is preliminarily determined by evaluating the computational complexity of the computational content, and then the multi-user security verification task is decomposed to obtain multiple computing subtasks and dynamically allocated based on the load balancing mechanism to achieve resource optimization allocation to improve computing resource utilization; the parallel algorithm using the CPU+GPU hybrid architecture significantly improves the computing efficiency through shared memory optimization and mixed precision calculation, and finally the calculation subtask results of the security verification of multiple users are sorted and merged to obtain the final security verification calculation result. The scheme not only improves the computing resource utilization of the resource pool, but also significantly improves the efficiency of large-scale power grid security verification.
[0005] In a first aspect, a technical solution provided in an embodiment of the present invention is: a large power grid security verification calculation method applicable to multiple time scales, comprising the following steps: S1. Obtain the calculation content of the multi-user security verification task, evaluate the complexity of the calculation content and select a parallel computing mode based on the evaluation result; S2. Extract the computing subtasks of the multi-user security verification task based on the parallel computing device pool and job scheduling strategy set in the parallel computing mode, and dynamically allocate the computing subtasks to the corresponding computing nodes using a load balancing mechanism; S3, uses a parallel algorithm based on a CPU+GPU hybrid architecture to process computing subtasks of multiple computing nodes, merges the computing subtask results of multiple users, and generates a final safety verification report.
[0006] Preferably, the calculation content includes the power grid model scope and time scale; The calculation scale is divided into level I, level II, and level III from small to large according to the scope of the power grid model; The time scales include medium to long term, monthly, day-ahead, intraday and real-time.
[0007] Preferably, the step of evaluating the complexity of the calculation content and selecting a parallel computing mode based on the evaluation result comprises the following steps: Extract the number of nodes, branches and sections of the power grid topology based on the power grid model range and time period; The complexity evaluation value is determined according to the number of nodes, the number of branches, the number of sections and their corresponding node calculation coefficients and branch-section coupling coefficients; and a matching parallel computing mode is selected from a parallel computing mode library according to the complexity evaluation value.
[0008] Preferably, the parallel computing mode includes at least one of the following: The single-machine CPU multi-core parallel mode uses the OpenMP shared memory programming model to match the level I intraday computing tasks; Single-machine heterogeneous parallel mode, using OpenMP+CUDA programming model, matching level II static safety analysis tasks; Cluster multi-core parallel mode, using OpenMP+MPI message communication model, matching level III medium and long-term computing tasks; The cluster heterogeneous parallel mode adopts the OpenMP+CUDA+MPI hybrid programming model to match the level III large-scale real-time computing tasks.
[0009] As a preferred embodiment, S2, based on the parallel computing device pool and job scheduling strategy set in the parallel computing mode, extracting the computing subtasks of the multi-user security verification task, and dynamically allocating the computing subtasks to the corresponding computing nodes using a load balancing mechanism; comprises the following steps: According to the hardware attributes of the computing nodes in the parallel computing device pool and the type of network analysis application, a matching splitting strategy is selected from a preset task splitting rule library to obtain an initial computing subtask; Based on the task dependency in the job scheduling strategy, the computing subtasks are topologically sorted to generate an acyclic task dependency graph; Determine the idle rate, load rate and queue length of the computing node to determine the granularity adjustment factor, and adjust the initial computing subtask according to the granularity adjustment factor to match the computing subtask granularity corresponding to the computing node to obtain the target computing subtask; The load weights of the computing nodes participating in the calculation are determined in turn through the CPU utilization, GPU memory occupancy and task queue length; the target computing subtask is assigned to the computing node corresponding to the smallest load weight.
[0010] As a preference, determine the idle rate, load rate, and queue length of the computing node to determine the granularity adjustment factor , the formula is as follows: ; in, is the load rate of the current node, is the load rate threshold, is the idle rate of the current node, is the idle rate threshold, is the normalized value of the task queue length of the current node, is the queue length threshold, , as well as are weight coefficients respectively, among which, .
[0011] Preferably, a parallel algorithm of a CPU+GPU hybrid architecture is used to process computing subtasks of multiple computing nodes, including the following steps: Dynamically assign tasks to CPU or GPU computing units based on the computing type and hardware adaptability of the computing subtask; OpenMP multi-thread management is used on the CPU side to perform collaborative operations with multiple GPUs; The batch power flow parallel solution method is used on the GPU side to achieve multi-section synchronous calculation; The computing process data of each computing subtask is obtained and structured and then stored in a memory database or a distributed database.
[0012] Preferably, the method of using OpenMP multi-thread management on the CPU side to perform collaborative operations with multiple GPUs includes the following steps: Use OpenMP to create multiple threads, each thread is responsible for managing the task scheduling of a GPU device; automatically adapt the computing subtasks according to the load balancing mechanism of the GPU device; Each thread starts the GPU kernel function through the CUDA API and passes the parameters of the computing subtask. Each thread monitors the GPU computing progress in real time and records the number of completed sections, the remaining computing amount and the estimated completion time.
[0013] Preferably, the method of using a batch power flow parallel solution method on the GPU side to realize multi-section synchronous calculation includes the following steps: The admittance matrix of the multi-period power grid is stored as a three-dimensional tensor according to the section number. The admittance matrix of each section is stored in a sparse format, and the non-zero elements are arranged in row priority order. The power grid parameters are organized into a two-dimensional tensor according to the section number. Align the 3D tensor and / or 2D tensor according to the number of bytes to store them to fit the access granularity of the GPU. Use multiple CUDA thread blocks to implement asynchronous execution of multi-section calculations, where each section is assigned a CUDA thread block, and the number of threads in the thread block is adapted to the Warp scheduling granularity of the NVIDIA GPU. Each thread block loads the non-zero elements of the admittance matrix of the current section into the shared memory. Each thread block independently performs Newton-Raphson iterations to calculate the node voltage amplitude and phase angle and writes the iteration results to the result buffer in the global video memory. Determine the residual norm of the current section calculated by each thread block, and mark the section calculation completed if the convergence condition is met.
[0014] Preferably, the step of merging the calculation subtask results of multiple users to generate a final safety verification report comprises the following steps: Merge the calculation subtask results of the same user in different time periods in chronological order to obtain a user-level security verification report; or The computing subtask result data of all users is aggregated and analyzed according to the user ID and time period number to generate a full-network security verification report.
[0015] Beneficial effects of the present invention: (1) To address the problems of long computation time and low resource utilization in large-scale power grid security verification calculations, this application evaluates the complexity of the calculation content, selects a suitable parallel computing mode (such as single-machine CPU multi-core parallel, single-machine heterogeneous parallel, cluster multi-core parallel, cluster heterogeneous parallel), and dynamically allocates computing subtasks based on a load balancing mechanism, so that computing resources are fully utilized and the resource waste problem of traditional single machines or homogeneous clusters is avoided. The parallel algorithm of the CPU+GPU hybrid architecture is adopted, combined with shared memory optimization and mixed precision computing, which significantly improves the computing efficiency, especially in multi-user concurrent scenarios, and can quickly complete the security verification task of large-scale power grids.
[0016] (2) Power grid security verification needs to cover multiple time scales, including medium- and long-term, monthly, day-ahead, intraday, and real-time. Traditional methods are difficult to cope with computing requirements at different time scales. This application divides computing tasks according to the scope and time scale of the power grid model, and selects different parallel computing modes based on the complexity assessment value. Different parallel computing strategies are adopted for tasks at different time scales (such as the single-machine CPU multi-core parallel mode is suitable for intraday computing tasks, and the cluster heterogeneous parallel mode is suitable for large-scale real-time computing tasks). It can flexibly respond to computing requirements at different time scales and ensure that both medium- and long-term planning and real-time safety analysis can be completed efficiently. Through task decomposition and dynamic allocation, the system can automatically select the optimal computing mode based on the characteristics of the task and the availability of computing resources, thereby improving the adaptability and flexibility of the system.
[0017] (3) With the expansion of the scale of power grids and the increase in the number of users, traditional single machines or homogeneous clusters are difficult to meet the computing needs of multi-user concurrent scenarios. This application adopts a cluster heterogeneous parallel mode, combined with the OpenMP, CUDA and MPI hybrid programming model, to support multi-user concurrent computing. Through the load balancing mechanism, the granularity of the computing subtasks is dynamically adjusted to ensure the load balancing of each computing node. At the same time, the parallel computing power of the GPU is used to achieve multi-section synchronous computing, further improving the concurrent processing capability of the system. Through dynamic load balancing and GPU parallel computing, this application enables the system to efficiently handle a large number of concurrent tasks, avoiding the computing bottleneck problem in traditional methods and ensuring the stability and efficiency of the system under high load conditions.
[0018] The above invention content is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts.
[0020] Figure 1 The present invention is a flow chart of a large power grid security verification calculation method applicable to multiple time scales. DETAILED DESCRIPTION
[0021] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation method described herein is only an optimal embodiment of the present invention, which is only used to explain the present invention and does not limit the scope of protection of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0022] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the drawings; the process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0023] Example: Figure 1 As shown, a large power grid security verification calculation method applicable to multiple time scales includes the following steps: S1. Obtain the calculation content of a multi-user security verification task, evaluate the complexity of the calculation content, and select a parallel computing mode based on the evaluation result.
[0024] As a preferred embodiment, the calculation content includes the power grid model range and time scale; the calculation scale is divided into Level I, Level II, and Level III from small to large according to the power grid model range; the time scale includes medium and long term, monthly, day-ahead, intraday, and real-time.
[0025] As a preferred embodiment, the step of evaluating the complexity of the calculation content and selecting a parallel calculation mode based on the evaluation result comprises the following steps: Extract the number of nodes, branches and sections of the power grid topology based on the power grid model range and time period; The complexity evaluation value is determined according to the number of nodes, the number of branches, the number of sections and their corresponding node calculation coefficients and branch-section coupling coefficients; and a matching parallel computing mode is selected from a parallel computing mode library according to the complexity evaluation value.
[0026] It can be understood that based on the scope of the power grid model and the number of time periods, the number of nodes in the power grid topology is extracted. N 1. Number of branches N 2 and number of sections N 3. Number of nodes N 1. Number of branches N 2 directly reflects the complexity of the power grid topology. The provincial model has a small coverage area, and the number of nodes and branches is relatively low. The national grid needs to process tens of thousands of nodes and branches due to cross-regional interconnection. The number of sections represents the granularity of the time scale. Real-time calculations need to process second-level sections (such as N 3=86400 / day), while only a small number of representative sections are needed in the medium and long term. In a specific example, the power grid model range can be set as: Provincial model: N 1≤5000, N 2≤8000; Network level model: 5000< N1≤20000,8000< N 2≤30000; State Grid model: N 1>20000, N 2>30000; The number of time periods is divided according to the time scale: Medium and long term: N 3≤10 (such as annual / quarterly plan); Monthly: 10< N 3≤100; Day-ahead / Real-time: N 3>100.
[0027] Furthermore, the complexity evaluation value can be expressed as: ;in, k 1 is the node calculation coefficient (empirical value k 1=0.5), k 2 is the branch-section coupling coefficient (empirical value k 2=0.1), which is used to quantify the computational complexity correlation between branches (such as transmission lines, transformers) and time sections (time points) in power grid security verification. In practice, the correlation calculation formula needs to be used for calculation, which is: , m is the weight coefficient.
[0028] As a preferred embodiment, the parallel computing mode includes at least one of the following: The single-machine CPU multi-core parallel mode uses the OpenMP shared memory programming model to match the level I intraday computing tasks; Single-machine heterogeneous parallel mode, using OpenMP+CUDA programming model, matching level II static safety analysis tasks; Cluster multi-core parallel mode, using OpenMP+MPI message communication model, matching level III medium and long-term computing tasks; The cluster heterogeneous parallel mode adopts the OpenMP+CUDA+MPI hybrid programming model to match the level III large-scale real-time computing tasks.
[0029] It is understandable that in single CPU multi-core parallel mode: if C ≤10 6 , using the shared memory programming model OpenMP, suitable for provincial-level intraday computing; single-machine heterogeneous parallel mode: if 10 6 < C ≤10 8 , using OpenMP+CUDA programming model, suitable for network-level static security analysis; cluster multi-core parallel mode: if 10 8 < C ≤10 10 , using OpenMP+MPI message communication model, suitable for medium and long-term verification at the national grid level; cluster heterogeneous parallel mode: if C >1010 , adopts the OpenMP+CUDA+MPI hybrid programming model, which is suitable for state-level real-time high-throughput tasks.
[0030] In this embodiment, the calculation content of the multi-user security verification task is first obtained, including the power grid model scope and time scale. The power grid model scope is divided into level I (provincial level), level II (grid level), and level III (national grid level) according to the scale. The time scale includes medium- and long-term, monthly, day-ahead, intraday, and real-time. Based on the power grid model scope and the number of time periods, the number of nodes, branches, and sections of the power grid topology structure are extracted. According to the number of nodes, branches, sections and their corresponding node calculation coefficients and branch-section coupling coefficients, the complexity evaluation value is calculated. Through the complexity evaluation, the system can automatically select the optimal parallel computing mode according to the computing requirements of the task, avoiding the waste of resources and low computing efficiency caused by mismatching computing modes in traditional methods. For example, for small-scale intraday computing tasks, the single-machine CPU multi-core parallel mode can make full use of the computing power of multi-core CPUs and significantly improve computing efficiency; for large-scale real-time computing tasks, the cluster heterogeneous parallel mode can combine the computing advantages of CPUs and GPUs to ensure that the computing tasks are completed in a short time.
[0031] S2. Based on the parallel computing device pool and job scheduling strategy set in the parallel computing mode, the computing subtasks of the multi-user security verification task are extracted, and the load balancing mechanism is used to dynamically allocate the computing subtasks to the corresponding computing nodes.
[0032] As a preferred embodiment, S2 includes the following steps: According to the hardware attributes of the computing nodes in the parallel computing device pool and the network analysis application type, a matching splitting strategy is selected from the preset task splitting rule library to obtain the initial computing subtask; among them, the hardware attributes include: number of CPU cores, GPU memory capacity, and network bandwidth between nodes; network analysis application types include: static safety analysis, power flow calculation, and sensitivity analysis; splitting strategies include: splitting by power grid area: dividing the entire network model into multiple electrically weakly coupled sub-areas, each sub-area is a computing subtask; splitting by time section: decomposing multi-time period tasks into independent subtasks according to time slices, and calculating each section separately; splitting by computing type: splitting mixed tasks (such as power flow + safety verification) into heterogeneous subtasks, and assigning them to CPU or GPU nodes respectively.
[0033] In this embodiment, according to the hardware attributes of the computing nodes in the parallel computing device pool (such as the number of CPU cores, memory size, GPU model and video memory capacity, etc.) and the type of network analysis application, a matching splitting strategy is selected from the preset task splitting rule library to obtain the initial computing subtask, which can make full use of the hardware advantages of the computing nodes. For example, for nodes with powerful GPU computing capabilities, intensive tasks such as matrix operations suitable for GPU processing are split out; for nodes with many CPU cores but weak GPU performance, more logical operation tasks that rely on CPU serial processing are assigned. When processing security verification tasks containing a large number of matrix multiplication operations, the computing efficiency is greatly improved.
[0034] Furthermore, based on the task dependencies in the job scheduling strategy, the computing subtasks are topologically sorted to generate an acyclic task dependency graph; the task dependencies include data dependency and timing dependency, where data dependency means that sub-computing task B needs to wait for the output data of sub-computing task A; timing dependency means that medium- and long-term tasks need to be started after the day-ahead task is completed.
[0035] In this embodiment, based on the task dependency in the job scheduling strategy, the computing subtasks are topologically sorted and an acyclic task dependency graph is generated, which ensures the correctness and order of task execution during the calculation process and avoids errors or deadlocks caused by improper task execution order. In complex power grid security verification scenarios, for example, the power flow calculation task may depend on the initialization task of the power grid topology structure. Through topological sorting, it can be ensured that the topology structure is built first, and then the power flow calculation is performed, thereby ensuring the smooth progress of the entire calculation process, effectively reducing the calculation error rate, and improving the reliability of the calculation results.
[0036] Furthermore, the idle rate, load rate and task queue length of the computing node are determined to determine the granularity adjustment factor, and the initial computing subtask is adjusted according to the granularity adjustment factor to match the computing subtask granularity corresponding to the computing node to obtain the target computing subtask.
[0037] As a preferred embodiment, the idle rate, load rate and queue length of the computing node are determined to determine the granularity adjustment factor , the formula is as follows: ; in, is the load rate of the current node, is the load rate threshold, is the idle rate of the current node, is the idle rate threshold, is the normalized value of the task queue length of the current node, is the queue length threshold, , as well as are weight coefficients respectively, among which, .
[0038] In this embodiment, when the idle rate of the computing node is high, the load rate is low, and the task queue length is short, the task granularity is appropriately increased to fully utilize the node resources; conversely, when the node load is heavy, the task granularity is reduced to avoid excessive node load. By dynamically adjusting the task granularity, the utilization rate of the overall computing resources is significantly improved.
[0039] The load weights of the computing nodes participating in the calculation are determined in turn through the CPU utilization, GPU memory occupancy and task queue length; the target computing subtask is assigned to the computing node corresponding to the smallest load weight.
[0040] As a preferred embodiment, the load weight calculation formula can be expressed as: ; in, is the CPU utilization, is the GPU memory occupancy rate, is the normalized value of the task queue length of the current node, and b1, b2, and b3 are the set weight coefficients respectively.
[0041] In this embodiment, the dynamic load balancing mechanism enables computing tasks to be evenly distributed on each computing node, avoiding the situation where some nodes are overly busy while other nodes are idle. In the scenario where multiple users submit security verification tasks concurrently, the system can dynamically allocate tasks based on the real-time load status of each node. For example, at a certain moment, there are 10 computing nodes in the system. Through the load balancing mechanism, the load difference of each node is always kept within the compliance range (for example, 10%), which significantly improves the concurrent processing capability and overall performance of the system, and ensures the stability and efficiency of the system under high load conditions.
[0042] S3, uses a parallel algorithm based on a CPU+GPU hybrid architecture to process computing subtasks of multiple computing nodes, merges the computing subtask results of multiple users, and generates a final safety verification report.
[0043] As a preferred embodiment, a parallel algorithm of a CPU+GPU hybrid architecture is used to process computing subtasks of multiple computing nodes, including the following steps: Dynamically allocate tasks to CPU or GPU computing units based on the computing type and hardware adaptability of the computing subtask.
[0044] It is understandable that in the large power grid safety verification calculation, there are a large number of matrix operations, numerical iterations and other computationally intensive tasks. GPUs have a natural advantage in handling such tasks and can use their many computing cores to achieve parallel acceleration. For example, in the matrix inversion operation in power flow calculation, the GPU processing speed can be several times faster than the CPU. However, the CPU is better at control tasks such as task scheduling and logical judgment. Through precise allocation, the computing subtasks can be reasonably diverted to the most appropriate computing unit.
[0045] Furthermore, OpenMP multi-thread management is used on the CPU side to perform collaborative operations with multiple GPUs.
[0046] As a preferred embodiment, the method of using OpenMP multi-thread management on the CPU side to perform collaborative operations with multiple GPUs includes the following steps: Use OpenMP to create multiple threads, each thread is responsible for managing the task scheduling of a GPU device; automatically adapt the computing subtasks according to the load balancing mechanism of the GPU device; Each thread starts the GPU kernel function through the CUDA API and passes the parameters of the computing subtask. Each thread monitors the GPU computing progress in real time and records the number of completed sections, the remaining computing amount and the estimated completion time.
[0047] It is understandable that the multithreading created by OpenMP can efficiently manage the task scheduling of different GPU devices. Each thread automatically adapts the computing subtask according to the load balancing mechanism of the GPU device to avoid the situation where one GPU is overloaded while other GPUs are idle. The above coordination operations further improve the overall computing power of the system.
[0048] Furthermore, a batch power flow parallel solution method is used on the GPU side to realize multi-section synchronous calculation.
[0049] As a preferred embodiment, the method of implementing multi-section synchronous calculation by using a batch power flow parallel solution method on the GPU side includes the following steps: The admittance matrix of the multi-period power grid is stored as a three-dimensional tensor according to the section number. The admittance matrix of each section is stored in a sparse format, and the non-zero elements are arranged in row priority order. The power grid parameters are organized into a two-dimensional tensor according to the section number. Align the 3D tensor and / or 2D tensor according to the number of bytes to store them to fit the access granularity of the GPU. Use multiple CUDA thread blocks to implement asynchronous execution of multi-section calculations, where each section is assigned a CUDA thread block, and the number of threads in the thread block is adapted to the Warp scheduling granularity of the NVIDIA GPU. Each thread block loads the non-zero elements of the admittance matrix of the current section into the shared memory. Each thread block independently performs Newton-Raphson iterations to calculate the node voltage amplitude and phase angle and writes the iteration results to the result buffer in the global video memory. Determine the residual norm of the current section calculated by each thread block, and mark the section calculation completed if the convergence condition is met.
[0050] It is understandable that large power grids contain multiple sections, and traditional serial computing methods are extremely inefficient. The GPU side stores the multi-period power grid admittance matrix and power grid parameters in a specific format, adapting to its access granularity, significantly reducing data reading time. Multiple CUDA thread blocks are used to asynchronously process different sections, and each thread block independently performs Newton-Raphson iterations to calculate node voltage amplitudes and phase angles, providing strong support for real-time, safe and efficient analysis of power grids.
[0051] Furthermore, the computing process data of each computing subtask is obtained and the computing process data is structured and then stored in a memory database or a distributed database.
[0052] In this embodiment, the calculation process of each calculation subtask is recorded according to the following fields: task ID, computing node number, start and end timestamps; number of convergence iterations, maximum error value, critical branch load rate; abnormal flag (such as over-limit alarm, data overflow); the obtained process log is stored in a hierarchical manner as a real-time log and a persistent log, where the real-time log is stored in a memory database (such as Redis) for real-time query by the online monitoring system; the persistent log is archived to a distributed file system (such as HDFS) by user and time period, for example, the retention period is ≥ 30 days.
[0053] As a preferred embodiment, the steps of merging the calculation subtask results of multiple users to generate a final safety verification report include the following steps: Merge the calculation subtask results of the same user in different time periods in chronological order to obtain a user-level security verification report; or The computing subtask result data of all users is aggregated and analyzed according to the user ID and time period number to generate a full-network security verification report.
[0054] In this embodiment, the in-memory database is suitable for storing hot data that needs to be accessed quickly, and can meet the frequent reading requirements of data in the real-time computing process, ensuring the smoothness of the computing process. The distributed database is used to store a large amount of historical data to ensure the security and scalability of the data. For example, when the power grid operation and maintenance personnel need to view the recent safety verification calculation process data to analyze the power grid operation trend, they can quickly obtain it from the in-memory database; and for long-term historical data archiving and in-depth analysis, it can be extracted from the distributed database. The storage method designed in this application not only facilitates data management and maintenance, but also provides a rich data foundation for subsequent power grid optimization, fault diagnosis, etc., and improves the level of intelligence of power grid safety management.
[0055] The specific implementation described above is a preferred implementation of the present invention for a large power grid safety verification calculation method suitable for multiple time scales. It is not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to this specific implementation. All equivalent changes made in accordance with the shape and structure of the present invention are within the protection scope of the present invention.
Claims
1. A large power grid security verification calculation method suitable for multiple time scales, characterized in that: The following steps are involved: S1. Obtain the calculation content of the multi-user security verification task, evaluate the complexity of the calculation content and select a parallel computing mode based on the evaluation result; S2. Extract the computing subtasks of the multi-user security verification task based on the parallel computing device pool and job scheduling strategy set in the parallel computing mode, and dynamically allocate the computing subtasks to the corresponding computing nodes using a load balancing mechanism; S3, uses a parallel algorithm based on a CPU+GPU hybrid architecture to process computing subtasks of multiple computing nodes, merges the computing subtask results of multiple users, and generates a final safety verification report.
2. A large power grid security verification calculation method applicable to multiple time scales according to claim 1, characterized in that: The calculation content includes the scope and time scale of the power grid model; The calculation scale is divided into level I, level II, and level III from small to large according to the scope of the power grid model; The time scales include medium to long term, monthly, day-ahead, intraday and real-time.
3. A large power grid security verification calculation method applicable to multiple time scales according to claim 1, characterized in that: The step of evaluating the complexity of the calculation content and selecting a parallel computing mode based on the evaluation result comprises the following steps: Extract the number of nodes, branches and sections of the power grid topology based on the power grid model range and time period; The complexity evaluation value is determined according to the number of nodes, the number of branches, the number of sections and their corresponding node calculation coefficients and branch-section coupling coefficients; and a matching parallel computing mode is selected from a parallel computing mode library according to the complexity evaluation value.
4. A large power grid security verification calculation method applicable to multiple time scales according to claim 2 or 3, characterized in that: The parallel computing mode includes at least one of the following: The single-machine CPU multi-core parallel mode uses the OpenMP shared memory programming model to match the level I intraday computing tasks; Single-machine heterogeneous parallel mode, using OpenMP+CUDA programming model, matching level II static safety analysis tasks; Cluster multi-core parallel mode, using OpenMP+MPI message communication model, matching level III medium and long-term computing tasks; The cluster heterogeneous parallel mode adopts the OpenMP+CUDA+MPI hybrid programming model to match the level III large-scale real-time computing tasks.
5. The method for calculating the safety verification of a large power grid applicable to multiple time scales according to claim 1 is characterized in that: S2, extracting computing subtasks of the multi-user security verification task based on the parallel computing device pool and job scheduling strategy set in the parallel computing mode, and dynamically allocating computing subtasks to corresponding computing nodes using a load balancing mechanism; comprising the following steps: According to the hardware attributes of the computing nodes in the parallel computing device pool and the type of network analysis application, a matching splitting strategy is selected from a preset task splitting rule library to obtain an initial computing subtask; Based on the task dependency in the job scheduling strategy, the computing subtasks are topologically sorted to generate an acyclic task dependency graph; Determine the idle rate, load rate and queue length of the computing node to determine the granularity adjustment factor, and adjust the initial computing subtask according to the granularity adjustment factor to match the computing subtask granularity corresponding to the computing node to obtain the target computing subtask; The load weights of the computing nodes involved in the calculation are determined in turn by CPU utilization, GPU memory occupancy, and task queue length; Assign the target computing subtask to the computing node with the smallest load weight.
6. A large power grid security verification calculation method applicable to multiple time scales according to claim 5, characterized in that: Determine the idle rate, load rate, and queue length of the computing node to determine the granularity adjustment factor , the formula is as follows: ; in, is the load rate of the current node, is the load rate threshold, is the idle rate of the current node, is the idle rate threshold, is the normalized value of the task queue length of the current node, is the queue length threshold, , as well as are weight coefficients respectively, among which, .
7. The method for calculating the safety verification of a large power grid applicable to multiple time scales according to claim 1 is characterized in that: The parallel algorithm of CPU+GPU hybrid architecture is used to process the computing subtasks of multiple computing nodes, including the following steps: Dynamically assign tasks to CPU or GPU computing units based on the computing type and hardware adaptability of the computing subtask; OpenMP multi-thread management is used on the CPU side to perform collaborative operations with multiple GPUs; The batch power flow parallel solution method is used on the GPU side to achieve multi-section synchronous calculation; The computing process data of each computing subtask is obtained and structured and then stored in a memory database or a distributed database.
8. A large power grid security verification calculation method applicable to multiple time scales according to claim 7, characterized in that: The method of using OpenMP multi-thread management on the CPU side to perform collaborative operations with multiple GPUs includes the following steps: Use OpenMP to create multiple threads, each thread is responsible for managing the task scheduling of a GPU device; automatically adapt the computing subtasks according to the load balancing mechanism of the GPU device; Each thread starts the GPU kernel function through the CUDA API and passes the parameters of the computing subtask. Each thread monitors the GPU computing progress in real time and records the number of completed sections, the remaining computing amount and the estimated completion time.
9. A large power grid security verification calculation method applicable to multiple time scales according to claim 7, characterized in that: The method of using a batch power flow parallel solution method on the GPU side to realize multi-section synchronous calculation includes the following steps: The admittance matrix of the multi-period power grid is stored as a three-dimensional tensor according to the section number. The admittance matrix of each section is stored in a sparse format, and the non-zero elements are arranged in row priority order. The power grid parameters are organized into a two-dimensional tensor according to the section number. Align the 3D tensor and / or 2D tensor according to the number of bytes to store them to fit the access granularity of the GPU. Use multiple CUDA thread blocks to implement asynchronous execution of multi-section calculations, where each section is assigned a CUDA thread block, and the number of threads in the thread block is adapted to the Warp scheduling granularity of the NVIDIA GPU. Each thread block loads the non-zero elements of the admittance matrix of the current section into the shared memory. Each thread block independently performs Newton-Raphson iterations to calculate the node voltage amplitude and phase angle and writes the iteration results to the result buffer in the global video memory. Determine the residual norm of the current section calculated by each thread block, and mark the section calculation completed if the convergence condition is met.
10. The method for calculating the safety verification of a large power grid applicable to multiple time scales according to claim 1, characterized in that: The step of combining the calculation subtask results of multiple users to generate a final safety verification report includes the following steps: Merge the calculation subtask results of the same user in different time periods in chronological order to obtain a user-level security verification report; or The computing subtask result data of all users is aggregated and analyzed according to the user ID and time period number to generate a full-network security verification report.
Citation Information
Patent Citations
Cluster GPU (graphic processing unit) resource scheduling system and method
CN102541640A
Multi-time scale security check system and method for uniformly scheduling computing resources
CN110196773A
Intelligent computing-oriented method, system and apparatus for scheduling distributed training tasks
WO2024060789A1
Cited By
Satellite task planning computing power dynamic distribution system based on heterogeneous multi-core processor
CN120803752A
Aerospace synthetic aperture radar image processing software load balancing method and system
CN121764694A
A space synthetic aperture radar image processing software load balancing method and system
CN121764694B